Use when translating changed keys from `_locales/en-US.ts` into one or more sibling locale files while preserving structure, placeholders, tags, and product terms.
This skill is user-invoked only. Run it only when the user explicitly invokes /i18n-translate.
Translate changed locale strings from one en-US.ts file into sibling locale files.
Safely update only the requested existing sibling locale files for messages changed in one en-US.ts file without breaking structure, imports, placeholders, tags, or dt(...) syntax.
dt(...) structures remain valid.en-US.ts file.dt(...) usage./i18n-translate [language_code|all] [file_path]
Required input:
allen-US.tsOptional input:
Defaults:
bn-BD, cs-CZ, de-DE, el-GR, es-ES, fr-FR, hi-IN, hr-HR, hu-HU, id-ID, it-IT, ja-JP, ko-KR, nl-NL, pl-PL, pt-BR, pt-PT, ro-RO, ru-RU, sk-SK, sr-Cyrl-ME, zh-CN, zh-TW
en-US.ts files typically end with as const satisfies LanguageMessages.as const satisfies Translations and import Translations from the local _locales index module.dt from @complexity/i18n when any translated entry uses dt(...)._locales or _locales/index in the import path. Only touch imports when a newly added or updated dt(...) entry requires it.en-US.ts.en-US.ts plus target sibling locale files.dirname(file_path).all is requested, target every supported sibling locale file except en-US.ts that already exists in the same directory.{name}, {count}, {version}, {?}, <0>, <1>, <0/>.dt(...), rule names, braces, commas, comments, as const, satisfies, and type annotations.dt(...) entries, translate every string leaf inside the rule object. Do not change selector names, branch structure, or interpolation markers.Perplexity, Complexity, Pro, CodeSandbox, Comet.en-US.ts and is absent in the target file."Updated to v{version}" → translate the message only; keep {version} exactly."Try Comet - Get a free <0/> subscription!" → translate the message only; keep <0/> exactly.dt(...) entry: translate the human-readable strings inside the rule object, but keep the plural / enum structure unchanged.dt(...) entry: translate every user-facing string leaf inside the rule object; do not rewrite selectors, variable names, or branch keys.git diff -- file_path.dt(...) entries, treat the whole dt(...) entry as changed and translate all of its string leaves.en-US.ts.no changed keys detected and stop.all.dirname(file_path) only.all, update only the sibling locale files that already exist and are supported.all, do not create missing supported locale files; mention them under files skipped only if that information is relevant to the outcome.basename(file_path) is en-US.ts.all.dirname(file_path) only.dt(...) entry.en-US.ts.dt(...), update its imports minimally and preserve the file's existing import style.Stop and ask instead of guessing when:
file_path is invalid, missing, or its basename is not en-US.tsdt(...) entry that can be translated safelydt(...) branches are ambiguous enough to risk corrupting syntaxWhen you stop, report:
On completion, use exactly these Markdown headings:
Report content rules:
## Files changed: list only files actually edited.## Languages updated: list only languages that received real translation updates.## Keys translated: list changed key paths grouped clearly by file or language.## Keys skipped and why: include removals, renames, ambiguous keys, or unsupported entry types.## Files skipped and why: include missing requested target files or intentionally uncreated files when relevant.## Follow-up needed: write none when no further action is needed.If no changes were made, say explicitly:
en-US.ts file was not modified.dt(...) structures were preserved and imports remain valid.dt imports were added or left alone only when required by translated entries.satisfies LanguageMessages / satisfies Translations remains intact.Edit PDFs with natural-language instructions using the nano-pdf CLI.