feat(desktop): Spanish (es) UI translation + locale wiring - #64793
feat(desktop): Spanish (es) UI translation + locale wiring#64793virtualwolf-369 wants to merge 1 commit into
Conversation
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.
Duplicate of #41230 — the earliest still-open desktop Spanish ( |
|
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. |
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 matchingen.ts1:1).src/i18n/es-field-copy.ts— field labels/descriptions. Flattened to dotted keys ('display.personality') to match theFIELD_LABELSshape inconstants.ts. The mirrored copy is passed raw tofieldLabels/fieldDescriptions(typedRecord<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— registereslocale (aliaseses-es,es-mx,es-419,es-ar,es-cl,es-co,es-latam) with fallback toen.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
on/off→ Activado/Desactivado (notEn/Apagado),muted→ Silenciado,smart(approval mode) → Inteligente (notElegante),Comprometerse→Confirmar,sucursal→rama,Relaciones públicas→PR,Escenario→Preparar.Verification
apps/desktop:npx tsc --noEmit -p tsconfig.json→ 0 errors.npx vitest run src/i18n→ 21/21 passing (languages, runtime, context tests).es.tsvsen.ts= 2098/2098 keys, 0 missing.es-field-copy= 87 labels + 33 descriptions, all present.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-copyflattening is the load-bearing change — without it the Settings form silently renders English labels.