Repository navigation
feat(i18n): add Brazilian Portuguese (pt) locale - #10934
joaoguilhermesimon-collab wants to merge 3 commits into
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (20)
🚧 Files skipped from review as they are similar to previous changes (10)
📝 WalkthroughWalkthroughPortuguese ( 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Este PR adiciona apenas registros de locale (duas arrow functions de uma linha em mapas de loader existentes) e um catálogo JSON. Não há funções que justifiquem docstrings, e as entradas de locale existentes também não têm. |
|
Thank you for putting this together — and I am sorry it sat unanswered for so long, which is on us, not you. We are not taking on new UI locales right now. Orca ships en/es/ja/ko/zh, and each one carries ongoing cost beyond the initial catalog: every new English string has to be re-translated, the build-time repair policy needs per-locale glossary and override rules, and mistranslations reach users in surfaces nobody on the team can read. We are currently working through a backlog of correctness bugs in the five we already ship, and adding a sixth before that is under control would not be fair to the people using it. That is a decision about our capacity, not about the quality of your work. Closing so the queue reflects reality rather than leaving it open indefinitely — if that changes, this is easy to reopen and we will come back to the contributors who offered first. Thanks again for the time you put in. |
|
I'm sorry — I closed this, and that was the wrong call. Reopening it. The reasoning I gave (that we aren't taking on new built-in locales right now) is still true, but closing your PR was not the right way to act on it. You did the work, it sat for months without a reply, and then it got closed with an explanation of our constraints. That's a bad trade for you, and I apologize. Here's what's actually going on. We do want these locales. What we can't currently take on is maintaining them in-tree, where every new English string becomes translation debt across every catalog and a mistranslation ships to users in a surface nobody on the team can read. So the direction we're working toward is the one where that maintenance sits with the people who actually speak the language: plugin language packs. Most of that mechanism is already in the repo today:
The test fixture for that manifest contract uses What's not there yet is the part that would make this pleasant for you: there's no authoring guide, no scaffolding to generate a starter catalog from I'd rather leave this open and come back to you when that lands than close it and have you find out from a changelog. If you'd prefer to close it yourself in the meantime, that's entirely your call — but it should be yours, not mine. Thanks for the work, and sorry again for how I handled it. |
Enables users to select Portuguese as their interface language. Includes locale configuration, translation catalog management, language picker integration, and comprehensive test coverage.
d489915 to
9b483a2
Compare
|
Note GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer. |
Switching approach: Portuguese will ship as the official language plugin first, not as a first-party core locale. Dismissing approval while we redirect this work.
Direction change: plugin-first for Brazilian PortugueseThanks for this work — the catalog and wiring quality is solid. After thinking through first-party vs plugin, we're going to start with the official language plugin and promote to a first-party core locale later once the pack is mature and the maintenance path is clear. Please continue this in the plugin repo instead of core:
Plan
I'll dismiss my approval so this PR isn't treated as merge-ready for core. Happy to help review PRs on the plugin repo as you port the strings over. Sorry for the flip-flop — plugin-first keeps core lean while still giving Brazilian Portuguese a real official home. |
|
Thank you @joaoguilhermesimon-collab for contributing to Brazilian Portuguese support! Brazilian Portuguese is now checked into I verified that you are credited as a commit co-author in the merged commit. Closing this PR as superseded by the merged built-in support. Thank you for your work and patience! |
Summary
Adds Brazilian Portuguese (
pt) as a built-in UI locale, alongsideen,zh,ko,ja, andes. Users can select Português (Brasil) in Settings → Appearance → Language, and a system locale ofpt-BR/pt-PTnow resolves to it automatically.The repo already ships a
README.pt.md, so there is clear interest from Portuguese speakers — this closes the gap for the app itself.Catalog scaffolded with
config/scripts/bootstrap-locale-catalog.mjs --locale pt, giving exact key parity with the other locales (11,445 keys). 1,644 strings are translated, covering the day-to-day surfaces: app shell and window chrome, main menu and tray, every Settings pane title and description, workspace/worktree/branch/repo flows, the new-workspace composer including SSH host setup, the GitHub/GitLab/Jira/Linear item dialogs, PullRequestPage, TaskPage, Terminal, QuickOpen, and GitHub Projects. Remaining keys fall back to English viafallbackLng.The four existing non-English catalogs each gain exactly one line: the
settings.appearance.language.portugueselabel. Its value isPortuguês (Brasil)in all of them, since language names are endonyms and are not translated — matching how中文(简体),한국어,日本語, andEspañolalready appear in every catalog. This keepsverify-localization-catalogparity green.Deliberately left in English: agent names (Claude, Codex, Cursor…), Git vocabulary Brazilian developers use untranslated day to day (
worktree,merge,diff,branch,PR,MR), and internal discriminator strings the UI switches on (default,destructive,sheet,page).Screenshots
No visual change — no new or changed UI behavior. The only surface difference is one additional entry in the existing Settings → Appearance → Language dropdown.
Testing
pnpm lintpnpm typecheckpnpm testpnpm buildBeing explicit rather than ticking boxes I did not fully run:
oxlintpasses with 0 errors on the changed files. Thepnpm lintwrapper did not complete on my machine for an unrelated reason (I run pnpm throughcorepack, so the nestedpnpm run …calls in that script have nopnpmon PATH). I ran its localization steps directly instead:node config/scripts/verify-localization-catalog.mjs— passes:Verified locale parity for pt.json (11445 keys).node config/scripts/audit-localization-coverage.mjs --check— reports 6 pre-existing unlocalized strings, allGhosttykeywords interminal-advanced-platform-search.tsandterminal-pane-appearance-search.ts. Neither file is touched by this PR.tsc --noEmitpasses forconfig/tsconfig.node.jsonandconfig/tsconfig.tc.web.json.node-gypneeds Visual Studio Build Tools, which I do not have installed), sopnpm buildand anything requiring the Electron runtime cannot execute here.verify-localization-catalog(key parity) and by the exhaustiveRecordtypes onNON_DEFAULT_LOCALE_LOADERS,LAZY_LOCALE_LOADERS, andUI_LANGUAGE_CHOICE_FALLBACKS, which turn a missing registration into a build error. That is not theoretical: it is exactly how the main-process loader insrc/main/i18n/main-i18n.tswas caught during development, after only the renderer loader had been registered.AI Review Report
Reviewed with Claude (Anthropic). Risks checked and outcomes:
SupportedUiLocaleandBuiltInUiLanguage. It initially missedLAZY_LOCALE_LOADERSin the main process;pnpm typecheckcaught it and it was added.{{value0}}×137,{{value1}}×25,{{value2}}×6,{{path}}×5, plus{{hostName}},{{names}},{{count}}. No malformed or dropped placeholders.default,destructive,sheet,page) were not translated, which would have broken variant logic.core.autocrlf=truecheckout rewrites these files to CRLF. The commit is LF-only, matching the rest of the repo — worth knowing if a Windows contributor sees whole-file diffs.Security Audit
Low risk; this is locale data plus type-level registration.
exec, or process spawning.import()calls, matching the existing catalogs. No dynamic path construction, no user-controlled segments.pt.jsonis data consumed by i18next through the same lazy-loading path ases/ja/ko/zh, so it sits inside the existing trust boundary. Values are plain strings with i18next interpolation only — no HTML and nodangerouslySetInnerHTMLinvolved.Follow-up needed: none.
Notes
Português (Brasil)or justPortuguês? I went with the explicit form since the copy is pt-BR, but it is a one-line change either way.