feat: add Brazilian Portuguese (pt-BR) translation#581
Conversation
📝 WalkthroughWalkthroughThis PR adds complete Brazilian Portuguese (pt-BR) localization to the application. The change registers the new locale in config, provides translation files covering all UI domains, and fixes HUD interaction handling on the system language prompt component. Total additions span ~544 lines of translation resources and a one-line UI wiring fix. ChangesBrazilian Portuguese Localization Support
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Tip 💬 Introducing Slack Agent: The best way for teams to turn conversations into code.Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.
Built for teams:
One agent for your entire SDLC. Right inside Slack. 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.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c13d3c71bc
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| "ar", | ||
| "ru", | ||
| "vi", | ||
| "pt-BR", |
There was a problem hiding this comment.
Register Portuguese in the Electron main locale list
When users select the newly exposed pt-BR locale, the renderer saves it and calls window.electronAPI.setLocale(newLocale), but the main-process i18n registry still only imports/accepts locales through vi in electron/i18n.ts (setMainLocale silently ignores anything else). In that scenario the HUD/editor text switches to Portuguese while the application menu and tray strings remain in the previous/default language, so this locale needs to be added to the main-process Locale, messages, and allow-list as well.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
🧹 Nitpick comments (1)
src/i18n/locales/pt-BR/common.json (1)
10-10: 💤 Low valuenit: consider translating these borrowings for consistency
lines 10, 41-42 keep the english terms "Upload", "Play", "Pause" – while these are super common in tech contexts, the rest of the file translates everything. could use:
- "Upload" → "Enviar" or "Fazer Upload"
- "Play" → "Reproduzir"
- "Pause" → "Pausar"
lowkey your call though, borrowed english terms are pretty standard in pt-br ui
Also applies to: 41-42
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@src/i18n/locales/pt-BR/common.json` at line 10, The JSON values for the keys "upload", "play", and "pause" are left in English; update their values to Portuguese for consistency (e.g., "upload" → "Enviar" or "Fazer Upload", "play" → "Reproduzir", "pause" → "Pausar") and ensure the rest of the pt-BR locale file uses the same localized terms and spelling conventions across other keys that reference these actions.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@src/i18n/locales/pt-BR/common.json`:
- Line 10: The JSON values for the keys "upload", "play", and "pause" are left
in English; update their values to Portuguese for consistency (e.g., "upload" →
"Enviar" or "Fazer Upload", "play" → "Reproduzir", "pause" → "Pausar") and
ensure the rest of the pt-BR locale file uses the same localized terms and
spelling conventions across other keys that reference these actions.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 996e162c-b187-4f50-afae-3c5340f6e02c
📒 Files selected for processing (9)
src/components/launch/LaunchWindow.tsxsrc/i18n/config.tssrc/i18n/locales/pt-BR/common.jsonsrc/i18n/locales/pt-BR/dialogs.jsonsrc/i18n/locales/pt-BR/editor.jsonsrc/i18n/locales/pt-BR/launch.jsonsrc/i18n/locales/pt-BR/settings.jsonsrc/i18n/locales/pt-BR/shortcuts.jsonsrc/i18n/locales/pt-BR/timeline.json
Pull Request
Description
Add Brazilian Portuguese (pt-BR) as a supported locale.
Motivation
Extends language support to Brazilian Portuguese speakers, making the app accessible to a larger audience.
Type of Change
Testing
npm run dev)Checklist
Thank you for contributing!
Summary by CodeRabbit
New Features
Improvements