translate-manual
Skill8 starsChanged 10 days agoMITView on GitHub
Translate or update the localized Control Center manual (docs/src/content/docs/<locale>/manual) and the agent copy behind each language's llms.txt (docs/src/data/agent-copy) after the English source changes. Use when the docs build or `pnpm i18n check` reports untranslated, stale, missing, orphaned, slug, link or agent copy problems; when an English manual page or en-US agent copy is added, edited, moved or deleted; or when asked to translate the docs.
In this repository28 other files it gives its agents.
- Control CenterAGENTS.md
- clean-ddd-hexagonalSkill
- design-taste-frontendSkill
- flutter-add-integration-testSkill
- flutter-add-widget-previewSkill
- flutter-add-widget-testSkill
- flutter-apply-architecture-best-practicesSkill
- flutter-build-responsive-layoutSkill
- flutter-fix-layout-issuesSkill
- flutter-implement-json-serializationSkill
- flutter-setup-declarative-routingSkill
- flutter-setup-localizationSkill
- flutter-use-http-packageSkill
- full-output-enforcementSkill
- gpt-tasteSkill
- high-end-visual-designSkill
- imagegen-frontend-mobileSkill
- imagegen-frontend-webSkill
- image-to-codeSkill
- impeccableSkill
- minimalist-uiSkill
- redesign-existing-projectsSkill
- security-reviewSkill
- seo-aeo-best-practicesSkill
- seo-auditSkill
- unslop-textSkill
- version-bumpSkill
- impeccableSkill
The file
We split this skill into the rules it gives an agent
3 rules. About 0 are common, 1 is distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 11
Run every command below from docs/.
- Very specific: line 52
Keep product terminology consistent with the locale's docs.sidebar.* labels and its landing copy (docs/src/data/landing-*.ts).
- Distinctive: line 57
Write the way a native technical writer for that locale would.
≈ “Common” is an estimate: at least 1 in 5 of the 364,980 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Translate the manual
The English manual (docs/src/content/docs/manual/**) is the source. Each other site locale (docs/src/data/locales.ts) mirrors it file for file at docs/src/content/docs/<locale>/manual/**, with the same file names, and serves each page under a translated URL. docs/scripts/manual-i18n.ts fails pnpm build (and CI) until every locale page exists, has a valid translated slug, was translated from the current English revision and links only within its own locale. astro dev only warns.
Run every command below from docs/.
A locale page
---
title: Créer et configurer un agent
description: Ajoutez un agent à un espace de travail…
slug: fr-FR/manuel/guides/creer-agent
sourceHash: 3b18e512dba79e4c8300dd08aeb37f8e728bac34
---slugis the page's public URL:<locale>/and then the translated path. It has as many segments as the English id (manual/guides/create-agent) and extends its section page's slug, which is theindex.mdxin the same folder.- Segments are lowercase words joined by single hyphens. Latin-script locales (cs, de, en-GB, es, fr, hu, id, it, ms, nb, nl, pl, pt, ro, sv, tr, vi) use ASCII only, with each language's usual URL transliteration (
ä→aein German, tone marks dropped in Vietnamese,ı→iin Turkish). Other locales use their own script, NFC-normalized; separate words with hyphens where the language uses spaces. Product names and acronyms stay Latin (mcp-サーバー). - Base each slug on the locale's sidebar label for that page (
docs.sidebar.*indocs/src/content/i18n/<locale>.json), as concise as the English segment. - A slug is a public URL. Don't rename a published one in passing: the Worker only redirects the pre-translation
/<locale>/manual/…paths, not old translated ones. sourceHashis the git blob id of the English page this text was translated from. Write it only withpnpm i18n stamp, never by hand, and only after the page really is translated.
Workflow
- See what's wrong.
pnpm i18n statusgives counts per locale.pnpm i18n check [--locale fr-FR]lists every problem withfile:line. - Fix the structure first.
- New English page: run
pnpm i18n scaffold. It copies the page into every locale with English text,/manual/…links pointed at existing translated pages, and noslug. Give each copy aslug, then translate it. - Moved or renamed English page:
git mvevery locale copy to the same new path. Keep each locale's slug unless the page changed section, and update any links that point at it. - Deleted English page: delete every locale copy (they show up as orphans), then fix the links the check reports.
- New site locale: once it is in
src/data/locales.ts,pnpm i18n scaffoldcreates the whole tree. Then give every page a slug and translate it.
- New English page: run
- Translate.
- Untranslated page (no
sourceHash): translate the whole English page. - Stale page:
pnpm i18n diff <locale file>shows what changed in English since the page was translated. Make the same changes to the translation and keep the rest. - Then run
pnpm i18n stamp <locale files…>.
- Untranslated page (no
- Verify.
pnpm i18n checkmust print "The translated manual is complete and current." Then runpnpm testandpnpm build.
Agent copy
docs/src/data/agent-copy/<locale>.json holds the prose of each language's llms.txt and llms-full.txt, which AI agents read. en-US.json is the source. When a key is added or its English text changes, update that key in every other locale file, in the same key order. Keep every {placeholder} and every backtick span byte for byte; the check compares them. {language} is filled with the language's native name and region (e.g. Deutsch (Deutschland)), so write the sentence so the name needs no inflection.
Translation rules
- Translate
title,description, prose, headings, table text, alt text and user-visible component props or children. Keep frontmatter keys,importlines, component names, non-text props, code blocks, inline code, commands, flags, environment variables, file paths and non-manual URLs exactly as in English. - UI labels the manual quotes from the app (Settings → Workspace → Agents) must match the app's own translation in
lib/l10n/app_<lang>.arb. Find the key by its English value inapp_en.arb. The sparse variants (en_GB,es_MX,fr_CA,pt_PT) fall back to their base language file. - Keep product terminology consistent with the locale's
docs.sidebar.*labels and its landing copy (docs/src/data/landing-*.ts). - Product labels that the app and its API show in English stay in English, e.g. the AI-review verdicts Ship, Hold and Block (
approve_on_ship). Brand and protocol names stay in Latin script. - Point every link to another manual page at the same locale's translated URL (the target page's
slug, with a leading/and a trailing/). Anchors (#…) are generated from the target page's translated heading text, so update them when you translate headings. - Interactive components keep the same usage as in English: same components, same props, same order. Strings a component renders itself belong in
docs/src/content/i18n/<locale>.jsonand are read withAstro.locals.t(), not hard-coded per page. - en-GB is a real translation into British English (spelling and usage), not a copy.
- Write the way a native technical writer for that locale would. No translator's notes, and leave nothing in English except the items listed above.
Working at scale
Many pages across 33 locales is a lot of work: split it by locale. Run at most 3 subagents at a time, on the opus model, and tell them not to spawn their own. Give each one its locales, this skill's path and the files to translate. Each runs pnpm i18n check --locale <id> and stamps only what it translated before reporting back. Run pnpm build once at the end.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

