Skip to content

feat(desktop): add German (de) desktop UI localization - #62592

Draft
Karaboja98 wants to merge 5 commits into
NousResearch:mainfrom
Karaboja98:feat/desktop-i18n-german
Draft

Karaboja98 wants to merge 5 commits into
NousResearch:mainfrom
Karaboja98:feat/desktop-i18n-german

Conversation

@Karaboja98

@Karaboja98 Karaboja98 commented Jul 11, 2026 •

Copy link
Copy Markdown

PR: Add German (de) desktop UI localization

Summary

Adds German as a fifth desktop locale for the Hermes Desktop app. The full
en.ts string surface (2,123 literals) is now translated to German.

The desktop i18n system currently only ships en, zh, zh-hant, and ja.
This PR brings it to parity for German-speaking users — the language now
appears in the Settings → Appearance → Language dropdown and persists to
display.language in config.yaml.

How it works

  • types.ts: 'de' added to the Locale union.
  • languages.ts: de registered in LOCALE_OPTIONS (endonym "Deutsch") and
    LOCALE_ALIASES (de, de-de, deutsch, german).
  • catalog.ts: de imported and registered in TRANSLATIONS.
  • de.ts (new): defineLocale({...}) built over the en base. Missing keys
    inherit English via defineLocale/translateNow, so the UI degrades
    gracefully and is fully type-checked against Translations.
  • Tests: languages.test.ts and context.test.tsx now expect de as a
    supported locale; the unsupported-language fallback test was repointed to a
    genuinely unsupported code (xx), and a new test asserts de loads from
    display.language config.

Translation coverage

  • 1,951 of 2,123 strings translated to German.
  • Remaining ~172 are internal command/keybind IDs (keybinds.*, nav.*,
    composer.*, session.*, profile.*, view.*) and technical proper nouns
    (Hermes, MCP, Gateway, Chat, Telegram, Discord, Slack, YOLO, …) that are
    correctly left untranslated as identifiers, not display text.

Test plan

  • npx tsc --noEmit -p apps/desktop/tsconfig.json — 0 errors
  • Structure parity: de.ts has 0 missing keys and 0 type mismatches vs
    en.ts (defineLocale supplies the 2 intentionally-inherited field
    label keys).
  • npm test in apps/desktop (i18n suites)
  • Manual: Settings → Appearance → Language → Deutsch; restart app; verify
    UI renders in German and persists across restart.

Notes for maintainers

The de.ts file was generated with a script that diffed en.ts string
literals against a German dictionary; the script is not included in this PR.
If you'd prefer a hand-maintained subset or want me to run the full vitest
suite, let me know.

@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 11, 2026
@alt-glitch

Copy link
Copy Markdown
Contributor

This was generated by AI during triage.

Duplicate of #51762 — both add the German (de) Hermes Desktop locale via apps/desktop/src/i18n/de.ts (defineLocale) plus the same types.ts/languages.ts/catalog.ts registration. #51762 is the earliest still-open PR for this exact feature and is canonical. See feature spec #51217. Maintainer to pick.

@teknium1 teknium1 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks for the German locale contribution. The feature remains needed on current main: Locale, the picker, and TRANSLATIONS still contain only four locales (apps/desktop/src/i18n/types.ts:8, languages.ts:7-32, catalog.ts:7-12).

Problems

  • apps/desktop/src/i18n/de.ts:84-86 and :126 leave visible boot-failure and update copy in English.
  • apps/desktop/src/i18n/de.ts:208-281 leaves keybind action labels in English. Those values are display copy, not identifiers: current main renders t.keybinds.actions['view.showTerminal'] in apps/desktop/src/app/command-palette/index.tsx:416.
  • apps/desktop/src/i18n/de.ts:298 gives importConfig the export label (Konfiguration exportieren).
  • apps/desktop/DESIGN.md:132-134 and :166 still describe four locales; this PR does not update that contract.

Suggested changes

  • Translate the remaining display strings, correct importConfig, and add targeted runtime assertions.
  • Update the Desktop i18n contract for the fifth locale.

Remote main is ten commits ahead of this PR's base, limited to existing locale files; defineLocale() fallback should make salvage mechanically straightforward after content review. This is an automated hermes-sweeper review.

Comment thread apps/desktop/src/i18n/de.ts Outdated
Comment thread apps/desktop/src/i18n/de.ts Outdated
Comment thread apps/desktop/src/i18n/de.ts Outdated
@teknium1 teknium1 added sweeper:risk-compatibility Sweeper risk: may break existing users, config, migrations, defaults, or upgrades sweeper:blast-contained Sweeper blast radius: contained — one narrow path / opt-in / few users labels Jul 11, 2026
Translate the visible German desktop strings called out in review, including
boot failure copy, update copy, and keybind command-palette labels. Keep the
locale contract in DESIGN.md in sync and add regression tests for the German
catalog content.

Co-Authored-By: Hermes Agent <noreply@nousresearch.com>
@Karaboja98
Karaboja98 force-pushed the feat/desktop-i18n-german branch from 73166e8 to 8a4d422 Compare July 11, 2026 16:20
@Karaboja98

Copy link
Copy Markdown
Author

Updated in 8a4d42276 and force-pushed to the PR branch.

Addressed the sweeper findings:

  • translated the visible boot-failure/update strings in de.ts
  • translated keybinds.actions display labels used by the command palette
  • corrected settings.importConfig to Konfiguration importieren
  • updated apps/desktop/DESIGN.md to list all five locales and the defineLocale() fallback contract
  • added de.test.ts regression assertions for the flagged German catalog content

Verification run locally from apps/desktop:

  • npx tsc --noEmit -p tsconfig.json -> 0 errors
  • npx vitest run src/i18n --environment jsdom -> 4 files / 25 tests passed

Karaboja98 and others added 3 commits July 12, 2026 14:48
…corruption guard

The German catalog left most `assistant.tool.titles.*` status strings
(pending/pendingAction) in English — users saw literal "Updating todos",
"Reading webpage", etc. in the tool status row. Translate the whole block
to German.

Add a de.test.ts guard that walks every string leaf and rejects corruption
markers (***, FIXME, ...) and stray English sentences, so future updates
cannot silently regress to English or placeholder text.

Verified: tsc --noEmit 0 errors; vitest src/i18n 26/26 passed.
The main merge (34a5a7e) changed types.ts: `remoteSignInHint` became a
function `(signInLabel: string) => string`, and added `gatewaySettings`,
`back`, `signOutAndSignIn`, `remoteFailureHint`, plus providers/schedules
fields (`fallbackAdd`, `fallbackEmpty`, `notInCatalog`, `promptRequired`,
`scheduleRequired`, `scriptOnlyEditHint`). de.ts still carried the old string
value, which broke `tsc` (TS2322) and would have failed CI on merge.

Translate the new strings and convert `remoteSignInHint` to a function so
de.ts satisfies the current Translations contract again.

Verified: tsc --noEmit 0 errors; vitest src/i18n 26/26 passed.
@Karaboja98
Karaboja98 marked this pull request as draft July 13, 2026 11:14
@Karaboja98
Karaboja98 marked this pull request as ready for review July 13, 2026 11:14
@Karaboja98
Karaboja98 marked this pull request as draft July 18, 2026 17:15
@Karaboja98
Karaboja98 marked this pull request as ready for review July 18, 2026 18:50

This branch has not been deployed

No deployments
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 sweeper:blast-contained Sweeper blast radius: contained — one narrow path / opt-in / few users 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.

3 participants