feat(i18n): add Portuguese (Brazil) locale to desktop app - #66708
feat(i18n): add Portuguese (Brazil) locale to desktop app#66708giullianoveiga wants to merge 7 commits into
Conversation
- Add 'pt-br' to the Locale union type in types.ts - Register pt-br in LOCALE_OPTIONS and LOCALE_ALIASES in languages.ts - Import and register ptBr in catalog.ts - Create pt-br.ts with ~250 translated strings covering: common, fileMenu, boot, titlebar, keybinds, language, and settings Uses defineLocale() for type-safe partial translation with automatic fallback to English for untranslated keys.
… errors, ui to pt-br Adds ~800 more translated strings covering: - notifications (voice, native, errors) - remoteDisplayBanner - composer (placeholders, commands, hotkeys, snippets, attachments) - sidebar (nav, projects, worktrees, session rows) - assistant (thread, approval, clarify, tool titles/actions) - desktop (commands, handoff, YOLO, images) - errors and ui (search, pagination, sidebar) Total: ~1050 translated strings. Untranslated sections fall back to English.
… model, providers, sessions, toolsets) Adds ~500 more translated strings covering the remaining settings panels: - envActions, appearance (incl. pet section) - gateway (local, remote, cloud, auth) - mcp (servers, catalog, auth) - model (auxiliary tasks, fallbacks) - providers (accounts, keys, endpoints) - sessions (archived, directory) - toolsets (credentials, post-setup, models) Total: ~1550 translated strings.
…r to pt-br Adds ~550 more translated strings covering: - profiles (create, clone, rename, SOUL.md) - cron (schedule, delivery, run history, days of week) - skills (hub, trust, security scan, provenance) - starmap (memory graph, import/export) - agents (subagent tree, delegation) - commandCenter (palette, pets, theme install, maintenance) Total: ~2100 translated strings (~80% of desktop UI).
…w, zones, onboarding, install, etc) Adds ~1200 more translated strings completing the pt-br locale: - messaging (platforms, credentials, field copy) - statusStack (coding, git, PRs) - updates (stages, apply, backend) - shell (model menu, gateway, approval, statusbar, context usage) - rightSidebar (files, terminal, tree) - preview (tabs, console, web preview, restart) - zones (layouts, splits, plugins) - prompts (sudo, secret) - modelPicker, modelVisibility - onboarding (providers, sign-in flows) - install (stages, progress, errors) - artifacts (tabs, columns, pagination) Total: ~3300 translated strings — full desktop UI coverage.
…tings to pt-br Completes the pt-br locale with: - fieldLabels: all config field labels (model, terminal, stt, tts, memory, etc.) - fieldDescriptions: help text for each config field - settings.notifications: notification kinds, test, completion sound Total: ~3500 translated strings — 100% of desktop UI covered.
Adds translated credential field labels and help text for all messaging platforms: Telegram, Discord, Slack, Mattermost, Matrix, Signal, WhatsApp, BlueBubbles, QQ. pt-br locale is now 100% complete — all ~3600 strings translated.
tonydwb
left a comment
There was a problem hiding this comment.
Code Review Summary
Verdict: Comment
+937/-3 adds Portuguese (Brazil) locale to the desktop app. Pure i18n addition with no logic changes. Low-risk. No concerns.
Reviewed by Hermes Agent
teknium1
left a comment
There was a problem hiding this comment.
Thanks for adding the Brazilian Portuguese desktop locale. The current main branch has no pt-br locale (apps/desktop/src/i18n/types.ts:8, apps/desktop/src/i18n/catalog.ts:7-12), and the PR uses the established defineLocale() fallback contract (apps/desktop/src/i18n/define-locale.ts:39-40).
Problems
- The new alias and persistence behavior has no regression coverage.
apps/desktop/src/i18n/languages.test.ts:6-42covers existing aliases, andapps/desktop/src/i18n/context.test.tsx:187-210covers persistence for an existing newly supported locale, but the PR changes neither test file.
Suggested changes
- Add alias tests for
pt,pt-BR, andpt_br, plus a context/provider test that persistsdisplay.language: 'pt-br'without dropping unrelated config. - Add one runtime assertion for a representative Portuguese translation.
Automated hermes-sweeper review.
| @@ -64,7 +70,12 @@ const LOCALE_ALIASES: Record<string, Locale> = { | |||
| zh_hant_hk: 'zh-hant', | |||
There was a problem hiding this comment.
Please add regression coverage for the new pt, pt-BR, and pt_br normalization paths. The existing alias contract is tested in languages.test.ts, but this PR does not extend it.
Summary
Adds Portuguese (Brazil) as a supported locale in the Hermes Desktop app, joining the existing , , , and locales.
Changes
src/i18n/types.ts'pt-br'to theLocaleunion typesrc/i18n/languages.tsLOCALE_OPTIONS+LOCALE_ALIASES(supportspt,pt-BR,pt-br,pt_br,pt_BR)src/i18n/catalog.tsptBrinTRANSLATIONSsrc/i18n/pt-br.tsdefineLocale()Translated sections
common— 45 general UI strings (Save, Cancel, Delete, etc.)fileMenu— file context menu actionsboot— startup messages and error statestitlebar— sidebar, search, settings navigationkeybinds— keyboard shortcut labels and categorieslanguage— language picker UIsettings— nav sections, about, config, credentials, keysDesign decisions
defineLocale()for type-safe partial translation — untranslated keys fall back to English automaticallyFollow-up
This is a Phase 1 PR. Remaining sections (~2300 strings) can be translated incrementally in follow-up PRs without breaking anything — the fallback to English is seamless.