Lint rules
missing-translation
warningFlags a message the source locale defines that a target locale leaves absent or empty.
Why this is bad
A message with no translation either fails at runtime or falls back to a default, depending on how your setup handles a missing key.
Examples
Given a source locale that defines the keys save and discard.
Examples of incorrect code for this rule:
messages/es.json
{"discard": "Descartar"}
Examples of correct code for this rule:
messages/es.json
{"discard": "Descartar","save": "Guardar"}
How to fix it
You can add all missing translations by running eloqnt translate.
This rule reports a warning instead of an error, so that you can delay adding translations while still working on a feature. By passing --strict to eloqnt lint, you can fail on warnings too (useful e.g. for GitHub Actions).
Coding agents like Claude Code or Codex can generate translations too, but typically fall short at it:
- Missing context: A messages file doesn’t show where a message is used, so translations can miss the intent.
- Consistency: Terminology drifts across files and between sessions.
- Language nuances: Plural rules and grammar of a target language get guessed at, leading to subtle errors.
- Context pollution: Messages for many locales fill up the context window with content unrelated to the task.
The translate command instead enriches messages with usage context from your source code, applies your styleguides, and verifies every translation.