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
188 lines
10 KiB
Plaintext
188 lines
10 KiB
Plaintext
DEAL HUNTER — SIMPLIFIED CHINESE TRANSLATION
|
||
TASK LIST
|
||
Updated: 2026-10-19 13:44 UTC
|
||
|
||
Legend: [x] done [~] in progress [ ] todo [!] blocked [?] decision needed
|
||
Effort is a rough machine/operator estimate, not a promise.
|
||
|
||
---------------------------------------------------------------------------
|
||
PHASE 0 — SOURCE AND STRUCTURE
|
||
---------------------------------------------------------------------------
|
||
[x] T0.1 Locate the English source.
|
||
artifacts: audio-read/bundles/dh-bundle/manifest.jsonl
|
||
sha256: 21ce568787540cf7164b6ab4028f1caee51996447537022154d1e5768cde87ba
|
||
[x] T0.2 Extract the book (1 book, 32 chapter rows, 4,319 utterances).
|
||
artifacts: productions/deal-hunter-zh/source/book.json
|
||
[x] T0.3 Classify matter: 4 front, 27 body, 1 back.
|
||
[x] T0.4 Reconstruct readable paragraphs; keep source utterance ranges.
|
||
3,047 paragraphs; 66,884 source words.
|
||
[x] T0.5 Detect and remove production-only lines (the spoken "Chapter one"
|
||
announcement in Salvage; the repeated "Author's Note" heading).
|
||
[!] T0.6 Recover exact DOCX paragraphing. Blocked on Q1.
|
||
Default: proceed with the reconstruction and flag it for review.
|
||
|
||
---------------------------------------------------------------------------
|
||
PHASE 1 — GLOSSARY AND STYLE
|
||
---------------------------------------------------------------------------
|
||
[x] T1.1 Initial glossary: characters, roles, places, terms, style rules.
|
||
artifacts: productions/deal-hunter-zh/glossary/glossary.json
|
||
[x] T1.2 Style guide: narration, dialogue, punctuation, numbers, unknown
|
||
names, no additions.
|
||
[?] T1.3 Author approval of names, ranks and title treatment. Q3–Q5.
|
||
[x] T1.4 Enforce the title/proper-name rules in the drafter prompt
|
||
(Deal Hunter/Hunter/Umbra Audio stay English; no invented full
|
||
names or titles).
|
||
[~] T1.5 Expand the glossary for minor characters and ship/place names
|
||
after the Chapter 1 analysis pass.
|
||
artifacts: glossary/candidates.md (14 analyst proposals, 204 source
|
||
candidates; needs manual pruning before merge).
|
||
[~] T1.6 Add a glossary validation check (every approved name appears
|
||
consistently; no unapproved transliteration).
|
||
note: qa.py flags proper-name residue and system->系统 today; a full
|
||
approved-name consistency check is still todo.
|
||
|
||
---------------------------------------------------------------------------
|
||
PHASE 2 — PIPELINE
|
||
---------------------------------------------------------------------------
|
||
[x] T2.1 Local OpenAI-compatible client with reasoning disabled, retries,
|
||
JSON extraction, prompt-hash cache and usage log.
|
||
artifacts: tools/translation/llm.py
|
||
[x] T2.2 Pass 0: scene/chunk assembly, source-index preservation.
|
||
artifacts: tools/translation/book.py, pipeline.py
|
||
[x] T2.3 Pass 1: scene intent analysis (summary, register, tone,
|
||
participants, risks, proposed terms).
|
||
[x] T2.4 Pass 2: context-aware draft translation with glossary and
|
||
analysis; paragraph-id validation and per-paragraph fallback.
|
||
note: source lines no longer carry speaker labels; deterministic
|
||
cleanup removes leaks, normalises quotes and repairs English
|
||
residue; remaining Latin is recorded as a per-paragraph warning.
|
||
[x] T2.5 Pass 3: chapter voice/term consistency check (implemented,
|
||
optional; not yet run).
|
||
[~] T2.6 Pass 4: bilingual critic with a different model, severity and
|
||
minimal-fix output.
|
||
note: sample uses qwen3.5-9b, the drafter model, because DeepSeek
|
||
R1 8B produced 28 duplicate/contradictory term issues on one
|
||
chunk. The independence requirement is not met by the sample
|
||
critic; the full-run model is a decision for the author.
|
||
[x] T2.7 Resume/checkpoint: every analysis, draft and critique is a file.
|
||
[x] T2.8 JSON repair and per-paragraph fallback; no silent omissions.
|
||
[ ] T2.9 Parallelise independent chunks (the server serialises today;
|
||
measure before changing).
|
||
[~] T2.10 Add a cost/time estimator and a run manifest.
|
||
note: measured ~1.6 min/chunk gives a ~8-9 h full-book estimate;
|
||
a first-class estimator is still todo.
|
||
[~] T2.11 Add automated regression tests for the prompt/cache/validation
|
||
paths.
|
||
note: 17 unittest cases cover sanitise, residue detection, JSON
|
||
extraction and the mechanical QA checks; prompt/cache and live LLM
|
||
paths are still todo.
|
||
|
||
---------------------------------------------------------------------------
|
||
PHASE 3 — SAMPLE TRANSLATION
|
||
---------------------------------------------------------------------------
|
||
[x] T3.1 Translate the front matter (Sample Track, Opening Track,
|
||
Copyright, Author's Note).
|
||
note: re-run with the corrected prompt and glossary.
|
||
[x] T3.2 Translate Chapter 1, Salvage (232 paragraphs, 24 chunks).
|
||
note: complete; QA clean apart from one ship-name review note.
|
||
[~] T3.3 Run Pass 4 critic on the front matter and Chapter 1.
|
||
note: front/back matter and the first four Chapter 1 chunks are
|
||
covered by the bounded qwen critic; the rest waits for the
|
||
full-book critic pass.
|
||
[ ] T3.4 Run Pass 3 consistency on Chapter 1.
|
||
[x] T3.5 Translate the Closing Track (3 paragraphs).
|
||
[~] T3.6 Operator spot-check: names, title, register, paragraphing,
|
||
Chinese punctuation, no English residue.
|
||
note: a 22-page render has been checked for layout and TOC; the
|
||
operator's language review is still pending.
|
||
[ ] T3.7 Fix the sample issues and freeze the prompt/glossary version.
|
||
|
||
---------------------------------------------------------------------------
|
||
PHASE 4 — RENDERING
|
||
---------------------------------------------------------------------------
|
||
[x] T4.1 AsciiDoc writer (book doctype, TOC, chapter headings, dialogue
|
||
roles, scene breaks, source comments).
|
||
artifacts: tools/translation/render.py
|
||
[x] T4.2 Flat-ODF writer with title page, copyright, TOC, headings,
|
||
body/dialogue/quote/front-matter styles, A4 page layout,
|
||
running header and page numbers.
|
||
[x] T4.3 ODT conversion with UNO TOC update (page numbers populated).
|
||
[x] T4.4 PDF export for review.
|
||
[x] T4.5 Different formatting for front matter, body and back matter.
|
||
[x] T4.6 Sample render: title page, TOC, copyright, author's note,
|
||
audio preface.
|
||
note: 22-page render includes the full Chapter 1 and the Closing
|
||
Track.
|
||
[~] T4.7 Chinese typography check on rendered pages (font size, indent,
|
||
line spacing, punctuation, orphan/widow control).
|
||
note: font size (20pt headings, 11pt body), 2-em indent, 1.5 line
|
||
spacing, Chinese numerals and right-aligned TOC page numbers are
|
||
verified in LibreOffice; orphan/widow and full punctuation review
|
||
are still pending.
|
||
[~] T4.8 Verify the ODT opens cleanly in LibreOffice and Microsoft Word.
|
||
note: LibreOffice verified; Word is not available on this machine.
|
||
[ ] T4.9 Per-chapter ODT/AsciiDoc outputs (optional).
|
||
[ ] T4.10 Add a cover image / half-title if supplied.
|
||
|
||
---------------------------------------------------------------------------
|
||
PHASE 5 — FULL-BOOK RUN
|
||
---------------------------------------------------------------------------
|
||
[ ] T5.1 Translate all 27 body chapters (~8–9 h at the measured rate).
|
||
[ ] T5.2 Run the critic pass on every chapter (3–5 h).
|
||
[ ] T5.3 Run the consistency pass and apply approved fixes.
|
||
[ ] T5.4 Normalise the glossary and re-run affected paragraphs.
|
||
[ ] T5.5 Render the full AsciiDoc, ODT and PDF.
|
||
[ ] T5.6 Record model names, prompt versions, glossary hash and run date
|
||
in the output metadata.
|
||
|
||
---------------------------------------------------------------------------
|
||
PHASE 6 — QA AND REVIEW
|
||
---------------------------------------------------------------------------
|
||
[~] T6.1 Automated checks:
|
||
- every source paragraph has a translation (or an explicit flag)
|
||
- no paragraph-id drift or duplicate ids
|
||
- no unintended English residue
|
||
- Chinese punctuation and quote pairing
|
||
- approved names/terms used consistently
|
||
- no added or dropped sentences in flagged passages
|
||
note: qa.py covers missing paragraphs, id drift, metadata leaks,
|
||
straight/unbalanced quotes, double punctuation, title drift,
|
||
English residue and system->系统. Full approved-name consistency
|
||
and added/dropped-sentence detection are still todo.
|
||
[x] T6.2 Produce a bilingual side-by-side review table.
|
||
artifacts: tools/translation/review.py -> output/review.html
|
||
[~] T6.3 Produce a severity-sorted issues queue (block/major/minor).
|
||
note: qa.py --json-out and the critic issues are merged in
|
||
review.html; a standalone queue is still todo.
|
||
[ ] T6.4 Native-speaker review of the full book.
|
||
[ ] T6.5 Apply the review fixes and re-render.
|
||
[ ] T6.6 Final read-through of the ODT/PDF (TOC, page breaks, headers).
|
||
|
||
---------------------------------------------------------------------------
|
||
PHASE 7 — DELIVERY
|
||
---------------------------------------------------------------------------
|
||
[ ] T7.1 Final deliverables: AsciiDoc, ODT, PDF, glossary, issue log.
|
||
[ ] T7.2 Version and date the output; keep the source hash.
|
||
[ ] T7.3 Archive the production outside the public Git repository.
|
||
[ ] T7.4 Optional: EPUB and print-ready PDF.
|
||
|
||
---------------------------------------------------------------------------
|
||
PHASE 8 — AUDIO ALIGNMENT (FUTURE)
|
||
---------------------------------------------------------------------------
|
||
[x] T8.1 Preserve source utterance indices on every translated paragraph.
|
||
[ ] T8.2 1:1 utterance alignment for TTS (split or align the paragraph
|
||
translation back to the 4,319 source utterances).
|
||
[ ] T8.3 Update the UmbraAudio import format to accept paragraph-level
|
||
translations with source ranges.
|
||
[ ] T8.4 Re-render the audiobook in Chinese and compare timing.
|
||
|
||
---------------------------------------------------------------------------
|
||
CRITICAL PATH
|
||
---------------------------------------------------------------------------
|
||
Q1/Q3/Q4/Q5 (source, title, names, script)
|
||
-> T3.6 sample approval
|
||
-> T5.1 full-book draft
|
||
-> T5.2 critic
|
||
-> T6.4 native review
|
||
-> T7.1 delivery
|