专业翻译:18 种目标语言、4 种风格(正式/口语/技术/直译)、术语表控制译名、整文件翻译(README/文档/字幕)并保留 Markdown 与代码块格式;经 SiliconFlow 调用 DeepSeek。
安装
# GitHub 源码(首次需按提示配置 allowBuilds 构建授权后重试)
dsh plugin --profile web add github:ShiXiangYu2/dsh-translate-pro
装任何插件都等于在你的机器上跑第三方代码,权限和你本人一样大——能读你的文件、用你的凭据、访问网络,工具审批管不到它。GitHub 来源的插件还会在安装时执行构建脚本——pnpm 默认拦截,所以安装可能停在 ERR_PNPM_GIT_DEP_PREPARE_NOT_ALLOWED 或 ERR_PNPM_IGNORED_BUILDS;dsh 会打印出需要添加的确切键名,把它加进该 profile 的 pnpm-workspace.yaml 的 allowBuilds 下,重跑一次即可装上。放行构建本身就是一次信任判断:请只安装可信来源,并尽量锁定 commit(github:owner/repo#sha)。
README
该插件的 README 只有英文版本。
Professional translation for DeepSeek Harness — 18 target languages, 4 writing styles, terminology control, and whole-file translation with format preservation.
✨ Why this plugin
LLMs can "sort of" translate. DSH Translate Pro gives you professional-grade translation with controls you can't get from a casual chat prompt:
| Feature | What it does |
|---|---|
| 🌍 18 target languages | Chinese, English, Japanese, Korean, French, German, Spanish, Russian, Portuguese, Italian, Arabic, Thai, Vietnamese, Indonesian, Turkish, Hindi, Polish, Dutch |
| 🎭 4 writing styles | formal / casual / technical / literal — from legal documents to daily chat |
| 📖 Glossary control | Pin terminology: API=应用程序接口, LLM=大语言模型 — consistent terms across every translation |
| 📄 Whole-file translation | Translate READMEs, docs, subtitles, code comments while preserving Markdown, code blocks, URLs, and paths |
| ✍️ In-place write-back | One call translates your file and writes the result back — instant localized docs |
| 🧠 DeepSeek engine | Powered by DeepSeek V4-Flash (fast/cheap) or V3.2 (highest quality) via SiliconFlow |
| 🎨 Conversation cards | Side-by-side 原文/译文 cards rendered right in the chat stream |
📸 Demo
Screenshots coming soon — the plugin renders bilingual comparison cards directly in your DSH conversation.
你: 把这段翻译成日语,正式风格:
"Please find attached the revised contract for your review."
DSH: 🌐 translate → 日语 · formal
原文: Please find attached the revised contract for your review.
译文: 修正後の契約書をレビューのため添付しましたので、ご確認ください。
🚀 Install
Prerequisite: one free API key
Register at SiliconFlow (free credits included) and set the key:
export SILICONFLOW_API_KEY=sk-xxxxxxxx
Install the plugin
# From GitHub (no build step needed — ships plain ESM)
dsh plugin --profile demo add github:ShiXiangYu2/dsh-translate-pro
# From npm (prebuilt)
dsh plugin --profile demo add dsh-translate-pro
Verify the layer:
dsh --profile demo --dump-config # shows a "# == dsh-translate-pro" layer
Start and use it:
SILICONFLOW_API_KEY=sk-xxx dsh --profile demo
🛠 Tools
translate
Translate text with full control:
| Parameter | Type | Description |
|---|---|---|
text |
string (required) | The text to translate |
target |
string | Target language (default: 中文) |
source |
string | Source language (auto-detected if omitted) |
style |
string | formal / casual / technical / literal |
glossary |
string | Terminology map, e.g. API=应用程序接口,LLM=大语言模型 |
model |
string | deepseek-ai/DeepSeek-V4-Flash (default) or deepseek-ai/DeepSeek-V3.2 |
translate_file
Translate an entire file, preserving its format:
| Parameter | Type | Description |
|---|---|---|
path |
string (required) | File to translate (workspace-relative or absolute) |
target |
string | Target language (default: 中文) |
style |
string | Translation style |
glossary |
string | Terminology map |
inPlace |
boolean | Write the translation back to the file (default: false) |
model |
string | Engine model |
💬 Examples
<!-- In your DSH conversation -->
翻译:"The quick brown fox jumps over the lazy dog." 到英语 casual 风格
用 translate_file 把 README.md 翻译成中文并写回 (inPlace: true)
把这段 API 文档翻译成日语,术语表:API=API, function=関数
🧩 Structure
dsh-translate-pro/
├── package.json # declares dsh.bundle
├── cordis.patch.yml # the layer applied when a profile lists this bundle
└── index.js # plugin module: translate + translate_file tools
⚠️ Note
inPlacewrites require file write permissions in your dsh profile's sandbox policy.- Translation is powered by DeepSeek models hosted on SiliconFlow — data is sent to that API.
📄 License
MIT
链接
同类插件
Tencent/WeKnora#dsh-weknora★ 31002
把 WeKnora 知识库接入 dsh 的四个只读工具:列出知识库、混合检索原文片段、按顺序还原单篇文档,以及直接取用 WeKnora 自己带引用的 RAG 或 ReAct agent 回答(含可续聊的 session id)。
superdesigndev/treg★ 3752
给 Agent 的工具目录:按「要做的事」检索约 2,600 个外部接口(SEO 与 SERP、外链、社交、人物与公司信息补全、广告库、抓取),查看参数与单次调用价格后直接调用,凭据由服务端注入。附带技能,MCP 行在未设置 TREG_TOKEN 前保持禁用。
TencentCloudBase/CloudBase-AI-Toolkit#dsh-plugin★ 1127
把腾讯云 CloudBase 后端接入 DeepSeek Harness——在对话里搭好并部署全栈应用,查询结果渲染为表格卡片(分页、排序、导出 CSV),部署后可预览真实域名,并提供 CloudBase MCP 工具集(`mcp__cloudbase__*`),登录走 device-code 流程。
gitroomhq/postiz-agent#dsh-postiz★ 498
通过 MCP 将 DeepSeek Harness 连接到 Postiz:列出已连接的社交媒体渠道、获取各平台发帖规则,并向 X、LinkedIn、Instagram、Facebook、Threads、TikTok、YouTube、Reddit、Bluesky、Mastodon、Discord、Slack、Telegram 等平台排期、存草稿或发布帖子;附带 postiz 工作流技能。
EthanYoQ/Invoice-Downloader#dsh-invoice-downloader★ 465
面向 DeepSeek Harness 的本地 IMAP 发票下载、OCR 识别、归档与 Excel 报销汇总。
anysearch-team/anysearch-dsh★ 432
基于 AnySearch 的实时网页与垂直搜索插件,为 DeepSeek Harness 提供搜索工具。
社区评论
评论公开保存在 GitHub Discussions。加载评论会连接 GitHub 和 Giscus;发表内容需要 GitHub 账号。