Skip to content

feat(i18n): add Brazilian Portuguese (pt-BR) locale - #552

Open
diogocaspary wants to merge 1 commit into
chaitanyagiri:mainfrom
diogocaspary:feat/pt-br-locale
Open

diogocaspary wants to merge 1 commit into
chaitanyagiri:mainfrom
diogocaspary:feat/pt-br-locale

Conversation

@diogocaspary

Copy link
Copy Markdown

What & why

Adds a Brazilian Portuguese (pt-BR) locale, following the exact recipe documented at the top of src/renderer/src/i18n/index.ts: one new locales/pt-BR.json with the same key tree as en.json, registered in resources, supportedLngs and LANGUAGES (dir: 'ltr'). No other code changed.

Brazil has one of the largest dev communities using coding agents, and the app currently offers English, 简体中文 and العربية — pt-BR felt like a natural next step. All 1,203 leaf strings are translated. Product names (Munder Difflin, Michael, hive, blackboard) and dev-established terms (commit, branch, worktree, token, prompt, webhook, kanban) deliberately stay in English; UI language follows natural Brazilian Portuguese product conventions (e.g. "Command Center" → "Central de Comando", "tasks" → "tarefas", "hire" → "contratação").

Validation performed:

  • Script-checked key tree parity: 0 missing / 0 extra keys vs en.json
  • Script-checked {{placeholder}} parity: 236/236 identical, zero divergence (also verified embedded tags)
  • npm run typecheck: green on both typecheck:node and typecheck:web
  • Manually exercised in the running app (screenshots below): floor, Command Center tabs, Settings — including the language picker round-trip EN → pt-BR → EN → pt-BR, which sticks correctly via cth.language

Type of change

  • Bug fix
  • New feature
  • Refactor / cleanup
  • Docs
  • Build / CI

Evidence

Before

English-only UI (floor + Settings → General):

before floor EN

before settings EN

After

Same views with Português (Brasil) selected in Settings → General → Language:

after floor pt-BR

after settings pt-BR


Terminology notes for review (basis for discussion, happy to adjust):

  • "floor" → "andar" — if you consider "floor" a product term that should stay in English, easy to revert across the file.
  • "ASK ME" tab → "PERGUNTE-ME", kept consistent between tab and board.
  • 31 strings intentionally identical to English (tokens, terminal, skills, workers, Webhooks, working tree, branches, provider names).

Discord: casparydev

Adds locales/pt-BR.json with all 1,170 entries of en.json (1,203 leaf
strings counting array items) translated, and registers pt-BR in
LANGUAGES, resources and supportedLngs.

A script checked the key tree against en.json: no missing or extra keys,
the same key order and types, and all 236 {{placeholders}} and embedded
tags kept per string. npm run typecheck passes.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
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