Skip to content

feat(i18n): add pt-BR Portuguese (Brazil) locale support#173

Open
itxtoledo wants to merge 6 commits intowebadderall:mainfrom
itxtoledo:feature/pt-br-i18n
Open

feat(i18n): add pt-BR Portuguese (Brazil) locale support#173
itxtoledo wants to merge 6 commits intowebadderall:mainfrom
itxtoledo:feature/pt-br-i18n

Conversation

@itxtoledo
Copy link
Copy Markdown

@itxtoledo itxtoledo commented Apr 3, 2026

  • Add pt-BR to SUPPORTED_LOCALES in config.ts
  • Create 7 translation files (common, launch, editor, timeline, settings, dialogs, shortcuts)
  • Update I18nContext with pt-BR message imports

Pull Request Template

Description

Motivation

Type of Change

  • New Feature
  • Bug Fix
  • Refactor / Code Cleanup
  • Documentation Update
  • Other (please specify)

Related Issue(s)

Testing Guide

Checklist

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

Thank you for contributing!

Summary by CodeRabbit

  • New Features
    • Added Brazilian Portuguese (pt-BR) localization across the app — editor, recording UI, settings, dialogs, timeline, shortcuts, common actions, exports, and error/permission messages.
    • pt-BR is now available as a supported app locale and shown in locale selection labels and relevant UI text.

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 3, 2026

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

Warning

.coderabbit.yaml has a parsing error

The CodeRabbit configuration file in this repository has a parsing error and default settings were used instead. Please fix the error(s) in the configuration file. You can initialize chat with CodeRabbit to get help with the configuration file.

💥 Parsing errors (1)
Validation error: Invalid regex pattern for base branch. Received: "*" at "reviews.auto_review.base_branches[0]"
⚙️ Configuration instructions
  • Please see the configuration documentation for more information.
  • You can also validate your configuration using the online YAML validator.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 434896dc-cda0-4770-b13c-f92316f1e02b

📥 Commits

Reviewing files that changed from the base of the PR and between 3f20da0 and 8103034.

📒 Files selected for processing (5)
  • src/components/launch/LaunchWindow.tsx
  • 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/timeline.json
✅ Files skipped from review due to trivial changes (5)
  • src/components/launch/LaunchWindow.tsx
  • src/i18n/locales/pt-BR/editor.json
  • src/i18n/locales/pt-BR/dialogs.json
  • src/i18n/locales/pt-BR/timeline.json
  • src/i18n/locales/pt-BR/settings.json

📝 Walkthrough

Walkthrough

Adds Brazilian Portuguese (pt-BR) localization: updates supported locales, wires pt-BR translation bundles into the i18n context, and adds seven pt-BR JSON translation files for common, dialogs, editor, launch, settings, shortcuts, and timeline.

Changes

Cohort / File(s) Summary
i18n Configuration
src/i18n/config.ts
Added 'pt-BR' to SUPPORTED_LOCALES, expanding the AppLocale union.
i18n Context Setup
src/contexts/I18nContext.tsx
Imported pt-BR JSON bundles for all namespaces and added a 'pt-BR' entry to the messages mapping used by the translation lookup.
Portuguese Translation Files
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
Added seven new pt-BR locale JSON files containing translated strings for UI labels, actions, dialogs, editor/recording flows, settings, shortcuts, and timeline messages (no runtime logic changes).
Launch Window UI
src/components/launch/LaunchWindow.tsx
Constrained LOCALE_LABELS typing to Record<AppLocale, string> and added "pt-BR": "Português (Brasil)"; minor formatting adjustments in an update-title call.

Estimated Code Review Effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Poem

🐰 I nibble keys and hop with cheer,

pt‑BR carrots tucked so near,
Seven strings in tidy rows,
Locale blossoms — off it goes!

🚥 Pre-merge checks | ✅ 1 | ❌ 2

❌ Failed checks (1 warning, 1 inconclusive)

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.
Description check ❓ Inconclusive The description includes the template structure but lacks critical details: no motivation explaining why pt-BR support was needed, no testing guide, no related issue links, and incomplete checklist items. Complete the template by adding motivation, detailed testing steps (e.g., how to verify the pt-BR locale loads and displays correctly), link any related issues, and complete the checklist items to clarify self-review and changelog status.
✅ Passed checks (1 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: adding Portuguese (Brazil) locale support to the i18n system, which is the primary objective.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

@itxtoledo itxtoledo force-pushed the feature/pt-br-i18n branch from 8c394c0 to 14dd72a Compare April 3, 2026 19:08
@itxtoledo itxtoledo marked this pull request as ready for review April 3, 2026 19:15
Copy link
Copy Markdown

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

Actionable comments posted: 11

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@src/contexts/I18nContext.tsx`:
- Around line 78-86: Locale normalization fails to handle underscore forms like
"pt_BR", so update the normalizeLocale function to also accept underscores by
converting any "_" to "-" before applying existing normalization rules; ensure
normalizeLocale normalizes inputs such as "pt_BR" to "pt-BR" (and similarly for
other locales) so the language map that includes 'pt-BR' (references:
normalizeLocale, locale lookup and the 'pt-BR' entry) will match on first load.

In `@src/i18n/config.ts`:
- Line 3: LOCALE_LABELS is missing a friendly label for the supported locale
"pt-BR", causing the dropdown to show the raw code; update the LOCALE_LABELS
object (used in LaunchWindow.tsx) to include a "pt-BR" entry with the
appropriate display string (e.g., "Português (Brasil)"). While editing, tighten
the type of LOCALE_LABELS from Record<string,string> to Record<AppLocale,string>
so the compiler will enforce alignment with SUPPORTED_LOCALES and prevent future
drift (ensure AppLocale includes 'pt-BR' if it's defined from
SUPPORTED_LOCALES).

In `@src/i18n/locales/pt-BR/common.json`:
- Around line 5-7: The Portuguese (pt-BR) localization has missing diacritics
and orthographic errors in several keys; update the JSON values for keys like
"subtitle", "language", and "manageRecordings" (and the other entries in the
reported block around lines 19–23) to use correct Brazilian Portuguese spelling
with proper accents/diacritics (e.g., "Gravação e edição de tela", "Idioma" if
different, "Abrir pasta de gravações", and similar corrections for the other
keys), ensuring consistency and proper Unicode characters across the file.

In `@src/i18n/locales/pt-BR/settings.json`:
- Around line 7-9: Update the Portuguese translation for the trim.deleteRegion
key: change the string "Excluir Regiao de Trim" to include the missing diacritic
so it reads "Excluir Região de Trim" to correct the spelling of Região.
- Around line 139-159: Update the Portuguese translations to include missing
diacritics: change the value of "quality.medium" from "Media" to "Média" and
change the value of "outputDimensions" from "Saida: {{dimensions}}px" to "Saída:
{{dimensions}}px"; locate these keys in the "export" object (e.g.,
"quality.medium" and "outputDimensions") and replace the string literals
accordingly, preserving interpolation tokens and JSON formatting.
- Around line 2-6: Update the Portuguese strings under the "zoom" object: change
the value for key "level" from "Nivel de Zoom" to "Nível de Zoom" and change the
value for key "selectRegion" from "Selecione uma regiao de zoom para ajustar" to
"Selecione uma região de zoom para ajustar" (leave the "deleteZoom" key
unchanged); locate the "zoom" object and replace those string values with the
versions that include the correct diacritical marks.
- Around line 128-138: Update the Portuguese translations in the "background"
object by correcting diacritics: change the value of "wallpaperPreview" from
"Visualizacao do papel de parede" to "Visualização do papel de parede" and
change the value of "uploadErrorDescription" from "Apenas imagens JPG e JPEG sao
suportadas." to "Apenas imagens JPG e JPEG são suportadas."; locate these keys
("wallpaperPreview" and "uploadErrorDescription") in the background block and
replace the strings accordingly.
- Around line 10-14: Update the Portuguese translations for the "speed" keys to
include proper diacritics: change the value of "playbackSpeed" from "Velocidade
de Reproducao" to "Velocidade de Reprodução", change "selectRegion" from
"Selecione uma regiao de velocidade para ajustar" to "Selecione uma região de
velocidade para ajustar", and change "deleteRegion" from "Excluir Regiao de
Velocidade" to "Excluir Região de Velocidade"; locate these keys
("playbackSpeed", "selectRegion", "deleteRegion") inside the "speed" object and
replace the strings accordingly.
- Around line 92-118: Update the Portuguese translations in the "captions"
object to include the missing diacritics: change the value for "fontSettings"
from "Configuracoes" to "Configurações", "defaultFont" from "Padrao" to
"Padrão", and "maxWidth" from "Largura Maxima" to "Largura Máxima" so the keys
in captions (fontSettings, defaultFont, maxWidth) use correct accented words.
- Around line 15-82: Update the Portuguese strings in the effects section to
include missing diacritics: change "Efeitos de Video" (key "title") to "Efeitos
de Vídeo"; change any occurrences of "camera" in keys/descriptions such as
"zoomInDescription"/"zoomOutDescription" (and any "camera"/"camera" mentions) to
"câmera"; change "Sobreposicao" (key "webcam") to "Sobreposição"; change
"Gravacao"/"gravacao" in keys like "webcamFootage", "webcamFootageDescription",
"uploadWebcamFootage", "replaceWebcamFootage", "removeWebcamFootage",
"webcamFootageAdded", "webcamFootageRemoved" to "Gravação"/"gravação" and update
"video" to "vídeo" where present (e.g., "webcamFootageDescription"); also
correct "Animacao" to "Animação" if present—ensure only string values are
edited, preserving keys and JSON structure.
- Around line 15-82: Many Portuguese strings in the "effects" block are missing
diacritics; update the translation values for keys such as
"zoomGeneralDescription", "zoomInDescription", "zoomOutDescription",
"connectedZoomDescription", "zoomInDuration", "zoomInOverlap",
"zoomOutDuration", "zoomEasingOptions" (value "snappy"), "cursorSmoothing",
"cursorSway", "webcamFootageDescription", "webcamFootageAdded",
"webcamFootageRemoved", and "padding" to include proper diacritical marks (e.g.,
"Configurações", "transição", "região"/"regiões", "conexão", "Duração",
"Sobreposição", "Rápido", "Suavização", "Oscilação", "gravação", "Gravação",
"Espaçamento"); keep keys unchanged and only modify the string values.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 993f96af-d5dc-4e8e-b6d5-4464b5de7143

📥 Commits

Reviewing files that changed from the base of the PR and between 215d7c4 and 14dd72a.

📒 Files selected for processing (9)
  • src/contexts/I18nContext.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

itxtoledo and others added 4 commits April 4, 2026 15:34
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant