dsh-all-over-chinese-to-english
abdelrhmanwaelbishr/dsh-all-over-chinese-to-english
把其他 DSH 插件显示的中文实时翻译成英文——插件卡片、设置页、下拉菜单、插件视图标签与同源 iframe 面板,同时不改动对话记录、工具输出和你输入的内容。使用内置翻译服务(Bing 或 Google,无需密钥),不可用时回退到默认模型。
安装
dsh plugin --profile web add github:abdelrhmanwaelbishr/dsh-all-over-chinese-to-englishREADME
All-Over Chinese to English
Translates Chinese text across the whole DSH interface into English — plugin pages, plugin settings, dropdown menus, plugin View tabs, the top bar, and same-origin iframe panels such as the MCP Connector.
It ships as one installable bundle with two halves.
- Host (
index.js) registersPOST /api/all-over-chinese-to-english, a batch endpoint that translates short Chinese strings and caches the results in memory. Translation prefers the shipped anonymoustranslatorservice (Bing by default, Google as a fallback), which needs no account or API key. If that service is unavailable it falls back to the configured default model through thellmservice. - Client (
client.js) observes the page for Chinese text nodes and translatable attributes, debounces edits, and replaces the text in place with the English translation. AMutationObserverre-checks content React re-renders, so translated strings stay translated after navigation and re-render.
What gets translated
| Surface | Example |
|---|---|
| Plugin pages and detail panels | Plugin READMEs, capability lists |
| Plugin settings | Labels, hints, and dropdown menus (native <select> lists and custom popovers) |
| Sidebar plugin pages | Trash, Plugins, and other panels |
| Plugin Views and their top bar tabs | e.g. the dsh-session-superagent view and its tab label |
| Same-origin iframe panels | The whole MCP Connector page (<iframe src="/mcp-connector/ui/">) |
| Display-only attributes | placeholder, title, aria-label, alt, label |
| The agent's own conversation text | Assistant messages and thinking titles such as ⏵ 验证图片是否已对齐 |
What is deliberately left alone
Chat rows authored by the user are never scanned or translated: data-chat-flow-kind="user" and "steering" rows,
the optimistic submission echo (data-submission-echo), tool output (tool-result), the composer and its dock, and
everything typed into a field. The Trajectory table and the Context/Fleet dashboard render stored raw payloads
(including user prompts and tool output), so those views stay untranslated as a whole. A plugin View is recognised by
the absence of those conversation markers inside the same conversation.view slot.
Also skipped: script, style, code, pre, svg, canvas, math, video, audio, fields where the user types
(input, textarea, contenteditable), anything marked translate="no" or data-atz-ignore, and strings longer than
800 characters. Option values and form-field values stay untouched, so saved configuration keeps the original value.
Configuration
Configured on the plugin row:
| Key | Default | Meaning |
|---|---|---|
enabled | true | Turn automatic translation on or off. |
targetLanguage | en | Target language passed to the translator service. |
The plugin's own switch lives on the Plugins page. Turning it off restores the original Chinese on the next render.
Install
dsh plugin add abdelrhmanwaelbishr/dsh-all-over-chinese-to-english
Or, from a local checkout, add the package directory as a profile bundle. The bundle also mounts the
@deepseek-ai/dsh-experimental-translator service so the free translation route exists; you do not need to enable
@deepseek-ai/dsh-experimental-cot-translation-bundle yourself.
A status file is written to ~/.dsh/all-over-chinese-to-english-status.json (translator, llm, connection,
enabled, and a live translatorTest), and an activity log to ~/.dsh/all-over-chinese-to-english-client.log. The log
records request counts only, never translated text.
License
MIT