Skip to content

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

Merged
awesomestvi merged 1 commit into
awesomestvi:mainfrom
mzspicoli:feature/pt-locale
May 19, 2026
Merged

feat(i18n): add Portuguese (pt-BR) locale#23
awesomestvi merged 1 commit into
awesomestvi:mainfrom
mzspicoli:feature/pt-locale

Conversation

@mzspicoli
Copy link
Copy Markdown

Summary

Adds Brazilian Portuguese (pt-BR) as the sixth supported locale, alongside the existing en, sv, de, fr, and es.

  • New translation file src/app/i18n/messages/pt.ts with 1196 keys in full parity with en.ts (verified by tsc --noEmit).
  • Registered 'pt' in SUPPORTED_LANGUAGES, LANGUAGE_OPTIONS (label Portugues, matching the existing ASCII convention used for Francais and Espanol), and LOCALE_BY_LANGUAGE (pt: 'pt-BR').
  • Wired ptMessages into the MESSAGES record in src/app/i18n/messages/index.ts.
  • Added a Portuguese boot copy entry in public/boot-i18n.js: Iniciando o seu painel de casa inteligente.

Translation notes

  • All placeholders ({name}, {count}, {week}, etc.) preserved.
  • Proper nouns kept untranslated: Navet, Home Assistant, Liquid Glass, Lucide, OLED, bento.
  • Tech terms commonly used in pt-BR kept in English: dashboard, widget, card, tile, sparkline, receiver, set-top box, streaming box, soundbar, onboarding.
  • Key terminology choices: room → cômodo, smart home → casa inteligente, HVAC → climatização, cover → cobertura, lock/unlock → trancar/destrancar, mopping → passando pano, ambient bleed → sangria ambiente.

Test plan

  • pnpm typecheck — passes (proves 1:1 key parity with enMessages via Record<string, Record<TranslationKey, string>>)
  • pnpm check (biome lint + format) — passes
  • pnpm check:ui-kit — passes
  • pnpm check:stories — passes (148 stories)
  • pnpm test — passes (53 files, 246 tests)

🤖 Generated with Claude Code

Adds a new 'pt' language with locale 'pt-BR' alongside the existing
en, sv, de, fr and es locales.

- New translation file src/app/i18n/messages/pt.ts (1196 keys, full parity with en.ts)
- Register 'pt' in SUPPORTED_LANGUAGES, LANGUAGE_OPTIONS, LOCALE_BY_LANGUAGE
- Wire ptMessages into the MESSAGES record
- Add Portuguese boot copy to public/boot-i18n.js

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@awesomestvi
Copy link
Copy Markdown
Owner

Thanks for this... But a alot of the code is drifted from last time. Is it okay for you to rebase and update the remaining keys and send a PR again?

@awesomestvi awesomestvi merged commit f4bd2be into awesomestvi:main May 19, 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