@tolgee/core
Advanced tools
Comparing version 1.0.0-alpha.53 to 1.0.0-alpha.54
@@ -79,3 +79,3 @@ "use strict"; | ||
return __awaiter(this, void 0, void 0, function () { | ||
var nodes_1, nodes_1_1, textNode, tolgeeData, result, text, keys, translatedNode, parentElement, e_1_1; | ||
var nodes_1, nodes_1_1, textNode, result, tolgeeData, text, keys, translatedNode, parentElement, e_1_1; | ||
var e_1, _a; | ||
@@ -91,13 +91,14 @@ return __generator(this, function (_b) { | ||
textNode = nodes_1_1.value; | ||
tolgeeData = textNode[Global_1.TOLGEE_ATTRIBUTE_NAME]; | ||
if (!((tolgeeData === null || tolgeeData === void 0 ? void 0 : tolgeeData.oldTextContent) == undefined)) return [3 /*break*/, 3]; | ||
return [4 /*yield*/, this.textService.replace(textNode.textContent)]; | ||
case 2: | ||
result = _b.sent(); | ||
if (result) { | ||
text = result.text, keys = result.keys; | ||
translatedNode = this.translateChildNode(textNode, text, keys); | ||
parentElement = this.getParentElement(translatedNode); | ||
parentElement._tolgee.nodes.add(translatedNode); | ||
this.elementRegistrar.register(parentElement); | ||
tolgeeData = textNode[Global_1.TOLGEE_ATTRIBUTE_NAME]; | ||
if ((tolgeeData === null || tolgeeData === void 0 ? void 0 : tolgeeData.oldTextContent) == undefined) { | ||
if (result) { | ||
text = result.text, keys = result.keys; | ||
translatedNode = this.translateChildNode(textNode, text, keys); | ||
parentElement = this.getParentElement(translatedNode); | ||
parentElement._tolgee.nodes.add(translatedNode); | ||
this.elementRegistrar.register(parentElement); | ||
} | ||
} | ||
@@ -104,0 +105,0 @@ _b.label = 3; |
{ | ||
"name": "@tolgee/core", | ||
"version": "1.0.0-alpha.53", | ||
"version": "1.0.0-alpha.54", | ||
"description": "Library providing ability to translate messages directly in context of developed application.", | ||
@@ -65,3 +65,3 @@ "main": "dist/tolgee.umd.js", | ||
}, | ||
"gitHead": "7140d7e30e56a61fa4a38ff8703d552001319ceb", | ||
"gitHead": "2431593b9777ced1b86860b79ea4c5bb5673a997", | ||
"publishConfig": { | ||
@@ -68,0 +68,0 @@ "access": "public" |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
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
2056738
4791