Orchestrate English→Japanese translation of po/ja.po — classify, delegate translation/review to subagents, iterate until clean
Translate po/ja.po from English to Japanese for this literate Nix configuration
repository. This skill orchestrates the process: you classify entries yourself, then
delegate translation and review to subagents, iterating until the review passes.
Scan po/ja.po and classify every entry into three buckets.
PO type comment (#. type:) | Reason |
|---|---|
paragraph in src | Code block content |
keyword NAME / keyword name | Source block identifiers |
keyword SETUPFILE | Org directive |
keyword PROPERTY | Property drawer value |
keyword OPTIONS | Export option string |
keyword STARTUP | Startup keyword |
keyword INCLUDE | po4a handles path swap |
property (*) | Property values |
Also skip: bare URLs as msgid, table cells with hardware models/hostnames/platforms.
Non-empty msgstr — leave unchanged unless review flags them.
Everything else: paragraph, heading *–*****, plain list, paragraph in QUOTE/quote/example,
cell column N with prose, keyword title.
Group translatable entries by primary source file into sequential batches:
configuration.orgapplications/emacs/init.orgoverlays/configuration.org + applications/emacs/early-init.org + .github/README.orgmodules/configuration.orgOutput a batch summary (entry counts, line ranges) before proceeding to Phase 2.
Spawn one Agent per batch, sequentially (wait for each to finish before starting the next — they all edit the same file).
Include ALL of the following in each subagent's prompt:
.claude/skills/po-translate/references/glossary.md.claude/skills/po-translate/references/style-guide.md.claude/skills/po-translate/references/po-format.md## Translation Rules
### What to translate
- paragraph, heading, plain list, paragraph in QUOTE/quote/example, cell with prose, keyword title
### What to leave empty (msgstr "")
- paragraph in src, keyword NAME/name, SETUPFILE/PROPERTY/OPTIONS/STARTUP/INCLUDE, property (*), bare URLs, proper nouns (hardware models, hostnames, platforms)
### PO format
- #, no-wrap entries: msgstr on single line
- Multi-line msgid: msgstr starts with "" then continuation lines
- Match approximate line structure of msgid
- Preserve \" escaping
### Org markup preservation
- [[url][desc]]: translate only desc, keep URL intact
- [[*heading][desc]]: translate *heading to match the translated heading name in po/ja.po, translate desc independently
- =code= and ~verbatim~: do NOT translate content inside markers
- *bold* / /italic/: translate text, keep markers
- \\\\: preserve in same position
### Terminology
- Follow the glossary strictly
- Nix terms (flake, derivation, overlay, home-manager) → keep English
- General technical terms with Japanese equivalents → use Japanese
### Register
- です/ます (desu/masu) polite form consistently
- Technical but accessible
- Faithfully translate "why" reasoning — core value of literate config
### Important
- Never modify msgid or comment lines (#., #:, #,)
- If entry already has correct translation, leave unchanged
- Preserve blank lines between entries
- Use the Edit tool for each translation
- After completing, read back modified sections to verify
After all translation batches complete, spawn a review subagent.
Include these checks in the prompt:
msgfmt --check po/ja.poparagraph in src, keyword NAME/name, directive
keywords, property (*) all have empty msgstrparagraph, heading, plain list etc. have non-empty msgstr#, no-wrap entries have single-line msgstr[[/]] count matches, URLs unchanged, =code=/~verbatim~ preserved[[*heading][desc]] — verify *heading matches the translated heading name in the corresponding heading entry's msgstrThe review subagent should:
msgfmt --check po/ja.po after fixesEvaluate the review subagent's report:
After review passes:
msgfmt --check po/ja.po
po4a po4a.cfg