---
title: "stale-translation"
description: "A translation that last changed before its source message, by the history providers (git)."
canonical_url: "https://x18n.dev/checks/stale-translation"
---
# stale-translation

> A translation that last changed before its source message, by the history providers (git).

<!-- Generated by docs/scripts/generate.ts from the source code. Do not edit. -->

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`:

```ts [x18n.config.ts]
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.

## Source

- [`packages/builtins/src/checks/index.ts`](https://github.com/x18n-dev/x18n/blob/main/packages/builtins/src/checks/index.ts)


## Sitemap

See the full [sitemap](https://x18n.dev/sitemap.md) for all pages.
