stale-translation
A translation that last changed before its source message, by the history providers (git).
The check is on by default, with the severity warning.
A translation is stale when it last changed before its source message did. Inside a git repo, x18n reads the commits that touched the locale files and compares the parsed messages, so reformatting, sorting and moving keys between files do not count. Uncommitted edits count as changed now. A message without history is never stale.
In CI, fetch the full history: a shallow clone (the actions/checkout default) reports nothing. Set fetch-depth: 0. Limit the walk with history: { git: { maxDepth, since } }, or turn history off with history: false. x18n prompt translate --to <locale> --stale adds stale translations to the prompt, with the source text from when they last changed.
Configure
Change the severity, or turn the check off, in checks:
import { defineConfig } from '@x18n/core'
export default defineConfig({
checks: {
'stale-translation': 'off',
},
})x18n check --only stale-translation runs this check alone. x18n check --skip stale-translation skips it for one run.