hermes - ✅(Solved) Fix [Feature]: Add a Portuguese Language [1 pull requests, 1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
NousResearch/hermes-agent#15738Fetched 2026-04-26 05:25:26
View on GitHub
Comments
0
Participants
1
Timeline
3
Reactions
0
Timeline (top)
labeled ×2cross-referenced ×1

Fix Action

Fixed

PR fix notes

PR #15737: feat(i18n): add Portuguese (pt-BR) language support

Description (problem / solution / changelog)

Summary

  • Add complete pt-BR translation file (web/src/i18n/pt.ts) covering all ~150+ translation keys
  • Extend Locale union type to include "pt"
  • Register Portuguese in i18n context and localStorage guard
  • Refactor LanguageSwitcher from binary toggle to N-locale cycle using LOCALE_CONFIG map — adding future languages only requires a config entry

Test plan

  • Switch language via the flag button — cycles EN → ZH → PT → EN
  • Verify PT translations render correctly on all pages (Chat, Sessions, Analytics, Logs, Cron, Skills, Config, Keys, OAuth)
  • Confirm localStorage persists the chosen locale across page reloads
  • Verify TypeScript compiles without errors (npx tsc --noEmit)

🤖 Generated with Claude Code

Closes #15738

Changed files

  • web/src/components/LanguageSwitcher.tsx (modified, +17/-5)
  • web/src/i18n/context.tsx (modified, +3/-2)
  • web/src/i18n/pt.ts (added, +337/-0)
  • web/src/i18n/types.ts (modified, +1/-1)
RAW_BUFFERClick to expand / collapse

Problem or Use Case

The dashboard UI only supports English and Chinese. Users who speak Portuguese (Brazil) have no native-language option in the language switcher.

Proposed Solution

Add a complete pt-BR translation file and update the i18n infrastructure to support a third locale.

Changes required

  • web/src/i18n/types.ts — Extend Locale union: "en" | "zh" | "pt"
  • web/src/i18n/pt.ts (new) — Full translation object implementing Translations, covering all sections: common, app, status, sessions, analytics, logs, cron, skills, config, env, oauth, language, theme
  • web/src/i18n/context.tsx — Import pt, add to TRANSLATIONS record, update getInitialLocale() guard
  • web/src/components/LanguageSwitcher.tsx — Refactor binary toggle into an N-locale cycle via LOCALE_CONFIG map, so adding future languages only requires a config entry

Notes

  • Technical terms kept in English where standard: Gateway, CLI, PKCE, Cron, Skill, Toolset
  • Interpolation placeholders ({count}, {input}, etc.) preserved as-is
  • Pluralization suffix {s} follows same convention as en.ts

Alternatives Considered

No response

Feature Type

Other

Scope

Small (single file, < 50 lines)

Contribution

  • I'd like to implement this myself and submit a PR

Debug Report (optional)

extent analysis

TL;DR

To add support for Portuguese (Brazil) in the dashboard UI, update the i18n infrastructure by extending the Locale union, creating a new translation file, and modifying the language switcher component.

Guidance

  • Extend the Locale union in web/src/i18n/types.ts to include "pt" as a valid locale.
  • Create a new translation file web/src/i18n/pt.ts that implements the Translations interface, covering all required sections.
  • Update web/src/i18n/context.tsx to import the new translation file, add it to the TRANSLATIONS record, and modify the getInitialLocale() function accordingly.
  • Refactor the LanguageSwitcher component in web/src/components/LanguageSwitcher.tsx to support multiple locales using the LOCALE_CONFIG map.

Example

// web/src/i18n/types.ts
export type Locale = "en" | "zh" | "pt";

// web/src/i18n/pt.ts
export const pt: Translations = {
  common: {
    // translations for common section
  },
  app: {
    // translations for app section
  },
  // ...
};

Notes

The proposed solution requires careful consideration of technical terms, interpolation placeholders, and pluralization suffixes to ensure consistency with existing translations.

Recommendation

Apply the proposed workaround by updating the i18n infrastructure and adding the new translation file, as it provides a clear and comprehensive solution to support the Portuguese (Brazil) locale.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

hermes - ✅(Solved) Fix [Feature]: Add a Portuguese Language [1 pull requests, 1 participants]