xliff-simple-merge
Advanced tools
Comparing version
@@ -9,3 +9,3 @@ declare type MergeOptions = { | ||
newTranslationTargetsBlank?: boolean | 'omit'; | ||
/** For untranslated units with initial state (state="initial" / state="new"), a updated source will be copied into the target */ | ||
/** For untranslated units with initial state (state="initial" / state="new"), an updated source will be copied into the target (unless `newTranslationTargetsBlank='omit'/true`) */ | ||
syncTargetsWithInitialState?: boolean; | ||
@@ -12,0 +12,0 @@ }; |
@@ -209,4 +209,6 @@ "use strict"; | ||
if ((options === null || options === void 0 ? void 0 : options.sourceLanguage) || ((options === null || options === void 0 ? void 0 : options.syncTargetsWithInitialState) === true && isUntranslated(destUnit, xliffVersion, destSourceText))) { | ||
const targetElement = destTarget !== null && destTarget !== void 0 ? destTarget : createTargetElement(destUnit, xliffVersion); | ||
targetElement.children = unitSource.children; | ||
if (destTarget || (options === null || options === void 0 ? void 0 : options.newTranslationTargetsBlank) !== 'omit') { | ||
const targetElement = destTarget !== null && destTarget !== void 0 ? destTarget : createTargetElement(destUnit, xliffVersion); | ||
targetElement.children = unitSource.children; | ||
} | ||
} | ||
@@ -213,0 +215,0 @@ updateFirstAndLastChild(destSource); |
{ | ||
"name": "xliff-simple-merge", | ||
"version": "1.1.1", | ||
"version": "1.1.2", | ||
"description": "Merges XLIFF files", | ||
@@ -5,0 +5,0 @@ "main": "dist/src/index.js", |
[](https://www.npmjs.com/package/xliff-simple-merge) | ||
[](https://coveralls.io/github/daniel-sc/xliff-simple-merge?branch=main) | ||
[](https://lgtm.com/projects/g/daniel-sc/xliff-simple-merge/context:javascript) | ||
@@ -5,0 +4,0 @@ # XLIFF Simple Merge |
24568
0.02%357
0.56%35
-2.78%