Preface

When reading conversations, sidebars, or input boxes in the DSH Web GUI, you often encounter sentences that need temporary translation. Existing solutions may rely on external translation interfaces or additional API keys, which incur higher configuration and maintenance costs. dsh-translator addresses this scenario by providing a Youdao-style inline translation: select text in the interface, click the floating button, and the translation is generated by the current DSH configured model pipeline. It does not require a separate API key configuration and does not call third-party endpoints.

DSH’s plugin ecosystem emphasizes “everything is a plugin.” The community directory here is an independent site, not an official app store, and has no official affiliation with DeepSeek / Huanqian.

What is this

dsh-translator is a DSH plugin for inline translation in the Web client. The npm package name is @nicearrack/dsh-translator, the GitHub repository is nicearrack/dsh-translator, maintained by nicearrack, and is licensed under the MIT license.

It solves the problem of quickly obtaining a translation after selecting text anywhere in the DSH interface. The translation is generated by the harness’s LLM, using the model pipeline you have already configured, without introducing additional API keys or third-party endpoints.

Core Features

  • Inline Trigger: Select text anywhere in the app, and a floating Translate button will appear following the selection, adapting to light/dark themes.
  • Auto Direction: Configured main language text will be translated into English; other text will be translated into the main language.
  • Configurable Main Language: Supports 简体中文 / 繁體中文 / 日本語 / 한국어 / Русский, default 简体中文.
  • Settings Card: In DSH Settings Settings → Plugins → 划词翻译, you can configure main language, model, reasoning effort, timeout, max tokens, and temperature. Each field can show overridden / restore default, and supports staging changes, save/discard.
  • Translation Card: Displays original text, direction marker, and translation, with retry on failure; footer displays model · reasoning effort · tokens.
  • Click to Copy: Click translation, original text, or error message to copy, displaying a 已复制 / Copied hint.
  • Draggable: Drag the card header to move it; the card will stay where you place it.
  • Pin/Unpin: Once pinned, dragging, Esc, and clicking outside to close are locked until you close it manually; only one card is retained at a time, nesting is not supported.
  • Streamlined Stability: Handles live streaming output to avoid flickering; the card position remains fixed when content scrolls.

Installation and Enablement

Install from npm:

dsh plugin --profile web add @nicearrack/dsh-translator@latest

After installation, go to Settings → Plugins → 划词翻译 in DSH Settings to select the main language, model, and reasoning intensity as needed. The model can be left blank to follow the session default.

Typical Usage

  1. Select text.
  2. Click the floating Translate button near the selection.
  3. View the translation, direction, and footer information in the translation card.
  4. Drag the card header to adjust position, or pin the card to avoid accidental touches.
  5. Click the translation, original text, or error message to complete copying.

Configuration Items

In Settings → Plugins → 划词翻译, you can set:

Field Description
Main Language 简体中文 / 繁體中文 / 日本語 / 한국어 / Русский, default 简体中文
model Select a model, or leave blank to follow session default
reasoning effort off / low / high / max
timeout Timeout setting
max tokens Maximum token count
temperature Temperature

Each field supports displaying overridden / restore default and restoration, and allows editing via staging before saving or discarding.

Updates, Uninstallation, and Notes

After updating, restart the DSH instance to load the new host bundle:

dsh --profile web

The client bundle will update on the next page refresh.

Uninstalling also requires restarting the instance:

dsh --profile web

Installing via Git runs the package’s prepare build script. If the first install is rejected and you are using pnpm ≥ 10, you can authorize the build script once by adding to the profile’s pnpm-workspace.yaml:

allowBuilds:
  "@nicearrack/dsh-translator": true

npm registry metadata may lag after publishing. If @latest still resolves to an old version, you can use a specific version instead.

The plugin runs with the current DSH process permissions; please check the source code and MIT license before using. It is suitable for developers who want to get translations by inline selection in the DSH Web GUI and wish for the translation to always come from the current model pipeline.

Links

  • Directory Page: https://www.skillhub.cn/plugins/nicearrack/dsh-translator
  • GitHub: https://github.com/nicearrack/dsh-translator