ztechno_core 0.0.10 → 0.0.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -91,13 +91,13 @@ class ZTranslateService {
91
91
  }
92
92
  async translateHtml(html, cookies) {
93
93
  const lang = this.getLang(cookies);
94
- const defaultLang = this.getDefaultLang();
94
+ const srcLang = this.getSourceLang();
95
95
  const dom = htmlParser.parseFromString(html);
96
96
  const htmlNodes = dom.getElementsByTagName('html');
97
97
  const mainNodes = dom.getElementsByTagName('main');
98
98
  const isView = htmlNodes.length === 0;
99
99
  const domNode = isView ? mainNodes[0] : htmlNodes[0];
100
- if (lang !== defaultLang) {
100
+ if (lang !== srcLang) {
101
101
  const node = isView ? domNode : domNode.getElementsByTagName('body')[0];
102
102
  const promises = [];
103
103
  this.translateHtmlRec(lang, node, promises);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ztechno_core",
3
- "version": "0.0.10",
3
+ "version": "0.0.11",
4
4
  "description": "Core files for ztechno framework",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",