i18n-translate

Installation
SKILL.md

Frontend i18n Translation Workflow

Mandatory Preflight

  • Read this entire SKILL.md before any frontend i18n work, including one-key fixes.
  • Before editing locale files, confirm the source text comes from a t(...) key, en.json, existing UI copy, or an explicitly requested new UI string.
  • Use the user conversation only to understand the task target. Do not copy conversation text, review wording, or task descriptions directly into locale values.
  • Before translating each key, re-think the intended UI copy from the code and locale context instead of treating the surrounding chat as the translation source.

Hard Constraint: Locale Writes Go Through the Script

  • You MUST NOT edit web/src/i18n/locales/*.json directly with text-editing tools (StrReplace, Write, search-and-replace, manual JSON edits, etc.). This applies even to a single key.
  • ALL locale writes MUST go through the add-missing-keys.mjs script, followed by bun run i18n:sync. The script is the only sanctioned way to add or change locale values.
  • Why this is mandatory, not optional:
    • Hand-editing reliably drops one or more of the seven locales (en, zh, zh-TW, fr, ja, ru, vi), leaving keys missing in some languages.
    • Hand-editing breaks the required alphabetical key order and introduces JSON syntax errors (trailing commas, mismatched quotes).
    • The script writes all seven files atomically with consistent sorting, so the locale set stays in sync by construction.
  • The script does not do the translation for you. You still must reason out each locale's copy and populate the script's newKeys object; the script only handles insertion, sorting, and writing. Do not skip the script just because the thinking happens regardless.
Installs
4
GitHub Stars
50.2K
First Seen
May 12, 2026