Skip to content

armgit / core

Public Imported from GitHub
0

100% open-source IoT Platform - Integrate your devices, add intelligence, build custom apps

Remove translation from language modal

Robin Dekkersb1c4eb5d5cee
diff --git a/ui/component/or-chart/src/index.ts b/ui/component/or-chart/src/index.ts
index 33aa5e4f6..06fc335c7 100644
--- a/ui/component/or-chart/src/index.ts
+++ b/ui/component/or-chart/src/index.ts
@@ -603,7 +603,6 @@ export class OrChart extends translate(i18next)(LitElement) {
super.updated(changedProperties);
if (!this._loading && changedProperties.has("activeAsset") && this.activeAsset && changedProperties.get("activeAsset") !== this.activeAsset) {
this.getSettings();
- return;
}
if(changedProperties.has("assetAttributes") ) {
@@ -614,8 +613,7 @@ export class OrChart extends translate(i18next)(LitElement) {
}
let reloadData = changedProperties.has("period") || changedProperties.has("compareTimestamp") || changedProperties.has("timestamp") || changedProperties.has("assetAttributes");
-
- if (reloadData && !this._loading) {
+ if (reloadData) {
this._data = [];
this._loadData();
}
@@ -704,7 +702,6 @@ export class OrChart extends translate(i18next)(LitElement) {
}
getSettings() {
- this._loading = true;
const configStr = window.localStorage.getItem('OrChartConfig')
if(!configStr) return
@@ -716,7 +713,8 @@ export class OrChart extends translate(i18next)(LitElement) {
const query = {
ids: view.assetIds
}
- if(view.assetIds === this.assets.map(asset => asset.id)) return
+ if(view.assetIds === this.assets.map(asset => asset.id)) return
+ this._loading = true;
manager.rest.api.AssetResource.queryAssets(query).then((response) => {
const assets = response.data;
diff --git a/ui/component/or-header/src/index.ts b/ui/component/or-header/src/index.ts
index e761dfaca..f4b43cf0f 100644
--- a/ui/component/or-header/src/index.ts
+++ b/ui/component/or-header/src/index.ts
@@ -58,7 +58,7 @@ const secondaryItems: menuOption[] = [
{
icon: "web",
value: "language",
- text: "lang"
+ text: "selectLanguage"
},
{
icon: "file-document-box-search-outline",
diff --git a/ui/component/or-header/src/or-language-modal.ts b/ui/component/or-header/src/or-language-modal.ts
index 9e8651ca8..dd6c53a20 100644
--- a/ui/component/or-header/src/or-language-modal.ts
+++ b/ui/component/or-header/src/or-language-modal.ts
@@ -34,9 +34,7 @@ export const languageOptions: languageOptions = {
};
const getLanguageOptions = () => {
- return Object.entries(languageOptions).map(([key, value]) => {
- return [key, i18next.t(value)]
- });
+ return Object.entries(languageOptions);
}
@customElement("or-language-modal")