Keep every language current when the English changes
“We changed the pricing page in English last month. The German page still says the old thing.”
For teams that keep changing the main language and ship in others: product teams, sites with many pages, anyone whose translations come a step behind.
I changed English texts on this branch. Bring every other language up to date: 1. Run `npx i18next-cli extract`, so new keys reach every language file. 2. For every key whose English value changed (`git diff [main] -- [src/locales/en]`), translate the same key again in every other language. 3. Run `npx i18next-cli status` and `npx i18next-cli lint`; both must pass, and lint must not warn about a missing placeholder. List the keys you changed per language.
What your agent does
- Runs
npx i18next-cli extract, so new keys reach every language file. - Reads
git diffon the English files and translates every key whose English value changed again, in every other language. - Runs
npx i18next-cli statusandnpx i18next-cli lint; both pass, and lint reports no missing placeholder. - Lists the keys it changed, per language.
Two kinds of change
- A new text gets a new key.
i18next-cli extractwrites it into every language file, andi18next-cli statusreports it as missing until it is translated. In CI, before the build, that stops the deploy. - A changed text under the same key keeps its old translations, and when the English is edited in
the translation file, no i18next-cli command reports it:
statuscounts the key as translated. Step 2 of the prompt closes that gap from the git diff. When the meaning changes, a new key is the safer way: thenstatusreports it in every language.
Two ways to keep the other languages current
The agent translates from the diff
Step 2 of the prompt reads git diff on the English files and translates every key whose English
changed again, in every language. It costs nothing extra and fits when one person or the agent keeps the languages.
Locize marks what changed
When the English text of a translated key changes in Locize (edited there, or synced from the repository with
locize-sync --update-values), Locize marks that key's translation in every language as
needing review (the setting "Review on source change", on by default). Translators and reviewers who do not code
see per language what to re-check, in a web editor. It fits when several people translate, or when a missed
change costs more than the setup.
From the maintainers Locize is the translation management service of the people who maintain i18next; its customers fund i18next.
The review workflow in LocizeBefore it goes live
- Have each changed translation read by someone who speaks the language. An agent's translation is a first draft.
- Compare the agent's list with the diff: every English key that changed appears in every language.
- Add
npx i18next-cli statusto CI, so a new text without its translation stops the build.