DSH HUB
HomePlugin StorePlugin PacksCommunityRankingsResourcesPublish Guide
Plugin source
Back to catalog

zhrzs /

zhrzs/dsh-selection-translate

Verified

DSH Web GUI 划词翻译插件:选中英文即在浮层卡片显示中文译文,免费 Bing/MyMemory 引擎,无需 API Key。

★ 0 Stars0 Forks0 IssuesN/A Community rating0 Confirmed installs
View on GitHub
READMESource: main@0495c771

dsh-selection-translate

test

DSH Web GUI 的划词翻译插件:用鼠标选中英文,松手后在选区旁浮现一张只显示译文的小卡片。

  • 划词即译:约 60 ms 发起翻译,卡片贴着选区定位,并始终绘制在菜单、弹窗之上。
  • 只显示译文:没有标题栏、按钮或语言标签;材质、字体与圆角跟随 DSH 浅色/深色主题。
  • 免费免密钥:主用 Bing(Edge 翻译接口),失败降级到 MyMemory,不调用任何付费模型。
  • 零打断、不落日志:不抢焦点、不改选区;选中文本只发给上述翻译接口,不写入会话日志。
  • 中英混排可翻:英文句里夹中文、中文句里嵌成段英文都能翻;纯中文与零散英文 token 静默。

需要已安装 DSH,并通过它的 Plugin Manager 加载。

安装

把仓库克隆到任意目录,然后在 DSH 里安装本地 bundle:

plugin_manager install_bundle("<本仓库目录的绝对路径>")

开发

离线测试(Node ≥ 20.4,无需网络):

node --test test/host-route.test.mjs test/client-harness.test.mjs

交互规则、验证步骤、实现说明与已知限制见 docs/DEVELOPMENT.md。

License

MIT,见 LICENSE。

—/ 5

No ratings yet

Verified DSH bundle

Commit 0495c7717584

Community comments

No comments yet. Be the first to write one.

DSH HUB

A community index for DSH plugins. Not an official GitHub or DeepSeek AI product.

CommunityResourcesAPIAbout