Skip to content

feat(i18n): add Brazilian Portuguese translations for all exercises - #64

Open
dverzolla wants to merge 2 commits into
hasaneyldrm:mainfrom
dverzolla:main
Open

feat(i18n): add Brazilian Portuguese translations for all exercises#64
dverzolla wants to merge 2 commits into
hasaneyldrm:mainfrom
dverzolla:main

Conversation

@dverzolla

@dverzolla dverzolla commented Jul 17, 2026

Copy link
Copy Markdown

Description

This pull request adds Brazilian Portuguese (pt) translations for all exercises in the dataset, allowing Portuguese-speaking users to view exercise instructions and steps in their native language.

The translations were generated using DeepL.com API.

Changes

  • Data: Added pt translations for both instructions and instruction_steps of all exercises in data/exercises.json.
  • Schema: Updated data/exercises.schema.json to support the new pt language code properties.
  • Frontend: Updated index.html to add pt ('Português') to the list of available languages (LANG_LABELS and langs) and updated the static EXERCISES list with the translated data.

Verification

  • Verified that all exercises contain valid JSON formatting.
  • Verified that the language switcher in the web UI works correctly and loads the Portuguese translations without issues. ⁠

- Add Brazilian Portuguese (pt) translations for instructions and instruction_steps across all exercises in data/exercises.json.
- Update the schema in data/exercises.schema.json to support the new pt language code.
- Update index.html to add pt ('Português') to LANG_LABELS and langs, and include the translated data in the static EXERCISES array.
@tutods

tutods commented Jul 19, 2026

Copy link
Copy Markdown

I have open a pull request to add PT-PT (portugal portuguese), but ideally is to have two keys:

  • one for PT-PT
  • other for PT-BR

if you have suggestions, I'm ok to do it!

@hfabio

hfabio commented Jul 22, 2026

Copy link
Copy Markdown

I have open a pull request to add PT-PT (portugal portuguese), but ideally is to have two keys:

  • one for PT-PT
  • other for PT-BR

if you have suggestions, I'm ok to do it!

we could definitely have 2 distinct language keys

@dverzolla

Copy link
Copy Markdown
Author

I have open a pull request to add PT-PT (portugal portuguese), but ideally is to have two keys:

* one for PT-PT

* other for PT-BR

if you have suggestions, I'm ok to do it!

Would you mind do work on merging both PRs?

@tutods

tutods commented Jul 22, 2026

Copy link
Copy Markdown

I have open a pull request to add PT-PT (portugal portuguese), but ideally is to have two keys:

* one for PT-PT

* other for PT-BR

if you have suggestions, I'm ok to do it!

Would you mind do work on merging both PRs?

I will do it! I will add your translations on my PR with ptBR key, do you agree?

@dverzolla

Copy link
Copy Markdown
Author

I have open a pull request to add PT-PT (portugal portuguese), but ideally is to have two keys:

* one for PT-PT

* other for PT-BR

if you have suggestions, I'm ok to do it!

Would you mind do work on merging both PRs?

I will do it! I will add your translations on my PR with ptBR key, do you agree?

sure!

tutods added a commit to tutods/exercises-dataset that referenced this pull request Jul 22, 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
@tutods

tutods commented Jul 22, 2026

Copy link
Copy Markdown

@hfabio @dverzolla — done! I've merged both translations into #66 using two separate keys:

  • pt — European Portuguese (PT-PT)
  • ptBr — Brazilian Portuguese (PT-BR), from @dverzolla's work in this PR

The ptBr translations cover all 1,324 exercises across both instructions and instruction_steps, the schema is updated, and the language switcher in the web UI now lists both variants.

@dverzolla shout if you'd rather be credited a different way. If this looks good to everyone, we can close #64 in favor of #66.

@hfabio

hfabio commented Jul 22, 2026

Copy link
Copy Markdown

@hfabio @dverzolla — done! I've merged both translations into #66 using two separate keys:

  • pt — European Portuguese (PT-PT)
  • ptBr — Brazilian Portuguese (PT-BR), from @dverzolla's work in this PR

The ptBr translations cover all 1,324 exercises across both instructions and instruction_steps, the schema is updated, and the language switcher in the web UI now lists both variants.

@dverzolla shout if you'd rather be credited a different way. If this looks good to everyone, we can close #64 in favor of #66.

Amazing, man! thank you!

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.

3 participants