1738348785/dsh-plugin-text-translation ↗★ 2
dsh-plugin-text-translation
Text & document localization plugin for DeepSeek Harness (DSH): lossless tag-protected extraction, batch slicing and assembly for translation workflows
安装
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:1738348785/dsh-plugin-text-translation说明文档
阅读完整 README ↗📖 dsh-plugin-text-translation
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 (,)、变量占位符 ({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。
- 游戏脚本:Mtool JSON (
- 🧩 原生集成 DSH:
- 导出标准的
dsh.bundleManifest(dsh.bundle.patch),随dsh plugin安装后自动加入 profile 的 bundle 层。 - 注册
extract_text、assemble_text、inspect_text_file三个工具供 DSH Agent 调度。 - Python 引擎(
python/目录)随插件一起分发,安装即用,无外部路径依赖。
- 导出标准的
📦 安装与使用
方式一:从 GitHub 安装(推荐)
dsh plugin --profile demo add github:1738348785/dsh-plugin-text-translation
dsh 会拉取仓库、自动把插件的 cordis.patch.yml 追加进 profile 的 bundle 层。
(GitHub 安装实测通过:依赖走 pnpm store,无符号链接解析问题。)
方式二:安装到 web profile(让 GUI 插件页可见)
DSH Web 的「设置 → 插件」清单显示的是当前运行的 profile 实际加载的插件。 要让 GUI 里看到并管理本插件,需要装进 web profile 并重启:
dsh plugin --profile web add github:1738348785/dsh-plugin-text-translation
# 重启 web(Ctrl+C 后重新 dsh web),刷新页面即可在插件清单中看到 text-translation