RadicalGitter/dsh-ui-translate

dsh-ui-translate is a privacy-first DSH Web plugin that translates visible Chinese UI and content (session titles, workspace names, messages, search results, plugin text) without enabling Chrome auto-translate: it is disabled on first install and defaults to an in-process offline glossary, offers a browser-local OPUS-MT backend (pinned Xenova/opus-mt-zh-en revision, ~110 MB model downloaded once and run in a Worker so no page text is uploaded) and an optional OpenAI-compatible backend over a loopback host route, marks translated text and leaves editable fields, code and opted-out elements untouched.

dsh-ui-translate is a privacy-first DSH Web plugin that translates all visible Chinese UI and content - session titles, workspace names, messages, search results and plugin text - without enabling Chrome auto-translate. It offers three backends: an in-process offline glossary (the default, no network, translating approved Chinese labels and bounded templates), a browser-local OPUS-MT backend that translates all connected visible Chinese text including user-authored and session-derived content entirely inside a local Worker, and an optional OpenAI-compatible backend that sends only allowlisted UI phrases through a token-authenticated, same-origin, rate-limited, loopback host route. Translation changes only Text.data - element structure, attributes, stable session/workspace IDs, links, listeners and React ownership stay intact - translated text gets a configurable marker (purple overlay, dashed underline, both or none) with a hover control to Show original and then Re-translate, translated session titles remain presentation aliases that still open the canonical thread, and disabling or reconfiguring the plugin restores the original text.

Web UI Enhancements ★ 1
View on GitHub ↗

Install

dsh plugin --profile web add https://github.com/RadicalGitter/dsh-ui-translate.git

Copied verbatim from the README's Install block ('Or add the Git repository directly if your DSH profile installer supports Git dependencies'). The README's primary form is dsh plugin --profile web add dsh-ui-translate (the npm package name is documented but was not resolvable on registry.npmjs.org on 2026-10-15, so the documented Git form is shipped); a link:/absolute/path/to/dsh-ui-translate local form is also documented.

Compatibility

Privacy-first: the plugin is disabled on first install and defaults to the in-process offline glossary, network-capable translation is restricted to a compile-time allowlist of known DSH UI phrases and bounded numeric templates, and the explicitly selected browser-local OPUS-MT backend performs inference inside a dedicated browser Worker so source text and translations stay on the machine (only the public model artifacts are downloaded, about 110 MB, cached by the browser). It never touches editable/composer fields, textarea/input/select, contenteditable, code/preformatted content, [data-input-backdrop], translate="no" or .notranslate, and a plugin can opt a read-only <pre> in with data-dsh-translate="prose". The optional OpenAI-compatible provider defaults to http://127.0.0.1:11434/v1 with qwen2.5:7b, is loopback/RFC1918/link-local by default, requires HTTPS and an explicit setting for public hosts, reads an optional bearer token from DSH_UI_TRANSLATE_API_KEY and rejects redirects so credentials are not forwarded.

Details

Alternatives

0lidaxiang/dsh-plugin-greet · 147228/dsh-black-whale · 15828148/dsh-portable-launcher

More plugins in Web UI Enhancements

Browse more in Web UI Enhancements

Guides for Web UI Enhancements plugins