Skip to content

1738348785/dsh-plugin-text-translation

30Last commit Aug 14, 2026

dsh-plugin-text-translation DSH plugin

This plugin provides DSH Agent with tag-protected text extraction, slicing, and lossless reassembly capabilities. It supports game scripts (Mtool JSON, Ren'Py, subtitles, etc.) and long documents (PDF, Word, Markdown, HTML, TXT). It registers three tools — extract_text, assemble_text, inspect_text_file — for the Agent to orchestrate translation workflows.

How to install the dsh-plugin-text-translation DSH plugin

dsh plugin --profile demo add github:1738348785/dsh-plugin-text-translation

Copying does not run this command. Review the repository and version before installing the dsh-plugin-text-translation DSH plugin.

dsh-plugin-text-translation DSH plugin data source

dsh-plugin-text-translation DSH plugin snapshot date: Aug 16, 2026

discovered

What the dsh-plugin-text-translation DSH plugin can do

  • Tag protection for RPG Maker, Unity/RichText, variable placeholders, and Ren'Py tags, ensuring 100% accurate restoration after translation.
  • Support for multiple input formats: game scripts (Mtool JSON, Translator++ XLSX/CSV, Ren'Py .rpy, subtitles SRT/ASS/VTT, Gettext .po) and documents (PDF, .docx, Markdown, HTML, TXT).
  • Native integration with DSH via bundle manifest: install once, tools are automatically available in the profile.
  • Configurable Python path and batch size via cordis.patch.yml (pythonPath, batchSize).
  • Optional Python dependencies for specific formats (XLSX, PDF, DOCX, HTML); pure-text formats require zero extra dependencies.

Where the dsh-plugin-text-translation DSH plugin fits

  • Translating game scripts with embedded tags (e.g., RPG Maker, Ren'Py) while preserving all formatting and variables.
  • Splitting long documents into batches, translating each batch in parallel using DSH sub-agents, then reassembling the translated text losslessly.
  • Inspecting a file's structure, line count, and tag distribution before starting a translation task.
  • Building automated translation workflows using DSH's workflow and subagent tools, with the plugin handling extraction and assembly.
  • Integrating into a CI/CD pipeline for game localization, where the plugin extracts and assembles text automatically.

Who the dsh-plugin-text-translation DSH plugin is for

  • DSH users who need to translate game scripts or documents with complex formatting.
  • Developers building translation pipelines or workflows within the DSH ecosystem.

dsh-plugin-text-translation DSH plugin limitations

  • Translation itself is not performed by the plugin; it only handles extraction and assembly. The DSH Agent must orchestrate the actual translation via sub-agents or workflow.
  • Requires DSH environment version 0.1.0-rc.6 or later, and a profile with the necessary dependencies installed.
  • Optional format support (XLSX, PDF, DOCX, HTML) requires additional Python packages; missing dependencies cause errors only for those formats.
  • Local installation via file path may encounter symlink issues on Windows, requiring manual junction creation to resolve module resolution.

dsh-plugin-text-translation DSH plugin: from the repository README

Quoted from the 1738348785/dsh-plugin-text-translation README, the upstream source of the dsh-plugin-text-translation DSH plugin. Copyright remains with the original authors.

> **DeepSeek Harness (DSH) 文本与文档翻译插件**:为 DSH Agent 提供**标签防爆遮罩**、 > **多格式文本提取/切片**与**无损回填组装**能力,覆盖游戏脚本与长文档两类场景。 > 翻译本身由 DSH Agent 编排完成——可借助 DSH 内置的 `subagent` / `subagent_fork` / > `workflow` 工具并行翻译各批次,本插件只负责"提取"与"装配"这两个原子环节。 - 📦 GitHub: https://github.com/1738348785/dsh-plugin-text-translation - ✅ 实测环境:DSH `0.1.0-rc.6`(headless 与 web profile 均已验证) --- ## 🌟 核心特性 - 🛡️ **标签防爆遮罩 (Tag Protector)**:自动识别并保护 RPG Maker (`\c[1]`, `\v[1]`, `\n`)、 Unity/RichText (`<color>`, `<b>`)、变量占位符 (`{player}`, `{0}`, `%s`) 与 Ren'Py 标签, 翻译后 **100% 精确无损还原**。 - 📑 **全格式支持**: - **游戏脚本**:Mtool JSON (`ManualTransFile.json`)、Translator++ 表格 (XLSX/CSV)、 Ren'Py (`.rpy`)、字幕 (SRT/ASS/VTT)、Gettext (`.po`)。 - **长文档**:PDF、Word (`.docx`)、Markdown、HTML、TXT。 - 🧩 **原生集成 DSH**: - 导出标准的 `dsh.bundle` Manifest(`dsh.bundle.patch`),随 `dsh plugin` 安装后自动加入 profile 的 bundle 层。 - 注册 `extract_text`、`assemble_text`、`inspect_text_file` 三个工具供 DSH Agent 调度。 - Python 引擎(`python/` 目录)随插件一起分发,安装即用,无外部路径依赖。 --- ## 📦 安装与使用 ### 方式一:从 GitHub 安装(推荐) ```bash dsh plugin --profile demo add github:1738348785/dsh-plugin-text-translation ``` `dsh` 会拉取仓库、自动把插件的 `cordis.patch.yml` 追加进 profile 的 bundle 层。 (GitHub 安装实测

Read the full READMERepository license: MIT

dsh-plugin-text-translation DSH plugin questions

How do I install this plugin?

Run `dsh plugin --profile demo add github:1738348785/dsh-plugin-text-translation`. For the web profile, use `--profile web` and restart DSH Web. You can also install from a local source path with `dsh plugin --profile demo add ./dsh-plugin-text-translation`.

What file formats are supported?

Game scripts: Mtool JSON, Translator++ XLSX/CSV, Ren'Py .rpy, subtitles SRT/ASS/VTT, Gettext .po. Long documents: PDF, .docx, Markdown, HTML, TXT. For XLSX, PDF, DOCX, and HTML, you need to install optional Python dependencies (openpyxl, PyMuPDF, python-docx, beautifulsoup4).

Does the plugin translate text itself?

No, the plugin only extracts text with tag protection and reassembles translations. The actual translation is done by the DSH Agent using sub-agents (subagent, subagent_fork) or workflow tools. You need to provide a translation model or API key via DSH environment.

How do I handle large files for translation?

Use the `extract_text` tool with the `batch_size` parameter to split the file into smaller batches. Then translate each batch separately using DSH sub-agents, collecting all results into a single translations JSON. Finally, call `assemble_text` with the original file and the translations JSON to produce the translated file.

Why do I get ERR_MODULE_NOT_FOUND when installing locally on Windows?

This is a known issue with pnpm symlinks. The plugin's ESM imports resolve to the real path of the plugin directory, which doesn't have access to the profile's node_modules. To fix, create a junction from the plugin's node_modules to the profile's node_modules. The README provides PowerShell commands to do this.