鱼皮AI导航
鱼皮AI导航
  • 主页
  • 社区
  • AI工具
  • AI知识库
  • AI提示词
  • MCP
  • Skills
  • AI学习资源
  • AI资讯
  • GitHub开源
登录/注册

dsh-plugins#to-english

用你已经配置好的模型,把从市场安装的插件里的中文文案改写成英文——安装时自动运行,随后热重载。每个文件整体翻译一遍,凡是有解析器的都会实际校验(JavaScript 用 node --check,其余用 JSON、YAML 解析器),失败时把报错交回模型,最多修复三次;超过 48 KB 或始终无法解析的文件,回退到按行区间翻译,逐行与原文做结构比对。触发短语与本地化表可以选择保留而不翻译,未改动的原文件保留在同目录下的 .zh.bak。

插件市场
访问 GitHub
文档README

@creait/dsh-to-english

Rewrites a market-installed plugin's Chinese copy into English, using a model you already have configured — once when it lands, then live-reloaded.

Most of the DSH plugin market is written in Chinese. Installing from it gives you a working plugin whose settings page, tool descriptions, log lines and README you cannot read. Translating by hand is a per-plugin chore that has to be redone on every update, and a blunt "replace every CJK run" pass produces something worse: a plugin that reads English and no longer works.

The untouched original is always kept beside the file as .zh.bak.

How it translates

One pass over the whole file is the default. The model is handed the entire file and returns the entire file. What stands behind it is not a diff gate but a parser: node --check for .js/.cjs/.mjs (on a sibling temp file, so the package's own type field decides script-vs-module exactly as it will at load time), JSON.parse for .json, a YAML parse for .yml/.yaml. A file that fails is handed back to the model with the parser's complaint, up to three repair round-trips. A reply shorter than 60% of the original is treated as truncated rather than as a translation — prose has no parser to catch a half-written README.

Files up to 48 KB go through this path. Above that the model would have to echo back more than the completion budget allows.

The segment path is the fallback. For a file too large to echo back, or one the model could never get past its parser, the older pipeline still runs: only line ranges containing Chinese are sent, the reply must have the same number of lines, and each line is checked against the original's code skeleton before it is accepted. A conservative partial translation beats none at all. Nothing above 512 KB is touched at all.

Why the default moved: the skeleton comparison is safe, and it is also why Chinese that has to change shape to become English never translated. /^[好嗯啊]*\s*继续/ has to become /^(ok|um|ah)*\s*continue/ — a character class turning into an alternation, because Chinese marks optionality per character and English words are longer than one character. Every such line came back rejected.

What that trades away is real and worth stating: node --check catches a file that stopped parsing, not one that still parses and now means something else. A renamed identifier, a reworded id: in cordis.patch.yml, a translated "main" in package.json all survive their parser. The contract asks the model to leave those alone; nothing enforces it. Read the diff against .zh.bak.

What it will not translate

translateEverything (default true) decides whether Chinese the program matches on is rewritten or preserved. On an English-only harness, preserving it just leaves a feature switched off — the phrases that would fire it can never be typed — so the default is to translate it, and to change its shape where English demands a different one. Turn it off and the segment path locks three shapes:

Match data. dsh-recall's auto-recall gate is ~324 characters of Chinese trigger phrases and Chinese regexes. A line holding a regex literal with CJK, or a line that is only quoted literals and commas, is locked.

The non-English half of an i18n table. A var zh = {…} next to a var en = {…} is already bilingual; rewriting zh serves English to the people who deliberately picked Chinese. A brace-depth scan from a head line bound to a non-English language tag locks the block.

Two things are locked regardless of that setting.

Names the code looks up. Variable and function names, object keys, import and route paths, settings namespaces, and the id, name and main fields of package.json and cordis.patch.yml. In the segment path keepsStructure enforces this by comparing the code skeleton, and YAML gets its own gate — a quoted scalar is writable only if the original held CJK, so prompt: "你是助手" translates and name: 'dsh-enhance' does not. In the whole-file path this is a contract clause, not a gate.

Protocol strings. lib/semantic.js's QUERY_PREFIX in dsh-recall is the BGE embedding model's required instruction prefix. It belongs to the checkpoint, not to the user: a model trained on Chinese instructions expects its Chinese instruction whatever language the query is in. No deterministic rule catches this — it is a prompt clause in both paths. Review the diff.

README.zh.md and its siblings are skipped outright — the English README is the file next to it, and translating it spends the budget producing a second English README under a name that says it is Chinese. A README.md that is itself the localized half (a Chinese README.md beside an English README_EN.md) is skipped the same way.

The one structural edit the segment path allows

"请求 " + <b>{n}</b> + " 次" puts the measure word after the number and English puts it in front, so the trailing literal has nothing left to hold and must go. dropsOnlyAffixes permits that deletion under narrow terms — only a short CJK literal, at most two per line, exactly one separator removed each, and only when another Chinese literal on the same line survives, so t("中文标题", fallback) cannot quietly lose an argument. Every such acceptance is logged and listed under relaxed in the file report.

Install

Not on npm yet, and pnpm cannot install a subdirectory of a git repo — so clone the repo and point the profile at the folder:

▼
sh
复制代码
git clone https://github.com/CREAIT-nl/dsh-plugins.git dsh plugin --profile web add ./dsh-plugins/to-english

That records a link: rather than copying the package in, which is what you want here: pnpm does not install a link target's dependencies into the linking project, so the profile's node_modules stays free of a second copy of any @deepseek-ai/* runtime. Run pnpm install inside to-english/ once, then restart dsh web — the boot manifest is built at startup.

The package ships its own cordis.patch.yml, so it inserts its roster row on its own — no manual profile edit. Add it to dsh.profile.bundles to activate the browser half.

Configure

Settings live in the dsh-to-english namespace, or in the GUI at Settings → To English.

KeyDefaultWhat it does
enabledtrueRun automatically when a plugin is installed.
provider / model''Which configured model translates. Empty means the first available.
promptstyle guidanceEditable. Style only — the mechanical contract lives in WHOLE_FILE_RULES and PROTOCOL_SYSTEM, where an edited prompt cannot weaken it.
rewriteRadius1Segment path only. Lines without Chinese on each side of a Chinese line that are also open to rewriting. 0 leaves a mixed passage reading like a graft; 1 lets the model repair the English clause the Chinese was joined to. Capped at 5.
translateEverythingtrueTranslate the match data and locale tables described above rather than preserving them. The gates that stop the model renaming code are unaffected.

The automatic run fires on a new top-level package directory appearing in the profile's node_modules. Anything installed before this plugin existed never crossed that trigger — use the settings section's Translate now box, which takes a package name and runs the same pipeline.

Routes

Loopback-only, mirroring the gen-limit settings-route pattern — the harness settings wire only exposes namespaces on its own allowlist, which a plugin cannot widen:

RoutePurpose
GET/POST /api/dsh-to-english/configread/write the settings above
GET /api/dsh-to-english/cataloglive provider/model list
POST /api/dsh-to-english/translatetranslate + reload one installed plugin now
GET /api/dsh-to-english/statusenabled, provider, model, last run

What breaks this

The watcher, the settings provider and the live-reload seam are pre-1.0 internal dsh surfaces with no compatibility guarantee. peerDependencies pins the versions this was built against; a harness upgrade can move them.

Translation is a model call, so it is not deterministic. In the segment path a line that fails its check is left in Chinese and counted in the report. In the whole-file path a file that fails its parser three times is abandoned and falls back to segments. Neither can make a mediocre translation good, and neither catches a change that parses. Read the report, and for anything carrying a protocol string, read the diff.

The settings nav glyph is a deliberate reach past the API. settings.section has no icon option — the shell picks the glyph from a hardcoded section-id map and falls back to the gear for ids it does not know, ours included. So the client half repaints its own row: it finds the nav cell by label and replaces the gear's markup with the official IconListPenOutline16. It fails safe — if the shell's markup moves, nothing matches and the row keeps the gear.

插件市场

快捷安装

复制到终端去安装插件

dshplugin--profilewebaddgithub:CREAIT-nl/dsh-plugins#path:/to-english

温馨提示

装插件等于在本机跑第三方代码,权限与你相同,能读文件、用凭据、访问网络,工具审批管不到。请只装可信来源,并尽量锁定 commit。

站长:程序员鱼皮 老鱼简历 商务合作 增值电信业务经营许可证
2026 鱼皮AI导航 | 沪ICP备19026706号-6
站长:程序员鱼皮 老鱼简历 商务合作 增值电信业务经营许可证
2026 鱼皮AI导航 | 沪ICP备19026706号-6
🔥热门工具
朱雀AI检测朱雀AI检测
朱雀AI检测助手朱雀AI检测助手
LovartLovart
老鱼简历老鱼简历
WritePass官网WritePass官网
面多多面多多
CursorCursor
星月写作星月写作
零感AI零感AI
墨得问题墨得问题
dsh 插件推荐
dsh-expert-market
DeepSeek Harness 专家市场:WorkBuddy 专家/专家团体系原生 agent preset 移植,425 个官方专家目录按需安装,内置能力减法声明、开场白与团队委派工具。
experts-management
专家管理:管理 ntd 格式的专家与专家团队(plugin.json + Agent MD + 技能集),内置 50+ 专家市场,`/expert-名称` 以专家身份执行任务,不占模型目录 token。
universal-plugin-hub
DSH 的可视化插件市场:多源浏览、一键安装,技能、子代理、MCP 连接器、LSP 服务器与 hooks 自动接入。
dsh-plugin-marketplace
在 Web UI 设置页浏览和搜索 GitHub dsh-plugin 仓库,按 Star 排序,并通过 DSH CLI 安装插件。
dsh-plugin-mgr
设置页卡片式插件管理:经 profile 补丁层启停插件(跨重启保留)、安装来源详情、npm 更新检查与一键更新、卸载、搜索与加载失败标识。