@i18n-doctor/usages
v0.11.17
Published
Translation key usage detection with source locations
Downloads
3,160
Maintainers
Readme
@i18n-doctor/usages
Beta — v0.11.17 · Part of i18n-doctor — static localization analysis for JavaScript and TypeScript.
Translation key usage detection across React, Vue, Angular, and more — plus helpers used by the issue engine:
- Prop-passed translators (
{ t }/props.t) - Static key composition (
"a" + "b", static templates, same-fileconst) - Static ternaries (
t(cond ? "A" : "B"),const k = cond ? "A" : "B"; t(k)) - Form-field maps (
t(field.label)from static config arrays) - Translator factories (
usersColumns(t)inherits call-site namespace) - String enums +
useStatemaps (t(item.name)/WpNavbar.SENSITIVE_TERMS) - Prop-passed config objects (
t(item.translation)for navigation configs) - Helper returns, string maps, object/chart configs, route titles (
*Route+ nested settings/children),Object.keys(Enum) for…int(key)over reachable property-type string enums (suppressUnusedOnly)- Spread-imported catalog keys keep origin file locations for diagnostics
- String-literal array maps (
(["JALALI","GEORGIAN"] as const).map(op => t(op))) - Enum-typed props (
t(type as string)whentype?: SomeEnum | string) - Path-alias imports for translator factories (
app/...,@core/...) - Store/object methods with
tparams (odsDownload(uuid, t)) - Renamed Zustand selectors (
deleteRowRawById = useStore(s => s.deleteRawRowById)) - Nested factories (
schema(t)→dateSchema(t)) - Project
i18nwrappers (import i18n from "i18n/…"+i18n.t("ns:key")/{ ns }) - JSX
Object.keys(Enum)props into childt(item)maps - Helpers returning enum-member arrays (
cols.map(col => t(col))) - Object-param translators (
fn({ t })inherits call-site namespace) - Enum-typed property access (
t(data.actionType)/t(node.data.actionType)) useTranslation(ref || "ns")fallback namespace- Dynamic key fragments (for soft unused hints)
- Untranslated UI literals (JSX text / common attributes)
This package is an internal engine module. Most users only need the CLI:
npx i18n-doctor checkLicense
MIT
