feat(desktop): add German (de) desktop UI localization - #62592
Karaboja98 wants to merge 5 commits into
Conversation
Duplicate of #51762 — both add the German ( |
teknium1
left a comment
There was a problem hiding this comment.
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-86and:126leave visible boot-failure and update copy in English.apps/desktop/src/i18n/de.ts:208-281leaves keybind action labels in English. Those values are display copy, not identifiers: current main renderst.keybinds.actions['view.showTerminal']inapps/desktop/src/app/command-palette/index.tsx:416.apps/desktop/src/i18n/de.ts:298givesimportConfigthe export label (Konfiguration exportieren).apps/desktop/DESIGN.md:132-134and:166still 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.
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>
73166e8 to
8a4d422
Compare
|
Updated in Addressed the sweeper findings:
Verification run locally from
|
…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.
PR: Add German (de) desktop UI localization
Summary
Adds German as a fifth desktop locale for the Hermes Desktop app. The full
en.tsstring surface (2,123 literals) is now translated to German.The desktop i18n system currently only ships
en,zh,zh-hant, andja.This PR brings it to parity for German-speaking users — the language now
appears in the Settings → Appearance → Language dropdown and persists to
display.languageinconfig.yaml.How it works
types.ts:'de'added to theLocaleunion.languages.ts:deregistered inLOCALE_OPTIONS(endonym "Deutsch") andLOCALE_ALIASES(de,de-de,deutsch,german).catalog.ts:deimported and registered inTRANSLATIONS.de.ts(new):defineLocale({...})built over theenbase. Missing keysinherit English via
defineLocale/translateNow, so the UI degradesgracefully and is fully type-checked against
Translations.languages.test.tsandcontext.test.tsxnow expectdeas asupported locale; the unsupported-language fallback test was repointed to a
genuinely unsupported code (
xx), and a new test assertsdeloads fromdisplay.languageconfig.Translation coverage
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 errorsde.tshas 0 missing keys and 0 type mismatches vsen.ts(defineLocalesupplies the 2 intentionally-inherited fieldlabel keys).
npm testinapps/desktop(i18n suites)UI renders in German and persists across restart.
Notes for maintainers
The
de.tsfile was generated with a script that diffeden.tsstringliterals 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.