Skip to content

Chinese (Simplified) localization — community patch set, offer to contribute #24252

@XIYBHK

Description

@XIYBHK

Chinese (Simplified) Localization — Community Implementation & Offer to Contribute

Hi! I noticed the recent i18n work landing in the repo — particularly #20231 (initial display.language support for zh/ja/de/es) and #22914 (gateway commands + web dashboard localization, now 16 locales). Great to see this getting first-class support!

What we've built locally

We've been maintaining a community Chinese (Simplified) localization patch set for personal use. Here's a rough summary of what it covers:

Scope: ~820+ string patches across:

Module Coverage
cli.py CLI banners, spinner labels, tool progress messages, session reset/tip strings, approval popup descriptions
run_agent.py Self-improvement review messages (💾 Self-improvement review), memory update labels (Memory updated, User profile updated)
gateway/platforms/base.py Approval flow strings for messaging platforms
tools/approval.py Dangerous command description lookup table (_DANGER_DESC_I18N_ZH — 51 entries), with a localize_description() helper

Two translation strategies used:

  • Mode A (direct string replacement): For pure UI strings with no side effects — source strings are patched to Chinese directly via a patch runner.
  • Mode B (display-layer lookup): For strings that also serve as logic keys (config persistence, dict membership, API parameters) — we keep the English key in the source and inject a lookup call at the render point. This avoids breaking logic while still showing Chinese in the UI. Example: approval popup descriptions are stored as English internally but localized at display time via localize_description().

Current gap vs. upstream locales/zh.yaml

The official zh.yaml covers ~350 lines focused on gateway commands. Our patch set extends into the CLI layer and agent core which still has many hard-coded English strings not yet wired into the i18n key system.

Offer

If it would be helpful, we're happy to:

  1. Share our string inventory — the full list of UI-visible strings in cli.py / run_agent.py that aren't yet covered by locales/, as a starting point for extending the i18n key system.
  2. Help draft zh.yaml entries for the uncovered strings.
  3. Contribute the Mode B pattern (localize_description / display-layer lookup) as a reference for handling strings that double as logic keys.

Happy to open a PR if the team is interested, or just drop the data here if a lightweight reference would be more useful. Let us know what would be most helpful!

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3Low — cosmetic, nice to havecomp/cliCLI entry point, hermes_cli/, setup wizardcomp/gatewayGateway runner, session dispatch, deliverytype/featureNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions