dsh-locale-multilingual
为 DeepSeek Harness 增加四种界面语言(繁體中文、日本語、한국어、Français),语料随包内置,完全离线。
安装
dsh plugin --profile web add dsh-locale-multilingual
沙箱测试结果
| 阶段 | 结果 |
|---|---|
| 1 安装 | ✓ |
| 2 列装 | ✓ |
| 3 挂载 | ✓ |
| 4 启动 | — |
四阶段在隔离沙箱里跑:安装(有网)→ 列装 → 挂载 → 启动(后三步断网)。
README
dsh-locale-multilingual



Adds four UI languages to DeepSeek Harness (DSH): 繁體中文 (台灣)、日本語、한국어、Français.
Once installed they show up under Settings → General → Language.
Fully offline. No model API is called and no quota is consumed. The Traditional Chinese dictionary
is produced at runtime by OpenCC; the other three are static JSON files shipped in this repository.
[中文说明在下方 ↓](#中文)
English
Why this exists
DSH ships only two UI locales (zh and en). Its locale service exposes a registration API for
additional language packs, but no dictionaries are provided, so this plugin fills the gap.
DSH Desktop/locales/zh-TW.pak is Electron/Chromium's own locale pack. It controls native menus
and file dialogs, not DSH UI strings, and is not a substitute for this plugin.
Where the translations come from
Language · Source · Notes
繁體中文 (zh-TW) · Runtime OpenCC conversion (cn → twp) · Deterministic and offline; handles glyphs (裡/著/髮) and Taiwan vocabulary (資訊/程式/檔案/滑鼠). No static file
日本語 (ja) · lang/ja.json · Shipped in this repository
한국어 (ko) · lang/ko.json · Shipped in this repository
Français (fr) · lang/fr.json · Shipped in this repository
Structure of lang/*.json:
{
"dicts": { "<namespace>": { "<key>": "<translation>" } },
"texts": { "<original simplified-Chinese string>": "<translation>" }
}
dictsbacks the locale service dictionaries (61 namespaces, 3415 entries);textsbacks the UI whitelist (147 strings from plugins that never go through dictionaries).
All three files cover exactly the same surface as zh-TW: same namespaces, same keys, same
whitelist strings. There is no generation script, because the translations are a one-off manual
artefact; correctness is enforced by comparing key sets.
How it works
DSH UI text comes from three different sources, so there are three channels.
① Locale dictionaries (most official packages)
Side · Responsibility
Browser · Registers the four locales (zh-TW falls back to zh; ja/ko/fr fall back to en), collects the simplified-Chinese entries each package registers, fetches translations, and registers them back under the original namespace
Host · Converts Traditional Chinese with OpenCC on the fly; for the others it reads lang/<locale>.json (cached by mtime, so editing the file takes effect immediately)
② Title bar menus (not in any dictionary)
The 应用 / 编辑 items at the top of the window are drawn by the preload inside a shadow DOM and
never pass through the locale service, so they are patched directly: locate
[data-dsh-windows-menu] and write the label for the active locale.
③ UI string whitelist (plugin copy that bypasses dictionaries)
Some third-party copy — the workbench market page, for example — is hardcoded in the plugin, so it is
patched by exact string matching: only text nodes/attributes identical to a whitelist entry are
replaced. Session titles and message bodies are therefore never touched; conversation content always
stays in its original language.
Both DOM channels pierce shadow DOM and re-scan every 1.5 s. The title bar and some panels mount
after startup, and mutations inside a shadow root never reach a MutationObserver attached to
document.body.
Installation
From npm (recommended):
dsh plugin add dsh-locale-multilingual
Restart DSH, then pick a language under Settings → General → Language.
From GitHub:
dsh plugin add clarag0d/dsh-locale-multilingual
This needs git on the machine, and pnpm resolves the shorthand to an SSH URL
(git+ssh://git@github.com/...), so an SSH key registered on GitHub is required. If either is
missing, use the npm route above instead.
From a local directory (development / personal use):
{
"dependencies": { "dsh-locale-multilingual": "file:C:/path/to/dsh-locale-multilingual" },
"dsh": { "profile": { "bundles": ["dsh-locale-multilingual"] } }
}
Then restart DSH.
Uninstall: drop dsh-locale-multilingual from dsh.profile.bundles (and from the dependencies),
then restart.
Limitations
- Conversation content is never translated. Session titles, message bodies and card contents stay
in their original language; the whitelist only matches exact UI strings.
- Native menus are out of scope. Electron's own menu bar and file dialogs come from
locales/*.pak, which this plugin does not touch.
zh-TWis not stored on disk. Onlyja.json/ko.json/fr.jsonexist underlang/;
Traditional Chinese is converted on demand.
- Translation quality. The
ja/ko/frfiles are hand-maintained; terminology follows the
wording already used in the UI. Corrections via Issues are welcome.
Repository layout
dsh-locale-multilingual/ ├── client.js # Browser half: registers locales, collects entries, patches DOM ├── lib/index.js # Host half: OpenCC, local language files, HTTP routes ├── lang/ # ja.json / ko.json / fr.json ├── ui-strings.json # UI whitelist (147 strings) ├── scripts/verify.mjs # Self-check: coverage parity across languages ├── .github/workflows/verify.yml ├── cordis.patch.yml # bundle patch declaration ├── package.json ├── LICENSE └── README.md
Self-check
npm run verify # same as: node scripts/verify.mjs
It checks four things, with no third-party dependencies:
1. every lang/*.json parses and has both dicts and texts;
2. the n
…(truncated)
以上内容来自 npm 上的 README,我们只做格式化,不改内容。
版本
npm 上共发布:5,最后更新 2026-10-28