Skip to content

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

Merged
tieubao merged 2 commits into
consolelabs:developfrom
xgustavu:feat/pt-br-localization
Nov 25, 2026
Merged

tieubao merged 2 commits into
consolelabs:developfrom
xgustavu:feat/pt-br-localization

Conversation

@xgustavu

Copy link
Copy Markdown
Contributor

What and why

Adds a Brazilian Portuguese (pt-BR) translation. All 294 Localizable.strings keys and the 11 strings left in Main.storyboard (the app menu) are translated. The wording follows macOS's own pt-BR terms: barra de menus, Ajustes do Sistema, Acessibilidade, Lixo, Aplicativos, Itens de Início.

pt-BR is registered in the Xcode project (knownRegions, two file references, and both variant groups), so it ships in the bundle. Settings › General › App language lists it as "português (Brasil)".

Notes:

  • pt-BR.lproj/Main.strings holds only the 11 object IDs that ibtool --export-strings-file returns for the current storyboard. The older locales still carry entries for objects that no longer exist.
  • No LocaleCoverageTests allow-list entries were needed. Every pt-BR value differs from English except the four keys already allowed in every locale (macOS, Wi-Fi, Mac App Store, OK).
  • CHANGELOG: one line under a new Unreleased › Added.

How it was tested

  • plutil -lint hidden/*.lproj/*.strings
  • xcodebuild test -scheme "Hidden Bar" -configuration Debug-Direct -only-testing:HiddenTests/LocaleCoverageTests -only-testing:HiddenTests/LanguagePreferencesTests: 11 tests, 0 failures. The built app contains pt-BR.lproj, so LocaleCoverageTests checked it.
  • scripts/test.sh on a Mac whose system language is pt-BR: the App Store scheme passed 526/526. The Direct scheme passed 798 and failed 34. Every failure is a test that compares UI text with English (ArrivalsPromptTests, PalettePanelTests, PresentationViewsTests, SettingsWindowTests and others): the test host now opens in Portuguese, so it reads "Sempre ocultar" where the test expects "Always hide". Re-running the Direct scheme with -testLanguage en -testRegion US passes 832/832, 0 failures. CI runs in English, so it should pass. The same failures show up today on a Mac set to any other shipped language, such as German or French. Pinning the test language in the shared schemes (language = "en" on the TestAction) would fix that. I left the schemes alone because that change is outside this PR's scope.
  • Rendered every pane and panel with the Debug-Direct -settingsSnapshotDir hook under -AppleLanguages '(pt-BR)' (82 images, light and dark). Checked each one for clipped or untranslated text.

UI proof

Committed under docs/verification/pt-br-localization/ (9 PNGs: General, Icons, Advanced, About, the new-icon prompt, the find palette, and the presentation panel and settings, in light and dark).

General, light

Icons, light

Presentation settings and App language, dark

A new string goes into every locale in the same commit. The test LocaleCoverageTests enforces it.

Tick exactly one:

  • This PR changes something users see, and the proof is above
  • This PR changes nothing users see

- Translate every Localizable.strings key (294) and the 11 strings the
  current Main.storyboard still has (app menu) into Brazilian Portuguese,
  using the terms macOS uses in pt-BR (barra de menus, Ajustes do Sistema,
  Acessibilidade, Lixo, Aplicativos).
- Register pt-BR in the Xcode project: knownRegions, file references and
  the Main.storyboard and Localizable.strings variant groups.
- The App language row lists it as "português (Brasil)".
Rendered with the Debug-Direct SettingsSnapshot (-settingsSnapshotDir) of
this branch, launched with -AppleLanguages '(pt-BR)' on macOS 27: the
General, Icons, Advanced and About panes, the new-icon prompt, the
type-to-find palette and the presentation mode panel and settings, in
light and dark.
@tieubao

tieubao commented Nov 25, 2026

Copy link
Copy Markdown
Contributor

Thanks for the pt-BR translation, Gustavo. This is a clean, complete PR.

What I checked:

  • Diff scope: hidden/pt-BR.lproj/Localizable.strings, hidden/pt-BR.lproj/Main.strings, the project file's localization entries (file references, knownRegions, the two variant groups), CHANGELOG and the UI proof PNGs. Nothing executable changed.
  • Keys: all 294 Localizable.strings keys match en exactly, none missing and none extra. Main.strings covers the 11 titles the storyboard has today.
  • Placeholders: every %@, %d and `
  • Wording: app, Trash ("Lixo"), Applications ("Aplicativos"), "Ajustes", "Encerrar" and the other macOS terms follow Apple's pt-BR wording. No English left over except the product names on the allow-list (macOS, Wi-Fi, Mac App Store, OK).
  • UI proof: light and dark, pt-BR, as CONTRIBUTING asks. The General, Icons and Advanced screens in your screenshots show no clipped text.

Nothing blocks the merge. These are optional wording points, only if you agree:

  1. Localizable.strings, key Chevron: "Angular" is easy to read as a different word. Apple's pt-BR docs use "Divisa" for a chevron, if you want to match.
  2. Localizable.strings, key Tutorial text: step 1 of "view always hidden icons" says "para reativar o recurso" ("to re-enable"); the English says "to enable the feature". "para ativar o recurso" is closer.
  3. Localizable.strings, keys Pause hiding while macOS shows Now Playing, Focus and similar items and macOS hides Focus, Siri and Now Playing ...: "Reproduzindo" stands for macOS's Now Playing item. Please check it against the name your own Control Center shows in pt-BR, since the text should match that item.
  4. Localizable.strings, key Check System Settings > General > Login Items ...: same check for "Itens de Início" against System Settings on your Mac.

If you change any of these, rerun LocaleCoverageTests (-only-testing:HiddenTests/LocaleCoverageTests, Direct Hidden Bar scheme) so the guard still passes.

@tieubao
tieubao merged commit 496b64d into consolelabs:develop Nov 25, 2026
3 checks passed
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.

2 participants