@i18n-doctor/usages

Translation key usage detection with source locations
3,932 2
Install
npm install @i18n-doctor/usages
Latest Version:0.11.17
License:MIT
Last Updated:Sep 23, 2026
Links: GitHub  ·  npm
Maintainer: tahaff

@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-file const)
  • 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 + useState maps (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…in t(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) when type?: SomeEnum | string)
  • Path-alias imports for translator factories (app/..., @core/...)
  • Store/object methods with t params (odsDownload(uuid, t))
  • Renamed Zustand selectors (deleteRowRawById = useStore(s => s.deleteRawRowById))
  • Nested factories (schema(t) → dateSchema(t))
  • Project i18n wrappers (import i18n from "i18n/…" + i18n.t("ns:key") / { ns })
  • JSX Object.keys(Enum) props into child t(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 check

License

MIT

Related Packages

@i18n-doctor/detect

Framework, package manager, language, and i18n library detection

2,239 2
@ai-i18n/analyzer

Static i18n message analysis for ai-i18n tooling in Vite, Vue, and React project...

5,336 0
i18n-sentry

i18n quality checker for Vue, React, Angular and Svelte projects

527
@inlang/cli

title: inlang CLI - Localization Automation for CI/CD description: Automate tran...

2,350,321 2,006

Version History

Version Released License
0.11.17 MIT
0.11.16 MIT
0.11.14 MIT
0.11.13 MIT
0.11.11 MIT