Skip to main content
Overwrite one or more existing translations in Entri, identified by their key and language. Unlike nt3 push, which syncs whole files, overwrite targets individual strings — making it well suited for coding agents and scripts that spot a wrong translation locally and want to correct it in place. Overwritten translations are set to status translated with source api, so automated corrections are distinguishable from human, AI, and import edits in the translation history.

Usage

nt3 overwrite [options]
# alias: nt3 ow

Examples

# Overwrite a single translation inline
nt3 overwrite -k common.save_button -l nl -v "Opslaan"

# With a namespace
nt3 overwrite -k save_button -n common -l nl -v "Opslaan"

# Overwrite many translations from a JSON file
nt3 overwrite -f fixes.json

# Pipe a JSON array on stdin (e.g. from an agent)
echo '[{"key":"common.save_button","language":"nl","value":"Opslaan"}]' | nt3 overwrite

# JSON output for CI/agents
nt3 overwrite -f fixes.json --json

Options

FlagDescription
-k, --key <key>Translation key to overwrite (inline mode)
-v, --value <value>New translation value (inline mode)
-l, --language <lang>Target language code, e.g. nl (inline mode)
-n, --namespace <ns>Namespace the key belongs to (optional)
-f, --file <path>JSON file with an array of { key, namespace?, language, value }
--jsonOutput the result as JSON

Input modes

overwrite resolves its input in this priority order:
  1. Inline flags--key, --language, and --value (plus optional --namespace) overwrite a single translation.
  2. JSON file--file path.json reads an array of items.
  3. Stdin — if no inline flags or file are given, a JSON array is read from standard input, enabling piping from other tools.
The JSON array shape:
[
  { "key": "common.save_button", "language": "nl", "value": "Opslaan" },
  { "key": "save_button", "namespace": "common", "language": "fr", "value": "Enregistrer" }
]

Result

{
  "overwritten": 2,
  "notFound": [
    { "key": "missing.key", "namespace": "", "language": "nl" }
  ]
}
Keys that don’t exist in the project are reported under notFound rather than created — overwrite only updates existing translations. The process exits with code 1 if any key is not found, so callers can detect partial failures.
An empty value clears the translation and sets its status back to untranslated.