dsh-at-file
FSMargoo/dsh-at-fileCodex 风格的 `@file` 文件引用,输入框里直接搜索并引用工作区文件。
為 DeepSeek Harness Web UI 語言選單新增六種語言(繁體中文、日本語、한국어、Français、Deutsch、Español):各語言逐條精譯,缺字串自動兜底(繁中即時簡轉繁、其他語言回退英文),官方更新與第三方插件都能覆蓋。
Languages: English · 繁體中文 · 日本語 · 한국어 · Français · Deutsch · Español
A DSH plugin that adds multiple languages to the DeepSeek Harness Web UI language options — 繁體中文, 日本語, 한국어, Français, Deutsch, Español. Known UI strings use hand-polished translations (each language translated from the English baseline); any new / updated / third-party strings fall back to English (or, for 繁體中文, a runtime Simplified→Traditional converter) — so upstream UI updates and other plugins are covered without re-translating every language.
en dictionaries are complete for every namespace), so no garbled or missing text appears.localStorage and survives reloads.Recommended: install from GitHub (give this link to an agent, or run it yourself)
dsh plugin --profile web add https://github.com/asd13006/dsh-multi-lang-ui
Or let an agent install it: paste this repository link into DSH and ask the agent to run the command above.
After installation, restart dsh web, then pick your language in "Settings → General → Language".
Removal (important): always use dsh plugin remove — it cleans up the profile's bundle list; manually deleting the package can leave dangling references that prevent DSH from starting:
dsh plugin --profile web remove dsh-multi-lang-ui
npm install (once published):
dsh plugin --profile web add dsh-multi-lang-ui
locale translate(ns, key)
│
├─ active is one of our languages ?
│ ├─ curated translation exists (DICTS) ? → return it
│ └─ missing (new strings / third-party plugins)
│ ├─ zh-TW → convert the zh value via the char table
│ └─ others → fall back to the en value
└─ other languages → handled by dsh-client-locale as usual
At startup the plugin:
locale.translate (curated → fallback) and locale.setLocale (accepts our language ids, writes localStorage);locale/change to refresh the settings row);locale.adopt — the built-in locale's host preference loads asynchronously and resets active to locale.preference ?? browser language; if the user's preference is one of our languages, it is re-asserted;No. Three layers of protection:
node scripts/extract.mjs <path-to-node_modules/@deepseek-ai> # 1. extract the latest zh/en dicts into src/zh-src/ and src/en/
# 2. translate src/en/*.json → src/<lang>/*.json (LLM batch OK; keys and placeholders must match)
node scripts/assemble.mjs # 3. regenerate lib/client.js
node scripts/collect-chars.mjs [third-party-client.js...] # collect all Simplified characters in use
node scripts/check-missing-chars.mjs # list Simplified-only characters missing from the char table
If any are reported, add the "简字": "繁字" mapping to src/zh-tw-parts/chars.json, then run node scripts/assemble.mjs.
dsh-multi-lang-ui/
├── package.json # plugin manifest (dsh.client.inject / bundle.patch)
├── index.mjs # Host side: no-op entry (pure client plugin)
├── cordis.patch.yml # Host plugin entry
├── lib/client.js # generated browser bundle (do not edit by hand)
├── src/
│ ├── zh-src/ # extracted zh (Simplified Chinese) dicts (generated data)
│ ├── en/ # extracted en dicts (translation baseline for all languages)
│ ├── zh-tw/ ja/ ko/ fr/ de/ es/ # per-language curated translations (quality baseline)
│ ├── zh-tw-parts/
│ │ ├── chars.json # Simplified→Traditional char table (zh-TW runtime fallback)
│ │ ├── simplified-only.txt # Simplified-only character checklist (maintenance)
│ │ └── collected-chars.txt # collect-chars output
│ └── TERMINOLOGY.md # terminology reference (used when polishing translations)
├── scripts/ # extract / assemble / verify / collect / check
└── verify/ # Playwright end-to-end verification scripts
localStorage (per-browser); the built-in locale is also non-persistent for remote browsers — this is a consistent design.check-missing-chars.mjs periodically and extend the table.localStorage["dsh-multi-lang-ui.preference"] (a language id such as "ja").index.mjs) is a no-op.dependencies is empty — installing downloads nothing new; the client bundle is fully self-contained (zero require); peer dependencies are official packages already present in DSH.Q: Why doesn't dshmarket show my plugin's description?
A: The market's description and category come from the curated "awesome-dsh-plugin" registry (data/plugins/<owner>__<repo>.yml), not from the local package.json. Once the entry is merged into that registry it will appear.
Q: Do I need to publish to npm to get a version number in the market?
A: No. The version of an installed plugin is read from its local node_modules package.json (a GitHub install already shows v0.1.0). npm publishing only affects npm search and plain-npm installs.
Q: Do I need to update the plugin when upstream adds new strings?
A: No — the runtime fallback covers new strings immediately, including third-party plugins' Simplified Chinese strings. Regenerate the curated dictionaries with scripts/ when you want best-quality sync.
Q: DSH won't start after removing the plugin?
A: Always remove via dsh plugin --profile web remove dsh-multi-lang-ui (it cleans up the profile's bundle list). Manually deleting the package can leave dangling references that break startup.
Q: After a DSH update the plugin's languages disappeared, or the page says "authentication required"?
A: DSH 0.1.1+ added browser authentication — open the tokenized URL printed by dsh web in your terminal (e.g. http://127.0.0.1:3080/?token=…); without it the server answers 401. If the languages still don't appear, update the plugin (dsh plugin --profile web remove dsh-multi-lang-ui, then add it again) — plugin 0.1.1+ declares inject: ["locale"] and no longer depends on plugin load order.
MIT