The Lingo.dev CLI preserves manual edits to target files. When you override a generated translation by editing the target file directly, the CLI keeps your change on subsequent runs - as long as the source content hasn't changed.
How overrides work#
The CLI tracks source content fingerprints, not target content. When you manually edit a translation in a target file, the source fingerprint remains unchanged, so the CLI treats the key as already translated and skips it.
CLI generates a translation
// locales/es.json (generated)
{ "greeting": "Bienvenido a nuestra plataforma" }You override it manually
// locales/es.json (manually edited)
{ "greeting": "¡Bienvenido a nuestro espacio digital!" }Subsequent runs preserve your override
npx lingo.dev@latest run
# Your custom translation remains unchangedWhen overrides are replaced#
If the source content changes, the CLI detects a new fingerprint and retranslates the key - replacing your override:
// locales/en.json (source updated)
{ "greeting": "Welcome to our new platform" }The new fingerprint doesn't match the lockfile entry, so the CLI generates a fresh translation for this key.
Key renaming#
The CLI preserves translations even when keys are renamed, as long as the content stays the same. The lockfile tracks both content and key fingerprints, enabling key renaming without losing translation work.
