Repository navigation
feat(i18n): add complete pt-BR (Portuguese Brazil) translation catalog - #7974
eusoucarlosmedeiros wants to merge 1 commit into
Conversation
Add full Portuguese (Brazil) translation support across the app: - New pt.json catalog with 10349 keys fully translated - Register pt locale in i18n infrastructure and language picker - Add translation policy (BRAND_MISTRANSLATIONS, phrase/value/search-keyword overrides) - Fix hardcoded strings: rate-limited Claude message and DevTools toast now use translate() - Sync en.json and existing locale files via catalog sync Includes all CONTRIBUTING.md verification: lint, typecheck, tests, build.
📝 WalkthroughWalkthroughPortuguese is added as a supported UI language and locale, including shared language constants, normalization, locale resolution, language selection, and lazy loading. Catalog tooling gains Portuguese translations, phrase fixes, value overrides, search keywords, brand corrections, and menu-label repairs. Renderer locale files add Portuguese language labels and shared Claude and DevTools strings. DevTools toast descriptions and Claude usage errors now use localized translation keys. 🚥 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 |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
config/scripts/locale-translation-policy.mjs (1)
627-641: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valueNice consolidation of the zh/ko menu-label fixes into a generic locale-keyed lookup.
Minor nit:
MENU_LABEL_FIXESis declared inline insiderepairCatalog, so it's reconstructed on every call, unlikeBRAND_MISTRANSLATIONS/NATIVE_PICKER_LABELSwhich live at module scope. Since this runs in a one-shot build script, the perf cost is negligible — purely a consistency/readability nit if you want to hoist it alongside the other locale tables.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: b324157f-c9f0-4bb4-9657-13a1e08f2960
📒 Files selected for processing (21)
config/scripts/bootstrap-locale-catalog.mjsconfig/scripts/locale-key-overrides.mjsconfig/scripts/locale-phrase-fixes.mjsconfig/scripts/locale-pt-phrase-fixes.mjsconfig/scripts/locale-pt-value-overrides.mjsconfig/scripts/locale-search-keyword-overrides.mjsconfig/scripts/locale-translation-policy.mjsconfig/scripts/locale-value-overrides.mjssrc/main/i18n/main-i18n.tssrc/renderer/src/components/settings/DevToolsPane.tsxsrc/renderer/src/components/status-bar/usage-error-copy.tssrc/renderer/src/i18n/i18n.tssrc/renderer/src/i18n/locales/en.jsonsrc/renderer/src/i18n/locales/es.jsonsrc/renderer/src/i18n/locales/ja.jsonsrc/renderer/src/i18n/locales/ko.jsonsrc/renderer/src/i18n/locales/pt.jsonsrc/renderer/src/i18n/locales/zh.jsonsrc/renderer/src/i18n/supported-languages.tssrc/shared/ui-language.tssrc/shared/ui-locale.ts
| return translate( | ||
| 'auto.components.status.bar.tooltip.claudeRateLimited', | ||
| 'Claude usage is rate limited right now.' | ||
| ) |
There was a problem hiding this comment.
📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win
Use a 10-char hash key instead of claudeRateLimited.
Every other translation key in getProviderUsageErrorMessage uses a 10-character hex hash (e.g., 2c35eca8d4, 3d3c9c0c1f, a7517cccb6). The new key claudeRateLimited breaks this convention with a descriptive name. As per coding guidelines, settings/localizable strings should use hash-based locale keys with translate('auto.components.<Dir>.<ComponentFile>.<10-char-hash>', 'Default English text').
♻️ Suggested fix: use a 10-char hash key
case 'missing-credentials':
case 'rate-limited':
return translate(
- 'auto.components.status.bar.tooltip.claudeRateLimited',
+ 'auto.components.status.bar.tooltip.<10-char-hash>',
'Claude usage is rate limited right now.'
)Generate the hash the same way other keys in this file were produced (e.g., via pnpm bootstrap:locale-catalog or the project's key-generation tooling), then update the locale catalogs accordingly.
Source: Learnings
|
We'd love to add pt-BR support! Doing a refactoring of our i18n implementation now so give us a few days to land this PR |
|
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. |
|
Thank you @eusoucarlosmedeiros 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
Add full Portuguese (Brazil) translation support across the Orca desktop app. All user-facing strings now pass through i18n so Portuguese displays correctly.
What's included
Verification
Notes
Cross-platform, SSH, and multi-provider safe - locale files are completely agnostic to these concerns.
ELI5
Orca gains a full Brazilian Portuguese translation catalog and wires it into language selection. Portuguese-speaking users can run the desktop UI in pt-BR with complete string coverage.