这个版本更新了什么#
A new EPUB core. Each item names its work item in
dev-docs/plans/2026-10-improve-tepub.md.
⬆️ Upgrading from 0.3#
- 每本正在处理的书只运行一次
tepub extract。 现在每个片段都会 found by a new rule and get new ids. Extraction carries every finished translation and synthesised audio clip over to the new units by matching file and text, after saving a timestamped copy of the state; it reports anything it could not match, which is translated again. On a real 1,623-segment workspace every translation carried over.
🐛 Fixed — the EPUB written back#
- 翻译后的书是有效的 EPUB 文件(WI-4.1)。生成器会复制源文件 book entry for entry and replaces only the chapters it translated. The old one, through ebooklib, rebuilt every chapter's head, moved every file and rewrote the navigation; written back unchanged, 15 of 19 real books gained epubcheck errors. Now none does, translated or not.
- 翻译后的章节会保留原来的标题和样式表链接(WI-4.2)。 ebooklib's reading API returned chapters with an empty head.
- SVG 封面、MathML 和
epub:switch都能保留下来(WI-4.2)。章节 parsed as XML; the HTML parser lowercased SVG names and crashed on prefixed elements. - 不会重复翻译或漏掉任何文字(WI-4.3)。一个段落中的
blockquote used to be extracted twice; text beside block children, and lists
wrapped in
<span>, are now covered. Across 10,583 chapters of a 19-book corpus every piece of text is in exactly one unit, skipped on purpose (SVG, MathML, code listings), or reported. - 脚注、链接和强调格式在翻译后仍会保留(WI-4.5)。段落 with inline markup are translated as HTML, and each reply must keep its links, anchors and images or it is retried once and then marked as an error. Measured with TranslateGemma 12B into Chinese: 30 of 30 paragraphs kept their markup.
- 双语输出在 EPUB 2 中同样有效(WI-4.6)。原文和
translations are marked with
tepub-originalandtepub-translationclasses;data-langis added only in EPUB 3, and translated copies carry no duplicate ids. - 纯译文输出会同时更新两份目录的名称,EPUB 3 nav and the NCX, and publisher stylesheets are no longer edited.
🐛 Fixed — reading books#
- 不再使用 ebooklib(WI-4.7)。它的导航解析器在遇到 nav with landmarks only. The spine, contents and metadata are read directly.
- 书籍移动或改名后仍能被识别(WI-5.3)。工作区会记录
(更新说明有删节,完整内容见下方链接。)
以上译自作者写在 GitHub 上的英文更新说明。查看原页面