feat: add Brazilian Portuguese locale#1653
Open
Alcimerio wants to merge 5 commits into
Open
Conversation
|
| Filename | Overview |
|---|---|
| packages/app/src/i18n/resources/pt-BR.ts | New complete pt-BR translation resource with full key parity to English; all interpolation placeholders preserved. |
| packages/app/src/i18n/locales.ts | Adds pt-BR to SupportedLocale, LANGUAGE_OPTIONS, LANGUAGE_NATIVE_NAMES, and LANGUAGE_NAMES_BY_LOCALE; resolveSupportedLocale explicitly maps only "pt" and "pt-br" to pt-BR, leaving pt-PT/pt-AO as English fallbacks. |
| packages/app/src/i18n/locales.test.ts | Good test coverage: explicit assertions for pt-BR explicit selection, system locale mapping (pt and pt-BR), and negative cases (pt-PT and pt-AO return "en"). |
| packages/app/src/i18n/resources.test.ts | ptBR added to key-parity, fallback-ratio (zhCN also now included closing the prior gap), and interpolation-placeholder guards; model count label pinned. |
| packages/app/src/i18n/i18next.ts | ptBR resource registered under "pt-BR" key; straightforward and correct. |
| docs/i18n.md | pt-BR added to locale list; parity-test description updated; Batch 5A progress note added. |
| packages/app/src/screens/settings-screen.tsx | No logic changes; pt-BR flows through the LANGUAGE_OPTIONS import automatically. |
Reviews (2): Last reviewed commit: "Test zh-CN translation fallback coverage" | Re-trigger Greptile
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.
Linked issue
Closes #1639
Type of change
What does this PR do
Adds Brazilian Portuguese (
pt-BR) as a supported client UI locale. System localespt-BRand bareptnow resolve to Brazilian Portuguese, while non-Brazilian Portuguese regional locales such aspt-PTandpt-AOcontinue to fall back to English until dedicated resources exist.How did you verify it
Manual web test:
Português brasileiro - Brazilian Portuguese.Not verified:
npm run dev:desktop, but Electron would not launch in my local checkout. Likely skill issue/local setup on my side.Checklist
npm run typecheckpassesnpm run lintpassesnpm run formatran (Biome)