This repository translates the Angular documentation site (angular.dev, the adev/ app of angular/angular) into one or more languages. Upstream lives in the origin/ submodule and is read-only: never edit a file under origin/.
i18n/<lang>/src/**mirrorsorigin/adev/src/**. A translated filex.mdalways has a sibling snapshotx.en.md(the English it was translated from) and starts with<!-- source: <hash> -->where<hash>is the git blob hash of that snapshot (git hash-object x.en.md). Same rule for app templates (x.html+x.en.html, marker<!-- source: … -->) and TypeScript overlays (x.ts+x.en.ts, marker// source: …).i18n/<lang>/LANGUAGE.mdholds the language rules (front matter is machine-checked),glossary.jsonthe terminology (itsforbiddenrenderings failpnpm check),dictionaries/*.jsonthe UI strings. Read them before translating anything.- JSON overlays cannot carry a comment: their marker lives in
<file>.sourcenext to them (pnpm status --initand--markhandle it). tools/holds the scripts;tools/adev-patches/the code patches applied at build time;.agents/skills/the skills.
.agents/skills/adev-translation/SKILL.md: translate a new page, update an outdated page from its English diff, review a translation..agents/skills/adev-i18n-maintenance/SKILL.md: sync with upstream (pnpm update-origin), triage the queue, build, deploy, switch release branch, refresh a patch.
pnpm bootstrap # once per clone: shallow fetch of the pinned upstream into origin/ (status, check and --init read it)
pnpm status <lang> [--md|--json] # what is outdated / untranslated / removed, with diff classes
pnpm status <lang> --init <rel> # start a page: snapshot + marked copy (rel is relative to adev/src)
pnpm status <lang> --diff <rel> # the English diff an outdated page needs
pnpm status <lang> --mark <rel> # marker -> current snapshot, once the hunks are translated
pnpm check <lang> [paths…] # must pass before you open a PR (structure, anchors, glossary via textlint, typography)
pnpm update-origin latest # maintainers only: move the upstream pin
pnpm build <lang> # full production build (Node 26 like everything else; Bazel and pnpm pick upstream's own versions)- Never edit
origin/, never rewritemainhistory, never commitbuild/. - A translated file must keep the line count, headings,
docs-*elements, code blocks, links and alert keywords (NOTE:,TIP:…, English with a plain colon) of its snapshot; every translated heading carries{#english-anchor}. - Only change the passages the English diff touches; unchanged translated prose stays byte-identical.
- Update the
sourcemarker to the new snapshot hash in the same change. - Run
pnpm checkand report what you translated, what you left in English (deferred) and any glossary gap. - Stop and ask a human when a patch fails to apply, a dictionary pair no longer matches, upstream changed
adev/shared-docs/pipelineoradev/BUILD.bazel, or a page would ship with mixed languages outside the deferred list.