Comparing version 3.0.0 to 3.0.1
const convert = require('xml-js'); | ||
const makeElement = require('./util/makeNodes').makeElement; | ||
const makeText = require('./util/makeNodes').makeText; | ||
const escape = require('./util/escape'); | ||
@@ -35,3 +36,3 @@ function js2xliff(obj, opt, cb) { | ||
} | ||
const u = makeElement('unit', {id: k}, [segment]); | ||
const u = makeElement('unit', {id: escape(k)}, [segment]); | ||
f.elements.push(u); | ||
@@ -38,0 +39,0 @@ }); |
const convert = require('xml-js'); | ||
const makeElement = require('./util/makeNodes').makeElement; | ||
const makeText = require('./util/makeNodes').makeText; | ||
const escape = require('./util/escape'); | ||
@@ -36,3 +37,3 @@ function jsToXliff12(obj, opt, cb) { | ||
Object.keys(obj.resources[nsName]).forEach((k) => { | ||
const u = makeElement('trans-unit', {id: k}, true); | ||
const u = makeElement('trans-unit', {id: escape(k)}, true); | ||
u.elements.push(makeElement('source', null, [makeText(obj.resources[nsName][k].source)])); | ||
@@ -39,0 +40,0 @@ u.elements.push(makeElement('target', null, [makeText(obj.resources[nsName][k].target)])); |
{ | ||
"name": "xliff", | ||
"version": "3.0.0", | ||
"version": "3.0.1", | ||
"description": "xliff2js and js2xliff converter xliff utils", | ||
@@ -10,3 +10,3 @@ "main": "index.js", | ||
"dependencies": { | ||
"xml-js": "1.2.2" | ||
"xml-js": "1.6.2" | ||
}, | ||
@@ -16,3 +16,3 @@ "devDependencies": { | ||
"expect.js": "^0.3.1", | ||
"mocha": "^3.2.0" | ||
"mocha": "^5.0.5" | ||
}, | ||
@@ -19,0 +19,0 @@ "scripts": { |
{ | ||
"key1": "Hello", | ||
"key2": "An application to manipulate and process XLIFF documents", | ||
"key.nested": "XLIFF Data Manager" | ||
"key.nested": "XLIFF Data Manager", | ||
"to ' \"esc<ap> & e": "special chars" | ||
} |
{ | ||
"key1": "Hallo", | ||
"key2": "Eine Applikation um XLIFF Dokumente zu manipulieren und verarbeiten", | ||
"key.nested": "XLIFF Daten Manager" | ||
"key.nested": "XLIFF Daten Manager", | ||
"to ' \"esc<ap> & e": "spezielle Charakter" | ||
} |
@@ -15,2 +15,6 @@ { | ||
"target": "XLIFF Daten Manager" | ||
}, | ||
"to ' \"esc<ap> & e": { | ||
"source": "special chars", | ||
"target": "spezielle Charakter" | ||
} | ||
@@ -17,0 +21,0 @@ } |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
35601
34
655
+ Addedxml-js@1.6.2(transitive)
- Removedxml-js@1.2.2(transitive)
Updatedxml-js@1.6.2