feat(i18n): add Portuguese instructions (European ptPT + Brazilian ptBR) - #66
Open
tutods wants to merge 6 commits into
Open
feat(i18n): add Portuguese instructions (European ptPT + Brazilian ptBR)#66tutods wants to merge 6 commits into
tutods wants to merge 6 commits into
Conversation
Adds an eleventh language to all 1,324 exercises: `instructions.pt` and `instruction_steps.pt`, plus the schema, README, viewer and setup guide. Register: impersonal 3rd-person without subject pronoun — "Deite-se", "Mantenha", "Repita". PT-PT orthography (abdómen, fletido, fletir). How it was produced ------------------- The 7,710 English step sentences deduplicate to 4,414 unique strings. Those were translated (LLM-assisted, glossary-constrained, then audited), and the per-exercise arrays were rebuilt deterministically by mapping each English step back through that table. `instructions.pt` is the join of `instruction_steps.pt`, so the two can never drift. A fixed glossary pinned the recurring terms — repetições, posição inicial, halter/barra, abdómen, omoplatas, à largura dos ombros — so terminology is consistent across all 1,324 records rather than varying sentence by sentence. Verified -------- - 1,324 records validate against the updated schema; a record missing `pt` is now rejected. - pt step count == en step count in every record. - instructions.pt == ' '.join(instruction_steps.pt) in every record. - Every pre-existing field is byte-identical; `pt` is purely additive. - No empty strings, none left in English, no PT-BR forms across 7,710 steps. - index.html embed stays in sync with data/exercises.json; the language picker renders "Português" and the steps display correctly. Note for review: these are machine translations, reviewed programmatically rather than by a native speaker. Happy to adjust any wording.
Merge PT-BR translations contributed by @dverzolla (upstream PR hasaneyldrm#64) under the ptBr key, keeping pt for European Portuguese. - Add ptBr to instructions and instruction_steps for all 1324 exercises - Add ptBr to data/exercises.schema.json (languageMap + languageStepsMap) - Add ptBr to index.html language switcher and regenerate inline data
hfabio
reviewed
Jul 22, 2026
README said 11 languages and omitted ptBr, but the schema and index.html already ship both pt and ptBr. Bump every language count to 12 and add Brazilian Portuguese to the enumerations and samples. Addresses PR review feedback (badge was 11, actually 12).
hfabio
suggested changes
Jul 22, 2026
Per review feedback, disambiguate the two Portuguese variants with symmetric keys: pt (European) -> ptPT, ptBr (Brazilian) -> ptBR. Renames both keys across all 1,324 records in exercises.json (instructions + instruction_steps), the JSON schema (languageMap + languageStepsMap), index.html (picker + inline data), setup.html and README. Pure key rename — no values, step counts or formatting changed; all 1,324 records re-validate against the updated schema.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds two new languages to all 1,324 exercises — European Portuguese (
ptPT) and Brazilian Portuguese (ptBR) — underinstructionsandinstruction_steps, bringing the dataset from 10 to 12 languages. Includes schema, README, viewer and setup updates.The
ptBRtranslations are contributed by @dverzolla (upstream PR #64), merged here under theptBRkey.European Portuguese (
ptPT)Register: impersonal 3rd-person without subject pronoun — "Deite-se", "Mantenha", "Repita". PT-PT orthography (abdómen, fletido, fletir).
The 7,710 English step sentences deduplicate to 4,414 unique strings. Those were translated (LLM-assisted, glossary-constrained, then audited), and the per-exercise arrays were rebuilt deterministically by mapping each English step back through that table.
instructions.ptPTis the join ofinstruction_steps.ptPT, so the two can never drift.A fixed glossary pinned the recurring terms — repetições, posição inicial, halter/barra, abdómen, omoplatas, à largura dos ombros — so terminology is consistent across all 1,324 records rather than varying sentence by sentence.
Naming
Both variants use explicit keys —
ptPT(European) andptBR(Brazilian) — rather than a barept, so consumers can tell the two apart at the key level. Applied consistently acrossdata/exercises.json,data/exercises.schema.json,index.htmlandsetup.html.Verified
ptPTorptBRis now rejected.ptPTandptBRstep count ==enstep count in every record.instructions.ptPT==' '.join(instruction_steps.ptPT)across all 1,324 records — zero drift (tied withen/es/zh/fras the most internally consistent).ptPTsteps.index.htmlembed stays in sync withdata/exercises.json; the language picker renders "Português (Portugal)" and "Português (Brasil)".Note for review: the European Portuguese (
ptPT) strings are machine translations, reviewed programmatically rather than by a native speaker. Happy to adjust any wording.