| name | check-l10n |
| description | Run before pushing a PR that touched UI to find untranslated keys in
any of the 16 non-English locales and to catch user-visible English
strings that bypass context.l10n. Reports findings as a checklist;
refuses to declare clean until all are addressed or explicitly waived.
Invoke with /check-l10n.
|
| author | Claude Code |
| version | 1.0.0 |
| date | "2026-05-02T00:00:00.000Z" |
| user_invocable | true |
| invocation_hint | /check-l10n |
| arguments | Optional: Scope to specific paths under mobile/lib/.
Example: /check-l10n
Example: /check-l10n mobile/lib/screens/auth
|
Check L10n Skill
Purpose
Catch the two ways localization breaks in this repo before users see English
in a non-English build:
- Untranslated keys. A key added to
app_en.arb but never translated
into one of the 16 non-English locales (ar, am, bg, de, es,
fr, id, it, ja, ko, nl, pl, pt, ro, sv, tr).
- Hardcoded user-visible English. Strings rendered straight to the user
from widget code without going through
context.l10n.<key>. These never
show up in .arb files because they were never extracted, so no amount
of translation work fixes them.
Run this before every PR push that touches mobile/lib/.
Workflow
Step 1: Determine scope
If the user passed paths after /check-l10n, scan those. Otherwise scan the
union of staged + unstaged changes vs the working tree.
git -C mobile status --porcelain | awk '{print $NF}' | grep '\.dart$'
Step 2: Run the arb consistency test (if present)
cd mobile && flutter test test/l10n/arb_consistency_test.dart
This test compares every .arb file against app_en.arb and fails if any
locale is missing keys that aren't on the explicit _knownUntranslatedDebt
allow-list.
If the test file does not exist on this branch, skip this step and rely
entirely on Step 3 plus the inline check below. Note in the report that
arb consistency was not verified.
Inline fallback when the test doesn't exist
If mobile/test/l10n/arb_consistency_test.dart is missing, do the
equivalent check by hand:
mobile/lib/l10n
python3 - <<
import json, glob
en = json.load(open())
en_keys = {k k en not k.startswith() and k != }
f sorted(glob.glob()):
f == :
other = json.load(open(f))
other_keys = {k k other not k.startswith() and k != }
missing = en_keys - other_keys
missing:
(f)
k sorted(missing)[:20]:
(f)
PY