From 21625a98805d02a190df13579f584e203f4333e4 Mon Sep 17 00:00:00 2001 From: Manuel Kocher <manuel.kocher@tugraz.at> Date: Wed, 4 Jan 2023 10:32:42 +0100 Subject: [PATCH] Remove innerText from dbp-translation component --- packages/common/src/translation.js | 7 ------- 1 file changed, 7 deletions(-) diff --git a/packages/common/src/translation.js b/packages/common/src/translation.js index 5b3b89a6..59b803ff 100644 --- a/packages/common/src/translation.js +++ b/packages/common/src/translation.js @@ -15,7 +15,6 @@ export class Translation extends DBPLitElement { // dir and i18next instance of translation overrides this._i18n = createInstance(); this.langDir = ''; - this.innerText = ''; } @@ -77,19 +76,15 @@ export class Translation extends DBPLitElement { // request to i18n translation if (this.interpolation && this.unsafe) { - this.innerText = this._i18n.t(this.key, this.interpolation); translation = unsafeHTML(this._i18n.t(this.key, this.interpolation)); } else if (this.interpolation) { - this.innerText = this._i18n.t(this.key, this.interpolation); translation = this._i18n.t(this.key, this.interpolation); } else if (this.unsafe) { - this.innerText = this._i18n.t(this.key); translation = unsafeHTML(this._i18n.t(this.key)); } else { - this.innerText = this._i18n.t(this.key); translation = this._i18n.t(this.key); } @@ -103,12 +98,10 @@ export class Translation extends DBPLitElement { || window.location.hash.includes('debug')) { keyComment = unsafeHTML("<!-- key: " + this.key + "-->"); } else if (this._i18n.hasResourceBundle(this.lang, overrideNamespace)){ - this.innerText = ""; translation = ""; keyComment = unsafeHTML("<!-- key '" + this.key + "' not found! -->"); console.error("Key '" + this.key + "' not found!"); } else { - this.innerText = ""; translation = ""; keyComment = unsafeHTML("<!-- key '" + this.key + "' and namespace '" + overrideNamespace + "' not found! -->"); console.error("Key '" + this.key + "' and namespace '" + overrideNamespace + "' not found!"); -- GitLab