Bundle
dsh-screen-translator
Universal on-screen translator for DeepSeek Harness Web UI: translates UI text, attributes, Shadow DOM, and iframes across 45+ languages.
- Source
- mustakimabdullah25-tech
- stars
- 1 stars
- License
- MIT
- Updated
- Updated 1 hour ago
Readme
# π DSH Screen Translator [](LICENSE) [](https://github.com/deepseek-ai/deepseek-harness) [](https://github.com/topics/dsh-plugin) > **Universal on-screen translator for DeepSeek Harness Web UI.** > Translates UI text, menus, sidebars, Settings, MCP Connectors, nested iframes, and Shadow DOM elements across **45+ languages** in real time without external API keys or rate limits. --- ## π English | [δΈζθ―΄ζ](./README_ZH.md) --- ## β¨ Features - **π 45+ Languages Supported** β Instant real-time translation for English, Simplified & Traditional Chinese, Japanese, Korean, Spanish, French, German, Russian, Arabic, and more. - **β‘ Multi-Endpoint Google Engine** β Automatic failover between `dict-chrome-ex`, `clients5`, `single-at`, and `web-at` APIs to completely prevent `429 Too Many Requests` rate limiting. - **π Full-Spectrum DOM Coverage**: - Visible text nodes and SVG typography (`<text>`, `<tspan>`). - Interactive attributes (`placeholder`, `title`, `alt`, `aria-label`, `aria-placeholder`). - Open Shadow DOM roots and web components. - Same-origin and nested iframes (MCP panels, modals, dialogs). - **π High Performance & Zero-Lag**: - **Dual-Tier Cache** (In-Memory LRU + LocalStorage persistence) β Instant `0ms` rendering for previously translated phrases. - **Smart Debounced MutationObserver** β Only newly inserted or altered DOM elements are processed. - **Sentence Boundary Splitting** β Natural splitting at punctuation boundaries (`γ`, `οΌ`, `οΌ`, `.`, `!`, `?`) preserves contextual readability. - **Loop Prevention** β Strict self-exclusion tags (`[data-no-translate]`, code blocks, syntax highlighters) prevent infinite loops. - **ποΈ Clean Native UI Integration**: - Integrated into **Settings β General** with matching native theme tokens. - One-click translation actions directly inside assistant conversation turns. - Granular controls: **Enable/Disable**, **Target Language selector**, **Translate now**, and **Clear cache**. --- ## π¦ Installation ### Method 1: Via DSH Plugin Manager (Recommended) In your terminal or DSH session: ```bash dsh plugin add mustakimabdullah25-tech/dsh-screen-translator ``` ### Method 2: Manual Installation from Source Clone the repository into your DSH plugins directory: ```bash cd "path/to/dsh-workspace/plugins" git clone https://github.com/mustakimabdullah25-tech/dsh-screen-translator.git ``` Then install the bundle into your profile: ```bash dsh plugin add ./plugins/dsh-screen-translator ``` --- ## βοΈ Configuration & Usage Once installed and enabled: 1. Open **Settings** β **General**. 2. Locate the **Screen Translator (Auto-Translate Everywhere)** section. 3. Choose your preferred **Target Language** from the dropdown. 4. Toggle **Enabled** to start automatic screen translation. 5. Hit **Translate now** to force-translate the entire visible viewport immediately, or **Clear cache** to wipe stored translations. --- ## π οΈ Architecture ``` ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β DSH Web Runtime β β β β βββββββββββββββββββββββββ βββββββββββββββββββββββββ β β β MutationObserver β β TreeWalker β β β β (Watches new DOM/SVG) β β (Scans DOM/Shadow/IFR)β β β βββββββββββββ¬ββββββββββββ βββββββββββββ¬ββββββββββββ β β β β β β βΌ βΌ β β ββββββββββββββββββββββββββββββββββββββββββ β β β Language & Token Filter β β β β (Filters Code, Math, Regex, Excludes) β β β ββββββββββββββββββββ¬ββββββββββββββββββββββ β β β β β βΌ β β ββββββββββββββββββββββββββββββββββββββββββ β β β Dual Cache (Memory LRU + Storage) β βββΊ Hit (0ms) β ββββββββββββββββββββ¬ββββββββββββββββββββββ β β β Miss β β βΌ β β ββββββββββββββββββββββββββββββββββββββββββ β β β Multi-Endpoint Network Engine β β β β (Chrome-Ex β Clients5 β Single-At) β β β ββββββββββββββββββββββββββββββββββββββββββ β ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ ``` --- ## π Repository Structure ``` dsh-screen-translator/ βββ client.js # Client bundle: DOM translation engine, cache & settings UI βββ index.js # Host entry point (Cordis apply hook) βββ cordis.patch.yml # Cordis composition patch configuration βββ package.json # Bundle metadata and plugin contract βββ README.md # English documentation βββ README_ZH.md # Chinese documentation βββ LICENSE # MIT License ``` --- ## π€ Contributing Contributions, issues, and feature requests are welcome! Feel free to open an issue or submit a pull request on [GitHub](https://github.com/mustakimabdullah25-tech/dsh-screen-translator). --- ## π License This project is licensed under the [MIT License](LICENSE).
Install
dsh plugin --profile web add github:mustakimabdullah25-tech/dsh-screen-translator#cfebcce41d0b4d2306196077693df6b73555b49c
Profile: web
With the hub plugin installed, ask your agent to install it by name β it resolves the same plan shown here.
dsh plugin --profile web add github:stvlynn/dsh.fish#path:packages/dsh-plugin-hub
install dsh-screen-translator from the hub