Overrides

Updated: last quarter · 1 min read

Deprecated

These docs cover the legacy CLI (v0). The current CLI is v1. See the current CLI docs

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.

1

CLI generates a translation

json
// locales/es.json (generated)
{ "greeting": "Bienvenido a nuestra plataforma" }
2

You override it manually

json
// locales/es.json (manually edited)
{ "greeting": "¡Bienvenido a nuestro espacio digital!" }
3

Subsequent runs preserve your override

bash
npx lingo.dev@latest run
# Your custom translation remains unchanged

When overrides are replaced#

If the source content changes, the CLI detects a new fingerprint and retranslates the key - replacing your override:

json
// 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.

Next Steps#