mirror of
https://github.com/streamyfin/streamyfin.git
synced 2026-06-01 11:38:26 +01:00
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:
43
scripts/i18n-keys.config.json
Normal file
43
scripts/i18n-keys.config.json
Normal file
@@ -0,0 +1,43 @@
|
||||
{
|
||||
"localesDir": "translations",
|
||||
"sourceLocale": "en",
|
||||
"srcDirs": [
|
||||
"app",
|
||||
"components",
|
||||
"hooks",
|
||||
"providers",
|
||||
"utils",
|
||||
"modules",
|
||||
"packages",
|
||||
"constants"
|
||||
],
|
||||
"srcExtensions": [".ts", ".tsx", ".js", ".jsx", ".mjs", ".cjs"],
|
||||
"excludeDirs": [
|
||||
"node_modules",
|
||||
"ios",
|
||||
"android",
|
||||
".expo",
|
||||
".git",
|
||||
"dist",
|
||||
"build",
|
||||
"translations"
|
||||
],
|
||||
"_ignoreUnusedNote": "Keys for planned features that are intentionally kept in en.json but not yet wired in code. They are exempt from the unused-key check until implemented. Remove an entry once its feature ships and uses the key.",
|
||||
"ignoreUnused": [
|
||||
"watchlists.add_to_watchlist",
|
||||
"watchlists.remove_from_watchlist",
|
||||
"watchlists.create_one_first",
|
||||
"watchlists.no_compatible_watchlists",
|
||||
"pin.confirm_pin",
|
||||
"pin.pins_dont_match",
|
||||
"player.search_subtitles",
|
||||
"player.subtitle_search",
|
||||
"player.subtitle_download_hint",
|
||||
"player.subtitle_tracks",
|
||||
"player.using_jellyfin_server",
|
||||
"player.swipe_down_settings",
|
||||
"player.stopPlayback",
|
||||
"player.stopPlayingTitle",
|
||||
"player.stopPlayingConfirm"
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user