Add REST endpoints and frontend wiring for per-language project actions:
- POST /api/workspace/{project}/translation/{lang}/queue — queue translation
- POST /api/workspace/{project}/audio/{lang}/queue — queue audio generation
- GET/POST /api/workspace/{project}/format/{lang} — format metadata (EPUB/PDF)
- GET /api/workspace/{project}/review/{lang}/chapters/{chapter} — utterance review
- GET/POST /api/workspace/{project}/front-matter/{lang} — front matter editor
- GET /api/workspace/{project}/chapters/{lang} — chapter list
- GET /api/workspace/{project}/chapter-content/{lang}/{chapter} — chapter text
Frontend fixes:
- Review page shows per-language text (English source, Chinese translation, etc.)
- Non-translated languages show 'Queue translation' button only
- Speaker data from English source matched by paragraph ID
- UmbraAudio column layout: Speaker, Variation, Text, Actions
- Chapter tree in left sidebar: Front matter, Back matter, Body
- Audio Format label at top of sidebar
- Pandoc formatting toolbar for front matter text editing
4.8 KiB
4.8 KiB
Plan: Continue Building Chinese Translations for Deal Hunter
Updated: 2026-10-21
Target: Translate Deal Hunter (English) to Simplified Chinese (zh-CN) with intent-preserving translation
Source machine: this machine (umbra controller) focuses on orchestration/UX/output; workers do directed work
Priority: First language is Chinese
Current state assessment
What exists (already working)
- UmbraTrans codebase with full translation pipeline for Deal Hunter
- Source extracted from bundle:
/home/umbra/audio-read/bundles/dh-bundle/manifest.jsonl(sha256 21ce5687...) →productions/deal-hunter-zh/source/book.json(1 book, 32 chapters, 4,319 utterances, ~66,884 words) - Matter classified: 4 front, 27 body, 1 back; paragraphs reconstructed (3,047) with source utterance indices
- Multi-pass pipeline: Pass 0 assembly, Pass 1 analysis (lfm2.5-2.6b), Pass 2 draft (qwen3.5-9b), Pass 3 consistency (optional), Pass 4 critic (different model). Caching, resume, fallbacks implemented.
- Glossary/style with hard-term blocks and proper-name handling; mechanical cleanup (quotes, leaks, English residue detection)
- Renderers: AsciiDoc (canonical), Flat ODF → ODT via LibreOffice UNO with TOC update, PDF export. Chinese typography (chapter numerals, indent, fonts)
- QA tools (qa.py, names.py, review.py), bilingual HTML review
- Status/TaskList/Questions documented in
docs/ - Sample: Front matter + Chapter 1 (Salvage) translated; Closing Track done. Review artifacts in
productions/deal-hunter-zh/output/
Gaps (from docs + inspection)
- Front matter needs re-run with corrected prompt/glossary (T1.4 done conceptually, but re-run flagged)
- Pass 3 consistency not run on Chapter 1; Pass 4 critic partial coverage (first 4 chunks of Ch1 + front/back)
- Paragraphing from reconstructed heuristic vs original DOCX (Q1) - blocked until DOCX available
- Glossary expansion/pruning: candidates.md has proposals needing manual approval (T1.5)
- Critic independence: DeepSeek R1 8B caused issues on sample; using qwen3.5-9b for critic now (not fully independent). Need better critic strategy/model.
- Parallel chunk processing not implemented (T2.9) - server serializes today
- Cost/time estimator and full regression tests incomplete
- Author review pending (names/titles/register) - Questions.txt has Q1-Q8
- Full book translation not done (only sample chapters)
- Need to ensure "intent translation not word-for-word" is enforced throughout
- Output for review must be AsciiDoc + OpenOffice Writer format (ODT) as specified
Plan
Phase 0: Prep & alignment (immediate)
- Sync context - Ensure Deal Hunter bundle/source is current; verify paths
- Answer/record decisions - Review Questions.txt; apply recommended defaults where reasonable, flag for user approval on critical items (names/titles/profanity register)
- Freeze baseline - Snapshot current glossary/prompt versions before full run
- Environment check - Verify LM Studio at 192.168.123.16:1234/v1 accessible; models available (lfm2.5-2.6b, qwen3.5-9b, deepseek-r1-8b)
Phase 1: Harden translation quality (fix issues from sample)
- Re-run front matter with corrected prompt/glossary (T3.1 follow-up)
- Complete critic coverage - Run Pass 4 on remaining Ch1 chunks; consider alternative critic model/config to satisfy independence
- Run Pass 3 consistency on Chapter 1 (T3.4)
- Glossary curation - Review
productions/deal-hunter-zh/glossary/candidates.md, approve/reject, update glossary.json - QA pass - Run qa.py strict on translated chapters; fix mechanical issues
- Review page - Generate/update review.html for spot-checking
Phase 2: Translate full book
- Translate body chapters in order (27 body chapters). Run with caching/resume enabled.
- Translate remaining front/back if not current
- Apply Pass 3/4 as configured (balance quality vs time/cost)
- Incremental QA after each chapter/batch
- Track progress in Status.txt
Phase 3: Render & produce review outputs
- Render full book - Generate AsciiDoc + ODT (with UNO TOC update) + PDF
- Verify formatting - Front/body/back matter styles correct; Chinese typography correct
- Review package - Ensure outputs in expected locations for user review
- Final QA - Full qa.py strict run
Phase 4: Documentation & handoff
- Update Status.txt/TaskList.txt with progress
- Record decisions made (from Questions or defaults applied)
- Document any gaps for future work
Success criteria
- Complete Simplified Chinese translation of Deal Hunter with intent preserved (not word-for-word)
- Outputs: canonical AsciiDoc + OpenOffice ODT (for review) + PDF
- Proper handling of front/body/back matter formatting
- Glossary applied consistently; proper names handled per decisions
- QA clean or issues documented/reviewed
- Process resumable, cached, documented