dsh-i18n-zh-hant
繁體中文(香港)語言包 for the DeepSeek Harness (DSH) web GUI.
Adds Traditional Chinese to the language selector and carries zh-Hant
dictionaries for every core and community plugin locale namespace, so the whole
interface reads in Traditional Chinese instead of falling back to English.
The shipped Simplified Chinese (zh) locale is not modified — the two
coexist and you can switch between them at any time.
What it does
DSH's web GUI is localised through a per-namespace locale registry. Each client
plugin registers dictionaries for its own namespace, and the registry resolves a
lookup by walking the active language's fallback chain, then repeating it in the
shared common namespace, then showing the key itself.
This package is a pure browser plugin (its host half is intentionally a
no-op). On page load it:
- Registers the language definition
zh-Hant — label 繁體中文, fallback en —
through ctx.locale.addLanguage, which is what makes it appear in
Settings → General → Language.
- Registers one
zh-Hant dictionary per covered namespace using the
single-locale form ctx.locale.register(ns, 'zh-Hant', dict).
Registration is additive per locale. Each namespace keeps the zh and en
dictionaries its owning package already registered, so Simplified Chinese is
untouched and remains fully selectable. Any namespace or key this pack does not
cover falls through to English, exactly as the source packages behave.
Coverage
| |
|---|
| Namespaces | 56 |
| Keys | 2,860 |
| Scope | Core harness client packages + community plugin families |
Covered namespaces:
Click to expand the full list
approval betterSidebar chat
command common conversation
cordis deliverables describe-image
documentHtml documentMarkdown dsh-skill-explorer
dsh-ssh dsh-web-ui-market dsh-web-ui-preset-center
dsh-web-ui-session-archive dsh-web-ui-usage feedback
git-graph goal job
model model-caps open-in-app
permission.access pet plan
question reference remote
schedule.catalog session-log-download setting-restart
settings settings.agentPreset settings.locale
settings.models settings.permission settings.pluginInventory
settings.plugins settings.theme sidebar
sidebarDocumentPreview sidebarFiles sidebarImage
sidebarPdf sidebarRight skill
skinCenter slash.menu subagent
task-board trajectory web-ui-plugins
workflowRun workspace
Requirements
- DSH
>= 0.1.5-rc.1 with the web profile.
- Node.js 20+ only if you intend to run the maintainer tooling.
Install
From a local checkout
git clone https://github.com/jimbb/dsh-i18n-zh-hant.git
dsh plugin --profile web add link:./dsh-i18n-zh-hant
From a directory inside your profile
Copy or symlink this package into your profile's node_modules:
mkdir -p ~/.dsh/profiles/web/node_modules
cp -r dsh-i18n-zh-hant ~/.dsh/profiles/web/node_modules/
Then add the row to ~/.dsh/profiles/web/cordis.patch.yml:
- insert:
- id: web-ui-i18n-zh-hant
name: 'dsh-i18n-zh-hant'
Activate
Restart the host — client package metadata is cached per loader entry until
restart, so a running dsh web will not serve a newly added bundle:
dsh web
Reload the page, then choose 繁體中文 in Settings → General → Language.
Verify it is working
With the host running:
npm run check # bundle structure + consistency with dictionaries.json
npm run verify # OpenCC script audit (requires: pip install opencc)
npm run check loads lib/client.js in a sandbox against a mock locale service
and asserts it registers exactly one language (zh-Hant, fallback en) plus one
dictionary per namespace, with contents identical to lib/dictionaries.json.
npm run verify derives the Simplified-only character set from OpenCC's
Simplified→Traditional map and asserts no Simplified character survives in any
translated string, and that no value is empty.
Repository layout
lib/client.js the browser bundle (generated — do not hand-edit)
lib/index.js host half (intentional no-op)
lib/dictionaries.json the translation data, namespace -> { key: text }
cordis.patch.yml profile bundle patch that inserts the plugin row
dev/ maintainer tooling (see below)
verify/ bundle + script verification
Regenerating after a plugin update
When an upstream plugin adds or changes its Chinese strings, those keys fall back
to English until this pack is regenerated. The toolchain is four steps:
# 1. Read every installed client plugin half and collect its zh/en dictionaries.
node dev/extract-dictionaries.mjs \
~/.dsh/profiles/web/node_modules \
<dsh-install>/node_modules \
--out /tmp/upstream.json
# 2. Build translatable batches (namespace, key, Simplified source, English ref).
node dev/make-batches.mjs /tmp/upstream.json /tmp/translation
# 3. Translate /tmp/translation/batches/NN.json into out/NN.json as
# [{ "id": <number>, "zhHant": "<Traditional Chinese>" }, ...]
# Placeholders such as {count} must be preserved byte-for-byte.
# 4. Merge the translations and rebuild the bundle.
node dev/merge-translations.mjs /tmp/translation --out lib/dictionaries.json
node dev/build-bundle.mjs
node verify/check-bundle.mjs
lib/client.js is generated from lib/dictionaries.json; npm run check fails
if the two ever drift, so commit both together.
Translation notes
- Variant: Traditional Chinese with Hong Kong terminology — 檔案, 設定,
網絡, 專案, 軟件, 列印, 儲存, 螢幕, 快取, 伺服器.
- Placeholders (
{count}, {total}, {error}, …) are preserved verbatim and
are checked at every stage.
- Strings are machine-generated and then validated for script correctness with
OpenCC. Wording can still be imperfect —
corrections are welcome.
Known limitations
dsh-web-ui-market/online is empty in the upstream Simplified and English
dictionaries. The key is deliberately omitted here so the registry's fallback
chain handles it exactly as it does for the Simplified locale.
- Six characters (台, 群, 峰, 划, 游, 床) are reported by the verifier as
"ambiguous" because OpenCC's
s2t map prefers an archaism or a Taiwan variant
(臺, 羣, 峯, 劃, 遊, 牀). They are legitimate Traditional forms in Hong Kong
usage (後台, 社群, 高峰, 划選, 上游, 起床) and are excluded from the hard check.
- Not every string in the GUI is localised by the source packages themselves;
copy that bypasses the locale registry is out of reach for any language pack.
Contributing
Corrections to wording are the most valuable contribution. Edit
lib/dictionaries.json, run npm run check && npm run verify, then
node dev/build-bundle.mjs and include both files in your pull request.
Uninstall
Delete the row from ~/.dsh/profiles/web/cordis.patch.yml and remove the package
directory, then restart dsh web.
License
Apache-2.0.