Skip to content
dsh.fish
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

[![GitHub License](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)
[![DSH Compatibility](https://img.shields.io/badge/dsh->=0.1.2-green.svg)](https://github.com/deepseek-ai/deepseek-harness)
[![Topic](https://img.shields.io/badge/topic-dsh--plugin-orange.svg)](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

Source