Vue · VUE0002

Disallow unused translations

Flags keys in the base locale file that no source file references. A key counts as used when a t(), $t(), tc(), te() or tm() call, an <i18n-t> keypath, a v-t value, or a linked message (@:key) names it, when a template literal or concatenation with a static prefix can build it, or when a source string literal equals the full key. The base locale is the Nuxt i18n defaultLocale, or English when none is set.
VUE0002vite-doctor/vuei18nwarnNo fix
vue/i18n/no-unused-translationssrc/rule-packs/vue/rules/vue/i18n.ts

Run this rule

pnpm vite-doctor . --framework vue --extends auto,vue/strict --rules vue/i18n/no-unused-translations

Why it matters

Every unused key is copy that translators keep paying for and that drifts out of date, and a large locale file hides which messages the UI still shows. Keys built entirely at runtime, such as t(key), can reach any message, so when Doctor finds such calls it still reports the key but lowers the confidence to heuristic-medium and names the first dynamic call in the evidence.

Delete the key from every locale file. If the report has heuristic-medium confidence, first check that no runtime-built key resolves to it. If the key is still needed, reference it with a literal such as t('home.title') so Doctor and readers can see the use.

Example

Remove unused translations

Before

{
  "used": "Save",
  "unused": "Delete"
}

After

{
  "used": "Save"
}
Copyright © 2026