dsh-hwp-translate

把 .hwp/.hwpx(한글)与 .docx 文档翻成会话模型能写的语言(中文最常见,韩转英、英转韩同理),保留表格、项目符号、缩进与字号,译文写在原文件旁(原名_zh)。hwp_extract 返回文档段落 JSON(默认每页 50 段、上限 200,用 next_offset 分页);hwp_apply 按 {段落 id: 译文} 写回,返回输出路径与 applied/missing。插件不访问任何 API、也不接受 API Key;随包的 10 MB 翻译器只在本地读写文件。仅 Windows:.hwpx 与 .docx 纯 Python 解析,旧版 .hwp 通过 COM 驱动本机 한글,需要 allow_hangul。

插件介绍

把 .hwp/.hwpx(한글)与 .docx 文档翻成会话模型能写的语言(中文最常见,韩转英、英转韩同理),保留表格、项目符号、缩进与字号,译文写在原文件旁(原名_zh)。hwp_extract 返回文档段落 JSON(默认每页 50 段、上限 200,用 next_offset 分页);hwp_apply 按 {段落 id: 译文} 写回,返回输出路径与 applied/missing。插件不访问任何 API、也不接受 API Key;随包的 10 MB 翻译器只在本地读写文件。仅 Windows:.hwpx 与 .docx 纯 Python 解析,旧版 .hwp 通过 COM 驱动本机 한글,需要 allow_hangul。

安装方式

从 GitHub 安装

dsh plugin --profile web add github:Sanshui258/dsh-hwp-translate

Installing from GitHub runs the project's build script, which pnpm blocks until you allowlist it — run the command once and pnpm prints the exact key to add under `allowBuilds` in ~/.dsh/profiles/web/pnpm-workspace.yaml.

版本兼容情况

兼容性待确认。可前往项目文档查看支持版本。