i18n-auditor

Scan locale JSON files, find missing translation keys, and flag untranslated strings across all language files.

i18n Consistency Auditor

Scan this project's locale/translation files and produce a consistency report.

Instructions

  1. Locate locale files. Search for JSON files in common locale directories: /locales/, /src/locales/, /public/locales/, /i18n/, /messages/. If none are found, ask the user where their locale files live.

  2. Identify the base language file. Look for en.json, en-US.json, or en_US.json. If ambiguous, ask the user which file is the base language.

  3. For every non-base locale file, check:

    • Missing keys — keys present in the base file but absent in this locale
    • Orphaned keys — keys present in this locale but absent in the base file
    • Untranslated values — values that are identical to the base language value (skip short strings ≤10 chars, URLs, numbers, and brand names that legitimately stay in English)
    • Inconsistent pluralization — if the base uses _one/_other suffixes, check all locales use the same pattern
  4. Output a structured report:

## i18n Consistency Report

Base language: en.json (142 keys)

### es.json — 3 issues
- MISSING KEYS (2):
  - `auth.errors.tokenExpired`
  - `profile.tabs.security`
- UNTRANSLATED (1):
  - `dashboard.welcome` (value: "Welcome back, {{name}}")

### fr.json — 0 issues ✓

---
Summary: 3 issues across 1 of 2 locale files.
  1. After the report, ask: "Would you like me to add stub entries for the missing keys? I'll use __MISSING__: <base value> as the placeholder so they're easy to find and replace."

  2. If yes: Insert missing keys into each locale file with the placeholder value. Preserve the existing JSON structure and key ordering. Do not modify any existing values.