I18n sync

From ksmaster03/claude-canfly-skill · View interactive version

I18n sync is an AI agent skill from the GitHub repository ksmaster03/claude-canfly-skill. Add or sync i18n translation keys across all locale files (EN + TH) in any monorepo with parallel locale JSON (next-intl, i18next, React Native). Detects missing/orphan keys, keeps EN/TH in lockstep, and fills Thai translations. Trigger when the user types /i18n-sync, asks to "add a translation / เพ

How to use this skill

Skill file

/i18n-sync — keep locale files in lockstep

Adding a UI string means touching every locale file or the app throws a missing-key warning. This skill does it once, correctly, in EN + TH.

Locate the locale files first

Don't assume — discover per app, because web and mobile differ:

  1. Web (Next.js / next-intl): typically messages/en.json + messages/th.json (nested namespaces).
  2. Mobile (React Native): grep for i18n, translations, locales/ under the mobile app — structure may be flat or per-namespace.
  3. Shared strings: check any packages/shared for cross-app message constants.

If the layout differs, glob for **/messages/*.json, **/locales/*.json, or en.json/th.json pairs and infer the convention from what exists.

Procedure

  1. Read every locale file in the target app so you see the real key tree and namespace style.
  2. Place the new key in the namespace that matches sibling keys (don't invent a new top-level namespace unless asked).
  3. Write all locales together — EN (technical/source) and TH. For TH use natural business Thai, not literal machine translation.
  4. Keep key order identical across locale files so diffs stay reviewable.
  5. Report the keys added and any pre-existing drift you noticed.

Audit mode (when asked "are translations in sync?")

Gotchas

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.