Translate chapters in a set-up EPUB project in batches of 20 items with glossary maintenance. Triggers: "dịch sách", "translate epub", "translate chapter", "dịch tiếp", "continue translating". Requires aio-epub-setup first.
which jread 2>/dev/null || echo "NOT INSTALLED — see references/installation.md"Translate chapters in an already-set-up EPUB project. This skill ONLY translates.
jread stats workspace/
If this fails → STOP. Tell user: "Project not set up. Run aio-epub-setup first."
Also verify:
test -f CLAUDE.md && echo "OK" || echo "MISSING"
If CLAUDE.md missing → STOP. Tell user: "No CLAUDE.md found. Run aio-epub-setup first."
Claude is NOT a translation API that processes one paragraph at a time. Claude is the translation director who reads the batch first, understands the author's voice, then translates with full awareness.
The goal is a translation that reads naturally in the target language. You are free to add sentences, split paragraphs, restructure ideas, rephrase for flow, use literary techniques native to the target language. What matters is preserving meaning, tone, and emotional impact — not mirroring the source word-for-word.
jread stats workspace/ --incomplete
jread stats workspace/ --incomplete
Pick the next chapter to translate.
NEVER dump all items at once. Always use --limit:
# First 20 untranslated items
jread list workspace/OEBPS/Text/chapter0001.html --untranslated --limit=20
For each batch, understand:
Before writing translations, update the Glossary section with:
Translate all items in the batch simultaneously — not one at a time. This allows:
HTML Preservation Rule: The text field from jread list contains innerHTML — it may include inline tags like <em>, <strong>, <a href="...">, <span>, etc. You MUST preserve all HTML tags in the translation. Only translate the visible text content, never alter or remove tags, attributes, or structure.
Example:
He was <em>absolutely</em> certain.Anh ta <em>hoàn toàn</em> chắc chắn.Anh ta hoàn toàn chắc chắn. ← lost <em>Write translations:
jread set workspace/OEBPS/Text/chapter0001.html <id> "<translation>" --lang=vi
jread list workspace/OEBPS/Text/chapter0001.html --untranslated --limit=20
Repeat Steps 2-5 until no untranslated items remain.
jread stats workspace/ --incomplete
Chapter should no longer appear when translated == total.
Note decisions made, difficulties encountered, terms added to Glossary.
Then move to next chapter.
If starting a new session:
CLAUDE.md — style guide, glossary, translation notesjread stats workspace/ --incomplete — find resume pointjread list <chapter.html> --untranslated --limit=20 — start translatingListing all items at once without --limit — floods context. Always use --limit=20.
Translating without reading the batch first — causes inconsistent terminology and wrong tone.
Translating one paragraph at a time via jread get — too slow, misses cross-paragraph context.
Not updating Glossary in CLAUDE.md — same term translated 3 different ways.
Not checking stats after each chapter — missed paragraphs discovered at the end.