Preface¶
DeepSeek Harness (DSH) adopts a “everything is a plugin” composition approach, where the plugin list in settings displays the title and description of each package. Most community plugins only have English LocalizedText ({ en: "..." }). When the interface switches to Chinese, resolveText() still falls back to the original English text, resulting in high reading and filtering costs.
Common remedies involve modifying the DOM, hooking up third-party translation APIs, or maintaining hardcoded dictionaries—which either conflict with React re-rendering, require managing extra API keys and quotas, or fail to keep up with plugin updates. Below, we introduce the community plugin dsh-plugin-zh-cn (Maintainer: Daneel0001). It supplements the title / description of installed plugins from { en } to { en, zh } at the data layer. Translation utilizes the default model selected in DSH settings (agentDefaultModel), and results are written to the profile’s local cache. It does not touch the DOM, call third-party translation APIs, or rely on built-in dictionaries.
What is this¶
dsh-plugin-zh-cn reads the local translation cache upon Harness startup. For installed plugin metadata lacking a zh field, it calls the DSH built-in llm service to generate Simplified Chinese, which is then rendered by the official resolveText(). When the interface language is Chinese, Chinese titles and descriptions are displayed; for English or other language interfaces, it is character-by-character identical to the state before installation.
Repository: https://github.com/Daneel0001/dsh-plugin-zh-cn
Community Directory Page: https://www.skillhub.cn/plugins/Daneel0001/dsh-plugin-zh-cn (An independent site with no official affiliation to DeepSeek or High-Flyer)
The current package version is 2.0.8, License MIT.
Core Features¶
Data Layer Injection, Zero DOM Manipulation¶
The data chain for the plugin list flows from pluginInventory.list() to readPluginInventory, ultimately obtaining { title, description } via pluginPackages.metaOf. This plugin wraps the return values of both metaOf and pluginInventory.list, projecting metadata containing only English into { en, zh }. The Chinese interface retrieves zh via DSH’s own resolveText(), avoiding retroactive modification of text nodes.
Translation and Caching¶
- Model Source:
ctx.get('agentDefaultModel').currentSelection(); alternatively, you can specifyprovider/modelin the configuration. If left blank, it uses the default from “Settings → Models”. - Calling Method:
ctx.get('llm').stream(...). A single request translates both the name and description, requiring the model to return JSON only. Names are ≤ 12 Chinese characters, descriptions ≤ 40 Chinese characters. Proper nouns (API, MCP, LLM, etc.) are copied verbatim without translation. - Cache Path (Default):
<DSH_PROFILE_DIR>/dsh-plugin-zh-cn/local-cache.json, incremented by package name. If the English fingerprint remains unchanged, no retranslation occurs. Atomic writes are used (write to.tmpthen rename). - Strict Mode (Default
strict: true): Cache is written only if valid Chinese translations are obtained for both name and description, avoiding mixed-language entries. - Plugins that already have
zhin their metadata (including official built-ins) are skipped. Translation failures retain the English text and log awarn, without crashing the settings page.
Activation Cycle¶
| Timing | Behavior |
|---|---|
| First Startup | Cached items appear in Chinese immediately; new plugins are translated in the background, so they may still appear in English during this startup session. |
| Second Startup | Previously translated items are read directly from the cache without sending translation requests. |
| Hot Operations (No Process Restart) | After background translation completes, switching to the settings page or refreshing the window displays updates (The injection layer queries the cache in real-time). |
Harness restart is required after changing plugin versions; disabling and re-enabling alone does not cause Node to reload the ESM module. Installation or upgrade also requires a restart; refreshing the page alone will not inject new plugins into the module graph of already-open windows.
Installation and Activation¶
Install from Plugin Market (Recommended)¶
Click “Add Plugin” on the “Plugins” page in the DSH Desktop version and enter the repository address:
github:Daneel0001/dsh-plugin-zh-cn
Restart Harness after installation.
Manual Installation (Windows Example)¶
# 1. Place the tgz into the profile's plugins directory
Copy-Item .\dsh-plugin-zh-cn-2.0.0.tgz "$env:DSH_PROFILE_DIR\plugins\"
# 2. Register in two places in <profile>/package.json
# dependencies: "dsh-plugin-zh-cn": "file:<profile>/plugins/dsh-plugin-zh-cn-2.0.0.tgz"
# dsh.profile.bundles: Append "dsh-plugin-zh-cn"
# 3. Actually install using pnpm (This step writes to lockfile and .modules.yaml)
node "$pnpm" install --dir "$env:DSH_PROFILE_DIR"
Step 3 must be completed; simply copying the tgz or manually copying node_modules may result in silent skipping by the profile composition logic.
Configuration Key Points¶
In the composition configuration, the plugin ID is zh-cn-plugin-locale. The main fields are as follows (see the repository README for the complete list):
- id: zh-cn-plugin-locale
name: dsh-plugin-zh-cn
config:
enabled: true # Master switch
strict: true # Write to cache only if both name and description have translations
timeoutMs: 60000 # Timeout for a single translation
maxTokens: 4096
provider: '' # Blank = default model
model: ''
cacheFile: '' # Blank = default local-cache.json under profile
seedFiles: [] # Additional cache initial values (absolute paths), merge only, no overwrite
maxPerStart: 500
delayMs: 200 # Interval between two translations
saveEvery: 8
retry: 3
debug: false
If you wish to see Chinese on the very first startup, you can merge a pre-existing local-cache.json via seedFiles. For format, see examples/local-cache.example.json in the repository.
Typical Usage and Uninstallation¶
- Install and restart DSH. Select a default model in “Settings → Models” (consistent with
agentDefaultModel). - Open the plugin settings page: Cached entries should display Chinese titles and descriptions; newly installed community plugins may initially appear in English until background translation completes, after which refreshing or revisiting the settings page will show the Chinese text.
- Uninstall: Turn off “Plugin Simplified Chinese Localization” in plugin settings and restart; the injection layer will restore callbacks via
ctx.effectcleanup. The runtime cache directory<DSH_PROFILE_DIR>/dsh-plugin-zh-cn/can be manually deleted for a thorough cleanup.
Use Cases and Notes¶
Suitable for: Users who long-term manage large amounts of English metadata community plugins via a Chinese interface; users who wish to unify translation and model quotas through DSH’s existing LLM configuration and accept that “the first startup or new plugin versions may briefly appear in English”.
Notes:
- The plugin runs with the permissions of the current DSH process. It calls the built-in
llmand writeslocal-cache.jsonto its own directory under the profile. Before installation, please read the source code and MIT license to ensure model invocation complies with your environment policies. - It only reads other plugins’
package.jsonand does not modify other plugin directories. It does not perform additional network requests other than model requests. - The enable/disable toggle on the right uses
entry.enabled, which is unrelated to this plugin’s metadata injection.
Conclusion¶
dsh-plugin-zh-cn localizes the “installed plugin display names and descriptions” by completing the task on the metadata and official localization pipeline: no DOM patches, no third-party translation APIs, no hardcoded dictionaries, and graceful degradation to English upon failure. If you primarily browse extensions installed from the plugin market in a Chinese interface, you can consider it a profile-level metadata localization assistant.