Skip to content

feat(i18n): add Portuguese instructions (European ptPT + Brazilian ptBR) - #66

Open
tutods wants to merge 6 commits into
hasaneyldrm:mainfrom
tutods:feat/add-portuguese-instructions
Open

feat(i18n): add Portuguese instructions (European ptPT + Brazilian ptBR)#66
tutods wants to merge 6 commits into
hasaneyldrm:mainfrom
tutods:feat/add-portuguese-instructions

Conversation

@tutods

@tutods tutods commented Jul 19, 2026

Copy link
Copy Markdown

Adds two new languages to all 1,324 exercises — European Portuguese (ptPT) and Brazilian Portuguese (ptBR) — under instructions and instruction_steps, bringing the dataset from 10 to 12 languages. Includes schema, README, viewer and setup updates.

The ptBR translations are contributed by @dverzolla (upstream PR #64), merged here under the ptBR key.

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.ptPT is the join of instruction_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) and ptBR (Brazilian) — rather than a bare pt, so consumers can tell the two apart at the key level. Applied consistently across data/exercises.json, data/exercises.schema.json, index.html and setup.html.

Verified

  • 1,324 records validate against the updated schema (Draft 2020-12); a record missing ptPT or ptBR is now rejected.
  • ptPT and ptBR step count == en step count in every record.
  • instructions.ptPT == ' '.join(instruction_steps.ptPT) across all 1,324 records — zero drift (tied with en/es/zh/fr as the most internally consistent).
  • Every pre-existing field is byte-identical; both keys are purely additive.
  • No empty strings, none left in English, no PT-BR forms across the 7,710 ptPT steps.
  • index.html embed stays in sync with data/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.

tutods added 3 commits July 19, 2026 08:33
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.
@tutods tutods changed the title Add Portuguese (pt) exercise instructions feat(i18n) Add European Portuguese (pt) exercise instructions Jul 19, 2026
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
Comment thread README.md Outdated
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).
@tutods tutods changed the title feat(i18n) Add European Portuguese (pt) exercise instructions feat(i18n): add Portuguese instructions (European pt + Brazilian ptBr) Jul 22, 2026
Comment thread README.md Outdated
Comment thread README.md Outdated
Comment thread README.md Outdated
Comment thread README.md Outdated
Comment thread README.md Outdated
Comment thread README.md Outdated
Comment thread README.md Outdated
Comment thread README.md Outdated
Comment thread README.md Outdated
Comment thread setup.html Outdated
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.
@tutods tutods changed the title feat(i18n): add Portuguese instructions (European pt + Brazilian ptBr) feat(i18n): add Portuguese instructions (European ptPT + Brazilian ptBR) Jul 22, 2026
@tutods
tutods requested a review from hfabio July 22, 2026 19:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants