Select or point at any English word in a DSH conversation and right-click to see its Chinese meaning in a card, without copying it elsewhere. Its HTTP routes have no DSH access check, so a web page open in your browser could call them.
Install
# from npm (prebuilt)
dsh plugin --profile web add dsh-word-translate
# from GitHub (first run asks for allowBuilds approval — follow the hint, retry)
dsh plugin --profile web add github:julypjyt-creator/dsh-word-translate
Any plugin you install runs third-party code with your own permissions — it can read your files, use your credentials, and reach the network, and tool approvals don’t sandbox it. GitHub-sourced plugins also run build scripts at install time — pnpm blocks those until you allow them, so an install can stop with ERR_PNPM_GIT_DEP_PREPARE_NOT_ALLOWED or ERR_PNPM_IGNORED_BUILDS; dsh prints the exact key to add under allowBuilds in your profile’s pnpm-workspace.yaml, and the install works on the next run. Allowing a build is a trust decision: only install sources you trust, and pin a commit (github:owner/repo#sha).
README
English | 中文
Right-click any English word in the DSH conversation — in your own message or in the assistant's reply — and a small card offers 翻译成中文 (translate to Chinese). Press it and the Chinese meaning appears in place, ready to copy. No copying the word into a browser or dictionary, and no API key.
Install
dsh plugin add dsh-word-translate
Or from the Plugins page: Discover → search dsh-word-translate → Install. The bundle affects the whole profile and stays installed across restarts.
Market source
To list this plugin in the market (with its icon and localized description), add this index URL under Plugins → Discover → sources:
https://cdn.jsdelivr.net/gh/julypjyt-creator/dsh-word-translate@main/market/index.json
raw.githubusercontent.com is frequently unreachable on mainland networks and DSH fails the index fetch after a 10 second timeout, so the metadata is served through the jsDelivr mirror; the icon path is relative and resolves through the same mirror. jsDelivr caches branch content, so edits to market/index.json can take a few minutes to show up.
Use
- Select an English word in any message, or just point at it — the plugin also picks up the word under the pointer when nothing is selected.
- Right-click. The native menu is replaced by a small card showing the chosen word.
- Choose 翻译成中文. The translation appears in the card; 复制译文 copies it and 重试 asks again.
Press Esc, click outside the card, or scroll to dismiss it. Right-clicks inside input boxes, text areas, and editable text are left to the browser, so the composer keeps its own menu.
Selection is capped at 800 characters per request; a single word or phrase is well below that.
Configuration
Optional, in the profile's cordis.patch.yml under this plugin's config:
| Key | Meaning | Default |
|---|---|---|
providers |
Providers to try in order: ['bing'], ['google'], or both |
['bing', 'google'] |
targetLanguage |
zh-CN (Simplified) or zh-TW (Traditional) |
zh-CN |
maxChars |
Longest text translated in one request (at most 2000) | 2000 |
Privacy
The selected text is sent to an anonymous machine-translation endpoint: Bing first, Google as a fallback. Nothing is stored — results are cached in memory only for the current process (at most 500 entries), and the plugin sends no text anywhere else. Turning the plugin off removes the right-click card, both routes, and the cache.
Endpoints
POST /dsh-word-translate/translatewith{"text": "...", "targetLanguage": "zh-CN"}returns{"ok": true, "translation": "...", "provider": "bing", "cached": false, "truncated": false}.GET /dsh-word-translate/healthreports the active providers, target language, and cache size.
Both listen on the loopback interface only, like every other DSH HTTP route. One request times out after 10 seconds; the response body is capped at 1 MiB.
Limitations
- Only Latin-script words are translated; text without
A-Zis rejected. - Right-clicking a link or a word inside a link opens the translation card instead of the browser's link menu.
- Results depend on the public translation endpoints; when both fail the card shows the error and offers 重试.
License
MIT
Links
More in this category
zhu1090093659/dsh-web#packages/dsh-task-board★ 10669
Task board for the dsh web GUI: a sidebar multi-column kanban whose cards run in real DSH agent sessions and can also be scheduled with cron expressions, executed host-side even with the browser closed.
zhu1090093659/dsh-web#packages/dsh-web-all★ 10669
Plugin and skin collection for the DSH Web UI: task board, Git graph, right-side panel, remote mobile UI, pet, live token stats, and a skin center.
ccch1mneyyy/dsh-TUI★ 8366
Claude Code-style full-screen terminal UI: pixel-whale header, live status line, and streaming thought expansion.
MeteorNOX/DeepSeek-Balance-Whale-Widget★ 7489
A fixed-corner whale widget for the DSH web GUI — balance, today's usage and per-turn cost with peak/off-peak pricing, editable balance-alert and daily-budget bubbles, a module-based custom bubble queue with A/B weighted choices and random lines or images, 30+ vendor templates (OpenAI, OpenRouter, Kimi, SiliconFlow, Ark, Zhipu, MiniMax and more) with per-model balance and subscription quota, plus task-end sound, imported audio, custom roles and a resource manager. Local-only, no telemetry.
omdsh-dev/DSH-better-sidebar★ 5362
Full sidebar workbench with file rendering and editing, terminal, Git, and subagents; third-party plugins can register new tabs.
omdsh-dev/dsh-genui★ 1070
Interactive UI components rendered inline in replies: layout, charts, forms, quizzes, mermaid, 3D scenes, and an action event loop back to the model.
Community comments
Comments are public GitHub Discussions. Loading them connects to GitHub and Giscus; a GitHub account is required to post.