ci(i18n): add unused & missing translation-key check to Quality Gate

Dependency-free Bun script (bun run i18n:check, added to the linting matrix):
flags keys referenced in code but missing from en.json, and keys in en.json
referenced nowhere. Handles dynamic t(\prefix.\\) and keys stored as string
constants (exact delimited-literal match). Source-only: only en.json is
checked/edited; Crowdin syncs the other locales. Planned-feature keys are
allow-listed in scripts/i18n-keys.config.json.
This commit is contained in:
Gauvino
2026-06-01 11:41:44 +02:00
parent 32c99de874
commit badbce34e1
4 changed files with 307 additions and 0 deletions

View File

@@ -22,6 +22,8 @@
"lint": "biome check --write --unsafe --max-diagnostics 1000",
"format": "biome format --write .",
"doctor": "expo-doctor",
"i18n:check": "bun scripts/check-i18n-keys.mjs",
"i18n:fix-unused": "bun scripts/check-i18n-keys.mjs --fix-unused",
"test": "bun run typecheck && bun run lint && bun run format && bun run doctor",
"postinstall": "patch-package"
},