Introduction¶
The core philosophy of DeepSeek Harness (DSH) is “everything is a plugin.” In the native plugin ecosystem, developers often need to manually write translation prompts for models or repeatedly paste text into the chat box. This reduces translation efficiency and makes it difficult to manage batch translation tasks.
dsh-translator is a native plugin that directly converts the DSH Web profile into a dual-pane translation workbench. It does not rely on additional translation APIs or runtime services, and directly calls the model and credentials configured in DSH to perform streaming translation. For developers who frequently need to localize text or documents, this provides a lightweight and controllable solution.
Core Features¶
The plugin mainly provides the following capabilities:
- Native workbench: Provides a dual-pane editor and responsive layout, supporting mobile operation.
- Streaming translation and control: Translations are displayed word by word, and users can stop generation midway while retaining the already generated content.
- Output modes: Supports both “target-only” and “bilingual” modes.
- Style and language: Built-in support for 12 commonly used languages, with automatic source language detection. Provides five styles: natural, professional, academic, technical, and literal.
- Format preservation: Supports preserving Markdown, tables, HTML/XML tags, links, and placeholders.
- Import and export: Supports importing text, Markdown, CSV, JSON, HTML, and XML files (up to 2 MB). Supports exporting as
.txtand reading the text aloud in the browser. - Glossary and customization: Supports an editable glossary and allows custom instructions to be appended to a single translation task.
- Security handling: Encodes the source text as untrusted JSON data to prevent the model from executing instructions contained in the source text.
- History: Locally saves the latest 100 translation records, with search, restore, and delete support.
- Shortcuts and statistics: Supports quick translation with
Ctrl / ⌘ + Enter, and provides source text character/word counts.
Installation and Enablement¶
Before using it, make sure your environment meets the requirements: Node.js 22.19+ or 24+ is required.
Install the plugin into the official web profile:
dsh plugin --profile web add github:SiYue-ZO/dsh-translator
dsh web
Open the address displayed in the terminal (default http://127.0.0.1:3080) and create a session to see the translation workbench.
If you need to install from a local copy, you can first clone the repository and install dependencies:
git clone https://github.com/SiYue-ZO/dsh-translator.git
cd dsh-translator
npm install
dsh plugin --profile web add .
The uninstall command is as follows:
dsh plugin --profile web remove dsh-translator
Typical Usage¶
- Select languages: Choose the source language (automatic detection is supported) and the target language in the interface. Click the swap button in the middle to exchange the content on both sides.
- Enter text: Paste text directly, or click the “Import” button in the source toolbar to select a file.
- Adjust settings: In the settings panel, choose the style (for example,
professional), the output mode (for example,bilingual), and format preservation options. - Run translation: Click the “Start Translation” button, and the translation will appear with streaming output. You can click “Stop” during translation.
- Export results: After translation is complete, use the target toolbar to copy, read aloud, or download the content.
Configuration¶
The default configuration for the plugin is located in cordis.patch.yml. You can create an override file to modify the default behavior.
For example, create translator.override.yml:
- id: translator
config:
sourceLanguage: auto
targetLanguage: Japanese
style: professional
outputMode: bilingual
preserveFormatting: true
glossary:
DeepSeek Harness: DeepSeek Harness
agent: エージェント
customInstructions: 'Japanese punctuation must use the full-width style.'
Start with this configuration temporarily:
dsh --profile web --patch ./translator.override.yml
Common configuration fields are described below:
| Field | Default Value | Description |
|---|---|---|
sourceLanguage |
auto |
Source language name; auto means automatic detection |
targetLanguage |
Simplified Chinese |
Default target language |
style |
natural |
Style: natural / professional / academic / technical / literal |
outputMode |
target-only |
Output mode: target-only or bilingual |
preserveFormatting |
true |
Preserve markup and layout as much as possible |
glossary |
{} |
Fixed mapping from source terms to target terms |
customInstructions |
'' |
Additional translation rules |
Use Cases and Considerations¶
Use cases: This plugin is suitable for translating text, Markdown files, and code snippets. It is especially convenient for technical document translation when format preservation and bilingual comparison are required.
Considerations:
* Model dependency: Translation quality, context length, and supported languages depend on the model currently selected in DSH.
* File formats: Currently only text and plain text files are supported. Parsing PDF, DOCX, images, or audio is not yet supported.
* History: History is stored locally in the browser only and cannot be recovered after clearing site data.
* Development status: DSH is still in developer preview, and future breaking API changes may require the plugin to be upgraded accordingly.
* Permissions: The plugin runs with the permissions of the current dsh process. It is recommended to review the source code and license before installation.
Conclusion¶
dsh-translator fills a gap in the DSH localization workflow by taking the form of a native plugin. It leverages existing model capabilities to provide a translation environment with no additional overhead, making it suitable for developers who value efficiency and privacy.