Content ReSync

Update translations when the original changes.

Content ReSync is off until you turn it on under PerfLocale → Settings → Translation → Content ReSync. While it is off, it adds nothing to your site. When the original of a post changes, its translations are marked Needs Update (see Content Translation). Content ReSync brings them up to date: it finds the parts of the original that changed, keeps the translation of every part that did not, and fills the changed and new parts from the original, either in the source language for a translator or machine-translated. Updates to published translations wait for a person on the Review update screen.

Where to start a resync

  • One translation: in the block editor’s Translations panel of a translation, Resync from source. On the original, Resync all translations. The classic editor’s Translations box has the same actions. Save first: a resync uses the saved version.
  • Many translations: on PerfLocale → Translations, the row action Resync, the bulk action Update translations, or the Update translations button while the status filter is Needs Update. Settings → Translation has the same button next to Generate Missing Translations.

The Update translations dialog asks for the target languages, the content types and what to update: Outdated translations: resync them with their source, Missing translations: create them as drafts (empty, or machine-translated when a provider is ready), and Also record translations that are up to date. Its only button is Estimate.

The estimate

A run that would send text to machine translation or create translations shows an estimate first: how many translations it updates, how many parts it reuses, leaves in the source language or machine-translates, and how many characters it sends to machine translation. Nothing changes until you press Start; Cancel leaves everything as it is. A run that sends nothing and creates nothing starts at once. A bulk run continues in the background; follow it under Jobs.

Review update

An update is written at once when nothing in it needs a person. It waits for review when, for example, the translation is published and the update holds machine translations, near matches or parts left in the source language, or when the translation was changed outside ReSync. The screen says why (“Held because: …”) and shows each part with its new source text, the current translation and the proposal, plus the title, content, excerpt and field changes.

  • Apply writes the proposal. Apply and edit writes it and opens the translation in the editor.
  • Reject drops it; later runs do not propose the same update again.
  • Mark as up to date writes nothing. The translation stays as it is and is recorded as in sync with the current original and is no longer marked Needs update. Use it when you translated the change by hand in the editor.
  • Undo, after an Apply, puts the earlier text back. The screen shows Before and now side by side.

Apply, Reject and Mark as up to date are for approvers: users with the perflocale_approve_translations capability, administrators and super admins. A translator without it can read the proposal but sees no decision buttons. Mark as up to date is decided one update at a time: on PerfLocale → Translations, open each from its Update waiting link, or run wp perflocale review keep <id> with an id from wp perflocale review list (see WP-CLI Commands).

Comparing block by block

For a post written in the block editor, the Content section compares each block as it is Now with what is Proposed. It starts with a count, such as “2 blocks changed”, and marks every block as New, Removed or Changed. Blocks that did not change are folded away under “Show N blocks that did not change”. After an Apply, Before and now compares the same way.

  • Visual shows each side as the block editor draws it, read-only. A block from another plugin is shown as its text, because its editor code is not loaded on this screen.
  • Code shows each block’s markup, with a changed block as a text diff. Without JavaScript this is the only view.
  • The Visual view is offered only when saving the proposal with your account would store it exactly as proposed. If it would not, or the update holds added code, only the Code view shows, with a note.
  • A new or changed block shows the original’s text next to it, and a Machine translated label when machine translation wrote it. The original’s text shows only to a user who may read the source.
  • Open the translation in the editor and Open the source in the editor sit above the comparison, each only for a user who may edit that post.

Content with no blocks, content that cannot be split into blocks, and content too large to compare here are compared line by line, with a note.

Sometimes a source change cannot be placed next to text a person wrote in the translation. The screen then says so and writes nothing for that change: translate it in the editor, then press Mark as up to date.

A translation with no starting point

Content ReSync compares the original with an earlier version of it. A translation with no earlier version to compare with is left unchanged, and the result says so. Bring it up to date by hand once, then use Track changes from now in that message. It records the current original as the starting point and writes nothing to the translation. After that, Resync from source brings over later changes to the original.

When the translation is edited after an update was proposed, Apply refuses the old proposal: reject it and run the resync again to get one built on the current text.

Settings

Under PerfLocale → Settings → Translation → Content ReSync. The other settings appear after you turn it on.

SettingDefaultWhat it does
Content ReSync: Turn on Content ReSyncOffTick it to use Content ReSync. While it is off, it adds nothing to your site: no screens, buttons, background jobs or notices. Its records are kept, and the first run after you turn it back on reads every source again.
IncludeEvery translatable post type, and Custom fieldsAn unticked type is never resynced. A post type the site starts to translate later is included.
Changed and new partsLeave them in the source language for a translatorMachine translate them appears while machine translation is on. Only the changed and new parts are sent.
Near matchesOff: update every changed partKeeps the old translation of a part whose text is at least 95, 90, 85 or 80% the same. Such a translation stays Needs Update until a person checks it.
Keep per-language blocks and mediaOnKeeps blocks that exist only in a translation, and images and links changed for its language. Unticked, an update that removes them always waits for review.
When a translation was edited outside ReSyncAsk every time (recommended)Ask every time: each update that would change an edited part waits on the review screen. Ask once, then follow the original: the first update after the edit waits for review; after you apply or keep it, later updates do not wait because of that edit. Never ask: replace those edits with the original: the next update replaces the edited text with the original, and every update can be undone. Runs without a signed-in user, such as scheduled runs, still ask. Edits in the editor and changes made by other plugins both count.

With Machine translate them, the context set under the machine-translation settings is sent with each changed part to DeepL and the WordPress AI Client.

What counts as changed

Content ReSync compares the title, content, excerpt and, with Custom fields included, the translatable custom fields, for example an SEO keyword or an ACF text field. A field that was empty on a translation and later changed on the original is updated. A field that becomes machine-translatable while it holds no text is not a change, and a field that cannot be read never counts as unchanged.

Large runs and memory

The part of a run that does not finish within 20 seconds of the request that started it continues as a content_resync background job. Settings → Performance → Background Thresholds has a row Content ReSync (Update translations). A run keeps memory free for WordPress’s own option writes; a post too large for the PHP memory limit is skipped and named, so raise the limit or update it by hand. A data import blocks ReSync while it runs.

If a ReSync table is missing, a run or estimate says so and names the fix: Retry now under Tools → Site Health, or wp perflocale db-migrate (see Troubleshooting).

For developers