mirror of
https://github.com/Sendouc/sendou.ink.git
synced 2026-11-16 19:25:33 -06:00
Make the unused translation check narrow template keys by their types
A template key like t(`user:builds.sorting.${sort}`) matched every builds.sorting.* key, so removed keys under that prefix were never reported as unused. With --check-unused the interpolated values are now resolved through the TypeScript API and, when they are a union of literals, only those values match.
Removes the two keys this found dead: common:maps.validation.VALID and tournament:progression.error.PLACEMENT_TOO_HIGH.
This commit is contained in:
@@ -62,7 +62,7 @@ const DESCRIPTIONS: Record<string, string> = {
|
||||
"check-translation-sync":
|
||||
"Fails when the translation jsons are out of sync with English",
|
||||
"check-unused-translations":
|
||||
"Fails when an English translation key is used nowhere in app/, matched like the `i18n:usage` index",
|
||||
"Fails when an English translation key is used nowhere in app/, matched like the `i18n:usage` index but with template literal keys narrowed by the TypeScript types of their interpolated values",
|
||||
checks:
|
||||
"Everything CI checks: lint, unit and browser tests, translations, type checks, knip and the docs build, the read-only ones in parallel. A task isn't done until it passes",
|
||||
"checks:scanner": "`checks` plus the scanner tests",
|
||||
|
||||
Reference in New Issue
Block a user