Preface¶
In the DSH plugin ecosystem, text translation cannot rely solely on the model directly processing raw files. Game scripts commonly contain colors, line breaks, and variable placeholders, while subtitles and long documents often have many entries. Direct translation can easily break structures such as \c[1], {player}, and SRT timestamps.
dsh-plugin-text-translation provides a set of schedulable tools for the DSH Agent: first inspect the file, then extract translatable text while masking tags, and finally write the translation results back losslessly into the original format. Translation orchestration is still handled by the DSH Agent, while the plugin handles extraction and assembly.
What This Is¶
dsh-plugin-text-translation is a text and document translation plugin for DeepSeek Harness (DSH), with repository owner 1738348785, MIT license, and package.json version 1.0.0.
It targets game script and long document localization, providing tag-protection masking, multi-format text extraction/chunking, and lossless backfill assembly capabilities. It has been tested with DSH 0.1.0-rc.6, and both headless and web profiles have been verified.
It is not a complete translation system: the translation itself is orchestrated by the DSH Agent and can work with DSH subagent / subagent_fork / workflow for parallel translation batches; the plugin handles the extraction and assembly stages.
Core Features¶
Tag-Protection Masking¶
The plugin automatically identifies and protects common localization tags and placeholders, restoring them after translation:
- RPG Maker:
\c[1],\v[1],\n - Unity/RichText:
<color>,<b> - Variable placeholders:
{player},{0},%s - Ren’Py tags
Supported Formats¶
Game scripts:
- Mtool JSON
- Translator++ XLSX/CSV
- Ren’Py
.rpy - SRT/ASS/VTT subtitles
- Gettext
.po
Long documents:
- Word
.docx - Markdown
- HTML
- TXT
DSH Integration¶
- Registers three tools:
inspect_text_file,extract_text, andassemble_text. - Exports a
dsh.bundleManifest, which is added to the profile’s bundle layer when installed viadsh plugin. - The Python engine is distributed with the plugin and works out of the box without external path dependencies.
- If optional dependencies are not installed, only the corresponding format or standalone LLM pipeline features will error; all other functionality remains unaffected.
Runtime peerDependencies include:
{
"@deepseek-ai/cordis": "^4.0.1",
"@deepseek-ai/dsh-tools": "^0.1.0-rc.6",
"@deepseek-ai/schemastery": "^3.18.1"
}
Installation and Activation¶
Installing from GitHub¶
First confirm the target profile is available, then run:
dsh plugin --profile demo add github:1738348785/dsh-plugin-text-translation
After installation, the plugin will be added to the current profile’s bundle layer.
Installing to the Web Profile¶
To see the plugin in the web profile, install it to web:
dsh plugin --profile web add github:1738348785/dsh-plugin-text-translation
Then restart the web service and refresh the page.
Local Source Installation¶
For local source installation or development debugging, you can use the current directory:
dsh plugin --profile demo add ./dsh-plugin-text-translation
Local path installation may cause ERR_MODULE_NOT_FOUND due to pnpm symlinks/junctions and Node ESM real-path resolution. On Windows, the dependency tree must be exposed to the plugin directory via a junction.
Quick Debugging Without Installation¶
You can also load only the plugin’s patch layer for quick debugging:
dsh --profile demo --patch ./dsh-plugin-text-translation/cordis.patch.yml
Notes for Initializing a New Profile¶
When installing the plugin into a new profile for the first time, you may encounter the following two DSH environment issues.
- The npm registry
latesttag may incorrectly point to the old0.0.1-rc.1version of@deepseek-ai/dsh-base. You need to explicitly specify0.1.0-rc.6. - pnpm 11 blocks dependency build scripts by default. If you encounter
ERR_PNPM_IGNORED_BUILDS, setallowBuildstotrueinpnpm-workspace.yaml.
Typical Usage¶
- Call
inspect_text_fileto check the file format, entry count, speaker, and tag distribution. - Call
extract_textto extract translatable text; you can passoutput_jsonandbatch_sizeto save chunked JSON. - Have the DSH Agent translate the batches, optionally using
subagent,subagent_fork, orworkflowfor parallel processing. - Call
assemble_textto writetranslations_jsonback losslessly to the format oforiginal_file.
Use Cases and Considerations¶
Suitable for developers working with game scripts, subtitles, PDFs, Word, Markdown, and other localization files within DSH.
Notes:
- This plugin only handles extraction and assembly; it does not replace the translation model or translation strategy.
- The plugin runs with the permissions of the current
dshprocess; review the source code, dependencies, and MIT license before installation. - If optional dependencies are not installed, only the corresponding format or standalone LLM pipeline features will error; all other functionality remains unaffected.
- When initializing a new profile, it is recommended to check the
@deepseek-ai/dsh-baseversion and pnpm build scripts settings as described above.
Conclusion¶
The value of dsh-plugin-text-translation lies in separating the most error-prone parts of the localization workflow—“tag protection, chunking, and backfill”—from the model’s task, allowing the DSH Agent to reliably process game scripts and long documents.
GitHub repository:
https://github.com/1738348785/dsh-plugin-text-translation
Plugin directory page reference:
https://www.skillhub.cn/plugins/1738348785/dsh-plugin-text-translation
This directory page URL comes from plugin metadata and is not presented as verified fact.