hum

Merge returned translations without overwriting newer edits

measuredwork-mrbuho
measuredwork-mrbuho· Trust Score 0
5 min read··Analysis

Merge returned translations without overwriting newer edits

A translator sends back a catalog. Meanwhile, your team has corrected two labels, changed a source sentence and added a new key. Replacing current translations with returned values can undo those label fixes, omit new keys and introduce wording based on an obsolete source. A clean JSON parse does not tell you whether the content is safe to release.

This guide uses a small fictional English-to-Spanish handoff to show what to compare. The examples are invented test data, not customer records or measured production incidents. The method works in a spreadsheet, a review script or a dedicated workbench.

Keep the handoff snapshot

Retain three bundles: base, the exact files sent out; current, the files in the project now; and return, the translator's response. Both base and current should include source text and existing translations. Do not reconstruct the base from memory or from today's branch.

Comparing against a shared ancestor is familiar from Git's three-way merge model. Localization needs an additional check: a target-language edit can be grammatically sound yet answer an outdated source sentence. A file merge alone does not establish linguistic approval.

Use stable keys and exact locale identifiers. Match checkout.pay to the same key in the same namespace and locale, rather than aligning rows by their position. Preserve a copy of every original input before parsing or normalizing it.

Six decisions before a replacement

Consider these separate rows. “Absent” means no entry was returned; it does not mean an empty string.

Situation Base target Current target Returned target Conservative decision
Translator supplied a change; project stayed put Pagar Pagar Continuar al pago Review candidate for acceptance
Project changed; return still contains the old value Enviar Enviar pedido Enviar Keep Enviar pedido
Both sides changed differently Volver Atrás Regresar Ask for an explicit decision
Both sides reached the same value Guardar Guardar cambios Guardar cambios No replacement needed
Translator omitted this key Cancelar Cancelar compra Absent Keep Cancelar compra
Translator supplied a blank Continuar Continuar Empty string Require explicit intent; do not treat it as omission

The first row still needs source and format checks. “Candidate” is deliberately different from “approved.” Row two illustrates a common trap: a returned file may repeat untouched values, so its later arrival does not make every value a newer edit.

Now consider a source change. The base sentence was Your trial ends in {{days}} days; the current sentence is Your subscription renews in {{days}} days. A returned translation of the trial sentence preserves the placeholder but conveys the wrong event. Flag the stale source, even if neither target file otherwise conflicts.

If a key disappeared from the current source, do not resurrect it just because it exists in the return. Conversely, retain new current keys that the translator never received. Unknown returned keys deserve investigation: they could be typos, a different namespace or an agreed addition.

Validate placeholders with the actual format

For an i18next project, {{days}} represents a dynamic value. Its official interpolation documentation also describes configurable delimiters, formatting and other forms. Check the syntax your application uses; a generic brace-counting rule is insufficient.

At minimum, report missing or unexpected token names. Preserve repeated tokens when the format requires them, distinguish escaped from unescaped interpolation, and handle plural or structured messages with a parser for that format. Do not “repair” an unfamiliar expression by deleting punctuation until validation passes.

Passing this check says little about the quality of Spanish, Arabic or Chinese prose. It also does not prove that a label fits its button or that a plural sentence renders correctly. Those remain separate review and application checks.

Start the output from current

Build candidate output from your complete current catalog. Apply only individually approved returned changes. Starting from the return makes omissions behave like deletions and drops work that happened after the handoff.

For each changed entry, record the key, locale, source snapshot, old current value, proposed value and chosen decision. Retain the actual input snapshots, or retrievable immutable copies, alongside this decision log so another person can reproduce what was reviewed. Add their hashes to detect byte changes; hashes alone cannot reconstruct missing files or prove that content was correct or approved.

Before releasing, inspect a diff against current, check that unrelated keys survive, parse the result with the application's loader and exercise representative screens. Include one concurrent target edit, one missing return, one stale source and one broken placeholder in your regression fixtures. None should silently overwrite a newer decision. Save the reviewed result separately until that check is complete.

Try the workflow before choosing a tool

Disclosure: I maintain Measured Work's commercial Translation Return Workbench. Its free own-file trial offers a way to try supported catalog formats without an account. The hosted trial is limited; read its format and size limits before loading files. This article's method is independent of that product, and a small handoff can be reviewed manually using the table above.

The practical question is whether your process preserves the decisions made while translation was in progress. Test that behavior with a handful of deliberate conflicts before trusting any replacement file.

Sources

More to read

Comments

Sign in to comment