feat(desktop): add i18n with Simplified Chinese (zh-Hans) support#38241
Merged
Conversation
59f76c9 to
43be21d
Compare
Contributor
Author
|
Thanks for flagging this. I double-checked the current PR diff after the rebase. The secret-pattern matches are false positives: the added strings are UI copy and configuration field names/placeholders such as I also scanned the current PR diff for common token formats and high-entropy credential-looking values, and did not find any real secrets. |
43be21d to
a734085
Compare
Introduce a lightweight React context-based i18n layer for the desktop app and translate the UI into Simplified Chinese. - New apps/desktop/src/i18n module: typed Translations interface, en + zh locale tables, I18nProvider/useI18n, localStorage-persisted locale (defaults to English), and language endonym metadata for the picker. - Wire I18nProvider at the app root in main.tsx. - Refactor 24 desktop screens/components to read strings from the `t` object instead of hard-coded English. - Add a unit test for the i18n context.
85b6023 to
705e4c4
Compare
This was referenced Jun 5, 2026
1 task
This was referenced Jun 6, 2026
xyshanren
pushed a commit
to xyshanren/hermes-agent-cn
that referenced
this pull request
Jun 12, 2026
…0+cn.6 v0.15.0+cn.5 backlog listed 'i18n upgrade (C8 19 commits)' as a v0.15.0+cn.6 task. Re-evaluating against the actual commit reveals the PR is 1 commit (4a1907b) and only modifies apps/desktop/ (upstream's Electron desktop app), which CN does not maintain (Desktop = CN jian-fa T3 category). Since v0.15.0+cn.5 already skipped NousResearch#38241 via EXCLUDE_LARGE / timeout, no functional gap exists. Cherry-picking would add 4.2k lines of desktop-only code with zero CN value and negative maintenance cost. This commit: - Corrects the v0.15.0+cn.6 backlog (4 items -> 3 items) - Documents the EXCLUDE rationale in CHANGELOG_CN.md - Establishes upstream-merge-cn6-2026-06 as the v0.15.0+cn.6 work branch (forked from cn @ 8ffd33a) - Marks the original v0.15.0+cn.6 plan (i18n/T3/jian-fa/manual conflicts) as the real backlog Refs: PLAN_CN.md, UPSTREAM_CLASSIFICATION_REPORT.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a lightweight i18n layer to the desktop app and a full Simplified Chinese (简体中文) translation. English remains the default; users can switch language from Appearance settings, and the choice is persisted to Hermes config (
display.language).What's included
apps/desktop/src/i18nmoduletypes.ts— a typedTranslationsinterface (single source of truth for all UI strings)en.ts/zh.ts— English and Simplified Chinese locale tablescatalog.ts/languages.ts/runtime.ts— shared locale catalog, language metadata, and non-React translation helpercontext.tsx—I18nProvider+useI18n(), reads and persists language through desktop config (display.language), defaults toen; language endonyms for the picker (no flags — languages aren't countries)context.test.tsx,languages.test.ts,runtime.test.ts— focused coverage for provider behavior, language metadata, and fallback translation lookupmain.tsx— wiresI18nProviderat the app roott/translateNow()instead of hard-coded English, including chat, sidebar, settings, command center, cron, messaging, profiles, skills, agents, artifacts, titlebar, boot, notifications, and update status textNotes
Translationsinterface makes adding further languages a matter of supplying one more locale table.Test plan
npm run test:ui -- i18nnpm run test:ui -- src/store/updates.test.tsnpm run type-checkdisplay.language: zh; capture the main interface and language settings screenshots aboveInfographic