dsh-translator
原生流式翻译工作台插件,支持双语对照、格式保留、术语表及历史记录本地存储。
AI 分析
核心用途是提供沉浸式的流式翻译体验。适合有高频跨语言阅读、翻译和对照需求的用户。历史记录仅保存在浏览器本地,保障隐私安全。
安裝
$
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:SiYue-ZO/dsh-translator說明文件
閱讀完整 README ↗使用
选择源语言和目标语言,粘贴原文,点击“开始翻译”。生成期间按钮会变成“停止翻译”。
DeepSeek Harness uses an architecture where everything is a plugin.
更多操作:
- 点击中间的互换按钮可交换语言与两侧内容。
- 设置面板中可调整风格、双语对照、格式保留、术语表和附加要求。
- 原文工具栏支持粘贴、导入和清空;译文工具栏支持朗读、下载和复制。
- 历史记录仅保存在当前浏览器的
localStorage,不会上传到第三方历史服务。
浏览器设置会记住你上次选择。Host 配置仍是翻译人格的回退值,也支持没有客户端界面的 dsh 使用方式。
配置
插件的默认配置位于 cordis.patch.yml。dsh 的后置 patch 可以按相同 id 覆盖整份配置。注意:dsh 对插件行的 config 是整体替换而非深度合并,因此覆盖时请写全所有字段。
例如,新建 translator.override.yml:
- id: translator
config:
sourceLanguage: auto
targetLanguage: Japanese
style: professional
outputMode: bilingual
preserveFormatting: true
translateCodeComments: false
glossary:
DeepSeek Harness: DeepSeek Harness
agent: エージェント
plugin: プラグイン
customInstructions: 'Japanese punctuation must use the full-width style.'
includeRuntimeContext: false
临时启动并应用:
dsh --profile web --patch ./translator.override.yml
| 字段 | 默认值 | 说明 |
|---|---|---|
sourceLanguage | auto | 源语言名称;auto 自动识别 |
targetLanguage | Simplified Chinese | 默认目标语言 |
style | natural | natural / professional / academic / technical / literal |
outputMode | target-only | target-only 或 bilingual |
preserveFormatting | true | 尽可能保留标记与排版 |
translateCodeComments | false | 是否翻译注释和 docstring |
glossary | {} | 源术语到目标术语的固定映射 |
customInstructions | '' | 附加翻译规则 |
includeRuntimeContext | false | 是否把工作区等动态上下文交给翻译模型 |