Preface¶
In the DSH plugin ecosystem, agents can call models to complete translation, but long-text translation usually also needs to handle chunking, terminology extraction, source and target text checking, tone guidelines, as well as the saving and reuse of translation memory.
dsh-plugin-translation provides tooling capabilities for these steps: the model is responsible for translation, while the plugin handles chunking, checking, terminology maintenance, and translation memory.
What is this¶
dsh-plugin-translation is a translation toolkit for DeepSeek Harness agents.
- Maintainer: 863683348
- License: MIT
- Core positioning: Provides chunking, terminology/glossary extraction, source-target QA, tone guidelines, and persistent translation memory in the session workspace
- Registered tool: After installing and restarting DSH, the
translate_kittool is registered host-wide
Core Functions¶
The translate_kit provides the following capabilities through different actions:
segment: Splits text into numbered, bounded-size chunks for chunked translationglossary: Extracts candidate terms such as abbreviations, camelCase, domain-specific words, numbers + units, emails, URLs, etc., and counts themcheck: Performs checks on numbers/units, parentheses, length ratio, and duplicate punctuation for source and target textstone: Provides tone guidelines based on register, including formal, colloquial, and technical registers, supportingen / zhmemo_get: Reads translation memorymemo_add: Saves source→target translation memory to the session workspace fileglossary_get: Reads the workspace glossaryglossary_add: Adds or updates workspace glossary entriesglossary_remove: Deletes workspace glossary entriesconsistency: Performs cross-segment terminology consistency checks against the glossary
Installation and Enablement¶
- Execute the official installation command.
dsh plugin --profile <profile> add dsh-plugin-translation
-
Restart DSH.
-
After restarting, the
translate_kittool is registered host-wide and can be used as a translation workflow tool in subsequent sessions.
Typical Usage¶
A common workflow is as follows:
- Use
segmentto split long text into numbered, bounded-size chunks. - Use
glossaryto extract candidate terms, identifying abbreviations, camelCase, domain-specific words, numbers + units, emails, URLs, etc. - For terms requiring long-term consistent expression, use
glossary_addto write them into the workspace glossary. - After translating chunk by chunk, use
checkto perform QA on source and target texts, checking for numbers/units, parentheses, length ratio, and duplicate punctuation. - Use
toneto obtain tone guidelines for formal, colloquial, or technical registers, and then adjust the target text expression. - Use
memo_addto save source→target translation memory. - During subsequent translations, use
memo_getto read existing memory. - After completing cross-segment tasks, use
consistencyto check terminology consistency against the glossary. - If there are unsuitable or outdated entries in the glossary, use
glossary_removeto delete them.
Configuration and File Locations¶
All configuration items are optional and are located in the config of the composition row.
Verified default file paths include:
memoFile: .dsh/translation-memo.md
glossaryFile: .dsh/translation-glossary.md
These two paths are relative to the session workspace and cannot escape.
The glossary and memo files default to retaining a maximum of 200 entries.
Memory access is performed via ctx.fs, and every resolved path undergoes a containment check against the session workspace.
Applicable Scenarios and Notes¶
Applicable Scenarios:
- Need to perform long-text chunked translation within DSH agents
- Need to extract and maintain a glossary
- Need to check numbers, units, parentheses, length ratio, and duplicate punctuation in source→target translations
- Need to adjust tone based on formal, colloquial, or technical registers
- Need to save and read translation memory in the session workspace
- Need to perform cross-segment terminology consistency checks
Notes:
- The plugin runs with the permissions of the current DSH process; please check the source code and license before installing.
- File write paths are restricted by the session workspace and cannot escape.
- The license is MIT.
- peerDependencies require the following dependency versions:
@deepseek-ai/cordis ^4.0.1
@deepseek-ai/dsh-fs ^0.1.0-rc.6
@deepseek-ai/dsh-system-prompt ^0.1.0-rc.6
@deepseek-ai/dsh-tools ^0.1.0-rc.6
@deepseek-ai/schemastery ^3.18.1
Related Links¶
- GitHub: https://github.com/863683348/dsh-plugin-translation
- Directory Page (Plugin clue, for reference only): https://www.skillhub.cn/plugins/863683348/dsh-plugin-translation