Translation keys of a project: definitions, usages and their gaps.
Joins the translation sources (findI18nSources) with the key usages
(collectI18nUsages) and answers per key or for the whole project:
where a key is defined (per language, with file, line and value), where it
is used, in which language it is missing, which used keys are defined
nowhere and which defined keys have no static usage.
Remarks
Layers: unconditional sources form the base, conditional sources
(overlays) are grouped by their lookup key; each app of the workspace
(folder with a tsconfig.app.json) has its own layers. missingIn
compares a key with the languages of each layer that defines it, so an
overlay-only key never counts as missing in the base. An overlay
definition of a base key is marked overrides. A usage in an app is
checked against that app's sources; usages in libraries against all.
"Unused" cannot be proven without running the app. A defined key without a
static usage is covered-by-dynamic when a dynamic key prefix ('A.' + x)
covers it, referenced-as-literal when its text appears as a complete
string in code or a template (menu configs, inputs passed on to a
translating child), and no-static-usage otherwise.
Translation keys of a project: definitions, usages and their gaps.
Joins the translation sources (findI18nSources) with the key usages (collectI18nUsages) and answers per key or for the whole project: where a key is defined (per language, with file, line and value), where it is used, in which language it is missing, which used keys are defined nowhere and which defined keys have no static usage.
Remarks
Layers: unconditional sources form the base, conditional sources (overlays) are grouped by their lookup key; each app of the workspace (folder with a
tsconfig.app.json) has its own layers.missingIncompares a key with the languages of each layer that defines it, so an overlay-only key never counts as missing in the base. An overlay definition of a base key is markedoverrides. A usage in an app is checked against that app's sources; usages in libraries against all."Unused" cannot be proven without running the app. A defined key without a static usage is
covered-by-dynamicwhen a dynamic key prefix ('A.' + x) covers it,referenced-as-literalwhen its text appears as a complete string in code or a template (menu configs, inputs passed on to a translating child), andno-static-usageotherwise.Example