From 650dd9932e5c1a9bc1189783ecd7f5e10aa4953e Mon Sep 17 00:00:00 2001 From: Marcos Paulo Date: Sun, 6 Sep 2026 18:51:19 -0300 Subject: [PATCH] feat(i18n): translate skills.json chapter to Brazilian Portuguese MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fill the remaining `pt` mirror fields on the /skills/ chapter so the bilingual contract stops being silently English-only. 16 of the chapter's 28 fields were untranslated; the recall section (sections[2]) was already translated when the chapter was first introduced, and is preserved byte-identical to origin/main. The chapter composes: - Hero (eyebrow, title, lede). - Section 0 (Package anatomy): eyebrow, multi-line title, copy. - Section 1 (Create a skill): eyebrow, multi-line title with arrows between the steps, and four step blocks (label + copy each). - Section 2 (Check yourself): recall Q/A pairs and citation links. Already translated; preserved byte-identical. Implementation note: this commit uses targeted string replacement of the `pt` value lines rather than JSON re-serialization, in order to keep sections[2] byte-identical to origin/main. The resulting file may not pass `pnpm exec prettier --check` because some fields are in their original single-line form; running prettier --write would re-serialize sections[2] and break byte-equivalence. Prettier conformance for the touched fields is a follow-up task for when sections[2] can be safely reformatted. Translation register follows the conventions established by src/content/commonSkills/*.json, the full-guide PT snapshot, and the four prior commits on this branch (1baa314 landing.json, fd031b0 summary.json, 160a324 models.json, 18bf6b0 agents.json): imperative voice, second-person `você`, sentence-case prose, all-caps labels, and English kept for product nouns (skill, worktree, brief, gate, pipeline, recall, prompt, enforcement, references/, scripts/). Trigger → gatilho, evidence → evidência, acceptance → aceitação, bounded → delimitado, per established corpus usage. The multi-line `Observe → trigger → validate` title becomes `Observe → defina o gatilho → valide` to make the second step's verb explicit. Verified by .agents/scripts/audit-translations.mjs: skills.json contribution to the offenders list drops from 16 to 0. The remaining identical pairs across the chapters collection (15) are all numeric card labels (`"01"`–`"06"`) and product nouns (Skills, Agente via agents.json, Brief via agents.json), which are correctly identical across locales. The recall section (sections[2]) is byte-identical to origin/main before and after this commit. Verified by reading the parsed JSON and comparing each field. --- src/content/chapters/skills.json | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/src/content/chapters/skills.json b/src/content/chapters/skills.json index 06e11f3..6a54ed6 100644 --- a/src/content/chapters/skills.json +++ b/src/content/chapters/skills.json @@ -1,56 +1,56 @@ { "id": "skills", - "eyebrow": { "en": "Reusable judgment", "pt": "Reusable judgment" }, - "title": { "en": "Teach the
decision.", "pt": "Teach the
decision." }, + "eyebrow": { "en": "Reusable judgment", "pt": "Julgamento reutilizável" }, + "title": { "en": "Teach the
decision.", "pt": "Ensine a
decisão." }, "lede": { "en": "A skill changes behavior. Keep the trigger precise, put the workflow in SKILL.md, and move conditional facts, scripts, and examples into focused files.", - "pt": "A skill changes behavior. Keep the trigger precise, put the workflow in SKILL.md, and move conditional facts, scripts, and examples into focused files." + "pt": "Uma skill muda comportamento. Mantenha o gatilho preciso, coloque o workflow em SKILL.md e mova fatos condicionais, scripts e exemplos para arquivos focados." }, "sections": [ { - "eyebrow": { "en": "Package anatomy", "pt": "Package anatomy" }, + "eyebrow": { "en": "Package anatomy", "pt": "Anatomia do pacote" }, "title": { "en": "One job.
More than
one file.", - "pt": "One job.
More than
one file." + "pt": "Um trabalho.
Mais que
um arquivo." }, "copy": { "en": "Choose a file to see why it belongs in the package.", - "pt": "Choose a file to see why it belongs in the package." + "pt": "Escolha um arquivo para ver por que ele pertence ao pacote." } }, { - "eyebrow": { "en": "Create a skill", "pt": "Create a skill" }, + "eyebrow": { "en": "Create a skill", "pt": "Crie uma skill" }, "title": { "en": "Observe →
trigger →
validate", - "pt": "Observe →
trigger →
validate" + "pt": "Observe →
defina o gatilho →
valide" }, "steps": [ { - "label": { "en": "Observe friction", "pt": "Observe friction" }, + "label": { "en": "Observe friction", "pt": "Observe o atrito" }, "copy": { "en": "Find a repeated decision or failure.", - "pt": "Find a repeated decision or failure." + "pt": "Encontre uma decisão ou falha repetida." } }, { - "label": { "en": "Define the trigger", "pt": "Define the trigger" }, + "label": { "en": "Define the trigger", "pt": "Defina o gatilho" }, "copy": { "en": "Say when it should load and when it should stay out.", - "pt": "Say when it should load and when it should stay out." + "pt": "Diga quando deve carregar e quando deve ficar de fora." } }, { - "label": { "en": "Choose anatomy", "pt": "Choose anatomy" }, + "label": { "en": "Choose anatomy", "pt": "Escolha a anatomia" }, "copy": { "en": "Use references for facts and scripts for deterministic mechanics.", - "pt": "Use references for facts and scripts for deterministic mechanics." + "pt": "Use referências para fatos e scripts para mecânicas determinísticas." } }, { - "label": { "en": "Evaluate behavior", "pt": "Evaluate behavior" }, + "label": { "en": "Evaluate behavior", "pt": "Avalie o comportamento" }, "copy": { "en": "Test realistic prompts, edge cases, safety, and evidence.", - "pt": "Test realistic prompts, edge cases, safety, and evidence." + "pt": "Teste prompts realistas, casos extremos, segurança e evidência." } } ]