Agent skill

Claude Desktop Chinese Localization

by javaht in javaht/claude-desktop-zh-cn

Adds missing Simplified and Traditional Chinese translations to the Claude Desktop Chinese patch across three layers, then checks how many mappings actually hit.

MITAuto-check passedFrontend & Design

SKILL.md written in Chinese; this summary is our English description.

Install Claude Desktop Chinese Localization

skills CLI
$ npx skills add javaht/claude-desktop-zh-cn --skill claude-desktop-zh-localize -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install javaht/claude-desktop-zh-cn claude-desktop-zh-localize --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/javaht/claude-desktop-zh-cn.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/claude-desktop-zh-localize .claude/skills/claude-desktop-zh-localize && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
claude-desktop-zh-localize
GitHub stars
7.5k
Token cost
~1.6k tokens
SKILL.md length
508 words
Files
3 (incl. scripts, references)
Skills in repo
1
Repo updated
First seen
Licence
MIT

At a glance

Adds missing Simplified and Traditional Chinese translations to the Claude Desktop Chinese patch across three layers, then checks how many mappings actually hit.

  • Works in 2 steps: frontend-zh-*.json(必须有 key——在 en-US.json… → frontend-hardcoded-zh-*.json(覆盖在线 DOM…
  • Translating interface text that a screenshot shows is still in English
  • SKILL.md covers 三层汉化机制, 工作流, 陷阱清单(都真实踩过) and 术语对照表
  • Runs Python scripts from its folder; calls python3, node and claude

What it does

Used when someone sends a screenshot of untranslated Claude Desktop screens or asks for Chinese translations for a new interface version, this skill works across three layers of the claude-desktop-zh-cn patch. Layer one is the i18n key lexicon, resources/frontend-zh files for zh-CN, zh-TW and zh-HK that feed the app's react-intl components; layer two is a hardcoded lexicon of source and target pairs for text that bypasses i18n; layer three is dynamic regex rules in the DOM translation script for counts, dates and sentences with variables.

The workflow locates keys by looking up the displayed text in the installed app's English language pack, decides the translations for all three Chinese locales with a glossary, and writes each one into both the key file and the hardcoded list, since some windows only honor keys. Special cases are listed: curly and straight quotes need separate entries, text split around links needs several entries, and so do sentences broken by code spans and headings shown in capitals by CSS. Dynamic text needs regex rules added in the patch script and its Windows installer template, and the two engines must be changed together.

A bundled Python script, scripts/verify_mapping.py, verifies mapping hit rates, and a reference note describes verification through computer use. The instructions are written in Chinese.

When your agent uses it

  • Translating interface text that a screenshot shows is still in English
  • Supporting Simplified and Traditional Chinese in a new Claude Desktop version
  • Adding regex rules for dynamic text with counts or dates
  • Verifying that translation mappings match the installed app

Example prompts

  • “These settings screens are still in English, so add Chinese translations for them.”
  • “Add zh-CN, zh-TW and zh-HK strings for the new sidebar labels.”
  • “Write a regex rule so the delete chats confirmation with a count shows up in Chinese.”

Requirements

  • A checkout of the claude-desktop-zh-cn project
  • Claude Desktop installed, for its English language pack
  • Python, for scripts/verify_mapping.py

Workflow steps

2 steps, taken from the first numbered list in SKILL.md.

  1. frontend-zh-*.json(必须有 key——在 en-US.json 里按值反查;只写硬编码对在该窗口不生效);
  2. frontend-hardcoded-zh-*.json(覆盖在线 DOM 层与本地 bundle 静态替换)。

What it can do on your machine

Read from SKILL.md and the folder at commit daee457. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 1 file in scripts/ (Python), which the agent can run.

    Shell commands in SKILL.md call:

    • python3
    • node
    • claude
    • git
    • gh

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use git and gh, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Claude Desktop Chinese Localization loads about 1.6k tokens when it runs, and up to ~4.2k if it reads all its reference files. Until then it costs about 50 tokens; SKILL.md has 508 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~50
When it runs · the whole SKILL.md, loaded when a task matches
~1.6k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~4.2k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.

SKILL.md

The full file from javaht/claude-desktop-zh-cn at commit daee457, republished under its MIT licence (© javaht). 508 words, ~1,629 tokens.

Download SKILL.mdSave it as .claude/skills/claude-desktop-zh-localize/SKILL.md (or your agent's skills folder). This skill also uses 2 other files; get the full folder from GitHub.
name
claude-desktop-zh-localize
description
为 claude-desktop-zh-cn 项目补全 Claude Desktop 未汉化界面。当用户发来 Claude Desktop 界面截图并指出未翻译的英文(如"这些没汉化"、"帮我汉化一下"),或要求为新版 UI 增加简体/繁体中文翻译时立即使用。覆盖 i18n 键值词表、硬编码词表与 DOM 动态正则三层,并自动验证映射命中率。

Claude Desktop 中文补丁 · 汉化工作流

本项目是 Claude Desktop 的本地中文补丁。界面文本通过三层机制汉化,新增翻译时必须按目标文本的性质选择正确的层,三层全部落位后统一验证。

三层汉化机制

层文件作用范围
1. i18n 键值词表resources/frontend-zh-{zh-CN,zh-TW,zh-HK}.json走 react-intl 的标准组件。合并进应用的 zh-*.json,有 key 即原生显示中文
2. 硬编码词表resources/frontend-hardcoded-zh-*.json([源文, 译文] 二元组列表)未走 i18n 的前端 bundle 文本(安装时静态替换 JS),同时并入在线 DOM 翻译映射
3. DOM 动态正则scripts/patch_claude_zh_cn.py 的 build_online_dom_translation_script() 中 G=[...] 数组;Windows 同款模板在 scripts/install_windows.ps1动态文本:计数、日期、时间区间、带变量的句子。两个引擎必须同步修改

桌面壳层文本(极少)放 resources/desktop-zh-*.json。

工作流

第 1 步:定位 i18n key

在已安装应用的英文语言包中按值精确匹配(项目词表只保留当前版本存在的 key):

python
import json
en = json.load(open("/Applications/Claude.app/Contents/Resources/ion-dist/i18n/en-US.json"))
for text in ["Theme", "Chat font"]:
    print(text, {k for k, v in en.items() if v == text})
  • 精确匹配不到时用小写子串模糊搜索,并去前端 bundle(/Applications/Claude.app/Contents/Resources/ion-dist/assets/v1/*.js)里确认组件写法。
  • 截图里的文本往往是多个 DOM 节点拼出来的(链接前后各一个 text node),要分别找。
第 2 步:确定三地译文

zh-CN / zh-TW / zh-HK 各写一份,遵守下方术语表。同一个英文值若有多个 key,全部都要写。

第 3 步:写入词表

关键机制(实测踩坑后确认):配置窗口(配置第三方推理)和主窗口首页走 react-intl + 语言包 key,DOM 注入层对它们无效!因此每条翻译必须同时写入:

  1. frontend-zh-*.json(必须有 key——在 en-US.json 里按值反查;只写硬编码对在该窗口不生效);
  2. frontend-hardcoded-zh-*.json(覆盖在线 DOM 层与本地 bundle 静态替换)。

用脚本一次性更新三个 frontend-zh-*.json(dict,key: 译文)和三个 frontend-hardcoded-zh-*.json(list of [source, target])。硬编码词表注意:

  • 弯引号与直引号各写一条(can't 与 can't 是两个不同源串);
  • 链接前后拆分的文本节点,前导节点要写"带尾随空格"和"不带"两条,例如 "...within Anthropic's guidelines. Learn more" 的前半句 Claude will keep these in mind ... within 需单独成条;
  • 被 <code> 片段拆开的句子(如 "when enabled is true"):key 的译文直接含反引号整体翻译("当 `enabled` 为 true 时……"),DOM 层则需按静态分段逐段映射;
  • CSS 大写显示的标题(如页面显示 NETWORK PROXY)实际 key 值可能是 Network proxy,按 key 原值匹配;
  • 源文与译文相同的条目会被丢弃(见陷阱 1),不能"原样保留"。
第 4 步:动态文本写正则规则

凡含数字/日期/变量的句子(Delete 3 chats?、Updated Aug 19、Past 3 months)不能靠静态映射,必须在两处同步加规则:

  1. scripts/patch_claude_zh_cn.py:在 build_online_dom_translation_script() 的 G=[...] 数组加 [/^...$/,"译文 $1"];可变的措辞先在函数开头的 if lang_code == "zh-CN": / else: 分支里定义文本变量。
  2. scripts/install_windows.ps1:$template = @'...'@ 模板中加同款规则;新文本变量走 __PLACEHOLDER__ 占位符——(a) 在模板首行 const L=...,XXX=__XXX__; 声明;(b) 在函数体用 $xxxText = if ($Language -eq "zh-CN") { "...$1..." } else { "..." }定义(PowerShell 双引号串中$1要写成 ``$1 ``);(c) ConvertTo-Json -Compress 后追加到函数末尾的 .Replace("__XXX__", $xxxTextJson) 链。

写完正则先用 Node 快速验证匹配:

bash
node -e 'const G=[[/^Past (\d+) months?$/,"过去 $1 个月"]];for(const s of ["Past 3 months","Past 1 month"]){const m=s.match(G[0][0]);console.log(s,"->",m?G[0][1].replace("$1",m[1]):"NO MATCH")}'
第 5 步:验证
bash
# 三地映射命中 + 废弃键检查(有未命中即退出码 1)
python3 skills/claude-desktop-zh-localize/scripts/verify_mapping.py "Theme" "Past 3 months" ...

# 语法检查
python3 -m py_compile scripts/patch_claude_zh_cn.py scripts/patch_linux_asar.py

verify_mapping.py 默认读 /Applications/Claude.app,可用 CLAUDE_APP=/path/to/Claude.app 覆盖。需要端到端确认时再跑 python3 scripts/patch_claude_zh_cn.py --user-home "$HOME" --dry-run(约 5 分钟,非必需)。

第 6 步:Computer Use 视觉回归验证(可选但推荐)

用户要求"测试页面"、"看看汉化效果",或批量补词之后需要真机确认时执行:重跑安装脚本把词表打进 /Applications/Claude.app,再用 computer-use 逐页截图核对。完整分步手册(含权限前置条件、bootstrap 代码、逐页核对清单、判定标准)见 references/computer-use-verification.md,执行前必读。

第 7 步:提交

默认不主动提交;用户要求提交时:从 main 切 feat/... 分支 → git add resources scripts → commit(feat: ...)→ push → gh pr create → 报告 PR 链接,等用户确认后再 merge。

Show full SKILL.md (262 more words)Show less

陷阱清单(都真实踩过)

  1. 源文 == 译文的条目会被静默丢弃。is_online_dom_translation_entry() 要求 source != target,所以 "Pull requests" 这类想保留英文的词必须给出真译文(如"拉取请求")。
  2. 含 { 或换行的文本进不了 DOM 映射(长度上限 1000)。ICU 复数串如 {count, plural, ...} will be permanently deleted 只能写进硬编码词表(对本地 bundle 生效),在线 DOM 侧必须配正则:[/^(\d+) items? will be permanently deleted\./, ...]。
  3. DOM 文本节点会在链接处被拆开,整句静态映射匹配不上。处理方式见第 3 步的前导节点变体。
  4. macOS 与 Windows 引擎必须同步。只改 Python 不改 ps1,Windows 在线页面会漏翻;反之亦然。
  5. 不要往 frontend-zh-*.json 写 en-US.json 里不存在的 key——合并时会被忽略并计入 extra old keys,验证要求该值恒为 0。
  6. 硬编码词表是 dict 合并语义(后写覆盖同源文),重复添加无害,但弯/直引号、带不带空格是不同 key。
  7. ⚠️ 通用单词/数据标识符严禁进硬编码词表。硬编码替换会命中 JS 源码里该词的所有带引号出现,包括数据上下文。真实事故:"Pin"→固定 把 icon:"Pin" 图标名改成中文(图标全坏);"Engineering"→工程 把 workFunction:"Engineering" 服务端数据值和 Ax=["...",...] 角色数组改掉,与未替换的 unquoted 对象键 Engineering:[...] 失配 → f["工程"] undefined → 连接器页崩溃(TypeError: e is not iterable)。判定规则:单词若同时是 (a) 图标/组件名、(b) 服务端数据值、(c) 对象键/switch-case/数组元素,就绝不能进硬编码词表——改用 react-intl key(frontend-zh-*.json)提供翻译。若已发生污染:在 ion-dist/assets/v1/*.js 中把 "中文" 批量还原为英文原词(UI 显示由 intl catalog 提供,不受影响),不要碰 app.asar(M 映射的键值对是合法的)与 i18n catalog。
  8. 主进程菜单翻译自 2.9939.2 起改走 desktop 语言包(intl catalog):菜单缺失翻译时应用会把 Missing message: "<id>" ... (default message (英文)) as fallback 打到 stderr——前台启动应用收集该日志即可拿到完整的未翻译菜单 key 清单(71 个),写入 desktop-zh-*.json 后由 install_desktop_locale 合并进 Contents/Resources/zh-CN.json。
  9. ⚠️ 2.9939.2(Electron 44)两大挂死:patch_online_locale_lock(DesktopIntl 锁,任何形态包括可重入标志位)与菜单运行时补丁都会让主进程在菜单构建后、窗口创建前陷入 JS 深度递归——进程活着但永远无窗口、AX 超时。两者都已加版本门控(>= 2.9939.2 跳过注入),新版菜单由 desktop 语言包覆盖。若需诊断:sample <pid> 看主线程是否陷入 JS 深度递归(成千层重复栈帧)。
  10. 应用启动时会把 Claude-3p/config.json 的 locale 归一化为系统语言。修 locale 的正确顺序:杀应用 → 改配置 → 启动;运行时改会被回写覆盖。界面整体回退英文时重跑补丁脚本即可。
  11. 手工 codesign --force --deep --sign - 会清空 entitlements(丢失 com.apple.security.virtualization),导致补丁校验失败。必须用补丁自带的 resign_app(从原二进制读取并保留授权),或从最近一个由补丁签名的备份恢复。

术语对照表

英文zh-CNzh-TWzh-HK
session会话工作階段工作階段
project项目專案項目
data数据資料數據
file / folder文件 / 文件夹檔案 / 資料夾檔案 / 資料夾
settings设置設定設定
default默认預設預設
plugin / skill插件 / 技能外掛程式 / 技能插件 / 技能
import / export导入 / 导出匯入 / 匯出匯入 / 匯出
sign out退出登录登出登出
account账号帳號帳戶
archive归档封存封存
group分组群組分組
token令牌權杖權杖
memory记忆記憶記憶
sandbox沙箱沙箱沙箱
create创建建立創建
rename重命名重新命名重新命名
sidebar侧边栏側邊欄側邊欄
learn more了解更多深入了解了解更多

不确定的术语先在现有词表里 grep 既有译法,保持一致优先。

© javaht, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 2 other files (scripts, references) in skills/claude-desktop-zh-localize of javaht/claude-desktop-zh-cn.

  • SKILL.md
  • references/computer-use-verification.md
  • scripts/verify_mapping.py

Open the folder on GitHubat commit daee457

Compare with similar skills

Claude Desktop Chinese Localization next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Claude Desktop Chinese Localization compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Claude Desktop Chinese Localization this skilljavaht/claude-desktop-zh-cn7.5k—~1.6kAutomated safety check: PassMIT
Ok Script I18nAliceJump/ok-end-field555—~828Automated safety check: PassAGPL-3.0
Fluent MigrationBrowserWorks/waterfox-android3791 repos~4.2kAutomated safety check: PassCustom licence
Ok Script I18nbaoxin1100/ok-kes101—~903Automated safety check: PassNone
I18nbrickbots/PiFinder250—~2.8kAutomated safety check: PassGPL-3.0
Viewer i18n Translatorliaohch3/claude-tap3.3k—~666Automated safety check: PassMIT

Similar skills

  • Ok Script I18n

    AliceJump/ok-end-field

    Maintain gettext translations for ok-script task UI and runtime messages.

    555 GitHub stars~828 tokensUpdated today
    Frontend & DesignAuto-check passed
  • Fluent Migration

    BrowserWorks/waterfox-android

    A skill your agent uses when a patch or local changes rename, restructure, move, or replace Fluent (.ftl) strings - or migrate legacy .properties strings to Fluent - and you need a migration recipe…

    379 GitHub starsUsed in 1 repo~4.2k tokens
    Frontend & DesignAuto-check passed
  • Ok Script I18n

    baoxin1100/ok-kes

    Add, sync, repair, and compile gettext translations for ok-script Python task classes and task metadata.

    101 GitHub stars~903 tokensUpdated 10 days ago
    Frontend & DesignAuto-check passed
  • I18n

    brickbots/PiFinder

    PiFinder's internationalization (i18n) workflow — marking strings for translation, running the Babel extract/update/compile pipeline, adding or updating language translations, and filling in missing…

    250 GitHub stars~2.8k tokensUpdated 3 days ago
    Frontend & DesignAuto-check passed
  • Viewer i18n Translator

    liaohch3/claude-tap

    Fills missing translations in claude-tap's viewer_i18n.json by sending untranslated keys to OpenRouter for Japanese, Korean, French, Arabic, German and Russian.

    3.3k GitHub stars~666 tokensUpdated yesterday
    Frontend & DesignAuto-check passed
  • Frappe Core Translation

    Impertio-Studio/Frappe_Claude_Skill_Package

    A skill your agent uses when implementing translations/i18n in Frappe v14-v16 apps.

    189 GitHub stars~1.9k tokensUpdated 24 days ago
    Writing & ContentAuto-check passed

Works with

Questions about Claude Desktop Chinese Localization

What does Claude Desktop Chinese Localization do?

Adds missing Simplified and Traditional Chinese translations to the Claude Desktop Chinese patch across three layers, then checks how many mappings actually hit. Used when someone sends a screenshot of untranslated Claude Desktop screens or asks for Chinese translations for a new interface version, this skill works across three layers of the claude-desktop-zh-cn patch. Layer one is the i18n key lexicon, resources/frontend-zh files for zh-CN, zh-TW and zh-HK that feed the app's react-intl components; layer two is a hardcoded lexicon of source and target pairs for text that bypasses i18n; layer three is dynamic regex rules in the DOM translation script for counts, dates and sentences with variables.

When should I use Claude Desktop Chinese Localization?

Claude Desktop Chinese Localization fits situations like: translating interface text that a screenshot shows is still in English; supporting Simplified and Traditional Chinese in a new Claude Desktop version; adding regex rules for dynamic text with counts or dates; verifying that translation mappings match the installed app.

How do I install Claude Desktop Chinese Localization in Claude Code?

Run `npx skills add javaht/claude-desktop-zh-cn --skill claude-desktop-zh-localize -a claude-code`. Or copy the skill folder (skills/claude-desktop-zh-localize in javaht/claude-desktop-zh-cn) into .claude/skills/claude-desktop-zh-localize in your project. Claude Code loads it when a task matches its description.

How do I install Claude Desktop Chinese Localization in Codex?

Run `npx skills add javaht/claude-desktop-zh-cn --skill claude-desktop-zh-localize -a codex`. Or copy the skill folder (skills/claude-desktop-zh-localize in javaht/claude-desktop-zh-cn) into .agents/skills/claude-desktop-zh-localize in your project. Codex loads it when a task matches its description.

Can I use Claude Desktop Chinese Localization in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add javaht/claude-desktop-zh-cn --skill claude-desktop-zh-localize -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/claude-desktop-zh-localize, .gemini/skills/claude-desktop-zh-localize, .github/skills/claude-desktop-zh-localize and .opencode/skills/claude-desktop-zh-localize in your project.

What does Claude Desktop Chinese Localization need to run?

Going by SKILL.md and its folder, Claude Desktop Chinese Localization needs Python for the scripts in its folder and the command-line tools its instructions call (python3, node, claude, git and gh). Our summary lists: A checkout of the claude-desktop-zh-cn project; Claude Desktop installed, for its English language pack; Python, for scripts/verify_mapping.py.

Does Claude Desktop Chinese Localization access the network?

SKILL.md contains no URLs. Its commands use git and gh, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Claude Desktop Chinese Localization safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Claude Desktop Chinese Localization use?

Claude Desktop Chinese Localization is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Claude Desktop Chinese Localization use?

About 1.6k tokens (SKILL.md is roughly 6.5k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 2.6k tokens, read only when the agent opens those files.

What are the alternatives to Claude Desktop Chinese Localization?

Skills that share tags, products or a category with Claude Desktop Chinese Localization: Ok Script I18n (AliceJump/ok-end-field, 555 stars), Fluent Migration (BrowserWorks/waterfox-android, 379 stars), Ok Script I18n (baoxin1100/ok-kes, 101 stars) and I18n (brickbots/PiFinder, 250 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Claude Desktop Chinese Localization?

javaht (a GitHub user) maintains it in javaht/claude-desktop-zh-cn, which has 7,529 GitHub stars. The repository was last updated on October 5, 2026.

Source: javaht/claude-desktop-zh-cn on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.