MkDocs translations
Translate every English MkDocs source file into a target locale, mirror the folder structure, update include paths and mkdocs.yml, and continue automatically until source and translated file counts match.
When to invoke
- "Run the mkdocs ai translator for Spanish."
- "Translate our MkDocs docs to pt-BR."
- "Add a French locale to this documentation site."
- "Localize docs/docs/en and includes/en."
- "Update mkdocs.yml for a new translated locale."
Inputs
Use the target translation language and locale code, such as Spanish es, French fr, Brazilian Portuguese pt-BR, or Korean ko. If the user did not provide both a language and a locale code, ask for them before proceeding. Use the locale code consistently in folder names, translated include paths, and MkDocs configuration.
Source and output layout
| Source |
Target |
docs/docs/en/** |
docs/docs/<locale>/** |
docs/docs/includes/en/** |
docs/docs/includes/<locale>/** |
Include reference includes/en/introduction-event.md |
includes/<locale>/introduction-event.md |
mkdocs.yml i18n plugin |
Add locale entry, nav_translations, and admonition_translations. |
Create a branch before writing files:
git checkout -b docs-translation-<language>
Translation procedure
- Confirm the target language and locale code.
- Create
docs-translation-<language> with git checkout -b docs-translation-<language> before creating any new files.
- List all files and subdirectories under
docs/docs/en.
- List all files and subdirectories under
docs/docs/includes/en.
- Translate every file one by one in the listed order; do not skip, reorder, or stop after a fixed number of files.
- Mirror the exact folder and filename structure under
docs/docs/<locale>/ and docs/docs/includes/<locale>/.
- Preserve Markdown formatting, headings, code blocks, metadata, and links.
- Update include references from
includes/en/... to includes/<locale>/....
- Append
*Translated using GitHub Copilot and GPT-4o.* at the end of every translated file.
- Update
mkdocs.yml with the new i18n locale entry, nav_translations, and admonition_translations.
- Count source files and translated files. If any file remains unprocessed, resume from the missing file and continue automatically.
Translation rules
| Do |
Do not |
| Use accurate, clear, technically appropriate translations. |
Do not wrap translated content or whole files in Markdown code blocks. |
| Use computer industry-standard terminology, such as "Stack Tecnológica" rather than "Pila Tecnológica". |
Do not comment on or fix Markdown linting issues. |
| Preserve original filenames, folder hierarchy, Markdown formatting, metadata, links, and code blocks. |
Do not mention missing blank lines, trailing punctuation in headings, missing alt text, heading levels, line length, or spacing. |
| Continue automatically until all files are translated. |
Do not ask for confirmation between files or before continuing. |
| Maintain original code and commands unless the prose around them requires localization. |
Do not translate code identifiers, paths, or configuration keys. |
MkDocs configuration rules
Update only the localization-related configuration required for the new locale:
- Add a
locale entry under the i18n plugin using the target locale code.
- Add appropriate
nav_translations.
- Add appropriate
admonition_translations.
- Keep existing locales and unrelated MkDocs settings intact.
Gotchas
- Do not start writing before branching:
git checkout -b docs-translation-<language> is required first.
- Do not stop after a sample: every file under both English source trees must be translated.
- Do not lint the docs: preserve formatting and avoid unrelated Markdown cleanup.
- Do not translate include paths partially: every
includes/en/ reference must use the target locale.
For Spanish examples, includes/es/introduction-event.md is the concrete rewritten include path.
Output template
## MkDocs translation result
**Status:** complete | blocked
**Language:** `<language>`
**Locale:** `<locale>`
**Branch:** `docs-translation-<language>`
### File counts
| Source tree | Source files | Translated files | Status |
| --- | --- | --- | --- |
| `docs/docs/en` | `<count>` | `<count>` | `matched | missing` |
| `docs/docs/includes/en` | `<count>` | `<count>` | `matched | missing` |
### Configuration
- `mkdocs.yml` locale entry: `<added/updated>`
- `nav_translations`: `<added/updated>`
- `admonition_translations`: `<added/updated>`
Quality gate
1---2name: mkdocs-translations3description: Translate an MkDocs documentation stack from docs/docs/en and docs/docs/includes/en into a target ISO 639-1 or locale folder, preserving Markdown structure and updating mkdocs.yml i18n locale, nav_translations, and admonition_translations. Use when the user asks for mkdocs ai translator, MkDocs translation, docs localization, or adding a new documentation locale.4---56<!-- Generated from harness/github-copilot/skills/mkdocs-translations/SKILL.md by harness/claude-code/scripts/convert_from_copilot.py. Edit the source, not this file. -->78# MkDocs translations910Translate every English MkDocs source file into a target locale, mirror the folder structure, update include paths and `mkdocs.yml`, and continue automatically until source and translated file counts match.1112## When to invoke1314- "Run the mkdocs ai translator for Spanish."15- "Translate our MkDocs docs to pt-BR."16- "Add a French locale to this documentation site."17- "Localize docs/docs/en and includes/en."18- "Update mkdocs.yml for a new translated locale."1920## Inputs2122Use the target translation language and locale code, such as Spanish `es`, French `fr`, Brazilian Portuguese `pt-BR`, or Korean `ko`. If the user did not provide both a language and a locale code, ask for them before proceeding. Use the locale code consistently in folder names, translated include paths, and MkDocs configuration.2324## Source and output layout2526| Source | Target |27| --- | --- |28| `docs/docs/en/**` | `docs/docs/<locale>/**` |29| `docs/docs/includes/en/**` | `docs/docs/includes/<locale>/**` |30| Include reference `includes/en/introduction-event.md` | `includes/<locale>/introduction-event.md` |31| `mkdocs.yml` i18n plugin | Add locale entry, `nav_translations`, and `admonition_translations`. |3233Create a branch before writing files:3435```bash36git checkout -b docs-translation-<language>37```3839## Translation procedure40411. Confirm the target language and locale code.422. Create `docs-translation-<language>` with `git checkout -b docs-translation-<language>` before creating any new files.433. List all files and subdirectories under `docs/docs/en`.444. List all files and subdirectories under `docs/docs/includes/en`.455. Translate every file one by one in the listed order; do not skip, reorder, or stop after a fixed number of files.466. Mirror the exact folder and filename structure under `docs/docs/<locale>/` and `docs/docs/includes/<locale>/`.477. Preserve Markdown formatting, headings, code blocks, metadata, and links.488. Update include references from `includes/en/...` to `includes/<locale>/...`.499. Append `*Translated using GitHub Copilot and GPT-4o.*` at the end of every translated file.5010. Update `mkdocs.yml` with the new i18n locale entry, `nav_translations`, and `admonition_translations`.5111. Count source files and translated files. If any file remains unprocessed, resume from the missing file and continue automatically.5253## Translation rules5455| Do | Do not |56| --- | --- |57| Use accurate, clear, technically appropriate translations. | Do not wrap translated content or whole files in Markdown code blocks. |58| Use computer industry-standard terminology, such as "Stack Tecnológica" rather than "Pila Tecnológica". | Do not comment on or fix Markdown linting issues. |59| Preserve original filenames, folder hierarchy, Markdown formatting, metadata, links, and code blocks. | Do not mention missing blank lines, trailing punctuation in headings, missing alt text, heading levels, line length, or spacing. |60| Continue automatically until all files are translated. | Do not ask for confirmation between files or before continuing. |61| Maintain original code and commands unless the prose around them requires localization. | Do not translate code identifiers, paths, or configuration keys. |6263## MkDocs configuration rules6465Update only the localization-related configuration required for the new locale:6667- Add a `locale` entry under the `i18n` plugin using the target locale code.68- Add appropriate `nav_translations`.69- Add appropriate `admonition_translations`.70- Keep existing locales and unrelated MkDocs settings intact.7172## Gotchas7374- **Do not start writing before branching**: `git checkout -b docs-translation-<language>` is required first.75- **Do not stop after a sample**: every file under both English source trees must be translated.76- **Do not lint the docs**: preserve formatting and avoid unrelated Markdown cleanup.77- **Do not translate include paths partially**: every `includes/en/` reference must use the target locale.7879For Spanish examples, `includes/es/introduction-event.md` is the concrete rewritten include path.8081## Output template8283```markdown84## MkDocs translation result8586**Status:** complete | blocked87**Language:** `<language>`88**Locale:** `<locale>`89**Branch:** `docs-translation-<language>`9091### File counts92| Source tree | Source files | Translated files | Status |93| --- | --- | --- | --- |94| `docs/docs/en` | `<count>` | `<count>` | `matched | missing` |95| `docs/docs/includes/en` | `<count>` | `<count>` | `matched | missing` |9697### Configuration98- `mkdocs.yml` locale entry: `<added/updated>`99- `nav_translations`: `<added/updated>`100- `admonition_translations`: `<added/updated>`101```102103## Quality gate104105- [ ] Target language and locale code were confirmed before translation.106- [ ] `git checkout -b docs-translation-<language>` ran before creating files.107- [ ] Every file under `docs/docs/en` was translated in listed order.108- [ ] Every file under `docs/docs/includes/en` was translated in listed order.109- [ ] Target folders mirror the source structure exactly.110- [ ] Markdown formatting, metadata, links, code blocks, paths, and filenames were preserved.111- [ ] Each translated file ends with `*Translated using GitHub Copilot and GPT-4o.*`.112- [ ] `mkdocs.yml` includes the locale entry, `nav_translations`, and `admonition_translations`.113- [ ] Source and translated file counts match.