Documentation Translation
Purpose
Keep multilingual docs consistent when one locale changes. Prioritize structural parity, glossary consistency, and link correctness.
Trigger Scenarios
Use this skill when the user asks to:
- translate a markdown doc to another language
- sync updates from one locale to all locales
- add the same SDK/link/section to multilingual pages
- update localized metadata (for example
updateTime)
Decision Path
- If target files already exist in multiple locales, use sync mode (apply equivalent deltas only).
- If target locale file does not exist, use new translation mode (create file with mirrored structure).
- If source wording is ambiguous and affects meaning, ask one concise clarification question before editing.
Workflow
- Locate source and target locale files.
- Read source content and existing target content.
- Apply minimal edits:
- preserve frontmatter keys and routing fields
- preserve heading depth and markdown layout
- preserve code blocks, URLs, identifiers, API names, and package names
- Localize only human-language text (headings, explanations, labels).
- Keep terminology consistent across all changed locales.
- Validate:
- links are correct
- no duplicated sections
- no missing sections introduced by sync
- heading order and level match source intent
Default Locale Set
When the user says "sync all languages" and does not specify a subset, default to:
zh_CN
zh_TW
en_US
ja_JP
fr_FR
es_ES
de_DE
id_ID
th_TH
Target Discovery Rules
- Prefer explicit file paths from the user.
- If user gives one locale file, locate sibling locale versions with the same document purpose.
- Keep
path, name, and slug-like fields unchanged unless explicitly requested.
- If user asks for date sync, set all target files to the same
updateTime.
- If "all languages" is requested but one locale file is missing, report it explicitly instead of silently skipping.
Translation Rules
- Do not translate:
- URLs
- code snippets
- command lines
- product/API/SDK identifiers unless user requests it
- Keep list/bullet structure identical unless target file has known intentional differences.
- Prefer concise phrasing; avoid adding new meaning not present in source.
- Keep canonical tokens unchanged (for example:
SDK, GitHub, API, package names).
- For proper nouns, prefer existing wording in that locale file; do not invent new term variants.
Clarification and Safety Rules
- Ask before changing these unless explicitly requested:
path, name, route slugs, or file location
- frontmatter fields other than requested metadata (such as
updateTime)
- If one locale intentionally differs from others, preserve that difference and only sync requested parts.
- Never remove content unless it is a clear duplicate or user requested deletion.
Output Style
When reporting completion, include:
- changed files count
- what was synchronized (for example: new section, link, timestamp)
- any cleanup done (for example: removed accidental duplicates)
Use this concise template:
Updated: <N> files
- Synced: <what changed>
- Metadata: <date/frontmatter updates if any>
- Cleanup: <duplicates/fixes or "none">
Additional Resources
- For concrete execution examples, see examples.md.
- For term consistency across locales, see reference.md.
Quick Checklist
1---2name: doc-translation3description: Translate and synchronize documentation across locales with consistent terminology and structure. Use when the user asks to translate docs, sync one language change to other language versions, update multilingual markdown pages, or maintain i18n document parity.4---56# Documentation Translation78## Purpose910Keep multilingual docs consistent when one locale changes. Prioritize structural parity, glossary consistency, and link correctness.1112## Trigger Scenarios1314Use this skill when the user asks to:15- translate a markdown doc to another language16- sync updates from one locale to all locales17- add the same SDK/link/section to multilingual pages18- update localized metadata (for example `updateTime`)1920## Decision Path21221. If target files already exist in multiple locales, use **sync mode** (apply equivalent deltas only).232. If target locale file does not exist, use **new translation mode** (create file with mirrored structure).243. If source wording is ambiguous and affects meaning, ask one concise clarification question before editing.2526## Workflow27281. Locate source and target locale files.292. Read source content and existing target content.303. Apply minimal edits:31 - preserve frontmatter keys and routing fields32 - preserve heading depth and markdown layout33 - preserve code blocks, URLs, identifiers, API names, and package names344. Localize only human-language text (headings, explanations, labels).355. Keep terminology consistent across all changed locales.366. Validate:37 - links are correct38 - no duplicated sections39 - no missing sections introduced by sync40 - heading order and level match source intent4142## Default Locale Set4344When the user says "sync all languages" and does not specify a subset, default to:45- `zh_CN`46- `zh_TW`47- `en_US`48- `ja_JP`49- `fr_FR`50- `es_ES`51- `de_DE`52- `id_ID`53- `th_TH`5455## Target Discovery Rules5657- Prefer explicit file paths from the user.58- If user gives one locale file, locate sibling locale versions with the same document purpose.59- Keep `path`, `name`, and slug-like fields unchanged unless explicitly requested.60- If user asks for date sync, set all target files to the same `updateTime`.61- If "all languages" is requested but one locale file is missing, report it explicitly instead of silently skipping.6263## Translation Rules6465- Do not translate:66 - URLs67 - code snippets68 - command lines69 - product/API/SDK identifiers unless user requests it70- Keep list/bullet structure identical unless target file has known intentional differences.71- Prefer concise phrasing; avoid adding new meaning not present in source.72- Keep canonical tokens unchanged (for example: `SDK`, `GitHub`, `API`, package names).73- For proper nouns, prefer existing wording in that locale file; do not invent new term variants.7475## Clarification and Safety Rules7677- Ask before changing these unless explicitly requested:78 - `path`, `name`, route slugs, or file location79 - frontmatter fields other than requested metadata (such as `updateTime`)80- If one locale intentionally differs from others, preserve that difference and only sync requested parts.81- Never remove content unless it is a clear duplicate or user requested deletion.8283## Output Style8485When reporting completion, include:86- changed files count87- what was synchronized (for example: new section, link, timestamp)88- any cleanup done (for example: removed accidental duplicates)8990Use this concise template:9192```markdown93Updated: <N> files94- Synced: <what changed>95- Metadata: <date/frontmatter updates if any>96- Cleanup: <duplicates/fixes or "none">97```9899## Additional Resources100101- For concrete execution examples, see [examples.md](examples.md).102- For term consistency across locales, see [reference.md](reference.md).103104## Quick Checklist105106- [ ] Source and all required targets updated107- [ ] Frontmatter and route fields preserved108- [ ] Links and package names correct109- [ ] No duplicate or missing synchronized sections110- [ ] Terminology consistent across locales