From 437615c7c4501c19b5a0ef901fcce1903962539b Mon Sep 17 00:00:00 2001 From: macworkers Date: Mon, 4 May 2026 16:09:46 -0700 Subject: [PATCH] docs: document zh-Hans locale activation for issue #566 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Add locale option to config.example.toml [tui] section with all supported values (auto/en/ja/zh-Hans/pt-BR) and clear notes that this controls TUI chrome only, not model output language. - Fix README.zh-CN.md: settings.toml → config.toml (wrong filename). - Expand README.zh-CN.md locale section with concrete config snippet and LANG= env-var example; add link to docs/LOCALIZATION.md. The zh-Hans locale has been fully implemented in localization.rs since v0.7.6 — this commit makes it discoverable without reading source code. Closes #566 Co-Authored-By: Claude Sonnet 4.6 --- README.zh-CN.md | 16 ++++++++++++++-- config.example.toml | 5 +++++ 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/README.zh-CN.md b/README.zh-CN.md index 4cded3c2..0b92ad64 100644 --- a/README.zh-CN.md +++ b/README.zh-CN.md @@ -235,7 +235,7 @@ deepseek mcp-server # 启动 dispatcher MCP stdio 服 | `NO_ANIMATIONS=1` | 启动时强制无障碍模式 | | `SSL_CERT_FILE` | 企业代理的自定义 CA 包 | -UI 语言与模型输出语言相互独立——在 `settings.toml` 中设置 `locale`、使用 `/config locale zh-Hans`、或依赖 `LC_ALL`/`LANG`。详见 [docs/CONFIGURATION.md](docs/CONFIGURATION.md) 和 [docs/MCP.md](docs/MCP.md)。 +UI 语言与模型输出语言相互独立——在 `config.toml` 中设置 `locale`、使用 `/config locale zh-Hans`、或依赖 `LC_ALL`/`LANG`。详见 [docs/LOCALIZATION.md](docs/LOCALIZATION.md) 和 [docs/CONFIGURATION.md](docs/CONFIGURATION.md)。 ### 切换为中文界面 @@ -246,7 +246,19 @@ UI 语言与模型输出语言相互独立——在 `settings.toml` 中设置 `l 可选语言:`auto` | `en` | `ja` | `zh-Hans` | `pt-BR`。 -也可以在 `~/.deepseek/settings.toml` 里直接设置 `locale = "zh-Hans"`,或通过 `LC_ALL` / `LANG` 环境变量自动选择。 +也可以在 `~/.deepseek/config.toml` 里直接设置 `locale = "zh-Hans"`,或通过 `LC_ALL` / `LANG` 环境变量自动选择: + +```toml +# ~/.deepseek/config.toml +[tui] +locale = "zh-Hans" +``` + +或者通过环境变量(中文系统通常已自动生效): + +```bash +LANG=zh_CN.UTF-8 deepseek run +``` --- diff --git a/config.example.toml b/config.example.toml index 280f0520..c3d26dd0 100644 --- a/config.example.toml +++ b/config.example.toml @@ -196,6 +196,11 @@ alternate_screen = "auto" # auto | always | never mouse_capture = true # true copies only transcript user/assistant text; false uses raw terminal selection/copy terminal_probe_timeout_ms = 500 # optional startup terminal-mode timeout (100-5000ms) osc8_links = true # emit OSC 8 escapes around URLs (Cmd+click in iTerm2/Ghostty/Kitty/WezTerm/Terminal.app 13+); set false for terminals that misrender +# locale = "auto" # UI chrome language: auto | en | ja | zh-Hans | pt-BR +# # "auto" reads LC_ALL → LC_MESSAGES → LANG; falls back to English. +# # Override: `locale = "zh-Hans"` for Simplified Chinese regardless of OS locale. +# # Also settable at runtime: /config locale zh-Hans +# # Note: this only affects TUI labels/chrome — it does NOT change model output language. # ───────────────────────────────────────────────────────────────────────────────── # Feature Flags