Skip to content

feat(desktop): Spanish (es) UI translation + locale wiring - #64793

Closed
virtualwolf-369 wants to merge 1 commit into
NousResearch:mainfrom
virtualwolf-369:feat/es-i18n
Closed

feat(desktop): Spanish (es) UI translation + locale wiring#64793
virtualwolf-369 wants to merge 1 commit into
NousResearch:mainfrom
virtualwolf-369:feat/es-i18n

Conversation

@virtualwolf-369

Copy link
Copy Markdown

Summary

Adds a complete Spanish (es) translation of the Hermes Desktop UI and wires the locale into the i18n system.

  • src/i18n/es.ts — full translation (~1700 strings, 2098 keys matching en.ts 1:1).
  • src/i18n/es-field-copy.ts — field labels/descriptions. Flattened to dotted keys ('display.personality') to match the FIELD_LABELS shape in constants.ts. The mirrored copy is passed raw to fieldLabels/fieldDescriptions (typed Record<string,string>), so a nested shape caused 2 TS errors and broke the Settings form at runtime. This fixes both.
  • src/i18n/languages.ts, catalog.ts — register es locale (aliases es-es, es-mx, es-419, es-ar, es-cl, es-co, es-latam) with fallback to en.
  • src/i18n/types.ts — widen field-copy type to allow dotted keys.
  • electron/main.ts, electron/titlebar-overlay-width.ts — locale-aware titlebar.
  • scripts/translate_*.py — offline translation helpers used to generate the catalog.

Translation quality notes

  • Fixed literal false-friends that were reported by the user: toggle on/offActivado/Desactivado (not En/Apagado), mutedSilenciado, smart (approval mode) → Inteligente (not Elegante), ComprometerseConfirmar, sucursalrama, Relaciones públicasPR, EscenarioPreparar.
  • Brand/technical terms kept in English on purpose: OpenAI, ElevenLabs, xAI (Grok), NeuTTS, ISO-639-3, Modal, Daytona, Stage.

Verification

  • apps/desktop: npx tsc --noEmit -p tsconfig.json → 0 errors.
  • npx vitest run src/i18n → 21/21 passing (languages, runtime, context tests).
  • Deep key diff: es.ts vs en.ts = 2098/2098 keys, 0 missing. es-field-copy = 87 labels + 33 descriptions, all present.
  • Tested in-app: Hermes Desktop launches and renders in Spanish with the corrected toggles.

Notes for reviewers

This is a contribution from a user who hit the gap; happy to adjust wording/register to match the project's style guide. The es-field-copy flattening is the load-bearing change — without it the Settings form silently renders English labels.

Adds a complete Spanish translation of the desktop app (~1700 strings,
2098 keys matching en.ts) and wires the 'es' locale into the i18n catalog
and language picker (with es-es/es-mx/es-419 aliases, fallback to en).

- es.ts: full translation; fixes literal toggle false-friends
  (on/off -> Activado/Desactivado, muted -> Silenciado, smart -> Inteligente)
- es-field-copy.ts: field labels/descriptions flattened to dotted keys
  to match FIELD_LABELS shape (fixes 2 TS errors + broken Settings form)
- languages.ts/catalog.ts: register es locale + TRANSLATIONS entry
- types.ts: widen field-copy type to allow dotted keys
- electron/main.ts, titlebar-overlay-width.ts: locale-aware titlebar
- scripts/: offline translation helpers

Verified: tsc --noEmit clean, vitest src/i18n 21/21 passing.
@alt-glitch alt-glitch added type/feature New feature or request comp/desktop Electron desktop app (apps/desktop/*) P3 Low — cosmetic, nice to have duplicate This issue or pull request already exists labels Jul 15, 2026
@alt-glitch

Copy link
Copy Markdown
Collaborator

This was generated by AI during triage.

Duplicate of #41230 — the earliest still-open desktop Spanish (es) locale PR covering the same apps/desktop/src/i18n/es.ts + locale-registration surface. Siblings #49036 and #54970 are also duplicates of #41230; the broader desktop+web combined PR #54415 and the spec issue #59780 are related. A maintainer should pick the canonical implementation among the open es-locale PRs.

@virtualwolf-369

Copy link
Copy Markdown
Author

Closing as duplicate of #41230 (earliest still-open desktop Spanish locale PR, and the one currently being curated by maintainers).

For the record: this PR independently arrived at the same contextual fixes the triage flagged — e.g. toggle on/off → Activado/Desactivado (not the literal En/Apagado), muted → Silenciado, smart → Inteligente — and those are already present in #41230, so no translation value is lost by closing here. Great to see the es locale landing; thanks @sdyckjq-lab for driving the canonical implementation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/desktop Electron desktop app (apps/desktop/*) duplicate This issue or pull request already exists P3 Low — cosmetic, nice to have type/feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants