Skip to content

feat: add Brazilian Portuguese (pt-BR) translation#581

Open
nxc-7 wants to merge 1 commit into
siddharthvaddem:mainfrom
nxc-7:feat/pt-BR-translation
Open

feat: add Brazilian Portuguese (pt-BR) translation#581
nxc-7 wants to merge 1 commit into
siddharthvaddem:mainfrom
nxc-7:feat/pt-BR-translation

Conversation

@nxc-7
Copy link
Copy Markdown

@nxc-7 nxc-7 commented May 12, 2026

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

  • New Feature

Testing

  1. Run the app (npm run dev)
  2. Open the language menu in the HUD bar
  3. Select Português Brasileiro
  4. Verify all UI strings are correctly translated

Checklist

  • I have performed a self-review of my code.
  • I have linked related issue(s) and updated the changelog if applicable.

Thank you for contributing!

Summary by CodeRabbit

  • New Features

    • Brazilian Portuguese language support is now available throughout the application, including settings, dialogs, editor features, timeline controls, and keyboard shortcuts.
  • Improvements

    • Enhanced interactive handling for UI prompts and controls to improve user responsiveness.

Review Change Stack

@nxc-7 nxc-7 requested a review from siddharthvaddem as a code owner May 12, 2026 23:10
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 12, 2026

📝 Walkthrough

Walkthrough

This 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.

Changes

Brazilian Portuguese Localization Support

Layer / File(s) Summary
Locale registration and foundational strings
src/i18n/config.ts, src/i18n/locales/pt-BR/common.json
Register pt-BR as a supported locale and provide foundational translations for common UI actions, playback controls, and locale metadata.
System language prompt HUD interaction and launch translations
src/components/launch/LaunchWindow.tsx, src/i18n/locales/pt-BR/launch.json
Enable HUD mouse-interaction capturing on the system language prompt wrapper element, and add Portuguese translations for launch-feature UI including tooltips, audio/webcam labels, cursor options, source selection, and language prompts.
Feature-specific translation resources
src/i18n/locales/pt-BR/dialogs.json, src/i18n/locales/pt-BR/editor.json, src/i18n/locales/pt-BR/settings.json, src/i18n/locales/pt-BR/shortcuts.json, src/i18n/locales/pt-BR/timeline.json
Add Portuguese translations for dialogs (export/file operations/unsaved-changes), editor (recording/export/project states/errors), settings (zoom/effects/export/font/language UI), shortcuts (keyboard commands and fixed navigation actions), and timeline (edit operations/controls/hints).

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Possibly related PRs

  • siddharthvaddem/openscreen#407: Registers Korean locale by updating SUPPORTED_LOCALES and adding corresponding kr-KO translation files, same pattern as this PR's pt-BR addition.
  • siddharthvaddem/openscreen#362: Refactors the system-language prompt UX in LaunchWindow.tsx, directly related to the HUD interaction fix in this PR that affects the same prompt component.
  • siddharthvaddem/openscreen#380: Adds French locale support by updating SUPPORTED_LOCALES and providing comprehensive locale JSON resources, mirrors the architectural pattern of this pt-BR addition.

Suggested reviewers

  • siddharthvaddem

Poem

🌍 pt-BR joins the team, translations in tow,
📝 483 lines, from config to flow,
🎯 HUD gets interactive, prompts now aware,
Locales aligned, the feature's all there! ✨

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed Title clearly and concisely describes the main change: adding Brazilian Portuguese translation support to the application.
Description check ✅ Passed Description covers key sections (purpose, motivation, type, testing steps) but is missing screenshots/videos and related issue links despite checklist claim.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ 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.

  • Generate code and open pull requests
  • Plan features and break down work
  • Investigate incidents and troubleshoot customer tickets together
  • Automate recurring tasks and respond to alerts with triggers
  • Summarize progress and report instantly

Built for teams:

  • Shared memory across your entire org—no repeating context
  • Per-thread sandboxes to safely plan and execute work
  • Governance built-in—scoped access, auditability, and budget controls

One agent for your entire SDLC. Right inside Slack.

👉 Get started


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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 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".

Comment thread src/i18n/config.ts
"ar",
"ru",
"vi",
"pt-BR",
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge 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 👍 / 👎.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
src/i18n/locales/pt-BR/common.json (1)

10-10: 💤 Low value

nit: 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

📥 Commits

Reviewing files that changed from the base of the PR and between b0293e7 and c13d3c7.

📒 Files selected for processing (9)
  • src/components/launch/LaunchWindow.tsx
  • src/i18n/config.ts
  • src/i18n/locales/pt-BR/common.json
  • src/i18n/locales/pt-BR/dialogs.json
  • src/i18n/locales/pt-BR/editor.json
  • src/i18n/locales/pt-BR/launch.json
  • src/i18n/locales/pt-BR/settings.json
  • src/i18n/locales/pt-BR/shortcuts.json
  • src/i18n/locales/pt-BR/timeline.json

@nxc-7 nxc-7 closed this May 13, 2026
@nxc-7 nxc-7 deleted the feat/pt-BR-translation branch May 13, 2026 21:42
@nxc-7 nxc-7 restored the feat/pt-BR-translation branch May 13, 2026 21:51
@nxc-7 nxc-7 reopened this May 13, 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.

1 participant