translate
БесплатноЗапускает вложенные скриптыНе проверенTranslate new/changed English UI strings into all supported languages using a translate-review-refine pipeline. Invoke with /translate to detect untranslated…
от shapeshift★ 206 звёзд на GitHubОб этом скилле
Automated i18n Translation Skill
Translates new or changed English UI strings into all 9 supported non-English languages using a translate-review-refine pipeline. Detects what changed, translates in batches with terminology glossary enforcement, validates output programmatically, and merges results into the existing translation files.
Supported Languages
| Locale | Language | Register |
|---|---|---|
de |
German | Formal (Sie) |
es |
Spanish | Informal (tú) |
fr |
French | Formal (vous) |
ja |
Japanese | Polite (です/ます) |
pt |
Portuguese (BR) | Informal (você) |
ru |
Russian | Formal (вы) |
tr |
Turkish | Formal (siz) |
uk |
Ukrainian | Formal (ви) |
zh |
Chinese (Simplified) | Neutral/formal |
See .claude/skills/translate/locales/{locale}.md for detailed locale-specific rules.
Precautions
- Do not translate
en— English is the source language. - Do not touch
idorko— these locales exist on disk but are not imported inindex.tsor declared inconstants.ts. - Preserve existing translations — only add/update keys, never delete existing translated keys.
- Interpolation is sacred —
%{variableName}placeholders must survive translation intact, including exact variable names. - JSON validity — all output files must be valid JSON. Validate before writing.
- File format — 2-space indent, trailing newline, UTF-8 encoding (matches
saveJSONFileinscripts/translations/utils.ts). - The glossary is a living document — it grows over time as new terms are identified. Check it at the start of every run.
Step 1: Compute Translation Diff
Determine which English strings need translation.
1a. Check for marker file
Read src/assets/translations/.last-translation-sha
1b. If marker file exists — diff-based detection
The marker contains a git SHA from the last translation run. Use it to find new/modified English strings since then.
node .claude/skills/translate/scripts/diff.js
This follows the same recursive comparison pattern as scripts/translations/utils.ts findStringsToTranslate().
1c. If no marker file — missing-key detection
Compare each non-English language against English to find missing keys:
node .claude/skills/translate/scripts/missing-keys.js
1d. Early exit
If no changes or missing keys are found, print:
Translations are up to date. No new or modified English strings detected.
and stop.
1e. For modified keys (English value changed)
Mark these as needing re-translation in ALL languages, not just those missing the key.
Step 2: Batching Strategy
Group the strings to translate by their top-level JSON namespace (the first segment of the dotted path, e.g., agenticChat, common, trade).
- Target 20-50 strings per batch
- If a namespace has more than 50 strings, split into sub-batches of 30-35 strings, preserving original key order
- If a namespace has fewer than 5 strings, combine with other small namespaces into a single batch
- Each batch item includes:
{ dottedPath, englishValue } - Keep batch contents together because namespace context improves translation consistency
Step 3: Load Glossary
Read src/assets/translations/glossary.json. This file contains:
- Terms with value
null= never translate, keep in English (e.g., "Bitcoin", "DeFi", "MetaMask") - Terms with locale-keyed objects = use the approved translation for that language (e.g., "staking" → "ステーキング" in Japanese)
The glossary is passed to every translator and reviewer sub-agent. If the glossary file is missing or contains invalid JSON, log an error and exit immediately with a clear message.
Step 3b: Cross-Reference Existing Translations for Term Consistency
Before translation begins, extract significant terms from the new English strings and search all namespaces in the target locale for existing translations containing those terms. This ensures that domain terms like "pool", "vault", "bridge", "fee", etc. are translated consistently with how they've already been translated elsewhere in the app — even across different namespaces.
Run the term-context script once per locale at pipeline start:
node .claude/skills/translate/scripts/term-context.js LOCALE NEW_STRINGS_JSON_OR_FILE
LOCALE— the target locale code (e.g.,fr)NEW_STRINGS_JSON_OR_FILE— path to a temp file containing the new strings as[{ path, value }]array or{ "dotted.path": "english value" }object
The script:
- Extracts significant words and 2-word phrases from the new English strings (filtering stop words and glossary terms which are already handled)
- Searches the full
{locale}/main.jsonfor existing translated strings whose English source contains those terms - Returns up to 3 matches per term, prioritizing multi-word phrases, capped at 30 terms total
Output format:
{
"liquidity pool": [
{ "key": "defi.liqu
Установить translate в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
ReadWriteEditGrepGlobBash(node *)Bash(git diff*)Bash(git log*)Bash(git rev-parse*)Bash(wc *)Bash(mkdir *)TaskAskUserQuestionВложенные файлы
FAQ
Что делает скилл translate?
Translate new/changed English UI strings into all supported languages using a translate-review-refine pipeline. Invoke with /translate to detect untranslated strings and produce high-quality translations for de, es, fr, ja, pt, ru, tr, uk, zh.
Как установить скилл translate?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл translate запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
frontend-design
Guidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making…
от Anthropicwebapp-testing
Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing…
от Anthropicbrand-guidelines
Applies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand…
от Anthropicweb-artifacts-builder
Suite of tools for creating elaborate, multi-component claude.ai HTML artifacts using modern frontend web technologies (React, Tailwind CSS, shadcn/ui). Use…
от Anthropic