l-translate
Translate English docs to Japanese for the zudo-doc locale. Use when: (1) User wants to translate en docs to ja, (2) User says 'translate', 'ja version', 'Japanese translation', (3) User wants to chec...
Translate EN Docs to JA
Translate English MDX documentation files to Japanese using the ja-translator subagent.
Invoke / first. Its bilingual rule and generated/default-locale-only exceptions govern which files to translate and which content to preserve.
Input Parsing
Parse the argument to determine the mode:
File path (e.g.,
docs/) — translate that specific filecolor/ three- tier- color- strategy. mdx Category (e.g.,
color,positioning) — translate all untranslated files in that categorycheck-missingorcheck— scan for all EN docs without JA counterpartsNo argument — ask the user what to translate
Path Convention
Source EN:
src/content/ docs/ <category>/ <filename>. mdx Target JA:
src/content/ docs- ja/ <category>/ <filename>. mdx
For deep articles (folder with index.mdx + sub-pages):
Source EN:
src/content/ docs/ <category>/ <folder>/ index. mdx Target JA:
src/content/ docs- ja/ <category>/ <folder>/ index. mdx
Mode A: Translate Specific Files
Step 1: Identify Files
Resolve the input to one or more source EN file paths. Verify each exists.
Step 2: Check Existing JA Files
For each source file, check if a JA translation already exists at the i18n path.
If JA exists: Read both EN and JA files. Compare to find sections that differ (the EN may have been updated after the JA was created). Report findings and ask the user whether to update the JA or skip.
If JA does not exist: Proceed to translation.
Step 3: Translate via Subagent
For each file that needs translation, use the ja-translator subagent:
Task tool → subagent_type: "ja-translator"
prompt: "Translate <en-path> to Japanese. Write the result to <ja-path>."Run translations in parallel when there are multiple independent files.
For updates to existing JA files:
Task tool → subagent_type: "ja-translator"
prompt: "Update the Japanese translation at <ja-path> based on changes in <en-path>. Read both files, identify what changed in the EN source, and update only the corresponding sections in the JA file."Step 4: Validate
Run pnpm build to verify no broken links or MDX errors.
Step 5: Report
List all translated files and their output paths.
Mode B: Check Missing Translations
Step 1: Scan EN Docs
List all .mdx files under src/ (recursively).
Step 2: Compare with JA Docs
For each EN file, check if a corresponding file exists at src/.
Step 3: Report
Output a table of missing JA translations grouped by category:
| Category | File | Status |
|----------|------|--------|
| color | three-tier-color-strategy.mdx | MISSING |
| visual | gradient-techniques/index.mdx | EXISTS | Step 4: Offer to Translate
Ask the user if they want to translate the missing files (all at once or selectively).
Mode C: Translate Category
Same as Mode A but for all untranslated files in a given category directory.
Step 1: List EN Files in Category
ls src/content/docs/<category>/Step 2: Filter to Missing
Compare with src/ and identify files without JA counterparts.
Step 3: Translate All Missing
Run parallel ja-translator subagent tasks for all missing files.
Notes
The
ja-translatoragent handles prose style and technical-term glossing;/governs content preservation and translation exceptionsl- writing Always preserve the exact file name — only the directory path changes
Preserve JSX props according to
/: CssPreview/TailwindPreview payload bodies (l- writing html={},css={},height={}) stay byte-identical, but translate thetitlepropCode blocks stay entirely in English
After translation, the user should visually verify the JA page renders correctly