rea
morluto
Reverse engineer anything with agents, from app behavior down to native binaries.
PROJECT TOPICS
INSTALL REFERENCE
dsh plugin --profile web add github:2189166478-bot/dsh-zh-cn
该命令指向仓库当前默认分支;尚无绑定当前 commit 的完整验证结果。
PROJECT README
把 DeepSeek Harness(DSH)里已安装插件的英文界面换成中文。
很多第三方 DSH 插件只写英文:插件名、说明、按钮、菜单、开关提示全是英文。这个插件带一份离线中文词典,在页面上做整串精确替换;打开开关就汉化,关掉立刻恢复原文。
装好之后在「设置 → 汉化」里开关;插件市场「已安装」列表里的插件名与说明会变成中文。
…、项目符号、大小写);聊天正文、代码块、输入框、编辑器(Monaco / xterm / CodeMirror)一律不碰dsh.client 的已装插件(40 个)的客户端字符串 + 人工 UI 词表 + 插件中文名要求:DSH >= 0.2.0-rc.1(Web 界面)。
git clone https://github.com/2189166478-bot/dsh-zh-cn.git
然后在 DSH 里让插件管理器安装这个目录(target 用绝对路径):
plugin_manager({ action: "install_bundle", target: "D:/path/to/dsh-zh-cn" })
装完如果界面没出现「汉化」,重启一次 DSH。
插件用
link:方式安装,移动或删除这个目录会让插件失效,重新install_bundle指向新路径即可。
localStorage(键名 dsh-zh-cn:enabled),默认开启extract_corpus.py 从 ~/.dsh/profiles/<profile>/node_modules 里所有带 dsh.client 的包中抽出英文字符串字面量;translate_bing.py 调用微软 bing 的批量翻译端点(免费、无需 key)翻成中文;再叠一份人工词表。结果写进 dictionary.json。build_bundle.py 把词典合并(dictionary.json → glossary.json → curated.json,后者覆盖前者)、过滤垃圾条目,替换进 client.template.js 的 __DICT__ 占位,产出 client.js。client.js 用 MutationObserver 监听 DOM,对文本节点与 placeholder / title / aria-label / alt / aria-description 做整串查表替换;命不中就不动。渲染到 Shadow DOM(Web Component)里的内容也会被扫到。# 1. 加了新词 → 直接重建
python build_bundle.py
# 2. 插件更新后冒出一堆新英文 → 重新抽词 + 增量翻译 + 重建
python extract_corpus.py # → corpus.json
python translate_bing.py # → 增量补进 tr_cache.json / dict.json
python build_bundle.py
改完把 package.json 的版本号 +1,在 DSH 里卸载再安装即可(客户端半边会热加载)。
三种词典文件的分工:
| 文件 | 用途 |
|---|---|
dictionary.json |
机翻 + 人工整理后的主词典(4700+ 条),一般不用手改 |
glossary.json |
通用 UI 词(按钮、菜单项、字段名),优先级更高 |
curated.json |
逐条覆盖:插件中文名、某句具体文案,优先级最高 |
想修某条翻译:在 curated.json 里加 "英文原文": "中文",重建即可。
Save 3 changes、3 of 25 selected)不翻,保持英文curated.json 覆盖那一条<iframe> 或 canvas 里画出来的文字(画布、终端输出)翻不到dsh-zh-cn/
├── package.json # dsh.bundle / dsh.client 声明
├── index.js # 宿主半边(空实现)
├── cordis.patch.yml # 插入插件条目 id: zh-cn
├── client.template.js # 客户端半边源码(__DICT__ 占位)
├── client.js # 构建产物(词典已内嵌,别手改)
├── icon.svg
├── build_bundle.py # 合并词典 → client.js
├── extract_corpus.py # 从已安装插件抽英文串
├── translate_bing.py # 批量机翻(构建期用)
├── dictionary.json # 主词典
├── glossary.json # 人工 UI 词表
└── curated.json # 逐条覆盖
English: dsh-zh-cn is a localization plugin for DeepSeek Harness. It ships an offline Chinese dictionary and translates English UI strings of installed plugins at runtime via a MutationObserver (exact whole-string matches only; chat content, code blocks and inputs are skipped). Toggle it in Settings → 汉化; disable to restore the original text. To add or fix entries, edit glossary.json / curated.json and run python build_bundle.py.
CLASSIFICATION EVIDENCE
系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。当前命中: deepseek-harness。