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_kit tool 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 translation
  • glossary: Extracts candidate terms such as abbreviations, camelCase, domain-specific words, numbers + units, emails, URLs, etc., and counts them
  • check: Performs checks on numbers/units, parentheses, length ratio, and duplicate punctuation for source and target texts
  • tone: Provides tone guidelines based on register, including formal, colloquial, and technical registers, supporting en / zh
  • memo_get: Reads translation memory
  • memo_add: Saves source→target translation memory to the session workspace file
  • glossary_get: Reads the workspace glossary
  • glossary_add: Adds or updates workspace glossary entries
  • glossary_remove: Deletes workspace glossary entries
  • consistency: Performs cross-segment terminology consistency checks against the glossary

Installation and Enablement

  1. Execute the official installation command.
dsh plugin --profile <profile> add dsh-plugin-translation
  1. Restart DSH.

  2. After restarting, the translate_kit tool is registered host-wide and can be used as a translation workflow tool in subsequent sessions.

Typical Usage

A common workflow is as follows:

  1. Use segment to split long text into numbered, bounded-size chunks.
  2. Use glossary to extract candidate terms, identifying abbreviations, camelCase, domain-specific words, numbers + units, emails, URLs, etc.
  3. For terms requiring long-term consistent expression, use glossary_add to write them into the workspace glossary.
  4. After translating chunk by chunk, use check to perform QA on source and target texts, checking for numbers/units, parentheses, length ratio, and duplicate punctuation.
  5. Use tone to obtain tone guidelines for formal, colloquial, or technical registers, and then adjust the target text expression.
  6. Use memo_add to save source→target translation memory.
  7. During subsequent translations, use memo_get to read existing memory.
  8. After completing cross-segment tasks, use consistency to check terminology consistency against the glossary.
  9. If there are unsuitable or outdated entries in the glossary, use glossary_remove to 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