i18n-parity — правило для Claude Code: что делает и как установить
Правило i18n-parity требует переносить любые правки интерфейса и документации во все поддерживаемые локали в том же пулреквесте, запрещая сдавать неполные переводы.
MIT ★ 1 198 обновлён 2026-10-23
.claude/rules/i18n-parity.mdЧто делает i18n-parity
Правило обязывает агента синхронно обновлять переводы при любых изменениях в кодовой базе. Английский язык выступает источником истины. Если добавляется ключ в client/src/i18n/locales/en/<ns>.json, его необходимо сразу прописать во всех остальных файлах <ns>.json с той же структурой и токенами интерполяции. Документация README-EN.md и переводы README для китайского, вьетнамского, корейского и испанского языков должны зеркалироваться полностью.
Команды терминала, пути, идентификаторы, имена флагов, переменные окружения и системные инструменты Claude Code вроде Bash, Agent, Read и Edit переводить запрещено. При этом название инструмента Agent остаётся буквальным всегда, а интерфейсное слово для испанского языка заменяется на agente.
Канонический файл хранится в каталоге .claude/skills/i18n-parity/. Скрипт bash .claude/skills/i18n-parity/scripts/i18n-audit.sh завершится с ошибкой, если зеркала в .codex/ устарели или в client/src/i18n/index.ts объявлена локаль с незаполненными переводами.
Какие задачи решает
- Синхронизировать новые ключи локализации во всех языковых файлах
- Зеркалировать изменения из
README-EN.mdв файлы документации на других языках - Защитить системные идентификаторы, флаги и имена инструментов от перевода
- Проверить полноту переводов перед слиянием через скрипт аудита
Примеры запросов агенту
- Добавь новый ключ в
client/src/i18n/locales/en/common.jsonи синхронизируй его по правилу i18n-parity - Обнови раздел установки в
README-EN.mdи перенеси изменения во все переведённые файлы README - Запусти проверку
bash .claude/skills/i18n-parity/scripts/i18n-audit.shи исправь недостающие ключи
Как установить i18n-parity
Вручную: положить файлы
.claude/rules/i18n-parity.mdПоле paths во frontmatter ограничивает файлы
AGENTS.md
Codex читает AGENTS.md: вставьте текст правила туда
Вручную: положить файлы
.cursor/rules/i18n-parity.mdcВо frontmatter: description, globs, alwaysApply
Вручную: положить файлы
.github/instructions/i18n-parity.instructions.mdПоле applyTo задаёт, к каким файлам применять
Вручную: положить файлы
.devin/rules/i18n-parity.mdВручную: положить файлы
.clinerules/i18n-parity.mdПо шагам, с командами для каждой платформы: AGENTS.md и CLAUDE.md: что это, кто читает и какой выбрать
Вопросы об i18n-parity
Как установить i18n-parity в Claude Code?
Сохраните файл правила по пути .claude/rules/i18n-parity.md в корне вашего проекта.
Что делает правило i18n-parity?
Оно обязывает агента переводить интерфейсные тексты и документацию на все поддерживаемые языки в рамках одного пулреквеста, не допуская частичных переводов.
Какие элементы правило запрещает переводить?
Нельзя переводить код, пути, ссылки, переменные окружения, флаги CLI, статус-коды HTTP, а также имена инструментов Claude Code вроде Bash и Agent.
Исходный текст
i18n-parity.md · MIT
---
paths:
- "client/src/i18n/**"
- "client/src/components/Sidebar.tsx"
- "client/src/lib/format.ts"
- "client/src/lib/paletteCommands.ts"
- "README.md"
- "README-EN.md"
- "README-CN.md"
- "README-VN.md"
- "README-KO.md"
- "README-ES.md"
- "docs/I18N.md"
---
# i18n Parity Rules (binding for every coding agent)
The dashboard is localized to **English (`en`), Simplified Chinese (`zh`),
Vietnamese (`vi`), Korean (`ko`), and Spanish (`es`)** across five independent
surfaces. English is the source of truth on all of them, and **a change is not
done until every supported language carries it in the same PR** — a fallback to
English is a safety net, never a completed translation.
The full workflow, the surface map, the new-language checklist, and the
glossary live in [`.claude/skills/i18n-parity/`](../skills/i18n-parity/SKILL.md).
Invoke that skill for anything beyond a single-key edit. It is mirrored to
`.agents/skills/i18n-parity/` and `.codex/skills/i18n-parity/` so Codex and
other agents get the same instructions; **edit the canonical `.claude/` copy and
re-run `bash .claude/skills/i18n-parity/scripts/sync-agent-mirrors.sh`** — the
audit fails on a stale mirror.
## Non-negotiables
- **Adding an i18n key** → add it to `client/src/i18n/locales/en/<ns>.json` **and
every other locale's `<ns>.json`**, with the same key path, the same value
type, and the same `{{interpolation}}` tokens. Enforced by
`client/src/i18n/__tests__/i18n.test.ts`.
- **Adding a namespace** → create the JSON for every locale, then register the
imports, the per-language `resources` entry, and the `ns` array in
`client/src/i18n/index.ts`.
- **Editing `README.md`** → keep the English-only landing concise and preserve
links to `README-EN.md` plus every localized full guide.
- **Editing `README-EN.md`** → mirror the same edit at the corresponding section of
`README-CN.md`, `README-VN.md`, `README-KO.md`, and `README-ES.md`. All four,
every time. They are full mirrors, not summaries.
- **Editing user-visible text in `wiki/index.html`** → follow
[`.claude/rules/wiki-i18n.md`](./wiki-i18n.md) and ship `zh` + `vi` + `ko` +
`es` entries in the same change, then bump the wiki cache versions.
- **Adding a language** → work through
[`.claude/skills/i18n-parity/references/new-language-checklist.md`](../skills/i18n-parity/references/new-language-checklist.md)
end to end. A complete README mirror, every app key, and a complete wiki
translation are all required; partial locales are not merged.
- **Never translate** code, commands, paths, URLs, env-var names, CLI flags,
identifiers, HTTP verbs/status codes, numbers with units, brand names, hook
event names (`PreToolUse`, `Stop`, …), or Claude Code tool names (`Bash`,
`Agent`, `Read`, `Edit`). Translate only the prose around them.
- **The Claude Code tool `Agent` and the UI noun "agent" are different things.**
The tool name is an identifier and stays literal in every locale. The UI noun
(`common:agent` / `common:subagent`) is literal in `zh`, `vi`, and `ko` but
deliberately `agente` / `subagente` in `es` — `i18n.test.ts` asserts both
halves. The Spanish exception never applies to the tool name.
- The root landing page `index.html` and repository landing `README.md` are
**English-only by design**. The complete localized guide set begins with
`README-EN.md`.
## Verify
```bash
bash .claude/skills/i18n-parity/scripts/i18n-audit.sh # must exit 0
npm run test:client
```
The audit reads `supportedLngs` from `client/src/i18n/index.ts`, so declaring a
locale there immediately turns every unfilled surface into a named failure.
© hoangsonww · MIT · hoangsonww/Claude-Code-Agent-Monitor