Skip to main content
shipi18n logo|Documentation

jed-drift: WordPress JS translations out of sync with the .po

error — fails the build

WordPress generates a JED-format JSON for your JavaScript strings from the .po, via `wp i18n make-json`. This finding means the JSON no longer matches the .po: someone edited the .po and did not regenerate the JSON, so the JavaScript side still serves the old translation while the PHP side shows the new one. Reported by `shipi18n wp-sync`.

What triggers it

# es.po (source of truth)
msgid "Save"
msgstr "Guardar"

// plugin-es_ES-<hash>.json — stale
{ "locale_data": { "messages": { "Save": ["Guardar (viejo)"] } } }

Fixed

// regenerated JSON matches the .po
{ "locale_data": { "messages": { "Save": ["Guardar"] } } }

Why it matters

It is completely invisible: the PHP admin shows the correct new string, the JS front-end shows the old one, both files are valid, and nothing in the WordPress toolchain flags the drift. Context and plural forms drift independently.

How to fix it

Re-run `wp i18n make-json` so the JSON is regenerated from the current .po, then commit both.

How to silence it

A per-rule severity: --severity jed-drift=warning (or =off) if a JSON is intentionally hand-maintained.

Check for this in CI

npx @shipi18n/cli check ./locales -s en
# SARIF for inline PR annotations:
npx @shipi18n/cli check ./locales -s en -r sarif -o shipi18n.sarif

The structural checks need no API key. Findings of this rule link back to this page from the SARIF helpUri.

Related rules