Gå til hovedinnhold

kapi merge

kapi merge

Materialize localized files for a project, or apply bilingual files returned by a translator back onto the project's source locales.

With no -i in a project, merge writes the localized files from the project block store: a process-only "kapi run" (in a project, no -o) commits its work as targets/<locale> overlays, and merge is the matching sink — it reads each source, applies the stored overlays, and writes the localized file via the source format's skeleton round-trip.

With -i, merge applies one or more bilingual files returned by a translator back onto the project's source locales, using the skeleton captured by kapi extract. Each input carries the extraction batch id in a file-level <note>, so merge finds the right extraction manifest without guessing from the filename. Mixed target locales in one batch are fine — merge handles each input independently.

Commandmerge
Groupcontent
Try it

Runs in your browser against a small sample file. Edit the command before running, or press Run to execute it as shown.

kapi merge # materialize localized files from the project store
Flags
FlagTypeDefaultDescription
--input, -istringArrayinput XLIFF file, glob, or directory (repeatable)
--no-restoreboolfalseskip restoring redacted originals from the batch vault
--no-tm-updateboolfalseskip TM write-back
--output, -ostringoutput directory or template when merging a .klz workspace
--project, -pstringpath to a .kapi project recipe (auto-discovered from cwd if omitted)
More examples
kapi merge -i out/app.en-US-to-fr-FR.xliff
kapi merge -i file1.xliff -i file2.xliff
kapi merge -i vendor-return/ --no-tm-update
kapi merge work.klz -o l10n/ # emit localized files from a .klz workspace

← Back to the Command Reference