Skip to content

Add Brazilian Portuguese (pt-BR) locale - #52

Closed
Mit0lenda wants to merge 1 commit into
arvids-unavailable:mainfrom
Mit0lenda:add-pt-br-locale
Closed

Add Brazilian Portuguese (pt-BR) locale#52
Mit0lenda wants to merge 1 commit into
arvids-unavailable:mainfrom
Mit0lenda:add-pt-br-locale

Conversation

@Mit0lenda

Copy link
Copy Markdown

Hey! 👋 Been using openGym daily and really enjoying it — thanks for building and open-sourcing it.

Noticed the existing pt locale is European Portuguese, which reads a bit off for us here in Brazil (different vocabulary, different verb forms). Instead of touching what's already there for Portugal users, I added a separate pt-BR option alongside it — so nothing changes for anyone currently using pt.

What's in this PR:

  • frontend/src/locales/pt-BR.js — covers every string the app currently uses (checked it against every t('...') call site, so nothing should fall back to English)
  • frontend/src/lib/i18n.js — registered pt-BR in LANGS and DATE_LOCALES (so dates format the Brazilian way too)

No instruction pack for pt-BR (same as pt/de today), so exercise instructions just fall back to English like they already do for those.

Ran the existing test suite and a full build locally, both green. Happy to tweak wording if anything reads off to you — Portuguese has enough regional variety that I'm sure there's room for bikeshedding 🙂

The existing 'pt' locale is European Portuguese (Portugal) — informal
"tu" verb forms, ecrã/telemóvel/ficheiro vocabulary, etc. This adds a
separate 'pt-BR' option rather than changing 'pt', so Portugal users
keep exactly what they have today.

pt-BR.js covers all 442 strings currently used by the app (verified
against every literal t('...') call site), converted to natural
Brazilian usage: "você"/imperative instead of "tu", vocabulary
(tela/celular/salvar/registrar/excluir/arquivo/compartilhar), and the
'pt' date-locale pattern extended with a pt-BR entry in DATE_LOCALES
so dates format the Brazilian way (dateLocale() in i18n.js).

No instruction pack exists for pt-BR (same situation as the existing
'pt' and 'de' entries), so exercise instructions fall back to English,
consistent with how those two already behave.
Copilot AI lite review requested due to automatic review settings August 28, 2026 03:05

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@Mit0lenda

Copy link
Copy Markdown
Author

Ah, just found #13/#28 already cover this (and more thoroughly — the inheritance+fingerprint approach is nicer than what I did here). Closing in favor of that. Thanks for the pointer!

@Mit0lenda Mit0lenda closed this Aug 28, 2026
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