Translate documentation pages to all missing locales. Use when a document exists in one locale but needs to be translated to others. Supports --dry-run, single-locale targeting, and incremental updates.
Translate the document at the given target path to locales that are missing or outdated.
Parse $ARGUMENTS into these parts:
wonder-mesh, billing/plans.mdx, en-US/wonder-mesh)zh-TW, zh-CN, ja-JP, es-ES), translate to only that locale instead of all missing localesExamples:
/translate wonder-mesh → translate to all missing locales/translate wonder-mesh zh-TW → translate to zh-TW only/translate wonder-mesh --dry-run → detection report only/translate wonder-mesh zh-TW --dry-run → detection report for zh-TW onlyThis is a Nextra-based documentation site with these locales:
en-US (English — primary/source locale)zh-TW (Traditional Chinese)zh-CN (Simplified Chinese)ja-JP (Japanese)es-ES (Spanish)All docs live under pages/<locale>/. Each section has a _meta.ts file for navigation labels (these must also be translated).
Before translating, read the glossary file at ${CLAUDE_SKILL_DIR}/glossary.json. This file maps English terms to their approved translations per locale. When translating:
"keep": true must remain in English (brand names, technical acronyms)When translating text that references platform UI elements (button labels, tab names, menu items, dialog titles), use the /i18n-lookup skill to find the exact translations from the Zeabur dashboard's i18n files. The dashboard i18n source is located at ../../dashboard/public/assets/locales/{locale}/.
Why this matters: Users reading docs in their language should see the same UI terms they see in the dashboard. For example, the "Networking" tab should appear as "網路" in zh-TW docs because that's what the dashboard displays.
If the dashboard i18n files are not available (the path does not exist), fall back to the glossary and contextual translation.
Determine the source locale — identify which locale(s) already have the target. If the target path includes a locale prefix (e.g. en-US/wonder-mesh), use that. If it's just a relative path (e.g. wonder-mesh/get-started.mdx), search all locales to find the source. Prefer en-US as the source if it exists there.
List all files under the source path. For example, if the target is wonder-mesh, list all .mdx files and _meta.ts files under pages/<source-locale>/wonder-mesh/.
Determine target locales — if a locale filter was provided, only check that locale. Otherwise, check all 4 non-source locales.
For each target locale, check which files are missing or outdated:
git log -1 --format="%H %ai" -- <file> to compare the last commit date of the source file vs the translated file. If the source file's last commit is newer than the translation's last commit, mark it as stale.Print a summary table showing:
missing, outdated (stub), outdated (stale), or up-to-dateIf --dry-run is set: Stop here. Print the summary and exit. Do NOT proceed to Phase 2.
If no files need action: Print "All translations are up to date." and exit.
Spawn one agent per target locale that needs translation. All translation agents run in parallel.
Each translation agent must:
${CLAUDE_SKILL_DIR}/glossary.json and use it throughout translation.**Button Label**, quoted UI text like "Tab Name" or 「Menu Item」). For each one, first search the en-US dashboard i18n files at ../../dashboard/public/assets/locales/en-US/ to find the i18n key for the English term, then look up that key in the target locale's files at ../../dashboard/public/assets/locales/{target-locale}/. Check relevant JSON files (common.json, service.json, servers.json, project.json). If the dashboard i18n path does not exist, skip this step silently and rely on the glossary and contextual translation._meta.ts in the source locale for navigation labels.outdated (stale) (not missing):
git diff <old-commit>..<new-commit> -- <source-file> to see what changed in the sourcemissing or outdated (stub): Translate the full source file.import { Callout } from 'nextra/components'))title, ogImageTitle, ogImageSubtitle) but translate their values_meta.ts: translate the display labels but keep the keys unchanged_meta.ts does not have an entry for this section, add it with the translated label (consulting the glossary for the label).zh-TW: use Traditional Chinese characters (繁體中文), not Simplifiedzh-CN: use Simplified Chinese characters (简体中文)ja-JP: use standard Japanese with appropriate kanji/hiragana/katakana mixes-ES: use Castilian Spanish conventions"keep": true stay in English, others use the specified translationAfter all translation agents complete, the main agent must:
_meta.ts consistency: Read each target locale's _meta.ts and confirm the section entry is present with a translated label.