hermes - ✅(Solved) Fix feat: TUI 中文本地化 / Chinese i18n for TUI [1 pull requests, 1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
NousResearch/hermes-agent#23224Fetched 2026-05-11 03:30:27
View on GitHub
Comments
0
Participants
1
Timeline
4
Reactions
0
Participants
Timeline (top)
labeled ×3cross-referenced ×1

Fix Action

Fixed

PR fix notes

PR #23243: feat: TUI 中文本地化 / Chinese i18n for TUI

Description (problem / solution / changelog)

Summary

为 Hermes Agent TUI 和 Web Dashboard 添加完整的中文 (zh) 国际化支持。

i18n 架构

  • 核心模块 (): Locale 类型、EN/ZH 翻译目录、React Provider、translate/tStatus/toolVerb helpers
  • 语言链路: HERMES_LANGUAGE=zh → agent/i18n.py → tui_gateway → TUI locale → 所有组件
  • 设计原则: 英文为默认 key,中文为翻译值;不破坏原有英文界面

翻译覆盖

TUI 界面:

  • 状态栏、工具动词、Section 标题(Thinking/工具调用/进度/活动/子代理等)
  • Prompt 提示(approval/clarify/confirm 快捷键)
  • 帮助面板(命令描述 + 18 条热键描述)
  • Voice 状态消息
  • Slash 命令补全提示(gateway 层)
  • Picker 提示(Model/Session/Skills 选择器)
  • 队列编辑提示
  • 确认对话框
  • 核心 slash 命令系统消息(/copy, /status, /clear, /title, /save, /queue, /steer, /history 等)
  • 运维 slash 命令(/browser, /rollback, /delegation, /replay, /skills)

Web Dashboard:

  • Config 页面:283 个配置字段的中文标签和描述

国际化方式

所有翻译均通过 i18n key 实现,不硬编码替换英文原文:

  • React 组件内使用 hook
  • .ts 模块使用 函数
  • 英文原文保留在 EN catalog 中作为 fallback

关联

Closes #23224

Changed files

  • tui_gateway/entry.py (modified, +2/-2)
  • tui_gateway/server.py (modified, +13/-4)
  • tui_gateway/ws.py (modified, +1/-1)
  • ui-tui/src/__tests__/constants.test.ts (modified, +5/-5)
  • ui-tui/src/app.tsx (modified, +12/-9)
  • ui-tui/src/app/createGatewayEventHandler.ts (modified, +22/-14)
  • ui-tui/src/app/interfaces.ts (modified, +2/-0)
  • ui-tui/src/app/slash/commands/core.ts (modified, +45/-44)
  • ui-tui/src/app/slash/commands/ops.ts (modified, +22/-19)
  • ui-tui/src/app/slash/commands/session.ts (modified, +13/-11)
  • ui-tui/src/app/uiStore.ts (modified, +1/-0)
  • ui-tui/src/app/useConfigSync.ts (modified, +2/-0)
  • ui-tui/src/app/useMainApp.ts (modified, +15/-7)
  • ui-tui/src/app/useSessionLifecycle.ts (modified, +15/-10)
  • ui-tui/src/components/agentsOverlay.tsx (modified, +10/-7)
  • ui-tui/src/components/appChrome.tsx (modified, +19/-9)
  • ui-tui/src/components/appLayout.tsx (modified, +3/-1)
  • ui-tui/src/components/branding.tsx (modified, +5/-3)
  • ui-tui/src/components/helpHint.tsx (modified, +19/-16)
  • ui-tui/src/components/modelPicker.tsx (modified, +6/-4)
  • ui-tui/src/components/prompts.tsx (modified, +10/-6)
  • ui-tui/src/components/queuedMessages.tsx (modified, +3/-1)
  • ui-tui/src/components/sessionPicker.tsx (modified, +5/-3)
  • ui-tui/src/components/skillsHub.tsx (modified, +5/-3)
  • ui-tui/src/components/thinking.tsx (modified, +12/-9)
  • ui-tui/src/content/hotkeys.ts (modified, +25/-24)
  • ui-tui/src/content/setup.ts (modified, +9/-7)
  • ui-tui/src/gatewayTypes.ts (modified, +2/-1)
  • ui-tui/src/i18n-consts.ts (added, +7/-0)
  • ui-tui/src/i18n.tsx (added, +548/-0)
  • ui-tui/src/lib/clipboard.ts (modified, +1/-1)
  • ui-tui/src/lib/text.ts (modified, +6/-1)
  • web/src/components/AutoField.tsx (modified, +39/-12)
  • web/src/i18n/schemaZh.ts (added, +575/-0)
RAW_BUFFERClick to expand / collapse

Problem

The Hermes Agent TUI currently has no Chinese (zh) localization support. All UI text — status bar, tool verbs, section headers, prompt hints, hotkey descriptions, voice status messages, help panel, slash command completions — is hardcoded in English.

For Chinese-speaking users, this creates friction: every interaction requires mentally switching between English UI and Chinese conversation.

Proposed Solution

Add a full i18n layer to the TUI, similar to how the Web Dashboard already supports en/zh switching:

  1. i18n core module (ui-tui/src/i18n.tsx): Locale type, EN/ZH translation catalogs, React Provider, translate() / tStatus() / toolVerb() helpers
  2. Language resolution chain: HERMES_LANGUAGE=zh env → agent/i18n.pytui_gateway → TUI locale state
  3. All user-visible strings routed through i18n keys instead of hardcoded
  4. Config dashboard (/api/config/schema): 280+ field labels/descriptions in Chinese

Scope

Areas that need translation:

  • Status bar text (ready, running, interrupted, etc.)
  • Tool verbs (browsing, searching, reading, writing, etc.)
  • Section headers (Thinking, Tool calls, Progress, Activity, Subagents)
  • Prompt hints (approval/clarify/confirm keyboard shortcuts)
  • Help panel + hotkey descriptions
  • Voice mode status messages
  • Slash command completion hints
  • Input placeholder ("Ctrl+C to interrupt…")
  • Setup panel
  • Agents overlay section titles
  • Model/session/skills picker hints

Related

Working implementation available at: https://github.com/Vodkakakaka/hermes-agent/tree/feat/tui-i18n-localization

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

hermes - ✅(Solved) Fix feat: TUI 中文本地化 / Chinese i18n for TUI [1 pull requests, 1 participants]