这个版本更新了什么#
Local translation by default, a glossary that holds a book's terms to one rendering, and inline markup a local model can keep.
⬆️ Upgrading from 0.4#
- 默认翻译器现在改为本地翻译:使用 Ollama 和 TranslateGemma 12B。
Install Ollama and run
ollama pull translategemma:12b, or, to keep using OpenAI, set it in~/.tepub/config.yaml:
Before translating, tepub checks that Ollama answers and has the model, and says how to fix it if not.primary_provider: name: openai model: gpt-4o - 每本正在处理的书都只需运行一次
tepub extract。 链接会 carry no target or anchor are no longer part of a unit, and long lists, tables and definition lists are split into their items (segments format 5). Every translation carries over: one whose unit changed between text and HTML is converted to its new form, a list translated whole is distributed over its items, and anything that cannot be carried faithfully is translated again. Re-running extract is safe from this release on; see the first fix below.
✨ Added#
- 每本书使用独立的术语表。 以前每个段落都是单独翻译的,所以
book's key terms drifted: in 124 paragraphs of one book, "scam compound" came
out ten different ways.
tepub glossary buildproposes terms from the book's index and its recurring names, with renderings from the model, for review; saved asglossary.yaml, the renderings of the terms in each paragraph go into its prompt, and a reply that misses one is retried once with the term named. TranslateGemma used an injected rendering in 10 of 10 paragraphs, and in 0 of 10 without it.tepub glossary checklists finished translations that miss a rendering;--retranslateredoes only those. - 默认使用本地翻译,通过 Ollama 和 TranslateGemma 12B 实现:免费、 private, no API key. The docs lead with it and show how to choose a cloud service instead.
- 对于 Ollama 上的推理模型使用
think: false,例如 Qwen 3.5,因为它们 otherwise spend minutes thinking before each paragraph.
🐛 Fixed — data loss#
- 再次运行
tepub extract不会再删除已翻译的书。 翻译 stored the target language as a code ("zh-CN") and extract passed its name ("Simplified Chinese"); the mismatch rebuilt the whole state as untranslated, with no warning and no copy. A workspace's state is now only ever merged
(更新说明有删节,完整内容见下方链接。)
以上译自作者写在 GitHub 上的英文更新说明。查看原页面