Skip to content

feat(i18n): add Portuguese (Brazil) locale to desktop app - #66708

Closed
giullianoveiga wants to merge 7 commits into
NousResearch:mainfrom
giullianoveiga:feat/i18n-pt-br
Closed

feat(i18n): add Portuguese (Brazil) locale to desktop app#66708
giullianoveiga wants to merge 7 commits into
NousResearch:mainfrom
giullianoveiga:feat/i18n-pt-br

Conversation

@giullianoveiga

Copy link
Copy Markdown

Summary

Adds Portuguese (Brazil) as a supported locale in the Hermes Desktop app, joining the existing , , , and locales.

Changes

File Change
src/i18n/types.ts Add 'pt-br' to the Locale union type
src/i18n/languages.ts Register in LOCALE_OPTIONS + LOCALE_ALIASES (supports pt, pt-BR, pt-br, pt_br, pt_BR)
src/i18n/catalog.ts Import and register ptBr in TRANSLATIONS
src/i18n/pt-br.ts New file — ~250 translated strings using defineLocale()

Translated sections

  • common — 45 general UI strings (Save, Cancel, Delete, etc.)
  • fileMenu — file context menu actions
  • boot — startup messages and error states
  • titlebar — sidebar, search, settings navigation
  • keybinds — keyboard shortcut labels and categories
  • language — language picker UI
  • settings — nav sections, about, config, credentials, keys

Design decisions

  • Uses defineLocale() for type-safe partial translation — untranslated keys fall back to English automatically
  • No risk of breaking existing locales or functionality
  • All 21 existing i18n tests pass unchanged
  • TypeScript compiles with zero errors

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

Giulliano Veiga added 7 commits July 18, 2026 00:59
- 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.
@alt-glitch alt-glitch added type/feature New feature or request P3 Low — cosmetic, nice to have comp/desktop Electron desktop app (apps/desktop/*) needs-decision Awaiting maintainer decision before any implementation labels Jul 18, 2026
@alt-glitch

Copy link
Copy Markdown
Collaborator

This was generated by AI during triage.

Related to #65064 and #42383: this is competing desktop pt-BR localization work with a different completeness/scope profile, not a mechanically redundant duplicate.

@tonydwb tonydwb left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 teknium1 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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-42 covers existing aliases, and apps/desktop/src/i18n/context.test.tsx:187-210 covers persistence for an existing newly supported locale, but the PR changes neither test file.

Suggested changes

  • Add alias tests for pt, pt-BR, and pt_br, plus a context/provider test that persists display.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',

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@teknium1 teknium1 added sweeper:risk-compatibility Sweeper risk: may break existing users, config, migrations, defaults, or upgrades sweeper:blast-moderate Sweeper blast radius: moderate — a subsystem or single platform area/i18n Localization, locales, translations labels Jul 18, 2026
@giullianoveiga giullianoveiga closed this by deleting the head repository Aug 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/i18n Localization, locales, translations comp/desktop Electron desktop app (apps/desktop/*) needs-decision Awaiting maintainer decision before any implementation P3 Low — cosmetic, nice to have sweeper:blast-moderate Sweeper blast radius: moderate — a subsystem or single platform sweeper:risk-compatibility Sweeper risk: may break existing users, config, migrations, defaults, or upgrades type/feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants