100% open-source IoT Platform - Integrate your devices, add intelligence, build custom apps
Java asset-managementbuildingdashboarddataplatformdevice-managementedge-computingenergyenergy-managementenergy-monitorfleet-managementfleet-telematicsiotiot-applicationiot-platformmodbusmqttmqtt-brokerota-updaterules-enginesmartcity
Enhancement/apply or-translate (#1218)
DonWillems852e7244e6aa
diff --git a/manager/src/web/shared/locales/ar/or.json b/manager/src/web/shared/locales/ar/or.jsonindex b49d9c306..13f191128 100644--- a/manager/src/web/shared/locales/ar/or.json+++ b/manager/src/web/shared/locales/ar/or.json@@ -214,10 +214,12 @@"realmRules": "إضافة شرط داخل هذا النطاق","globalRules": "الإجرائات العامة","recipients": "المستلمين",- "JSON": "عندما-بعد",- "FLOW": "المخطط التدفقي",- "GROOVY": "Groovy",- "JAVASCRIPT": "JavaScript",+ "rulesLanguages": {+ "JSON": "عندما-بعد",+ "FLOW": "المخطط التدفقي",+ "GROOVY": "Groovy",+ "JAVASCRIPT": "JavaScript"+ },"gatewayConnection": "إدارة الإتصال الداخلي ","connectionDetails": "معلومات الإتصال","secured": "محمي",diff --git a/manager/src/web/shared/locales/cn/or.json b/manager/src/web/shared/locales/cn/or.jsonindex eac015b2b..2b678c7e8 100644--- a/manager/src/web/shared/locales/cn/or.json+++ b/manager/src/web/shared/locales/cn/or.json@@ -229,10 +229,12 @@"realmRules": "场所","globalRules": "全局","recipients": "收件人",- "JSON": "When-Then",- "FLOW": "Flow",- "GROOVY": "Groovy",- "JAVASCRIPT": "JavaScript",+ "rulesLanguages": {+ "JSON": "When-Then",+ "FLOW": "Flow",+ "GROOVY": "Groovy",+ "JAVASCRIPT": "JavaScript"+ },"gatewayConnection": "管理器互联","connectionDetails": "连接详情","secured": "安全",diff --git a/manager/src/web/shared/locales/de/or.json b/manager/src/web/shared/locales/de/or.jsonindex 304da341d..b17945c62 100644--- a/manager/src/web/shared/locales/de/or.json+++ b/manager/src/web/shared/locales/de/or.json@@ -123,6 +123,7 @@"selectAttributes": "Attribute wählen","selectAttribute": "Attribut wählen","clearTable": "Leere",+ "clear": "Leere","export": "exportieren","addAssetAttribute": "Asset Attribute hinzufügen","add": "Hinzufügen",@@ -245,10 +246,12 @@"realmRules": "Realm","globalRules": "Global","recipients": "Empfänger",- "JSON": "When-Then",- "FLOW": "Flow",- "GROOVY": "Groovy",- "JAVASCRIPT": "JavaScript",+ "rulesLanguages": {+ "JSON": "When-Then",+ "FLOW": "Flow",+ "GROOVY": "Groovy",+ "JAVASCRIPT": "JavaScript"+ },"gatewayConnection": "Manager verbindung","connectionDetails": "VERBINDUNGSDETAILS","secured": "Gesichert",diff --git a/manager/src/web/shared/locales/en/or.json b/manager/src/web/shared/locales/en/or.jsonindex 56488aa44..42bc86341 100644--- a/manager/src/web/shared/locales/en/or.json+++ b/manager/src/web/shared/locales/en/or.json@@ -163,6 +163,7 @@"selectAttributes": "Select attributes","selectAttribute": "Select attribute","clearTable": "Clear",+ "clear": "clear","export": "Export","addAssetAttribute": "Add asset attribute","add": "Add",@@ -311,10 +312,12 @@"realmRules": "Realm","globalRules": "Global","recipients": "Recipients",- "JSON": "When-Then",- "FLOW": "Flow",- "GROOVY": "Groovy",- "JAVASCRIPT": "JavaScript",+ "rulesLanguages": {+ "JSON": "When-Then",+ "FLOW": "Flow",+ "GROOVY": "Groovy",+ "JAVASCRIPT": "JavaScript"+ },"gatewayConnection": "Manager interconnect","gateway": "Manager interconnect","connectionDetails": "CONNECTION DETAILS",@@ -654,6 +657,7 @@"showGeoJson": "Show GeoJSON overlay","showValueAs": "Show value as","customLabel": "Custom label",+ "customTimeSpan": "Custom","userCanEdit": "Allow user input","showHelperText": "Show time of last update","tableSettings": "Table settings",@@ -728,6 +732,7 @@"saveRealmSucceeded": "Saved realm successfully!","userDisconnected": "Disconnected successfully!","userDisconnectFailed": "Disconnect failed",+ "somethingWentWrong": "Something went wrong, please try again.","lttb": "Default (LTTB)","withInterval": "With interval","AVG": "Average (mean)",diff --git a/manager/src/web/shared/locales/es/or.json b/manager/src/web/shared/locales/es/or.jsonindex f646e9333..7584f9819 100644--- a/manager/src/web/shared/locales/es/or.json+++ b/manager/src/web/shared/locales/es/or.json@@ -231,10 +231,12 @@"realmRules": "Realm","globalRules": "Global","recipients": "Destinatarios",- "JSON": "Cuando-Entonces",- "FLOW": "Flujo",- "GROOVY": "Groovy",- "JAVASCRIPT": "JavaScript",+ "rulesLanguages": {+ "JSON": "Cuando-Entonces",+ "FLOW": "Flujo",+ "GROOVY": "Groovy",+ "JAVASCRIPT": "JavaScript"+ },"gatewayConnection": "Interconexión del Manager","connectionDetails": "DETALLES DE CONEXIÓN","secured": "Asegurado",diff --git a/manager/src/web/shared/locales/fr/or.json b/manager/src/web/shared/locales/fr/or.jsonindex 411e30397..9f31cdee7 100644--- a/manager/src/web/shared/locales/fr/or.json+++ b/manager/src/web/shared/locales/fr/or.json@@ -231,10 +231,12 @@"realmRules": "Realm","globalRules": "Global","recipients": "Destinataires",- "JSON": "Si-Alors",- "FLOW": "Flux",- "GROOVY": "Groovy",- "JAVASCRIPT": "JavaScript",+ "rulesLanguages": {+ "JSON": "Si-Alors",+ "FLOW": "Flux",+ "GROOVY": "Groovy",+ "JAVASCRIPT": "JavaScript"+ },"gatewayConnection": "Interconnexion du Manager","connectionDetails": "DÉTAILS DE CONNEXION","secured": "Sécurisé",diff --git a/manager/src/web/shared/locales/it/or.json b/manager/src/web/shared/locales/it/or.jsonindex 8217ab54b..aa91892b5 100644--- a/manager/src/web/shared/locales/it/or.json+++ b/manager/src/web/shared/locales/it/or.json@@ -227,10 +227,12 @@"realmRules": "Regno","globalRules": "Globale","recipients": "Destinatari",- "JSON": "Quando-Poi",- "FLOW": "Flusso",- "GROOVY": "Groovy",- "JAVASCRIPT": "JavaScript",+ "rulesLanguages": {+ "JSON": "Quando-Poi",+ "FLOW": "Flusso",+ "GROOVY": "Groovy",+ "JAVASCRIPT": "JavaScript"+ },"gatewayConnection": "Manager del gateway","connectionDetails": "DETTAGLI DELLA CONNESSIONE","secured": "Assicurato",diff --git a/manager/src/web/shared/locales/nl/or.json b/manager/src/web/shared/locales/nl/or.jsonindex bb9935fa2..a6e791e2a 100644--- a/manager/src/web/shared/locales/nl/or.json+++ b/manager/src/web/shared/locales/nl/or.json@@ -163,7 +163,8 @@"selectAttributes": "Kies attributen","selectAttribute": "Kies attribuut","clearTable": "Wissen",- "export": "export",+ "clear": "wissen",+ "export": "exporteer","addAssetAttribute": "Voeg asset attribuut toe","add": "toevoegen","EQUALS_COMPARATOR": "Gelijk aan",@@ -265,7 +266,7 @@"oncePerHour": "Max. 1x per uur","oncePerDay": "Max. 1x per dag","oncePerWeek": "Max. 1x per week",- "reset": "Reset",+ "reset": "Herstellen","noLongerMatches": "Komt niet meer overeen","logs": "Logs","addRemoveAttributes": "Attributen toevoegen/verwijderen",@@ -311,10 +312,12 @@"realmRules": "Realm","globalRules": "Globaal","recipients": "Ontvangers",- "JSON": "Als-Dan",- "FLOW": "Flow",- "GROOVY": "Groovy",- "JAVASCRIPT": "JavaScript",+ "rulesLanguages": {+ "JSON": "Als-Dan",+ "FLOW": "Flow",+ "GROOVY": "Groovy",+ "JAVASCRIPT": "JavaScript"+ },"gatewayConnection": "Manager interconnect","gateway": "Manager interconnect","connectionDetails": "CONNECTIE DETAILS",@@ -654,6 +657,7 @@"showGeoJson": "Toon GeoJSON overlay","showValueAs": "Laat waarde zien als","customLabel": "Label",+ "customTimeSpan": "Aangepast","userCanEdit": "Kan waarde aanpassen","showHelperText": "Toon moment van bijwerken","tableSettings": "Tabeleigenschappen",@@ -724,6 +728,11 @@"since": "Vanaf","roles": "Rollen","restrictedUser": "Gebruiker met beperkte toegang",+ "saveRealmFailed": "Realm opslaan mislukt",+ "saveRealmSucceeded": "Realm opgeslagen!",+ "userDisconnected": "Verbinding verbroken",+ "userDisconnectFailed": "Verbinding verbreken niet gelukt",+ "somethingWentWrong": "Er ging iets mis, probeer het nog een keer.","lttb": "Standaard (LTTB)","withInterval": "Met interval","AVG": "Gemiddelde",diff --git a/manager/src/web/shared/locales/pt/or.json b/manager/src/web/shared/locales/pt/or.jsonindex 6b72a1bd2..771a77ae5 100644--- a/manager/src/web/shared/locales/pt/or.json+++ b/manager/src/web/shared/locales/pt/or.json@@ -229,10 +229,12 @@"realmRules": "Reino","globalRules": "Global","recipients": "Destinatários",- "JSON": "Quando-Então",- "FLOW": "Fluxo",- "GROOVY": "Groovy",- "JAVASCRIPT": "JavaScript",+ "rulesLanguages": {+ "JSON": "Quando-Então",+ "FLOW": "Fluxo",+ "GROOVY": "Groovy",+ "JAVASCRIPT": "JavaScript"+ },"gatewayConnection": "Manager interconectar","connectionDetails": "Detalhes de conexão","secured": "Seguro",diff --git a/manager/src/web/shared/locales/ro/or.json b/manager/src/web/shared/locales/ro/or.jsonindex 154e644ca..bc7a176b3 100644--- a/manager/src/web/shared/locales/ro/or.json+++ b/manager/src/web/shared/locales/ro/or.json@@ -307,10 +307,12 @@"realmRules": "Domeniu","globalRules": "Global","recipients": "Destinatari",- "JSON": "Dacă-Atunci",- "FLOW": "Flow",- "GROOVY": "Groovy",- "JAVASCRIPT": "JavaScript",+ "rulesLanguages": {+ "JSON": "Dacă-Atunci",+ "FLOW": "Flow",+ "GROOVY": "Groovy",+ "JAVASCRIPT": "JavaScript"+ },"gatewayConnection": "Interconectare manager","gateway": "Interconectare manager","connectionDetails": "DETALIILE CONEXIUNII",diff --git a/ui/app/manager/src/components/configuration/or-conf-json.ts b/ui/app/manager/src/components/configuration/or-conf-json.tsindex 761766bc4..92c8cb367 100644--- a/ui/app/manager/src/components/configuration/or-conf-json.ts+++ b/ui/app/manager/src/components/configuration/or-conf-json.ts@@ -20,7 +20,6 @@import { html, LitElement } from "lit";import { customElement, property } from "lit/decorators.js";import "@openremote/or-components/or-ace-editor";-import { i18next } from "@openremote/or-translate";import { DialogAction } from "@openremote/or-mwc-components/or-mwc-dialog";import { OrMwcDialog, showDialog } from "@openremote/or-mwc-components/or-mwc-dialog";import { createRef, Ref, ref } from "lit/directives/ref.js";@@ -64,11 +63,11 @@ export class OrConfJson extends LitElement {const dialogActions: DialogAction[] = [{actionName: "cancel",- content: i18next.t("cancel")+ content: "cancel"},{actionName: "ok",- content: i18next.t("update"),+ content: "update",action: _saveConfig},diff --git a/ui/app/manager/src/components/configuration/or-conf-map/or-conf-map-card.ts b/ui/app/manager/src/components/configuration/or-conf-map/or-conf-map-card.tsindex e63ccadcb..52a537706 100644--- a/ui/app/manager/src/components/configuration/or-conf-map/or-conf-map-card.ts+++ b/ui/app/manager/src/components/configuration/or-conf-map/or-conf-map-card.ts@@ -119,12 +119,12 @@ export class OrConfMapCard extends LitElement {const dialogActions: DialogAction[] = [{actionName: "cancel",- content: i18next.t("cancel"),+ content: "cancel",},{default: true,actionName: "ok",- content: i18next.t("yes"),+ content: "yes",action: () => {this.dispatchEvent(new CustomEvent("remove"));},@@ -306,7 +306,7 @@ export class OrConfMapCard extends LitElement {${when(this.canRemove, () => html`<or-mwc-input outlined .type="${InputType.BUTTON}" id="remove-map"- .label="${i18next.t("configuration.deleteMapCustomization")}"+ label="configuration.deleteMapCustomization"@click="${() => { this._showRemoveMapDialog(); }}"></or-mwc-input>`)}diff --git a/ui/app/manager/src/components/configuration/or-conf-map/or-conf-map-geojson.ts b/ui/app/manager/src/components/configuration/or-conf-map/or-conf-map-geojson.tsindex 5fe6d09b3..e0117eb4a 100644--- a/ui/app/manager/src/components/configuration/or-conf-map/or-conf-map-geojson.ts+++ b/ui/app/manager/src/components/configuration/or-conf-map/or-conf-map-geojson.ts@@ -1,6 +1,5 @@import { GeoJsonConfig } from "@openremote/model";import {DialogAction, OrMwcDialog } from "@openremote/or-mwc-components/or-mwc-dialog";-import { i18next } from "@openremote/or-translate";import { html, LitElement } from "lit";import { customElement, property, state, query } from "lit/decorators.js";import "@openremote/or-components/or-ace-editor";@@ -38,11 +37,11 @@ export class OrConfMapGeoJson extends LitElement {const actions: DialogAction[] = [{actionName: "close",- content: i18next.t("close")+ content: "close"},{actionName: "ok",- content: i18next.t("update"),+ content: "update",disabled: !this._jsonValid,action: () => {this.geoJson = this.parseGeoJson(this._aceEditorValue); // update with new value@@ -69,7 +68,7 @@ export class OrConfMapGeoJson extends LitElement {</style>`return html`- <or-mwc-input type="button" label="JSON" outlined icon="pencil" @click="${() => {this.openJsonEditor()}}"></or-mwc-input>+ <or-mwc-input type="button" label="geoJson" outlined icon="pencil" @click="${() => {this.openJsonEditor()}}"></or-mwc-input><or-mwc-dialog id="geojson-modal" .heading="${heading}" .content="${content}" .actions="${actions}" .styles="${styles}" .dismissAction="${null}"></or-mwc-dialog>`}diff --git a/ui/app/manager/src/components/configuration/or-conf-panel.ts b/ui/app/manager/src/components/configuration/or-conf-panel.tsindex 9747f960c..859b03a73 100644--- a/ui/app/manager/src/components/configuration/or-conf-panel.ts+++ b/ui/app/manager/src/components/configuration/or-conf-panel.ts@@ -92,7 +92,7 @@ export class OrConfPanel extends LitElement {<!-- Show an "ADD REALM" button if there are realms available to be added --><div style="display: flex; justify-content: space-between;">${when(availableRealms.length > 0, () => html`- <or-mwc-input id="btn-add-realm" .type="${InputType.BUTTON}" .label="${type === 'mapconfig' ? i18next.t('configuration.addMapCustomization') : i18next.t('configuration.addRealmCustomization')}" icon="plus"+ <or-mwc-input id="btn-add-realm" .type="${InputType.BUTTON}" label="${type === 'mapconfig' ? 'configuration.addMapCustomization' : 'configuration.addRealmCustomization'}" icon="plus"@click="${() => this._showAddingRealmDialog()}"></or-mwc-input>`)}@@ -145,12 +145,12 @@ export class OrConfPanel extends LitElement {const dialogActions: DialogAction[] = [{actionName: "cancel",- content: i18next.t("cancel")+ content: "cancel"},{default: true,actionName: "ok",- content: i18next.t("ok"),+ content: "ok",action: () => {if (this._addedRealm) {let realms = this.getRealmsProperty(this.config);diff --git a/ui/app/manager/src/components/configuration/or-conf-realm/or-conf-realm-card.ts b/ui/app/manager/src/components/configuration/or-conf-realm/or-conf-realm-card.tsindex abab272ab..d91487535 100644--- a/ui/app/manager/src/components/configuration/or-conf-realm/or-conf-realm-card.ts+++ b/ui/app/manager/src/components/configuration/or-conf-realm/or-conf-realm-card.ts@@ -233,12 +233,12 @@ export class OrConfRealmCard extends LitElement {const dialogActions: DialogAction[] = [{actionName: "cancel",- content: i18next.t("cancel")+ content: "cancel"},{default: true,actionName: "ok",- content: i18next.t("yes"),+ content: "yes",action: () => {this.dispatchEvent(new CustomEvent("remove"));}},@@ -362,7 +362,7 @@ export class OrConfRealmCard extends LitElement {${when(app.canRemove, () => html`<or-mwc-input outlined id="remove-realm" .type="${InputType.BUTTON}"- .label="${i18next.t("configuration.deleteRealmCustomization")}"+ label="configuration.deleteRealmCustomization"@click="${() => { app._showRemoveRealmDialog(); }}"></or-mwc-input>`)}diff --git a/ui/app/manager/src/headers.ts b/ui/app/manager/src/headers.tsindex 1a797e417..ab1d764fc 100644--- a/ui/app/manager/src/headers.ts+++ b/ui/app/manager/src/headers.ts@@ -2,7 +2,6 @@ import { manager } from "@openremote/core";import { AppStateKeyed, HeaderItem, OrApp } from "@openremote/or-app";import {AnyAction} from "@reduxjs/toolkit";import { getMapRoute } from "./routes";-import { i18next } from "@openremote/or-translate";export function headerItemMap<S extends AppStateKeyed, A extends AnyAction>(orApp: OrApp<S>): HeaderItem {return {diff --git a/ui/app/manager/src/pages/page-assets.ts b/ui/app/manager/src/pages/page-assets.tsindex ef561098a..b51111e60 100644--- a/ui/app/manager/src/pages/page-assets.ts+++ b/ui/app/manager/src/pages/page-assets.ts@@ -320,14 +320,14 @@ export class PageAssets extends Page<AssetsStateKeyed> {if ( !assetsIds.includes(parentId) ) {await manager.rest.api.AssetResource.updateParent(parentId, { assetIds : assetsIds });} else {- showSnackbar(undefined, i18next.t("moveAssetFailed"), i18next.t("dismiss"));+ showSnackbar(undefined, "moveAssetFailed", "dismiss");}} else {//So need to remove parent from all the selected assetsawait manager.rest.api.AssetResource.updateNoneParent({ assetIds : assetsIds });}} catch (e) {- showSnackbar(undefined, i18next.t("moveAssetFailed"), i18next.t("dismiss"));+ showSnackbar(undefined, "moveAssetFailed", "dismiss");}}diff --git a/ui/app/manager/src/pages/page-configuration.ts b/ui/app/manager/src/pages/page-configuration.tsindex 90087dde2..d48c6d1b3 100644--- a/ui/app/manager/src/pages/page-configuration.ts+++ b/ui/app/manager/src/pages/page-configuration.ts@@ -249,7 +249,7 @@ export class PageConfiguration extends Page<AppStateKeyed> {${i18next.t("appearance")}</div><div id="header-actions">- <or-mwc-input id="save-btn" .disabled="${!this.managerConfigurationChanged && !this.mapConfigChanged}" raised type="button" .label="${i18next.t("save")}"+ <or-mwc-input id="save-btn" .disabled="${!this.managerConfigurationChanged && !this.mapConfigChanged}" raised type="button" label="save"@click="${() => this.saveAllConfigs(this.managerConfiguration, this.mapConfig)}"></or-mwc-input></div>@@ -262,7 +262,7 @@ export class PageConfiguration extends Page<AppStateKeyed> {`, () => html`<div class="notFound-container"><span>${i18next.t('configuration.managerConfigNotFound')}</span>- <or-mwc-input type="${InputType.BUTTON}" label="${i18next.t('configuration.tryAgain')}"+ <or-mwc-input type="${InputType.BUTTON}" label="configuration.tryAgain"@or-mwc-input-changed="${() => this.getManagerConfig().then(val => {this.managerConfiguration = val;}).catch(e => console.error(e))}"@@ -278,7 +278,7 @@ export class PageConfiguration extends Page<AppStateKeyed> {`, () => html`<div class="notFound-container"><span>${i18next.t('configuration.mapSettingsNotFound')}</span>- <or-mwc-input type="${InputType.BUTTON}" label="${i18next.t('configuration.tryAgain')}"+ <or-mwc-input type="${InputType.BUTTON}" label="configuration.tryAgain"@or-mwc-input-changed="${() => this.getMapConfig().then(val => {this.mapConfig = val;}).catch(e => console.error(e))}"diff --git a/ui/app/manager/src/pages/page-export.ts b/ui/app/manager/src/pages/page-export.tsindex b78d8e140..9ddc65ada 100644--- a/ui/app/manager/src/pages/page-export.ts+++ b/ui/app/manager/src/pages/page-export.ts@@ -265,8 +265,8 @@ export class PageExport extends Page<AppStateKeyed> {<or-mwc-input .type="${InputType.DATETIME}" label="${Util.capitaliseFirstLetter(i18next.t("to"))}" .value="${moment(this.latestTimestamp).toDate()}" @or-mwc-input-changed="${(evt: OrInputChangedEvent) => this.latestTimestamp = evt.detail.value}"></or-mwc-input></div><div class="export-btn-wrapper">- <or-mwc-input .disabled="${this.isClearExportBtnDisabled}" class="button" .type="${InputType.BUTTON}" label="${i18next.t("clearTable")}" @click="${() => this.clearSelection()}"></or-mwc-input>- <or-mwc-input .disabled="${this.isExportBtnDisabled}" class="button" raised .type="${InputType.BUTTON}" label="${i18next.t("export")}" @click="${() => this.export()}"></or-mwc-input>+ <or-mwc-input .disabled="${this.isClearExportBtnDisabled}" class="button" .type="${InputType.BUTTON}" label="clearTable" @click="${() => this.clearSelection()}"></or-mwc-input>+ <or-mwc-input .disabled="${this.isExportBtnDisabled}" class="button" raised .type="${InputType.BUTTON}" label="export" @click="${() => this.export()}"></or-mwc-input></div></div></div>diff --git a/ui/app/manager/src/pages/page-gateway.ts b/ui/app/manager/src/pages/page-gateway.tsindex 882015a35..912c08824 100644--- a/ui/app/manager/src/pages/page-gateway.ts+++ b/ui/app/manager/src/pages/page-gateway.ts@@ -189,9 +189,9 @@ export class PageGateway extends Page<AppStateKeyed> {<or-mwc-input .label="${i18next.t("disabled")}" .type="${InputType.SWITCH}" ?disabled="${this._loading || this._readonly}" .value="${connection ? connection.disabled : false}" @or-mwc-input-changed="${(e: OrInputChangedEvent) => this._setConnectionProperty("disabled", e.detail.value)}"></or-mwc-input></div><div id="buttons">- <or-mwc-input .label="${i18next.t("reset")}" ?disabled="${!this._dirty || this._loading || this._readonly}" .type="${InputType.BUTTON}" raised @click="${() => this._reset()}"></or-mwc-input>- <or-mwc-input .label="${i18next.t("delete")}" ?disabled="${this._loading || this._readonly}" .type="${InputType.BUTTON}" raised @click="${() => this._delete()}"></or-mwc-input>- <or-mwc-input .label="${i18next.t("save")}" ?disabled="${!this._dirty || this._loading || this._readonly}" .type="${InputType.BUTTON}" raised @click="${() => this._save()}"></or-mwc-input>+ <or-mwc-input label="reset" ?disabled="${!this._dirty || this._loading || this._readonly}" .type="${InputType.BUTTON}" raised @click="${() => this._reset()}"></or-mwc-input>+ <or-mwc-input label="delete" ?disabled="${this._loading || this._readonly}" .type="${InputType.BUTTON}" raised @click="${() => this._delete()}"></or-mwc-input>+ <or-mwc-input label="save" ?disabled="${!this._dirty || this._loading || this._readonly}" .type="${InputType.BUTTON}" raised @click="${() => this._save()}"></or-mwc-input></div></or-panel></div>diff --git a/ui/app/manager/src/pages/page-insights.ts b/ui/app/manager/src/pages/page-insights.tsindex 504503104..2790b253e 100644--- a/ui/app/manager/src/pages/page-insights.ts+++ b/ui/app/manager/src/pages/page-insights.ts@@ -5,7 +5,6 @@ import {DataViewerConfig, OrDataViewer} from "@openremote/or-data-viewer";import {Page, PageProvider, router} from "@openremote/or-app";import {AppStateKeyed} from "@openremote/or-app";import {Store} from "@reduxjs/toolkit";-import i18next from "i18next";import {createSelector} from "reselect";import { manager } from "@openremote/core";import "@openremote/or-dashboard-builder";@@ -99,7 +98,7 @@ export class PageInsights extends Page<AppStateKeyed> {this._userId = response.data.id;}).catch((ex) => {console.error(ex);- showSnackbar(undefined, i18next.t('errorOccurred'));+ showSnackbar(undefined, "errorOccurred");})}diff --git a/ui/app/manager/src/pages/page-provisioning.ts b/ui/app/manager/src/pages/page-provisioning.tsindex fdfd389c4..e3485d805 100644--- a/ui/app/manager/src/pages/page-provisioning.ts+++ b/ui/app/manager/src/pages/page-provisioning.ts@@ -287,7 +287,7 @@ export class PageProvisioning extends Page<AppStateKeyed> {}if (!response.data) {- showSnackbar(undefined, errorMsg, i18next.t("dismiss"));+ showSnackbar(undefined, errorMsg, "dismiss");console.error(errorMsg + ": response = " + response.statusText);return false;}@@ -447,16 +447,16 @@ export class PageProvisioning extends Page<AppStateKeyed> {</div><div class="row" style="margin-bottom: 0;">- ${config.id ? html`<or-mwc-input .label="${i18next.t("delete")}"+ ${config.id ? html`<or-mwc-input label="delete".type="${InputType.BUTTON}"@click="${() => this._deleteConfig(config)}"></or-mwc-input>` : ``}- ${!config.id ? html`<or-mwc-input .label="${i18next.t("cancel")}"+ ${!config.id ? html`<or-mwc-input label="cancel".type="${InputType.BUTTON}"@click="${() => addCancel()}"></or-mwc-input>` : ``}<or-mwc-input class="savebtn" style="margin-left: auto;"- .label="${i18next.t(config.id ? "save" : "create")}"+ label="${config.id ? "save" : "create"}".type="${InputType.BUTTON}"@click="${() => this._createUpdateConfig(config)}"></or-mwc-input></div>diff --git a/ui/app/manager/src/pages/page-realms.ts b/ui/app/manager/src/pages/page-realms.tsindex e580bf982..ad7374cfa 100644--- a/ui/app/manager/src/pages/page-realms.ts+++ b/ui/app/manager/src/pages/page-realms.ts@@ -318,12 +318,12 @@ export class PageRealms extends Page<AppStateKeyed> {<div class="row" style="margin-bottom: 0;">${realm.id && !readonly ? html`${realm.name !== "master" && manager.isSuperUser() ? html`- <or-mwc-input .label="${i18next.t("delete")}" .type="${InputType.BUTTON}" .disabled="${manager.displayRealm === realm.name}" @or-mwc-input-changed="${() => this._deleteRealm(realm)}"></or-mwc-input>+ <or-mwc-input label="delete" .type="${InputType.BUTTON}" .disabled="${manager.displayRealm === realm.name}" @or-mwc-input-changed="${() => this._deleteRealm(realm)}"></or-mwc-input>` : ``}- <or-mwc-input style="margin-left: auto;" .label="${i18next.t("save")}" .type="${InputType.BUTTON}" @or-mwc-input-changed="${() => this._updateRealm(realm)}"></or-mwc-input>+ <or-mwc-input style="margin-left: auto;" label="save" .type="${InputType.BUTTON}" @or-mwc-input-changed="${() => this._updateRealm(realm)}"></or-mwc-input>` : !readonly ? html`- <or-mwc-input .label="${i18next.t("cancel")}" .type="${InputType.BUTTON}" @or-mwc-input-changed="${() => {this._realms.splice(-1,1); this._realms = [...this._realms]}}"></or-mwc-input>- <or-mwc-input style="margin-left: auto;" .label="${i18next.t("create")}" .type="${InputType.BUTTON}" @or-mwc-input-changed="${() => this._createRealm(realm)}"></or-mwc-input>+ <or-mwc-input label="cancel" .type="${InputType.BUTTON}" @or-mwc-input-changed="${() => {this._realms.splice(-1,1); this._realms = [...this._realms]}}"></or-mwc-input>+ <or-mwc-input style="margin-left: auto;" label="create" .type="${InputType.BUTTON}" @or-mwc-input-changed="${() => this._createRealm(realm)}"></or-mwc-input>`: ``}</div></div>@@ -361,9 +361,9 @@ export class PageRealms extends Page<AppStateKeyed> {private async _updateRealm(realm) {const response = await manager.rest.api.RealmResource.update(realm.name, realm);if (response.status === 204) {- showSnackbar(undefined, i18next.t("saveRealmSucceeded"));+ showSnackbar(undefined, "saveRealmSucceeded");} else {- showSnackbar(undefined, i18next.t("saveRealmFailed"));+ showSnackbar(undefined, "saveRealmFailed");}//TODO improve this so that header realm picker is updatedwindow.location.reload();@@ -372,9 +372,9 @@ export class PageRealms extends Page<AppStateKeyed> {private async _createRealm(realm) {await manager.rest.api.RealmResource.create(realm).then(response => {if (response.status === 204) {- showSnackbar(undefined, i18next.t("saveRealmSucceeded"));+ showSnackbar(undefined, "saveRealmSucceeded");} else {- showSnackbar(undefined, i18next.t("saveRealmFailed"));+ showSnackbar(undefined, "saveRealmFailed");}//TODO improve this so that header realm picker is updatedwindow.location.reload();@@ -391,7 +391,7 @@ export class PageRealms extends Page<AppStateKeyed> {await manager.rest.api.RealmResource.delete(realm.name);this._realms = this._realms.filter(r => r !== realm);} catch (e) {- showSnackbar(undefined, i18next.t("realmDeleteFailed"), i18next.t("dismiss"));+ showSnackbar(undefined, "realmDeleteFailed", "dismiss");}};@@ -411,13 +411,13 @@ export class PageRealms extends Page<AppStateKeyed> {{actionName: "ok",disabled: true,- content: html`<or-mwc-input .type="${InputType.BUTTON}" ${ref(okBtnRef)} @or-mwc-input-changed="${(ev: MouseEvent) => {if ((ev.currentTarget as OrMwcInput).disabled) ev.stopPropagation()}}" disabled .label="${i18next.t("ok")}"></or-mwc-input>`,+ content: html`<or-mwc-input .type="${InputType.BUTTON}" ${ref(okBtnRef)} @or-mwc-input-changed="${(ev: MouseEvent) => {if ((ev.currentTarget as OrMwcInput).disabled) ev.stopPropagation()}}" disabled label="ok"></or-mwc-input>`,action: doDelete},{default: true,actionName: "cancel",- content: i18next.t("cancel")+ content: "cancel"}];diff --git a/ui/app/manager/src/pages/page-roles.ts b/ui/app/manager/src/pages/page-roles.tsindex 3fd9d6b25..f05192114 100644--- a/ui/app/manager/src/pages/page-roles.ts+++ b/ui/app/manager/src/pages/page-roles.ts@@ -405,11 +405,11 @@ export class PageRoles extends Page<AppStateKeyed> {${readonly ? html`` : html`<div class="row" style="margin-bottom: 0;">${role.id ? html`- <or-mwc-input .label="${i18next.t(" delete ")}" .type="${InputType.BUTTON}" @click="${() => this._deleteRole(role, index)}"></or-mwc-input>- <or-mwc-input ?disabled="${this._compositeRoles.some(role => role.compositeRoleIds.length === 0)}" style="margin-left: auto;" .label="${i18next.t(" save ")}" .type="${InputType.BUTTON}" @click="${() => this._updateRoles()}"></or-mwc-input>+ <or-mwc-input label="delete" .type="${InputType.BUTTON}" @click="${() => this._deleteRole(role, index)}"></or-mwc-input>+ <or-mwc-input ?disabled="${this._compositeRoles.some(role => role.compositeRoleIds.length === 0)}" style="margin-left: auto;" label="save" .type="${InputType.BUTTON}" @click="${() => this._updateRoles()}"></or-mwc-input>` : html`- <or-mwc-input .label="${i18next.t(" cancel ")}" .type="${InputType.BUTTON}" @click="${() => { this._compositeRoles.splice(-1, 1); this._compositeRoles = [...this._compositeRoles] }}"></or-mwc-input>- <or-mwc-input ?disabled="${this._compositeRoles.some(role => role.compositeRoleIds.length === 0)}" style="margin-left: auto;" .label="${i18next.t(" create ")}" .type="${InputType.BUTTON}" @click="${() => this._updateRoles()}"></or-mwc-input>+ <or-mwc-input label="cancel" .type="${InputType.BUTTON}" @click="${() => { this._compositeRoles.splice(-1, 1); this._compositeRoles = [...this._compositeRoles] }}"></or-mwc-input>+ <or-mwc-input ?disabled="${this._compositeRoles.some(role => role.compositeRoleIds.length === 0)}" style="margin-left: auto;" label="create" .type="${InputType.BUTTON}" @click="${() => this._updateRoles()}"></or-mwc-input>`}</div>`}diff --git a/ui/app/manager/src/pages/page-users.ts b/ui/app/manager/src/pages/page-users.tsindex 97d856fcf..cfd6ca785 100644--- a/ui/app/manager/src/pages/page-users.ts+++ b/ui/app/manager/src/pages/page-users.ts@@ -256,7 +256,7 @@ export class PageUsers extends Page<AppStateKeyed> {}if (!response.data) {- showSnackbar(undefined, errorMsg, i18next.t("dismiss"));+ showSnackbar(undefined, errorMsg, "dismiss");console.error(errorMsg + ": response = " + response.statusText);return false;}@@ -298,19 +298,19 @@ export class PageUsers extends Page<AppStateKeyed> {const roleResponse = await manager.rest.api.UserResource.getRoles(manager.displayRealm);- if (!this.responseAndStateOK(stateChecker, roleResponse, i18next.t("loadFailedRoles"))) {+ if (!this.responseAndStateOK(stateChecker, roleResponse, "loadFailedRoles")) {return;}const realmResponse = await manager.rest.api.RealmResource.get(manager.displayRealm);- if (!this.responseAndStateOK(stateChecker, realmResponse, i18next.t("loadFailedRoles"))) {+ if (!this.responseAndStateOK(stateChecker, realmResponse, "loadFailedRoles")) {return;}const usersResponse = await manager.rest.api.UserResource.query({realmPredicate: {name: manager.displayRealm}} as UserQuery);- if (!this.responseAndStateOK(stateChecker, usersResponse, i18next.t("loadFailedUsers"))) {+ if (!this.responseAndStateOK(stateChecker, usersResponse, "loadFailedUsers")) {return;}@@ -327,7 +327,7 @@ export class PageUsers extends Page<AppStateKeyed> {let result = false;if ((this._registrationEmailAsUsername && !user.serviceAccount) ? !user.email : !user.username) {- showSnackbar(undefined, i18next.t((this._registrationEmailAsUsername && !user.serviceAccount) ? "noEmailSet" : "noUsernameSet"), i18next.t("dismiss"));+ showSnackbar(undefined, ((this._registrationEmailAsUsername && !user.serviceAccount) ? "noEmailSet" : "noUsernameSet"), "dismiss");return false;}@@ -359,9 +359,9 @@ export class PageUsers extends Page<AppStateKeyed> {if (isAxiosError(e)) {console.error((isUpdate ? "save user failed" : "create user failed") + ": response = " + e.response.statusText);if (e.response.status === 400) {- showSnackbar(undefined, i18next.t(isUpdate ? "saveUserFailed" : "createUserFailed"), i18next.t("dismiss"));+ showSnackbar(undefined, (isUpdate ? "saveUserFailed" : "createUserFailed"), "dismiss");} else if (e.response.status === 403) {- showSnackbar(undefined, i18next.t('userAlreadyExists'))+ showSnackbar(undefined, "userAlreadyExists")}}result = false;@@ -585,12 +585,12 @@ export class PageUsers extends Page<AppStateKeyed> {// Load users assigned rolesconst userRolesResponse = await (manager.rest.api.UserResource.getUserRoles(manager.displayRealm, user.id));- if (!this.responseAndStateOK(() => true, userRolesResponse, i18next.t("loadFailedUserInfo"))) {+ if (!this.responseAndStateOK(() => true, userRolesResponse, "loadFailedUserInfo")) {return;}const userRealmRolesResponse = await manager.rest.api.UserResource.getUserRealmRoles(manager.displayRealm, user.id);- if (!this.responseAndStateOK(() => true, userRolesResponse, i18next.t("loadFailedUserInfo"))) {+ if (!this.responseAndStateOK(() => true, userRolesResponse, "loadFailedUserInfo")) {return;}@@ -598,7 +598,7 @@ export class PageUsers extends Page<AppStateKeyed> {realm: manager.displayRealm,userId: user.id});- if (!this.responseAndStateOK(() => true, userAssetLinksResponse, i18next.t("loadFailedUserInfo"))) {+ if (!this.responseAndStateOK(() => true, userAssetLinksResponse, "loadFailedUserInfo")) {return;}@@ -654,7 +654,7 @@ export class PageUsers extends Page<AppStateKeyed> {{default: true,actionName: "cancel",- content: i18next.t("cancel"),+ content: "cancel",action: () => {user.userAssetLinks = user.previousAssetLinks;user.previousAssetLinks = undefined;@@ -663,7 +663,7 @@ export class PageUsers extends Page<AppStateKeyed> {},{actionName: "ok",- content: i18next.t("ok"),+ content: "ok",action: () => {openBtn.disabled = false;this.onUserChanged(suffix);@@ -768,13 +768,13 @@ export class PageUsers extends Page<AppStateKeyed> {protected async getSessionLoader(user: UserModel): Promise<TemplateResult> {const userSessionsResponse = await (manager.rest.api.UserResource.getUserSessions(manager.displayRealm, user.id));- if (!this.responseAndStateOK(() => userSessionsResponse.status === 200, userSessionsResponse, i18next.t("loadFailedUserInfo"))) {+ if (!this.responseAndStateOK(() => userSessionsResponse.status === 200, userSessionsResponse, "loadFailedUserInfo")) {return html``;}const cols = [i18next.t("address"), i18next.t("since"), ""];const rows = userSessionsResponse.data.map((session) => {- return [session.remoteAddress, new Date(session.startTimeMillis), html`<or-mwc-input .type="${InputType.BUTTON}" label="${i18next.t("disconnect")}" @or-mwc-input-changed="${() => {this.disconnectSession(user, session)}}"></or-mwc-input>`]+ return [session.remoteAddress, new Date(session.startTimeMillis), html`<or-mwc-input .type="${InputType.BUTTON}" label="disconnect" @or-mwc-input-changed="${() => {this.disconnectSession(user, session)}}"></or-mwc-input>`]});if (rows.length < 1){return html`<or-mwc-table .rows="${[['This user has no active MQTT sessions',null]]}" .config="${{stickyFirstColumn:false}}" .columns="${cols}"></or-mwc-table>`;@@ -987,7 +987,7 @@ export class PageUsers extends Page<AppStateKeyed> {this._saveUserPromise = this._createUpdateUser(user, user.id ? 'update' : 'create').then((result) => {// Return to the users page on successful user create/updateif (result) {- showSnackbar(undefined, i18next.t("saveUserSucceeded"));+ showSnackbar(undefined, "saveUserSucceeded");this.reset();}}).catch((ex) => {@@ -1049,9 +1049,9 @@ export class PageUsers extends Page<AppStateKeyed> {protected disconnectSession(user: UserModel, session: UserSession) {this._sessionLoader = manager.rest.api.UserResource.disconnectUserSession(manager.displayRealm, session.ID)- .then(() => showSnackbar(undefined, i18next.t("userDisconnected")))+ .then(() => showSnackbar(undefined, "userDisconnected")).catch((e) => {- showSnackbar(undefined, i18next.t("userDisconnectFailed"));+ showSnackbar(undefined, "userDisconnectFailed");console.error("Failed to disconnect user", e);}).then(() =>this.getSessionLoader(user));diff --git a/ui/component/or-asset-tree/src/index.ts b/ui/component/or-asset-tree/src/index.tsindex 5f9cd4622..4597ef17f 100644--- a/ui/component/or-asset-tree/src/index.ts+++ b/ui/component/or-asset-tree/src/index.ts@@ -545,7 +545,7 @@ export class OrAssetTree extends subscribe(manager)(LitElement) {style="margin-top: 10px;"disabled></or-mwc-input><div style="margin-top: 10px;">- <or-mwc-input style="float:left;" type="${InputType.BUTTON}" .label="${i18next.t("filter.clear")}" @or-mwc-input-changed="${() => {+ <or-mwc-input style="float:left;" type="${InputType.BUTTON}" label="filter.clear" @or-mwc-input-changed="${() => {// Wipe the current value and hide the clear buttonthis._filterInput.value = undefined;@@ -561,7 +561,7 @@ export class OrAssetTree extends subscribe(manager)(LitElement) {// Call filteringthis._doFiltering();}}"></or-mwc-input>- <or-mwc-input style="float: right;" type="${InputType.BUTTON}" .label="${i18next.t("filter.action")}" raised @or-mwc-input-changed="${() => {+ <or-mwc-input style="float: right;" type="${InputType.BUTTON}" label="filter.action" raised @or-mwc-input-changed="${() => {this._filterFromSettings();}}"></or-mwc-input></div>@@ -1235,7 +1235,7 @@ export class OrAssetTree extends subscribe(manager)(LitElement) {} catch (e) {this._filter.assetType.forEach((assetT: string) => {if(this._assetTypes.findIndex((assetD: AssetDescriptor) => { return assetD.name === assetT; }) === -1) {- showSnackbar(undefined, i18next.t('filter.assetTypeDoesNotExist'), i18next.t("dismiss"));+ showSnackbar(undefined, "filter.assetTypeDoesNotExist", "dismiss");}});foundAssetIds = [];@@ -1392,11 +1392,11 @@ export class OrAssetTree extends subscribe(manager)(LitElement) {.setActions([{actionName: "cancel",- content: i18next.t("cancel")+ content: "cancel"},{actionName: "add",- content: html`<or-mwc-input id="add-btn" class="button" .type="${InputType.BUTTON}" label="${i18next.t("add")}" disabled></or-mwc-input>`,+ content: html`<or-mwc-input id="add-btn" class="button" .type="${InputType.BUTTON}" label="add" disabled></or-mwc-input>`,action: () => {const addAssetDialog = dialog.shadowRoot!.getElementById("add-panel") as OrAddAssetDialog;diff --git a/ui/component/or-asset-viewer/src/index.ts b/ui/component/or-asset-viewer/src/index.tsindex 29e39f3fc..4404e5015 100644--- a/ui/component/or-asset-viewer/src/index.ts+++ b/ui/component/or-asset-viewer/src/index.ts@@ -433,14 +433,14 @@ function getPanelContent(id: string, assetInfo: AssetInfo, hostElement: LitElememanager.rest.api.AgentResource.doProtocolAssetDiscovery(asset.id!).then(response => {if (response.status !== 200) {- showSnackbar(undefined, "Something went wrong, please try again", i18next.t("dismiss"));+ showSnackbar(undefined, "somethingWentWrong", "dismiss");} else {- showSnackbar(undefined, "Import successful! Added "+response.data.length+" assets!", i18next.t("dismiss"));+ showSnackbar(undefined, "Import successful! Added "+response.data.length+" assets!", "dismiss");console.info(response.data, response) //todo: do something with this response}}).catch((err) => {- showSnackbar(undefined, "Something went wrong, please try again", i18next.t("dismiss"));+ showSnackbar(undefined, "somethingWentWrong", "dismiss");console.error(err);}).finally(() => {@@ -483,7 +483,7 @@ function getPanelContent(id: string, assetInfo: AssetInfo, hostElement: LitElemereader.onload = () => {if (!reader.result) {- showSnackbar(undefined, "Something went wrong, please try again", i18next.t("dismiss"));+ showSnackbar(undefined, "somethingWentWrong", "dismiss");console.error(reader);} else {let encoded = reader.result.toString().replace(/^data:(.*,)?/, '');@@ -499,14 +499,14 @@ function getPanelContent(id: string, assetInfo: AssetInfo, hostElement: LitElememanager.rest.api.AgentResource.doProtocolAssetImport(asset.id!, fileInfo, undefined, {timeout: 30000}).then(response => {if (response.status !== 200) {- showSnackbar(undefined, "Something went wrong, please try again", i18next.t("dismiss"));+ showSnackbar(undefined, "somethingWentWrong", "dismiss");} else {- showSnackbar(undefined, "Import successful! Added "+response.data.length+" assets!", i18next.t("dismiss"));+ showSnackbar(undefined, "Import successful! Added "+response.data.length+" assets!", "dismiss");console.info(response.data, response)}}).catch((err) => {- showSnackbar(undefined, "Something went wrong, please try again", i18next.t("dismiss"));+ showSnackbar(undefined, "somethingWentWrong", "dismiss");console.error(err);}).finally(() => {@@ -526,7 +526,7 @@ function getPanelContent(id: string, assetInfo: AssetInfo, hostElement: LitElemeif (descriptor.assetImport) {content = html`<div id="fileupload">- <or-mwc-input style="flex: 0 1 auto;" outlined .label="${i18next.t("selectFile")}" .type="${InputType.BUTTON}" @or-mwc-input-changed="${() => hostElement.shadowRoot!.getElementById('fileupload-elem')!.click()}">+ <or-mwc-input style="flex: 0 1 auto;" outlined label="selectFile" .type="${InputType.BUTTON}" @or-mwc-input-changed="${() => hostElement.shadowRoot!.getElementById('fileupload-elem')!.click()}"><input id="fileupload-elem" name="configfile" type="file" accept=".*" @change="${() => updateFileName()}"/></or-mwc-input><or-mwc-input style="flex: 1 1 auto; margin: 0 4px 0 10px;" id="filename-elem" .label="${i18next.t("file")}" .type="${InputType.TEXT}" disabled></or-mwc-input>@@ -537,11 +537,11 @@ function getPanelContent(id: string, assetInfo: AssetInfo, hostElement: LitEleme}else if (descriptor.assetDiscovery) {content = html`- <or-mwc-input outlined id="discover-btn" .type="${InputType.BUTTON}" .label="${i18next.t("discoverAssets")}" @or-mwc-input-changed="${() => discoverAssets()}"></or-mwc-input>- <or-mwc-input id="cancel-discover-btn" .type="${InputType.BUTTON}" .label="${i18next.t("cancel")}" @or-mwc-input-changed="${() => cancelDiscovery()}" hidden style="margin-left:20px"></or-mwc-input>+ <or-mwc-input outlined id="discover-btn" .type="${InputType.BUTTON}" label="discoverAssets" @or-mwc-input-changed="${() => discoverAssets()}"></or-mwc-input>+ <or-mwc-input id="cancel-discover-btn" .type="${InputType.BUTTON}" label="cancel" @or-mwc-input-changed="${() => cancelDiscovery()}" hidden style="margin-left:20px"></or-mwc-input>`;} else {- showSnackbar(undefined, "agent type doesn't support a known protocol to add assets", i18next.t("dismiss"));+ showSnackbar(undefined, "agent type doesn't support a known protocol to add assets", "dismiss");}return html`@@ -999,7 +999,7 @@ export async function saveAsset(asset: Asset): Promise<SaveResult> {}} catch (e) {success = false;- showSnackbar(undefined, i18next.t(isUpdate ? "saveAssetFailed" : "createAssetFailed"), i18next.t("dismiss"));+ showSnackbar(undefined, (isUpdate ? "saveAssetFailed" : "createAssetFailed"), "dismiss");console.error("Failed to save asset", e);}@@ -1267,18 +1267,18 @@ export class OrAssetViewer extends subscribe(manager)(translate(i18next)(LitElemconst dialogActions: DialogAction[] = [{actionName: "clear",- content: i18next.t("none"),+ content: "none",action: clearParent},{actionName: "ok",- content: i18next.t("ok"),+ content: "ok",action: setParent},{default: true,actionName: "cancel",- content: i18next.t("cancel")+ content: "cancel"}];@@ -1326,7 +1326,7 @@ export class OrAssetViewer extends subscribe(manager)(translate(i18next)(LitElem<div class="msg"><div class="multipleAssetsView"><or-translate value="multiAssetSelected" .options="${ { assetNbr: this.ids!.length } }"></or-translate>- <or-mwc-input .type="${InputType.BUTTON}" .label="${i18next.t("changeParent")}" @click="${() => this._onParentChangeClick()}" outlined></or-mwc-input>+ <or-mwc-input .type="${InputType.BUTTON}" label="changeParent" @click="${() => this._onParentChangeClick()}" outlined></or-mwc-input></div></div>`;@@ -1428,7 +1428,7 @@ export class OrAssetViewer extends subscribe(manager)(translate(i18next)(LitElem</div><div id="right-wrapper" class="mobileHidden">${validationErrors.length === 0 ? (asset!.createdOn ? html`<or-translate id="created-time" class="tabletHidden" value="createdOnWithDate" .options="${{ date: new Date(asset!.createdOn!) } as TOptions<InitOptions>}"></or-translate>` : ``) : html`<span id="error-wrapper" .title="${validationErrors.join("\n")}"><or-icon icon="alert"></or-icon><or-translate class="tabletHidden" value="validation.invalidAsset"></or-translate></span>`}- ${editMode ? html`<or-mwc-input id="save-btn" .disabled="${!this.isModified()}" raised .type="${InputType.BUTTON}" .label="${i18next.t("save")}" @or-mwc-input-changed="${() => this._onSaveClicked()}"></or-mwc-input>` : ``}+ ${editMode ? html`<or-mwc-input id="save-btn" .disabled="${!this.isModified()}" raised .type="${InputType.BUTTON}" label="save" @or-mwc-input-changed="${() => this._onSaveClicked()}"></or-mwc-input>` : ``}${!this._isReadonly() ? html`<or-mwc-input id="edit-btn" .disabled="${!this._assetInfo.asset.id}" outlined .type="${InputType.BUTTON}" .value="${this.editMode}" .label="${this.editMode ? i18next.t("viewAsset") : i18next.t("editAsset")}" icon="${this.editMode ? "eye" : "pencil"}" @or-mwc-input-changed="${() => this._onEditToggleClicked(!this.editMode!)}"></or-mwc-input>`: ``}</div>diff --git a/ui/component/or-asset-viewer/src/or-edit-asset-panel.ts b/ui/component/or-asset-viewer/src/or-edit-asset-panel.tsindex 230e6ab25..9b906d4bd 100644--- a/ui/component/or-asset-viewer/src/or-edit-asset-panel.ts+++ b/ui/component/or-asset-viewer/src/or-edit-asset-panel.ts@@ -280,7 +280,7 @@ export class OrEditAssetPanel extends LitElement {<tr class="mdc-data-table__row"><td colspan="4"><div class="item-add-attribute">- <or-mwc-input .type="${InputType.BUTTON}" .label="${i18next.t("addAttribute")}" icon="plus" @or-mwc-input-changed="${() => this._addAttribute()}"></or-mwc-input>+ <or-mwc-input .type="${InputType.BUTTON}" label="addAttribute" icon="plus" @or-mwc-input-changed="${() => this._addAttribute()}"></or-mwc-input></div></td></tr>@@ -344,7 +344,7 @@ export class OrEditAssetPanel extends LitElement {${metaTemplatesAndValidators.map((metaTemplateAndValidator) => metaTemplateAndValidator.template)}</div><div class="item-add">- <or-mwc-input .type="${InputType.BUTTON}" .label="${i18next.t("addMetaItems")}" icon="plus" @or-mwc-input-changed="${() => this._addMetaItems(attribute)}"></or-mwc-input>+ <or-mwc-input .type="${InputType.BUTTON}" label="addMetaItems" icon="plus" @or-mwc-input-changed="${() => this._addMetaItems(attribute)}"></or-mwc-input></div></div></div>@@ -482,7 +482,7 @@ export class OrEditAssetPanel extends LitElement {.setActions([{actionName: "cancel",- content: i18next.t("cancel")+ content: "cancel"},{default: true,@@ -493,7 +493,7 @@ export class OrEditAssetPanel extends LitElement {this._onModified();}},- content: html`<or-mwc-input id="add-btn" .type="${InputType.BUTTON}" disabled .label="${i18next.t("add")}"+ content: html`<or-mwc-input id="add-btn" .type="${InputType.BUTTON}" disabled label="add"@or-mwc-input-changed="${(ev: Event) => { if (isDisabled(attr)) { ev.stopPropagation(); return false; } } }"></or-mwc-input>`}])@@ -545,7 +545,7 @@ export class OrEditAssetPanel extends LitElement {.setActions([{actionName: "cancel",- content: i18next.t("cancel")+ content: "cancel"},{default: true,@@ -566,7 +566,7 @@ export class OrEditAssetPanel extends LitElement {});}},- content: i18next.t("add")+ content: "add"}]).setDismissAction(null));@@ -608,18 +608,18 @@ export class OrEditAssetPanel extends LitElement {const dialogActions: DialogAction[] = [{actionName: "clear",- content: i18next.t("none"),+ content: "none",action: clearParent},{actionName: "ok",- content: i18next.t("ok"),+ content: "ok",action: setParent},{default: true,actionName: "cancel",- content: i18next.t("cancel")+ content: "cancel"}];@@ -658,7 +658,7 @@ export class OrEditAssetPanel extends LitElement {return html`<div id="parent-edit-wrapper">${getPropertyTemplate(this.asset, "parentId", this, undefined, undefined, {readonly: true, label: i18next.t("parent")})}- <or-mwc-input id="change-parent-btn" type="${InputType.BUTTON}" outlined .label="${i18next.t("edit")}" @or-mwc-input-changed="${openDialog}"></or-mwc-input>+ <or-mwc-input id="change-parent-btn" type="${InputType.BUTTON}" outlined label="edit" @or-mwc-input-changed="${openDialog}"></or-mwc-input></div>`;}diff --git a/ui/component/or-attribute-card/src/index.ts b/ui/component/or-attribute-card/src/index.tsindex ae4ff1582..c99fd3548 100644--- a/ui/component/or-attribute-card/src/index.ts+++ b/ui/component/or-attribute-card/src/index.ts@@ -360,7 +360,7 @@ export class OrAttributeCard extends LitElement {<div class="panel-content-wrapper"><div class="panel-content">${this.shouldShowControls() ? html`- <or-mwc-input class="button" .type="${InputType.BUTTON}" label="${i18next.t("selectAttribute")}" icon="plus" @or-mwc-input-changed="${() => this._openDialog("editAttribute")}"></or-mwc-input>+ <or-mwc-input class="button" .type="${InputType.BUTTON}" label="selectAttribute" icon="plus" @or-mwc-input-changed="${() => this._openDialog("editAttribute")}"></or-mwc-input>` : html`<span>${i18next.t('noAttributeConnected')}</span>`}@@ -377,7 +377,7 @@ export class OrAttributeCard extends LitElement {<div class="panel-content"><span>${i18next.t("couldNotRetrieveAttribute")}</span>${this.shouldShowControls() ? html`- <or-mwc-input class="button" .type="${InputType.BUTTON}" label="${i18next.t("selectAttribute")}" icon="plus" @or-mwc-input-changed="${() => this._openDialog("editAttribute")}"></or-mwc-input>+ <or-mwc-input class="button" .type="${InputType.BUTTON}" label="selectAttribute" icon="plus" @or-mwc-input-changed="${() => this._openDialog("editAttribute")}"></or-mwc-input>` : undefined}</div></div>@@ -439,7 +439,7 @@ export class OrAttributeCard extends LitElement {${this.shouldShowControls() ? html`<div class="period-selector-wrapper">${getContentWithMenuTemplate(- html`<or-mwc-input class="period-selector" .type="${InputType.BUTTON}" .label="${i18next.t(this.period ? this.period : "-")}"></or-mwc-input>`,+ html`<or-mwc-input class="period-selector" .type="${InputType.BUTTON}" label="${this.period ? this.period : '-'}"></or-mwc-input>`,[{value: "hour", text: "hour"}, {value: "day", text: "day"}, {value: "week", text: "week"}, {value: "month", text: "month"}, {value: "year", text: "year"}].map((option) => {option.text = i18next.t(option.value);return option;@@ -484,7 +484,7 @@ export class OrAttributeCard extends LitElement {.setActions([{actionName: "cancel",- content: html`<or-mwc-input class="button" .type="${InputType.BUTTON}" .label="${i18next.t("cancel")}"></or-mwc-input>`,+ content: html`<or-mwc-input class="button" .type="${InputType.BUTTON}" label="cancel"></or-mwc-input>`,action: () => {// Nothing to do here}@@ -492,7 +492,7 @@ export class OrAttributeCard extends LitElement {{actionName: "yes",default: true,- content: html`<or-mwc-input class="button" .type="${InputType.BUTTON}" label="${i18next.t("ok")}" data-mdc-dialog-action="yes"></or-mwc-input>`,+ content: html`<or-mwc-input class="button" .type="${InputType.BUTTON}" label="ok" data-mdc-dialog-action="yes"></or-mwc-input>`,action: () => {if (dialogContent === "editDelta") {this.delta = this.data ? this.getFormattedDelta(this.getFirstKnownMeasurement(this.data), this.getLastKnownMeasurement(this.data)) : undefined;diff --git a/ui/component/or-attribute-picker/src/index.ts b/ui/component/or-attribute-picker/src/index.tsindex 3103fbe5c..6804317ff 100644--- a/ui/component/or-attribute-picker/src/index.ts+++ b/ui/component/or-attribute-picker/src/index.ts@@ -151,11 +151,11 @@ export class OrAttributePicker extends OrMwcDialog {this.actions = [{actionName: "cancel",- content: i18next.t("cancel")+ content: "cancel"},{actionName: "add",- content: html`<or-mwc-input id="add-btn" class="button" label="${i18next.t("add")}"+ content: html`<or-mwc-input id="add-btn" class="button" label="add".type="${InputType.BUTTON}" ?disabled="${!this.selectedAttributes.length}"@or-mwc-input-changed="${(ev: Event) => { if (!this.selectedAttributes.length) { ev.stopPropagation(); return false; } } }"></or-mwc-input>`,action: () => {diff --git a/ui/component/or-chart/src/index.ts b/ui/component/or-chart/src/index.tsindex cc00d7c1c..471064e28 100644--- a/ui/component/or-chart/src/index.ts+++ b/ui/component/or-chart/src/index.ts@@ -651,7 +651,7 @@ export class OrChart extends translate(i18next)(LitElement) {${this.timePresetOptions && this.timePresetKey ? html`${this.timestampControls ? html`${getContentWithMenuTemplate(- html`<or-mwc-input .type="${InputType.BUTTON}" .label="${this.timeframe ? i18next.t('Custom') : i18next.t(this.timePresetKey)}"></or-mwc-input>`,+ html`<or-mwc-input .type="${InputType.BUTTON}" label="${this.timeframe ? "dashboard.customTimeSpan" : this.timePresetKey}"></or-mwc-input>`,Array.from(this.timePresetOptions!.keys()).map((key) => ({ value: key } as ListItem)),this.timePresetKey,(value: string | string[]) => {@@ -666,7 +666,7 @@ export class OrChart extends translate(i18next)(LitElement) {<!-- Button that opens custom time selection --><or-mwc-input .type="${InputType.BUTTON}" icon="calendar-clock" @or-mwc-input-changed="${() => this._openTimeDialog(this._startOfPeriod, this._endOfPeriod)}"></or-mwc-input>` : html`- <or-mwc-input .type="${InputType.BUTTON}" .label="${i18next.t(this.timePresetKey)}" disabled="true"></or-mwc-input>+ <or-mwc-input .type="${InputType.BUTTON}" label="${this.timePresetKey}" disabled="true"></or-mwc-input>`}` : undefined}</div>@@ -689,7 +689,7 @@ export class OrChart extends translate(i18next)(LitElement) {</div>` : undefined}${this.attributeControls ? html`- <or-mwc-input class="button" .type="${InputType.BUTTON}" ?disabled="${disabled}" label="${i18next.t("selectAttributes")}" icon="plus" @or-mwc-input-changed="${() => this._openDialog()}"></or-mwc-input>+ <or-mwc-input class="button" .type="${InputType.BUTTON}" ?disabled="${disabled}" label="selectAttributes" icon="plus" @or-mwc-input-changed="${() => this._openDialog()}"></or-mwc-input>` : undefined}</div>${cache(this.showLegend ? html`@@ -919,10 +919,10 @@ export class OrChart extends translate(i18next)(LitElement) {`).setActions([{actionName: "cancel",- content: i18next.t('cancel')+ content: "cancel"}, {actionName: "ok",- content: i18next.t('ok'),+ content: "ok",action: () => {if(this.timePresetOptions && startRef.value?.value && endRef.value?.value) {this.timeframe = [new Date(startRef.value.value), new Date(endRef.value.value)];diff --git a/ui/component/or-dashboard-builder/src/controls/dashboard-refresh-controls.ts b/ui/component/or-dashboard-builder/src/controls/dashboard-refresh-controls.tsindex e60492122..48a40bf84 100644--- a/ui/component/or-dashboard-builder/src/controls/dashboard-refresh-controls.ts+++ b/ui/component/or-dashboard-builder/src/controls/dashboard-refresh-controls.ts@@ -4,7 +4,6 @@ import {getContentWithMenuTemplate} from "@openremote/or-mwc-components/or-mwc-mimport {html, LitElement, PropertyValues, TemplateResult} from "lit";import {customElement, property} from "lit/decorators.js";import {when} from "lit/directives/when.js";-import {i18next} from "@openremote/or-translate";import {DashboardRefreshInterval} from "@openremote/model";export function intervalToMillis(interval: DashboardRefreshInterval): number | undefined {@@ -65,14 +64,14 @@ export class DashboardRefreshControls extends LitElement {${when(this.interval === DashboardRefreshInterval.OFF, () => html`<or-mwc-input .type="${InputType.BUTTON}" icon="pause" disabled="true" style="height: 36px; margin-top: -12px;"></or-mwc-input>`, () => html`- <or-mwc-input .type="${InputType.BUTTON}" .label="${i18next.t(value)}" disabled="true"></or-mwc-input>+ <or-mwc-input .type="${InputType.BUTTON}" label="${value}" disabled="true"></or-mwc-input>`)}`, () => html`${getContentWithMenuTemplate(this.interval === DashboardRefreshInterval.OFF ? html`<or-mwc-input .type="${InputType.BUTTON}" icon="pause" style="height: 36px; margin-top: -12px;"></or-mwc-input>` : html`- <or-mwc-input .type="${InputType.BUTTON}" .label="${i18next.t(value)}"></or-mwc-input>+ <or-mwc-input .type="${InputType.BUTTON}" label="${value}"></or-mwc-input>`,intervalOptions.map(o => ({value: o} as ListItem)),value,diff --git a/ui/component/or-dashboard-builder/src/index.ts b/ui/component/or-dashboard-builder/src/index.tsindex c5e899453..e67b95227 100644--- a/ui/component/or-dashboard-builder/src/index.ts+++ b/ui/component/or-dashboard-builder/src/index.ts@@ -390,7 +390,7 @@ export class OrDashboardBuilder extends LitElement {await manager.rest.api.DashboardResource.getAllRealmDashboards(realm).then((result) => {this.dashboards = result.data;}).catch((reason) => {- showSnackbar(undefined, i18next.t('errorOccurred'));+ showSnackbar(undefined, "errorOccurred");console.error(reason);});@@ -504,17 +504,17 @@ export class OrDashboardBuilder extends LitElement {this.initialTemplateJSON = JSON.stringify(this.selectedDashboard.template);this.dashboards[this.dashboards?.indexOf(this.selectedDashboard)] = this.selectedDashboard;this.currentTemplate = Object.assign({}, this.selectedDashboard.template);- showSnackbar(undefined, i18next.t('dashboard.saveSuccessful'));+ showSnackbar(undefined, "dashboard.saveSuccessful");}}).catch((reason) => {console.error(reason);- showSnackbar(undefined, i18next.t('errorOccurred'));+ showSnackbar(undefined, "errorOccurred");}).finally(() => {this.isLoading = false;})} else {console.error("The selected dashboard could not be found..");- showSnackbar(undefined, i18next.t('errorOccurred'));+ showSnackbar(undefined, "errorOccurred");}}@@ -591,10 +591,10 @@ export class OrDashboardBuilder extends LitElement {<or-mwc-input id="share-btn" class="small-btn" .disabled="${this.isLoading}" type="${InputType.BUTTON}" icon="open-in-new"@or-mwc-input-changed="${() => { this.openDashboardInInsights(); }}"></or-mwc-input>- <or-mwc-input id="save-btn" ?hidden="${this._isReadonly() || !this._hasEditAccess()}" .disabled="${this.isLoading || !this.hasChanged}" type="${InputType.BUTTON}" raised label="${i18next.t('save')}"+ <or-mwc-input id="save-btn" ?hidden="${this._isReadonly() || !this._hasEditAccess()}" .disabled="${this.isLoading || !this.hasChanged}" type="${InputType.BUTTON}" raised label="save"@or-mwc-input-changed="${() => { this.saveDashboard(); }}"></or-mwc-input>- <or-mwc-input id="view-btn" ?hidden="${this._isReadonly() || !this._hasViewAccess()}" type="${InputType.BUTTON}" outlined icon="eye" label="${i18next.t('viewAsset')}"+ <or-mwc-input id="view-btn" ?hidden="${this._isReadonly() || !this._hasViewAccess()}" type="${InputType.BUTTON}" outlined icon="eye" label="viewAsset"@or-mwc-input-changed="${() => { this.dispatchEvent(new CustomEvent('editToggle', { detail: false })); }}"></or-mwc-input>`)}@@ -622,7 +622,7 @@ export class OrDashboardBuilder extends LitElement {<or-mwc-input id="share-btn" class="small-btn" .disabled="${(this.selectedDashboard == null)}" type="${InputType.BUTTON}" icon="open-in-new"@or-mwc-input-changed="${() => { this.openDashboardInInsights(); }}"></or-mwc-input>- <or-mwc-input id="view-btn" class="hideMobile" ?hidden="${this.selectedDashboard == null || this._isReadonly() || !this._hasEditAccess()}" type="${InputType.BUTTON}" outlined icon="pencil" label="${i18next.t('editAsset')}"+ <or-mwc-input id="view-btn" class="hideMobile" ?hidden="${this.selectedDashboard == null || this._isReadonly() || !this._hasEditAccess()}" type="${InputType.BUTTON}" outlined icon="pencil" label="editAsset"@or-mwc-input-changed="${() => { this.dispatchEvent(new CustomEvent('editToggle', { detail: true })); }}"></or-mwc-input>`)}diff --git a/ui/component/or-dashboard-builder/src/or-dashboard-boardsettings.ts b/ui/component/or-dashboard-builder/src/or-dashboard-boardsettings.tsindex 3e62a6ab8..8c63bd889 100644--- a/ui/component/or-dashboard-builder/src/or-dashboard-boardsettings.ts+++ b/ui/component/or-dashboard-builder/src/or-dashboard-boardsettings.ts@@ -77,7 +77,7 @@ export class OrDashboardBoardsettings extends LitElement {<!-- Permissions panel, to set who can view/edit the selected dashboard -->${when(this.showPerms, () => html`- <settings-panel displayName="${i18next.t('permissions')}" expanded="${true}">+ <settings-panel displayName="permissions" expanded="${true}"><div><div style="margin-bottom: 24px;"><div class="label">@@ -109,12 +109,12 @@ export class OrDashboardBoardsettings extends LitElement {`)}<!-- Layout panel, with options such as 'amount of columns' -->- <settings-panel displayName="${i18next.t('layout')}" expanded="${true}">+ <settings-panel displayName="layout" expanded="${true}"><div><!-- Number of Columns control --><div style="margin-bottom: 24px; display: flex; align-items: center;">- <span style="min-width: 180px;">${i18next.t("dashboard.numberOfColumns")}</span>+ <span style="min-width: 180px;"><or-translate value="dashboard.numberOfColumns"></or-translate></span><or-mwc-input type="${InputType.NUMBER}" comfortable .value="${this.dashboard.template.columns}" min="1" max="24" @or-mwc-input-changed="${(event: OrInputChangedEvent) => {if (this.dashboard.template != null && event.detail.value as number <= 24 && event.detail.value as number >= 1) {this.dashboard.template.columns = event.detail.value as number;@@ -135,7 +135,7 @@ export class OrDashboardBoardsettings extends LitElement {<!-- Max Screen Width control--><div style="margin-bottom: 24px; display: flex; align-items: center; justify-content: space-between;">- <span style="min-width: 150px;">${i18next.t('dashboard.maxScreenWidth')}</span>+ <span style="min-width: 150px;"><or-translate value="dashboard.maxScreenWidth"></or-translate></span><div><or-mwc-input type="${InputType.NUMBER}" comfortable .value="${this.dashboard.template.maxScreenWidth}" style="width: 70px;"@or-mwc-input-changed="${(event: OrInputChangedEvent) => {@@ -151,7 +151,7 @@ export class OrDashboardBoardsettings extends LitElement {<!-- "Set to mobile" preset button, for ease of use --><div>- <or-mwc-input type="${InputType.BUTTON}" comfortable label="${i18next.t('dashboard.setToMobilePreset')}"+ <or-mwc-input type="${InputType.BUTTON}" comfortable label="dashboard.setToMobilePreset"@or-mwc-input-changed="${() => {this.setToMobilePreset();}}">@@ -161,10 +161,10 @@ export class OrDashboardBoardsettings extends LitElement {</settings-panel><!-- Data management options -->- <settings-panel displayName="${i18next.t('dashboard.dataManagement')}" expanded="${true}">+ <settings-panel displayName="dashboard.dataManagement" expanded="${true}"><div><div class="label">- <span>${i18next.t('dashboard.defaultRefreshInterval')}</span>+ <span><or-translate value="dashboard.defaultRefreshInterval"></or-translate></span></div><or-mwc-input type="${InputType.SELECT}" comfortable .options="${refreshIntervalOptions.map(o => o.value)}" style="width: 100%;".value="${`dashboard.interval.${this.dashboard.template.refreshInterval?.toLowerCase() || `off`}`}"@@ -182,8 +182,8 @@ export class OrDashboardBoardsettings extends LitElement {} else {return html`<div style="padding: 24px;">- <span>${i18next.t('errorOccurred')}</span><br/>- <span>${i18next.t('noDashboardFound')}</span>+ <span><or-translate value="errorOccurred"></or-translate></span><br/>+ <span><or-translate value="noDashboardFound"></or-translate></span></div>`}diff --git a/ui/component/or-dashboard-builder/src/or-dashboard-preview.ts b/ui/component/or-dashboard-builder/src/or-dashboard-preview.tsindex 98003f2a5..8252ea549 100644--- a/ui/component/or-dashboard-builder/src/or-dashboard-preview.ts+++ b/ui/component/or-dashboard-builder/src/or-dashboard-preview.ts@@ -269,7 +269,7 @@ export class OrDashboardPreview extends LitElement {if(!this.template && this.dashboardId) {manager.rest.api.DashboardResource.get(this.realm, this.dashboardId).then((response) => { this.template = response.data.template!; })- .catch((reason) => { console.error(reason); showSnackbar(undefined, i18next.t('errorOccurred')); });+ .catch((reason) => { console.error(reason); showSnackbar(undefined, "errorOccurred"); });} else if(this.template == null && this.dashboardId == null) {console.warn("Neither the template nor dashboardId attributes have been specified!");}@@ -527,7 +527,7 @@ export class OrDashboardPreview extends LitElement {` : undefined}${this.rerenderActive ? html`<div id="container" style="justify-content: center; align-items: center;">- <span>${i18next.t('dashboard.renderingGrid')}</span>+ <span><or-translate value="dashboard.renderingGrid"></or-translate></span></div>` : html`<div id="container" style="justify-content: center; position: relative;">@@ -538,7 +538,7 @@ export class OrDashboardPreview extends LitElement {`, () => html`${this.activePreset?.scalingPreset == DashboardScalingPreset.BLOCK_DEVICE ? html`<div style="position: absolute; z-index: 3; height: 100%; display: flex; align-items: center;">- <span>${i18next.t('dashboard.deviceNotSupported')}</span>+ <span><or-translate value="dashboard.deviceNotSupported"></or-translate></span></div>` : undefined}`)}diff --git a/ui/component/or-dashboard-builder/src/or-dashboard-tree.ts b/ui/component/or-dashboard-builder/src/or-dashboard-tree.tsindex 355dc1cfb..6c2c9606c 100644--- a/ui/component/or-dashboard-builder/src/or-dashboard-tree.ts+++ b/ui/component/or-dashboard-builder/src/or-dashboard-tree.ts@@ -95,7 +95,7 @@ export class OrDashboardTree extends LitElement {this.dashboards = result.data;}).catch(reason => {console.error(reason);- showSnackbar(undefined, i18next.t("errorOccurred"));+ showSnackbar(undefined, "errorOccurred");});}@@ -126,9 +126,9 @@ export class OrDashboardTree extends LitElement {}).catch(e => {console.error(e);if (isAxiosError(e) && e.response?.status === 404) {- showSnackbar(undefined, i18next.t("noDashboardFound"));+ showSnackbar(undefined, "noDashboardFound");} else {- showSnackbar(undefined, i18next.t("errorOccurred"));+ showSnackbar(undefined, "errorOccurred");}});}@@ -139,7 +139,7 @@ export class OrDashboardTree extends LitElement {this.getAllDashboards();}).catch(reason => {console.error(reason);- showSnackbar(undefined, i18next.t("errorOccurred"));+ showSnackbar(undefined, "errorOccurred");});}}@@ -192,7 +192,7 @@ export class OrDashboardTree extends LitElement {return html`<div id="menu-header"><div id="title-container">- <span id="title">${i18next.t("insights")}</span>+ <span id="title"><or-translate value="insights"></or-translate></span></div><!-- Controls header -->@@ -231,7 +231,9 @@ export class OrDashboardTree extends LitElement {${dashboardItems.map((items, index) => {return (items != null && items.length > 0) ? html`<div style="padding: 8px 0;">- <span style="font-weight: 500; padding-left: 14px; color: #000000;">${(index === 0 ? i18next.t("dashboard.myDashboards") : i18next.t("dashboard.createdByOthers"))}</span>+ <span style="font-weight: 500; padding-left: 14px; color: #000000;">+ <or-translate value="${(index === 0 ? "dashboard.myDashboards" : "dashboard.createdByOthers")}"></or-translate>+ </span><div id="list-container" style="overflow: hidden;"><ol id="list">${items.map((listItem: ListItem) => {diff --git a/ui/component/or-dashboard-builder/src/or-dashboard-widgetcontainer.ts b/ui/component/or-dashboard-builder/src/or-dashboard-widgetcontainer.tsindex aca3266c7..9f3439fe3 100644--- a/ui/component/or-dashboard-builder/src/or-dashboard-widgetcontainer.ts+++ b/ui/component/or-dashboard-builder/src/or-dashboard-widgetcontainer.ts@@ -31,7 +31,7 @@ export class OrDashboardWidgetContainer extends LitElement {protected orWidget?: OrWidget@state()- protected error?: string;+ protected error?: string; // untranslated error messages@query("#widget-container")protected containerElem?: Element;@@ -100,7 +100,7 @@ export class OrDashboardWidgetContainer extends LitElement {const minWidth = this.manifest!.minPixelWidth || 0;const minHeight = this.manifest!.minPixelHeight || 0;const isMinimumSize: boolean = (minWidth < containerElem.clientWidth) && (minHeight < containerElem.clientHeight);- this.error = (isMinimumSize ? undefined : i18next.t('dashboard.widgetTooSmall'));+ this.error = (isMinimumSize ? undefined : "dashboard.widgetTooSmall");}, 200));this.resizeObserver.observe(containerElem);} else {@@ -143,9 +143,7 @@ export class OrDashboardWidgetContainer extends LitElement {<div style="flex: 1; max-height: ${showHeader ? 'calc(100% - 36px)' : '100%'};">${when((!this.error && !this.loading), () => html`${this.orWidget}- `, () => html`- ${this.error ? html`${this.error}` : html`${i18next.t('loading')}`}- `)}+ `, () => html`<or-translate value="${this.error ? this.error : "loading"}"></or-translate>`)}</div></div>`diff --git a/ui/component/or-dashboard-builder/src/panels/assettypes-panel.ts b/ui/component/or-dashboard-builder/src/panels/assettypes-panel.tsindex 2814f5938..a19754106 100644--- a/ui/component/or-dashboard-builder/src/panels/assettypes-panel.ts+++ b/ui/component/or-dashboard-builder/src/panels/assettypes-panel.ts@@ -267,11 +267,11 @@ export class AssettypesPanel extends LitElement {{default: true,actionName: "cancel",- content: i18next.t("cancel"),+ content: "cancel",},{actionName: "ok",- content: i18next.t("ok"),+ content: "ok",action: () => {const tree = assetTreeRef.value;if(tree?.selectedIds) {diff --git a/ui/component/or-dashboard-builder/src/panels/attributes-panel.ts b/ui/component/or-dashboard-builder/src/panels/attributes-panel.tsindex 971031576..c635c3a0a 100644--- a/ui/component/or-dashboard-builder/src/panels/attributes-panel.ts+++ b/ui/component/or-dashboard-builder/src/panels/attributes-panel.ts@@ -6,6 +6,7 @@ import {when} from "lit/directives/when.js";import {map} from "lit/directives/map.js";import {guard} from "lit/directives/guard.js";import {i18next} from "@openremote/or-translate";+import "@openremote/or-translate";import {InputType} from "@openremote/or-mwc-components/or-mwc-input";import manager, {DefaultColor5, Util} from "@openremote/core";import {getAssetDescriptorIconTemplate} from "@openremote/or-icon";@@ -215,7 +216,7 @@ export class AttributesPanel extends LitElement {assets = response.data;}).catch((reason) => {console.error(reason);- showSnackbar(undefined, i18next.t('errorOccurred'));+ showSnackbar(undefined, "errorOccurred");});return assets;}@@ -288,11 +289,11 @@ export class AttributesPanel extends LitElement {</div>`, () => html`- <span style="padding: 14px 0; display: block;">${i18next.t('noAttributesConnected')}</span>+ <span style="padding: 14px 0; display: block;"><or-translate value="noAttributesConnected"></or-translate></span>`)}<!-- Button that opens attribute selection -->- <or-mwc-input .type="${InputType.BUTTON}" label="${i18next.t('attribute')}" icon="${(this.multi || this.attributeRefs.length === 0) ? "plus" : "swap-horizontal"}"+ <or-mwc-input .type="${InputType.BUTTON}" label="attribute" icon="${(this.multi || this.attributeRefs.length === 0) ? "plus" : "swap-horizontal"}"style="margin-top: 8px;"@or-mwc-input-changed="${() => this.openAttributeSelector(this.attributeRefs, this.multi, this.onlyDataAttrs, this.attributeFilter)}"></or-mwc-input>diff --git a/ui/component/or-dashboard-builder/src/panels/thresholds-panel.ts b/ui/component/or-dashboard-builder/src/panels/thresholds-panel.tsindex e7826a2f3..cfd5ffcde 100644--- a/ui/component/or-dashboard-builder/src/panels/thresholds-panel.ts+++ b/ui/component/or-dashboard-builder/src/panels/thresholds-panel.ts@@ -2,7 +2,6 @@ import {InputType, OrInputChangedEvent} from "@openremote/or-mwc-components/or-mimport {css, CSSResult, html, LitElement, PropertyValues, TemplateResult, unsafeCSS} from "lit";import {customElement, property} from "lit/decorators.js";import {ifDefined} from "lit/directives/if-defined.js";-import {i18next} from "@openremote/or-translate";import {DefaultColor5} from "@openremote/core";import {style} from "../style";@@ -168,7 +167,7 @@ export class ThresholdsPanel extends LitElement {</div>`})}- <or-mwc-input .type="${InputType.BUTTON}" label="${i18next.t('threshold')}" icon="plus"+ <or-mwc-input .type="${InputType.BUTTON}" label="threshold" icon="plus"@or-mwc-input-changed="${() => this.addNewThreshold()}"></or-mwc-input>` : null}@@ -238,7 +237,7 @@ export class ThresholdsPanel extends LitElement {</div>`})}- <or-mwc-input .type="${InputType.BUTTON}" label="${i18next.t('threshold')}" icon="plus"+ <or-mwc-input .type="${InputType.BUTTON}" label="threshold" icon="plus"@or-mwc-input-changed="${() => this.addNewThreshold()}"></or-mwc-input>` : null}diff --git a/ui/component/or-dashboard-builder/src/settings/attribute-input-settings.ts b/ui/component/or-dashboard-builder/src/settings/attribute-input-settings.tsindex 2a705071f..fade9eb01 100644--- a/ui/component/or-dashboard-builder/src/settings/attribute-input-settings.ts+++ b/ui/component/or-dashboard-builder/src/settings/attribute-input-settings.ts@@ -1,7 +1,6 @@import {css, html, TemplateResult } from "lit";import { customElement } from "lit/decorators.js";import {AttributeInputWidgetConfig} from "../widgets/attribute-input-widget";-import {i18next} from "@openremote/or-translate";import {AttributesSelectEvent} from "../panels/attributes-panel";import { InputType, OrInputChangedEvent } from "@openremote/or-mwc-components/or-mwc-input";import {AssetWidgetSettings} from "../util/or-asset-widget";@@ -27,25 +26,25 @@ export class AttributeInputSettings extends AssetWidgetSettings {return html`<div><!-- Attribute selection -->- <settings-panel displayName="${i18next.t('attributes')}" expanded="${true}">+ <settings-panel displayName="attributes" expanded="${true}"><attributes-panel .attributeRefs="${this.widgetConfig.attributeRefs}" style="padding-bottom: 12px;"@attribute-select="${(ev: AttributesSelectEvent) => this.onAttributesSelect(ev)}"></attributes-panel></settings-panel><!-- Other settings -->- <settings-panel displayName="${i18next.t('settings')}" expanded="${true}">+ <settings-panel displayName="settings" expanded="${true}"><div><!-- Toggle readonly --><div class="switch-container">- <span>${i18next.t('dashboard.userCanEdit')}</span>+ <span><or-translate value="dashboard.userCanEdit"></or-translate></span><or-mwc-input .type="${InputType.SWITCH}" style="margin: 0 -10px;" .value="${!this.widgetConfig.readonly}"@or-mwc-input-changed="${(ev: OrInputChangedEvent) => this.onReadonlyToggle(ev)}"></or-mwc-input></div><!-- Toggle helper text --><div class="switch-container">- <span>${i18next.t('dashboard.showHelperText')}</span>+ <span><or-translate value="dashboard.showHelperText"></or-translate></span><or-mwc-input .type="${InputType.SWITCH}" style="margin: 0 -10px;" .value="${this.widgetConfig.showHelperText}"@or-mwc-input-changed="${(ev: OrInputChangedEvent) => this.onHelperTextToggle(ev)}"></or-mwc-input>diff --git a/ui/component/or-dashboard-builder/src/settings/chart-settings.ts b/ui/component/or-dashboard-builder/src/settings/chart-settings.tsindex 35e96e17c..8da97fe58 100644--- a/ui/component/or-dashboard-builder/src/settings/chart-settings.ts+++ b/ui/component/or-dashboard-builder/src/settings/chart-settings.ts@@ -54,7 +54,7 @@ export class ChartSettings extends WidgetSettings {<span>${asset.name}</span><span style="font-size:14px; color:grey;">${attributeLabel}</span>${when(isOnRightAxis, () => html`- <span style="position: absolute; right: 0; margin-bottom: 16px; font-size:14px; color:grey;">(${i18next.t('right')})</span>+ <span style="position: absolute; right: 0; margin-bottom: 16px; font-size:14px; color:grey;"><or-translate value="right"></or-translate></span>`)}`}@@ -68,7 +68,7 @@ export class ChartSettings extends WidgetSettings {return html`<div><!-- Attribute selection -->- <settings-panel displayName="${i18next.t('attributes')}" expanded="${true}">+ <settings-panel displayName="attributes" expanded="${true}"><attributes-panel .attributeRefs="${this.widgetConfig.attributeRefs}" multi="${true}" onlyDataAttrs="${true}" .attributeFilter="${attributeFilter}" style="padding-bottom: 12px;".attributeLabelCallback="${attributeLabelCallback}" .attributeActionCallback="${attributeActionCallback}"@attribute-action="${(ev: AttributeActionEvent) => this.onAttributeAction(ev)}"@@ -77,7 +77,7 @@ export class ChartSettings extends WidgetSettings {</settings-panel><!-- Display options -->- <settings-panel displayName="${i18next.t('display')}" expanded="${true}">+ <settings-panel displayName="display" expanded="${true}"><div style="padding-bottom: 12px; display: flex; flex-direction: column; gap: 6px;"><!-- Timeframe --><div>@@ -89,13 +89,13 @@ export class ChartSettings extends WidgetSettings {<!-- Y Min/max options --><div><div class="switch-container">- <span>${i18next.t('dashboard.allowTimerangeSelect')}</span>+ <span><or-translate value="dashboard.allowTimerangeSelect"></or-translate></span><or-mwc-input .type="${InputType.SWITCH}" style="margin: 0 -10px;" .value="${!this.widgetConfig.showTimestampControls}"@or-mwc-input-changed="${(ev: OrInputChangedEvent) => this.onTimestampControlsToggle(ev)}"></or-mwc-input></div><div class="switch-container">- <span>${i18next.t('dashboard.showLegend')}</span>+ <span><or-translate value="dashboard.showLegend"></or-translate></span><or-mwc-input .type="${InputType.SWITCH}" style="margin: 0 -10px;" .value="${this.widgetConfig.showLegend}"@or-mwc-input-changed="${(ev: OrInputChangedEvent) => this.onShowLegendToggle(ev)}"></or-mwc-input>@@ -105,14 +105,14 @@ export class ChartSettings extends WidgetSettings {</settings-panel><!-- Axis configuration -->- <settings-panel displayName="${i18next.t('dashboard.axisConfig')}" expanded="${true}">+ <settings-panel displayName="dashboard.axisConfig" expanded="${true}"><div style="padding-bottom: 12px; display: flex; flex-direction: column; gap: 16px;"><!-- Left axis configuration --><div>${when(isMultiAxis, () => html`<div style="margin-bottom: 8px;">- <span>${i18next.t('dashboard.leftAxis')}</span>+ <span><or-translate value="dashboard.leftAxis"></or-translate></span></div>`)}<div style="display: flex;">@@ -148,7 +148,7 @@ export class ChartSettings extends WidgetSettings {return html`<div><div style="margin-bottom: 8px;">- <span>${i18next.t('dashboard.rightAxis')}</span>+ <span><or-translate value="dashboard.rightAxis"></or-translate></span></div><div style="display: flex;">${rightMax !== undefined ? html`@@ -183,7 +183,7 @@ export class ChartSettings extends WidgetSettings {</settings-panel><!-- Data sampling options -->- <settings-panel displayName="${i18next.t('dataSampling')}" expanded="${true}">+ <settings-panel displayName="dataSampling" expanded="${true}"><div style="padding-bottom: 12px; display: flex; flex-direction: column; gap: 12px;"><div><or-mwc-input .type="${InputType.SELECT}" style="width: 100%" .options="${Array.from(this.samplingOptions.keys())}" .value="${samplingValue}"diff --git a/ui/component/or-dashboard-builder/src/settings/gauge-settings.ts b/ui/component/or-dashboard-builder/src/settings/gauge-settings.tsindex 9487871b9..6c498640f 100644--- a/ui/component/or-dashboard-builder/src/settings/gauge-settings.ts+++ b/ui/component/or-dashboard-builder/src/settings/gauge-settings.ts@@ -22,14 +22,14 @@ export class GaugeSettings extends WidgetSettings {return html`<div><!-- Attribute selection -->- <settings-panel displayName="${i18next.t('attributes')}" expanded="${true}">+ <settings-panel displayName="attributes" expanded="${true}"><attributes-panel .attributeRefs="${this.widgetConfig.attributeRefs}" .attributeFilter="${attributeFilter}" style="padding-bottom: 12px;"@attribute-select="${(ev: AttributesSelectEvent) => this.onAttributesSelect(ev)}"></attributes-panel></settings-panel><!-- Min/max and decimals options-->- <settings-panel displayName="${i18next.t('values')}" expanded="${true}">+ <settings-panel displayName="values" expanded="${true}"><div style="padding-bottom: 12px; display: flex; flex-direction: column; gap: 12px;"><div style="display: flex; gap: 8px;"><or-mwc-input .type="${InputType.NUMBER}" label="${i18next.t('min')}" .max="${this.widgetConfig.max}" .value="${this.widgetConfig.min}"@@ -48,7 +48,7 @@ export class GaugeSettings extends WidgetSettings {</settings-panel><!-- Thresholds panel -->- <settings-panel displayName="${i18next.t('thresholds')}" expanded="${true}">+ <settings-panel displayName="thresholds" expanded="${true}"><thresholds-panel .thresholds="${this.widgetConfig.thresholds}" .valueType="${'number'}" style="padding-bottom: 12px;".min="${this.widgetConfig.min}" .max="${this.widgetConfig.max}"@threshold-change="${(ev: ThresholdChangeEvent) => this.onThresholdChange(ev)}">diff --git a/ui/component/or-dashboard-builder/src/settings/image-settings.ts b/ui/component/or-dashboard-builder/src/settings/image-settings.tsindex ed5728825..ef5ae0b8b 100644--- a/ui/component/or-dashboard-builder/src/settings/image-settings.ts+++ b/ui/component/or-dashboard-builder/src/settings/image-settings.ts@@ -53,21 +53,21 @@ export class ImageSettings extends AssetWidgetSettings {return html`<div><!-- Attributes selector -->- <settings-panel displayName="${i18next.t('attributes')}" expanded="${true}">+ <settings-panel displayName="'attributes" expanded="${true}"><attributes-panel .attributeRefs="${this.widgetConfig.attributeRefs}" onlyDataAttrs="${false}" multi="${true}"@attribute-select="${(ev: AttributesSelectEvent) => this.onAttributesSelect(ev)}"></attributes-panel></settings-panel><!-- Marker coordinates -->- <settings-panel displayName="${i18next.t('dashboard.markerCoordinates')}" expanded="${true}">+ <settings-panel displayName="dashboard.markerCoordinates" expanded="${true}"><div style="display: flex; flex-direction: column; gap: 8px;">${map(this.draftCoordinateEntries(this.widgetConfig), template => template)}</div></settings-panel><!-- Image settings -->- <settings-panel displayName="${i18next.t('dashboard.imageSettings')}" expanded="${true}">+ <settings-panel displayName="dashboard.imageSettings" expanded="${true}"><div><or-mwc-input style="width: 100%;" type="${InputType.TEXT}" label="${i18next.t('dashboard.imageUrl')}" .value="${this.widgetConfig.imagePath}"@or-mwc-input-changed="${(ev: OrInputChangedEvent) => this.onImageUrlUpdate(ev)}"@@ -153,7 +153,7 @@ export class ImageSettings extends AssetWidgetSettings {});} else {return [- html`<span>${i18next.t('noAttributeConnected')}</span>`+ html`<span><or-translate value="noAttributeConnected"></or-translate></span>`];}}diff --git a/ui/component/or-dashboard-builder/src/settings/kpi-settings.ts b/ui/component/or-dashboard-builder/src/settings/kpi-settings.tsindex f08990df0..a6390cb54 100644--- a/ui/component/or-dashboard-builder/src/settings/kpi-settings.ts+++ b/ui/component/or-dashboard-builder/src/settings/kpi-settings.ts@@ -31,14 +31,14 @@ export class KpiSettings extends AssetWidgetSettings {return html`<div><!-- Attribute selector -->- <settings-panel displayName="${i18next.t('attributes')}" expanded="${true}">+ <settings-panel displayName="attributes" expanded="${true}"><attributes-panel .attributeRefs="${this.widgetConfig.attributeRefs}" onlyDataAttrs="${false}" .attributeFilter="${attributeFilter}" style="padding-bottom: 12px;"@attribute-select="${(ev: AttributesSelectEvent) => this.onAttributesSelect(ev)}"></attributes-panel></settings-panel><!-- Display settings -->- <settings-panel displayName="${i18next.t('display')}" expanded="${true}">+ <settings-panel displayName="display" expanded="${true}"><div style="display: flex; flex-direction: column; gap: 8px;"><or-mwc-input .type="${InputType.SELECT}" style="width: 100%;".options="${['year', 'month', 'week', 'day', 'hour']}"@@ -46,7 +46,7 @@ export class KpiSettings extends AssetWidgetSettings {@or-mwc-input-changed="${(ev: OrInputChangedEvent) => this.onTimeframeSelect(ev)}"></or-mwc-input><div class="switchMwcInputContainer">- <span>${i18next.t('dashboard.allowTimerangeSelect')}</span>+ <span><or-translate value="dashboard.allowTimerangeSelect"></or-translate></span><or-mwc-input .type="${InputType.SWITCH}" style="margin: 0 -10px;" .value="${this.widgetConfig.showTimestampControls}"@or-mwc-input-changed="${(ev: OrInputChangedEvent) => this.onTimeframeToggle(ev)}"></or-mwc-input>@@ -54,7 +54,7 @@ export class KpiSettings extends AssetWidgetSettings {</div></settings-panel>- <settings-panel displayName="${i18next.t('values')}" expanded="${true}">+ <settings-panel displayName="values" expanded="${true}"><div style="display: flex; flex-direction: column; gap: 8px;"><or-mwc-input .type="${InputType.SELECT}" style="width: 100%;" .options="${['absolute', 'percentage']}" .value="${this.widgetConfig.deltaFormat}"label="${i18next.t('dashboard.showValueAs')}"diff --git a/ui/component/or-dashboard-builder/src/settings/map-settings.ts b/ui/component/or-dashboard-builder/src/settings/map-settings.tsindex bfef1c23e..bd34badc1 100644--- a/ui/component/or-dashboard-builder/src/settings/map-settings.ts+++ b/ui/component/or-dashboard-builder/src/settings/map-settings.ts@@ -43,7 +43,7 @@ export class MapSettings extends AssetWidgetSettings {<div><!-- Map settings -->- <settings-panel displayName="${i18next.t('configuration.mapSettings')}" expanded="${true}">+ <settings-panel displayName="configuration.mapSettings" expanded="${true}"><div style="display: flex; flex-direction: column; gap: 8px;"><div><or-mwc-input .type="${InputType.NUMBER}" style="width: 100%;"@@ -59,7 +59,7 @@ export class MapSettings extends AssetWidgetSettings {></or-mwc-input></div><div style="display: flex; justify-content: space-between; align-items: center;">- <span>${i18next.t('dashboard.showGeoJson')}</span>+ <span><or-translate value="dashboard.showGeoJson"></or-translate></span><or-mwc-input .type="${InputType.SWITCH}" style="width: 70px;".value="${this.widgetConfig.showGeoJson}"@or-mwc-input-changed="${(ev: OrInputChangedEvent) => this.onGeoJsonToggle(ev)}"@@ -69,7 +69,7 @@ export class MapSettings extends AssetWidgetSettings {</settings-panel><!-- Panel where Asset type and the selected attribute can be customized -->- <settings-panel displayName="${i18next.t('attributes')}" expanded="${true}">+ <settings-panel displayName="attributes" expanded="${true}"><assettypes-panel .assetType="${this.widgetConfig.assetType}" .attributeNames="${this.widgetConfig.attributeName}" .config="${config}"@assettype-select="${(ev: AssetTypeSelectEvent) => this.onAssetTypeSelect(ev)}"@attributenames-select="${(ev: AttributeNamesSelectEvent) => this.onAttributeNameSelect(ev)}"@@ -78,14 +78,14 @@ export class MapSettings extends AssetWidgetSettings {<!-- Other settings like labels and units--><div><div class="switchMwcInputContainer">- <span>${i18next.t("dashboard.showLabels")}</span>+ <span><or-translate value="dashboard.showLabels"></or-translate></span><or-mwc-input .type="${InputType.SWITCH}" style="width: 70px;".value="${this.widgetConfig.showLabels}" .disabled="${!this.widgetConfig.assetType}"@or-mwc-input-changed="${(ev: OrInputChangedEvent) => this.onShowLabelsToggle(ev)}"></or-mwc-input></div><div class="switchMwcInputContainer">- <span>${i18next.t("dashboard.showUnits")}</span>+ <span><or-translate value="dashboard.showUnits"></or-translate></span><or-mwc-input .type="${InputType.SWITCH}" style="width: 70px;".value="${this.widgetConfig.showUnits}" .disabled="${!this.widgetConfig.showLabels || !this.widgetConfig.assetType}"@or-mwc-input-changed="${(ev: OrInputChangedEvent) => this.onShowUnitsToggle(ev)}"@@ -96,7 +96,7 @@ export class MapSettings extends AssetWidgetSettings {<!-- List of customizable thresholds -->${when(this.widgetConfig.assetIds.length > 0, () => html`- <settings-panel displayName="${i18next.t('thresholds')}" expanded="${true}">+ <settings-panel displayName="thresholds" expanded="${true}"><thresholds-panel .thresholds="${this.widgetConfig.thresholds}" .valueType="${this.widgetConfig.valueType}" style="padding-bottom: 12px;".min="${this.widgetConfig.min}" .max="${this.widgetConfig.max}"@threshold-change="${(ev: ThresholdChangeEvent) => this.onThresholdsChange(ev)}">@@ -161,7 +161,7 @@ export class MapSettings extends AssetWidgetSettings {this.widgetConfig.valueType = (response.data.length > 0) ? response.data[0].attributes![attrName].type : "text"; // sometimes no asset exists of that assetType, so using 'text' as fallback.}).catch((reason) => {console.error(reason);- showSnackbar(undefined, i18next.t('errorOccurred'));+ showSnackbar(undefined, "errorOccurred");});this.notifyConfigUpdate()diff --git a/ui/component/or-dashboard-builder/src/settings/table-settings.ts b/ui/component/or-dashboard-builder/src/settings/table-settings.tsindex a3a9e445f..f275ccdfc 100644--- a/ui/component/or-dashboard-builder/src/settings/table-settings.ts+++ b/ui/component/or-dashboard-builder/src/settings/table-settings.ts@@ -2,7 +2,6 @@ import {css, html, TemplateResult } from "lit";import { customElement } from "lit/decorators.js";import {AssetWidgetSettings} from "../util/or-asset-widget";import {TableWidgetConfig} from "../widgets/table-widget";-import {i18next} from "@openremote/or-translate";import { InputType, OrInputChangedEvent } from "@openremote/or-mwc-components/or-mwc-input";import {AssetIdsSelectEvent, AssetTypeSelectEvent, AssetTypesFilterConfig, AttributeNamesSelectEvent} from "../panels/assettypes-panel";@@ -37,7 +36,7 @@ export class TableSettings extends AssetWidgetSettings {return html`<div><!-- Asset type, assets, and attribute picker -->- <settings-panel displayName="${i18next.t('attributes')}" expanded="${true}">+ <settings-panel displayName="attributes" expanded="${true}"><div style="padding-bottom: 12px;"><assettypes-panel .assetType="${this.widgetConfig.assetType}" .config="${config}".assetIds="${this.widgetConfig.assetIds}" .attributeNames="${this.widgetConfig.attributeNames}"@@ -49,10 +48,10 @@ export class TableSettings extends AssetWidgetSettings {</settings-panel><!-- Table settings like amount of rows -->- <settings-panel displayName="${i18next.t('dashboard.tableSettings')}" expanded="${true}">+ <settings-panel displayName="dashboard.tableSettings" expanded="${true}"><div style="padding-bottom: 12px;"><div class="customMwcInputContainer">- <span style="min-width: 180px">${i18next.t('dashboard.numberOfRows')}</span>+ <span style="min-width: 180px"><or-translate value="dashboard.numberOfRows"></or-translate></span><or-mwc-input type="${InputType.SELECT}" .options="${[10, 25, 100]}" .value="${this.widgetConfig.tableSize}"@or-mwc-input-changed="${(ev: OrInputChangedEvent) => this.onTableSizeSelect(ev)}"></or-mwc-input>diff --git a/ui/component/or-dashboard-builder/src/util/or-asset-widget.ts b/ui/component/or-dashboard-builder/src/util/or-asset-widget.tsindex 4c81c8458..1782b4f07 100644--- a/ui/component/or-dashboard-builder/src/util/or-asset-widget.ts+++ b/ui/component/or-dashboard-builder/src/util/or-asset-widget.ts@@ -2,7 +2,6 @@ import {OrWidget} from "./or-widget";import {Asset, AssetQuery, Attribute, AttributeRef} from "@openremote/model";import { state } from "lit/decorators.js";import manager from "@openremote/core";-import {i18next} from "@openremote/or-translate";import { showSnackbar } from "@openremote/or-mwc-components/or-mwc-snackbar";import {WidgetConfig} from "./widget-config";import {WidgetSettings} from "./widget-settings";@@ -101,7 +100,7 @@ async function fetchAssets(assetQuery: AssetQuery) {assets = response.data;}).catch((reason) => {console.error(reason);- showSnackbar(undefined, i18next.t('errorOccurred'));+ showSnackbar(undefined, "errorOccurred");});return assets;}diff --git a/ui/component/or-dashboard-builder/src/util/settings-panel.ts b/ui/component/or-dashboard-builder/src/util/settings-panel.tsindex 612553477..1f61e5271 100644--- a/ui/component/or-dashboard-builder/src/util/settings-panel.ts+++ b/ui/component/or-dashboard-builder/src/util/settings-panel.ts@@ -84,7 +84,7 @@ export class SettingsPanel extends LitElement {</div>${when(title, () => html`<div id="panel-title">- <span>${this.displayName}</span>+ <span><or-translate value="${this.displayName}"></or-translate></span></div>`)}</div>diff --git a/ui/component/or-dashboard-builder/src/widgets/attribute-input-widget.ts b/ui/component/or-dashboard-builder/src/widgets/attribute-input-widget.tsindex 5afa7dde2..6e67541d2 100644--- a/ui/component/or-dashboard-builder/src/widgets/attribute-input-widget.ts+++ b/ui/component/or-dashboard-builder/src/widgets/attribute-input-widget.ts@@ -7,7 +7,6 @@ import {WidgetSettings} from "../util/widget-settings";import { customElement, query, queryAll } from "lit/decorators.js";import {AttributeInputSettings} from "../settings/attribute-input-settings";import { when } from "lit/directives/when.js";-import {i18next} from "@openremote/or-translate";import {throttle} from "lodash";import {Util} from "@openremote/core";import "@openremote/or-attribute-input";@@ -136,7 +135,7 @@ export class AttributeInputWidget extends OrAssetWidget {`}, () => html`<div style="height: 100%; display: flex; justify-content: center; align-items: center;">- <span>${i18next.t('noAttributesConnected')}</span>+ <span><or-translate value="noAttributesConnected"></or-translate></span></div>`)}`;diff --git a/ui/component/or-dashboard-builder/src/widgets/chart-widget.ts b/ui/component/or-dashboard-builder/src/widgets/chart-widget.tsindex 906af1b8e..fdccf2837 100644--- a/ui/component/or-dashboard-builder/src/widgets/chart-widget.ts+++ b/ui/component/or-dashboard-builder/src/widgets/chart-widget.ts@@ -1,7 +1,6 @@import {AssetDatapointLTTBQuery, AssetDatapointQueryUnion, Attribute, AttributeRef} from "@openremote/model";import {html, PropertyValues, TemplateResult } from "lit";import { when } from "lit/directives/when.js";-import {i18next} from "@openremote/or-translate";import {TimePresetCallback} from "@openremote/or-chart";import moment from "moment";import {OrAssetWidget} from "../util/or-asset-widget";@@ -188,7 +187,7 @@ export class ChartWidget extends OrAssetWidget {}, () => {return html`<div style="height: 100%; display: flex; justify-content: center; align-items: center;">- <span>${i18next.t('noAttributesConnected')}</span>+ <span><or-translate value="noAttributesConnected"></or-translate></span></div>`})}diff --git a/ui/component/or-dashboard-builder/src/widgets/gauge-widget.ts b/ui/component/or-dashboard-builder/src/widgets/gauge-widget.tsindex 9b5d83f24..066193097 100644--- a/ui/component/or-dashboard-builder/src/widgets/gauge-widget.ts+++ b/ui/component/or-dashboard-builder/src/widgets/gauge-widget.ts@@ -7,7 +7,6 @@ import {OrWidget, WidgetManifest} from "../util/or-widget";import {WidgetSettings} from "../util/widget-settings";import {GaugeSettings} from "../settings/gauge-settings";import {when} from "lit/directives/when.js";-import {i18next} from "@openremote/or-translate";import "@openremote/or-gauge";export interface GaugeWidgetConfig extends WidgetConfig {@@ -102,7 +101,7 @@ export class GaugeWidget extends OrAssetWidget {}, () => {return html`<div style="height: 100%; display: flex; justify-content: center; align-items: center;">- <span>${i18next.t('noAttributeConnected')}</span>+ <span><or-translate value="noAttributeConnected"></or-translate></span></div>`})}diff --git a/ui/component/or-dashboard-builder/src/widgets/image-widget.ts b/ui/component/or-dashboard-builder/src/widgets/image-widget.tsindex e51362bbc..a73aa7fef 100644--- a/ui/component/or-dashboard-builder/src/widgets/image-widget.ts+++ b/ui/component/or-dashboard-builder/src/widgets/image-widget.ts@@ -7,7 +7,6 @@ import {css, CSSResult, html, PropertyValues, TemplateResult, unsafeCSS } from "import {OrAssetWidget} from "../util/or-asset-widget";import {ImageSettings} from "../settings/image-settings";import { when } from "lit/directives/when.js";-import {i18next} from "@openremote/or-translate";import {DefaultColor2, DefaultColor3, Util} from "@openremote/core";import { styleMap } from "lit/directives/style-map.js";@@ -172,7 +171,7 @@ export class ImageWidget extends OrAssetWidget {</div></div>`, () => html`- <span>${i18next.t('dashboard.noImageSelected')}</span>+ <span><or-translate value="dashboard.noImageSelected"></or-translate></span>`)}</div>`;diff --git a/ui/component/or-dashboard-builder/src/widgets/map-widget.ts b/ui/component/or-dashboard-builder/src/widgets/map-widget.tsindex 22e35ae95..2f62b749d 100644--- a/ui/component/or-dashboard-builder/src/widgets/map-widget.ts+++ b/ui/component/or-dashboard-builder/src/widgets/map-widget.ts@@ -15,7 +15,6 @@ import {} from "@openremote/or-map";import {when} from "lit/directives/when.js";import manager, {Util} from "@openremote/core";-import {i18next} from "@openremote/or-translate";import { showSnackbar } from "@openremote/or-mwc-components/or-mwc-snackbar";import "@openremote/or-map";@@ -121,7 +120,7 @@ export class MapWidget extends OrAssetWidget {this.markers = {};}).catch((reason) => {console.error(reason);- showSnackbar(undefined, i18next.t('errorOccurred'));+ showSnackbar(undefined, "errorOccurred");});return assets;}diff --git a/ui/component/or-json-forms/src/controls/control-array-element.ts b/ui/component/or-json-forms/src/controls/control-array-element.tsindex 2c0da3e7d..ba2a5d7a6 100644--- a/ui/component/or-json-forms/src/controls/control-array-element.ts+++ b/ui/component/or-json-forms/src/controls/control-array-element.ts@@ -147,7 +147,7 @@ export class ControlArrayElement extends ControlBaseElement {<div id="errors">${!this.errors ? `` : html`<or-icon icon="alert"></or-icon><span>${this.errors}</span>`}</div>- <div id="header-buttons"><or-mwc-input .type="${InputType.BUTTON}" outlined .label="${i18next.t("json")}" icon="pencil" @or-mwc-input-changed="${(ev: Event) => this._showJson(ev)}"></or-mwc-input></div>+ <div id="header-buttons"><or-mwc-input .type="${InputType.BUTTON}" outlined label="json" icon="pencil" @or-mwc-input-changed="${(ev: Event) => this._showJson(ev)}"></or-mwc-input></div></div>`;@@ -173,7 +173,7 @@ export class ControlArrayElement extends ControlBaseElement {</div>${this.errors ? `` : html`<div id="footer">- <or-mwc-input .disabled="${itemCount && itemCount >= maxItems}" .type="${InputType.BUTTON}" .label="${i18next.t("addItem")}" icon="plus" @or-mwc-input-changed="${() => this.doAddItem()}"></or-mwc-input>+ <or-mwc-input .disabled="${itemCount && itemCount >= maxItems}" .type="${InputType.BUTTON}" label="addItem" icon="plus" @or-mwc-input-changed="${() => this.doAddItem()}"></or-mwc-input></div>`}</div>@@ -312,7 +312,7 @@ export class ControlArrayElement extends ControlBaseElement {.setActions([{actionName: "cancel",- content: i18next.t("cancel")+ content: "cancel"},{default: true,@@ -323,7 +323,7 @@ export class ControlArrayElement extends ControlBaseElement {this.addItem(value);}},- content: html`<or-mwc-input id="add-btn" .type="${InputType.BUTTON}" disabled .label="${i18next.t("add")}"></or-mwc-input>`+ content: html`<or-mwc-input id="add-btn" .type="${InputType.BUTTON}" disabled label="add"></or-mwc-input>`}]).setDismissAction(null));diff --git a/ui/component/or-json-forms/src/layouts/layout-vertical-element.ts b/ui/component/or-json-forms/src/layouts/layout-vertical-element.tsindex 0a0a1919e..615c110cd 100644--- a/ui/component/or-json-forms/src/layouts/layout-vertical-element.ts+++ b/ui/component/or-json-forms/src/layouts/layout-vertical-element.ts@@ -139,7 +139,7 @@ export class LayoutVerticalElement extends LayoutBaseElement<VerticalLayout | Gr<div id="errors">${!this.errors ? `` : html`<or-icon icon="alert"></or-icon><span>${this.errors}</span>`}</div>- <div id="header-buttons"><or-mwc-input .type="${InputType.BUTTON}" outlined .label="${i18next.t("json")}" icon="pencil" @or-mwc-input-changed="${(ev: Event) => this._showJson(ev)}"></or-mwc-input></div>+ <div id="header-buttons"><or-mwc-input .type="${InputType.BUTTON}" outlined label="json" icon="pencil" @or-mwc-input-changed="${(ev: Event) => this._showJson(ev)}"></or-mwc-input></div></div>`;@@ -179,7 +179,7 @@ export class LayoutVerticalElement extends LayoutBaseElement<VerticalLayout | Gr${this.errors || (optionalProps.length === 0 && !dynamic) ? `` : html`<div id="footer">- <or-mwc-input .type="${InputType.BUTTON}" .label="${i18next.t("addParameter")}" icon="plus" @or-mwc-input-changed="${() => this._addParameter(rootSchema, optionalProps, dynamicPropertyRegex, dynamicValueSchema)}"></or-mwc-input>+ <or-mwc-input .type="${InputType.BUTTON}" label="addParameter" icon="plus" @or-mwc-input-changed="${() => this._addParameter(rootSchema, optionalProps, dynamicPropertyRegex, dynamicValueSchema)}"></or-mwc-input></div>`}</div>`;@@ -375,7 +375,7 @@ export class LayoutVerticalElement extends LayoutBaseElement<VerticalLayout | Gr.setActions([{actionName: "cancel",- content: i18next.t("cancel")+ content: "cancel"},{default: true,@@ -387,7 +387,7 @@ export class LayoutVerticalElement extends LayoutBaseElement<VerticalLayout | Grdata[key] = Array.isArray(schema.type) ? null : ((selectedOneOf ? selectedOneOf.defaultValueCreator() : undefined) || createDefaultValue(schema));this.handleChange(this.path || "", data);},- content: html`<or-mwc-input id="add-btn" .type="${InputType.BUTTON}" disabled .label="${i18next.t("add")}"></or-mwc-input>`+ content: html`<or-mwc-input id="add-btn" .type="${InputType.BUTTON}" disabled label="add"></or-mwc-input>`}]).setDismissAction(null));diff --git a/ui/component/or-json-forms/src/standard-renderers.ts b/ui/component/or-json-forms/src/standard-renderers.tsindex 15eddf2d1..fc0610976 100644--- a/ui/component/or-json-forms/src/standard-renderers.ts+++ b/ui/component/or-json-forms/src/standard-renderers.ts@@ -53,7 +53,6 @@ import "./layouts/layout-vertical-element";import "./controls/control-input-element";import "./controls/control-array-element";import {InputType, OrInputChangedEvent} from "@openremote/or-mwc-components/or-mwc-input";-import {i18next} from "@openremote/or-translate";import {AdditionalProps} from "./base-element";import {Util} from "@openremote/core";@@ -268,7 +267,7 @@ export const anyOfOneOfControlRenderer = (state: JsonFormsStateContext, props: C};return html`- <div class="item-container no-match-container"><span>${label}:</span><b><or-translate value="validation.noSchemaMatchFound"></b><or-mwc-input .type="${InputType.BUTTON}" outlined .label="${i18next.t("json")}" icon="pencil" @or-mwc-input-changed="${(ev: Event) => showJson(ev)}"></or-mwc-input></div>+ <div class="item-container no-match-container"><span>${label}:</span><b><or-translate value="validation.noSchemaMatchFound"></b><or-mwc-input .type="${InputType.BUTTON}" outlined label="json" icon="pencil" @or-mwc-input-changed="${(ev: Event) => showJson(ev)}"></or-mwc-input></div>`;} else {// We have no data so show a schema pickerdiff --git a/ui/component/or-json-forms/src/util.ts b/ui/component/or-json-forms/src/util.tsindex 6b60ab7b1..323c0de72 100644--- a/ui/component/or-json-forms/src/util.ts+++ b/ui/component/or-json-forms/src/util.ts@@ -347,7 +347,7 @@ export const showJsonEditor = (title: string, value: any, updateCallback: (newVa.setActions([{actionName: "cancel",- content: i18next.t("cancel")+ content: "cancel"},{default: true,@@ -359,7 +359,7 @@ export const showJsonEditor = (title: string, value: any, updateCallback: (newVaupdateCallback(data);}},- content: html`<or-mwc-input ${ref(updateBtnRef)} disabled .type="${InputType.BUTTON}" .label="${i18next.t("update")}"></or-mwc-input>`+ content: html`<or-mwc-input ${ref(updateBtnRef)} disabled .type="${InputType.BUTTON}" label="update"></or-mwc-input>`}]).setHeading(title)diff --git a/ui/component/or-map/src/index.ts b/ui/component/or-map/src/index.tsindex 3edcde836..ff7ed291b 100644--- a/ui/component/or-map/src/index.ts+++ b/ui/component/or-map/src/index.ts@@ -339,7 +339,7 @@ export const geoJsonPointInputTemplateProvider: ValueInputProviderGenerator = (a.setActions([{actionName: "none",- content: i18next.t("none"),+ content: "none",action: () => {setPos(null);valueChangeHandler(pos as LngLatLike);@@ -347,7 +347,7 @@ export const geoJsonPointInputTemplateProvider: ValueInputProviderGenerator = (a},{actionName: "ok",- content: i18next.t("ok"),+ content: "ok",action: () => {valueChangeHandler(pos as LngLatLike);}@@ -355,7 +355,7 @@ export const geoJsonPointInputTemplateProvider: ValueInputProviderGenerator = (a{default: true,actionName: "cancel",- content: i18next.t("cancel")+ content: "cancel"}]));};diff --git a/ui/component/or-map/src/or-map-asset-card.ts b/ui/component/or-map/src/or-map-asset-card.tsindex 1087a932d..c6eed627c 100644--- a/ui/component/or-map/src/or-map-asset-card.ts+++ b/ui/component/or-map/src/or-map-asset-card.ts@@ -21,7 +21,6 @@ import manager, {subscribe, Util} from "@openremote/core";import "@openremote/or-icon";import {mapAssetCardStyle} from "./style";import { InputType } from "@openremote/or-mwc-components/or-mwc-input";-import { i18next } from "@openremote/or-translate";import { getMarkerIconAndColorFromAssetType } from "./util";import {getMarkerConfigAttributeName, MapMarkerAssetConfig} from "./markers/or-map-marker-asset";@@ -178,7 +177,7 @@ export class OrMapAssetCard extends subscribe(manager)(LitElement) {</div>${cardConfig && cardConfig.hideViewAsset ? html`` : html`<div id="footer">- <or-mwc-input .type="${InputType.BUTTON}" .label="${i18next.t("viewAsset")}" @or-mwc-input-changed="${(e: MouseEvent) => {e.preventDefault(); this._loadAsset(this.asset!.id!);}}"></or-mwc-input>+ <or-mwc-input .type="${InputType.BUTTON}" label="viewAsset" @or-mwc-input-changed="${(e: MouseEvent) => {e.preventDefault(); this._loadAsset(this.asset!.id!);}}"></or-mwc-input></div>`}</div>diff --git a/ui/component/or-mwc-components/src/or-mwc-dialog.ts b/ui/component/or-mwc-components/src/or-mwc-dialog.tsindex e4daa7a27..b1ebf463e 100644--- a/ui/component/or-mwc-components/src/or-mwc-dialog.ts+++ b/ui/component/or-mwc-components/src/or-mwc-dialog.ts@@ -82,7 +82,7 @@ export async function showOkCancelDialog(title: string, content: string | Templa[{actionName: "cancel",- content: i18next.t("cancel"),+ content: "cancel",default: true,action: () => deferred.resolve(false)},diff --git a/ui/component/or-mwc-components/src/or-mwc-list.ts b/ui/component/or-mwc-components/src/or-mwc-list.tsindex bc21208a7..259fed011 100644--- a/ui/component/or-mwc-components/src/or-mwc-list.ts+++ b/ui/component/or-mwc-components/src/or-mwc-list.ts@@ -183,15 +183,15 @@ export function getItemTemplate(item: ListItem | null, index: number, selectedVaif (secondaryText !== undefined) {textTemplate = html`<span class="mdc-list-item__text">- <span class="mdc-list-item__primary-text">${translate && !!text ? i18next.t(text) : text}</span>- <span class="mdc-list-item__secondary-text">${translate && !!secondaryText ? i18next.t(secondaryText) : secondaryText}</span>+ <span class="mdc-list-item__primary-text">${translate && !!text ? html`<or-translate value="${text}"></or-translate>` : text}</span>+ <span class="mdc-list-item__secondary-text">${translate && !!secondaryText ? html`<or-translate value="${secondaryText}"></or-translate>` : secondaryText}</span></span>`;} else {if (type === ListType.RADIO) {- textTemplate = html`<label class="mdc-list-item__text" for="radio-item-${index+1}">${translate && !!text ? i18next.t(text) : text}</label>`;+ textTemplate = html`<label class="mdc-list-item__text" for="radio-item-${index+1}">${translate && !!text ? html`<or-translate value="${text}"></or-translate>` : text}</label>`;} else {- textTemplate = html`<span class="mdc-list-item__text" title="${translate && !!text ? i18next.t(text) : text}">${translate && !!text ? i18next.t(text) : text}</span>`;+ textTemplate = html`<span class="mdc-list-item__text" title="${translate && !!text ? i18next.t(text) : text}">${translate && !!text ? html`<or-translate value="${text}"></or-translate>` : text}</span>`;}}}diff --git a/ui/component/or-mwc-components/src/or-mwc-snackbar.ts b/ui/component/or-mwc-components/src/or-mwc-snackbar.tsindex 65d172b43..94afd548a 100644--- a/ui/component/or-mwc-components/src/or-mwc-snackbar.ts+++ b/ui/component/or-mwc-components/src/or-mwc-snackbar.ts@@ -120,11 +120,11 @@ export class OrMwcSnackbar extends LitElement {@MDCSnackbar:closed="${(ev: MDCSnackbarCloseEvent) => this.onClose(ev.detail.reason)}"><div class="mdc-snackbar__surface" role="status" aria-relevant="additions"><div class="mdc-snackbar__label" aria-atomic="false">- ${this.text}+ <or-translate value="${this.text}"></or-translate></div>${!this.buttonText ? html`` : html`<div class="mdc-snackbar__actions" aria-atomic="true">- <or-mwc-input type="button" class="mdc-button mdc-snackbar__action" .label="${this.buttonText}">+ <or-mwc-input type="button" class="mdc-button mdc-snackbar__action" label="${this.buttonText}"></or-mwc-input></div>`};diff --git a/ui/component/or-rules/src/flow-viewer/components/internal-picker.ts b/ui/component/or-rules/src/flow-viewer/components/internal-picker.tsindex bf61dfdeb..9319766c5 100644--- a/ui/component/or-rules/src/flow-viewer/components/internal-picker.ts+++ b/ui/component/or-rules/src/flow-viewer/components/internal-picker.ts@@ -212,7 +212,7 @@ export class InternalPicker extends translate(i18next)(LitElement) {<div class="asset-attribute">${selectedAttrLabel}</div></div></div>` :- html`<or-mwc-input class="attribute-label-white" .type="${InputType.BUTTON}" label="${i18next.t("attribute")}" icon="plus" @or-mwc-input-changed="${() => openDialog()}"></or-mwc-input>`+ html`<or-mwc-input class="attribute-label-white" .type="${InputType.BUTTON}" label="attribute" icon="plus" @or-mwc-input-changed="${() => openDialog()}"></or-mwc-input>`)}</div>`;}diff --git a/ui/component/or-rules/src/json-viewer/forms/or-rule-form-webhook.ts b/ui/component/or-rules/src/json-viewer/forms/or-rule-form-webhook.tsindex 13a5f6c6a..c48e1acc2 100644--- a/ui/component/or-rules/src/json-viewer/forms/or-rule-form-webhook.ts+++ b/ui/component/or-rules/src/json-viewer/forms/or-rule-form-webhook.ts@@ -118,7 +118,7 @@ export class OrRuleFormWebhook extends LitElement {`, () => html`${this.getHeadersTemplate(this.webhook.headers!, false)}`)}- <or-mwc-input type="${InputType.BUTTON}" icon="plus" label="${i18next.t('addRequestHeader')}"+ <or-mwc-input type="${InputType.BUTTON}" icon="plus" label="addRequestHeader"@or-mwc-input-changed="${(ev: OrInputChangedEvent) => {if ((this.webhook.headers ? this.webhook.headers[''] : undefined) != undefined) {this.webhook.headers![''].push('');diff --git a/ui/component/or-rules/src/json-viewer/modals/or-rule-notification-modal.ts b/ui/component/or-rules/src/json-viewer/modals/or-rule-notification-modal.tsindex 9ed4c03d3..c943b7f41 100644--- a/ui/component/or-rules/src/json-viewer/modals/or-rule-notification-modal.ts+++ b/ui/component/or-rules/src/json-viewer/modals/or-rule-notification-modal.ts@@ -107,14 +107,14 @@ export class OrRuleNotificationModal extends translate(i18next)(LitElement) {const notificationPickerModalActions: DialogAction[] = [{actionName: "cancel",- content: html`<or-mwc-input class="button" .type="${InputType.BUTTON}" .label="${i18next.t("cancel")}"></or-mwc-input>`,+ content: html`<or-mwc-input class="button" .type="${InputType.BUTTON}" label="cancel"></or-mwc-input>`,action: (dialog) => {}},{actionName: "",- content: html`<or-mwc-input class="button" .type="${InputType.BUTTON}" .label="${i18next.t("ok")}" @or-mwc-input-changed="${this.checkForm}"></or-mwc-input>`+ content: html`<or-mwc-input class="button" .type="${InputType.BUTTON}" label="ok" @or-mwc-input-changed="${this.checkForm}"></or-mwc-input>`}];@@ -127,7 +127,7 @@ export class OrRuleNotificationModal extends translate(i18next)(LitElement) {};return html`- <or-mwc-input .type="${InputType.BUTTON}" .label="${i18next.t("message")}" @or-mwc-input-changed="${notificationPickerModalOpen}"></or-mwc-input>+ <or-mwc-input .type="${InputType.BUTTON}" label="message" @or-mwc-input-changed="${notificationPickerModalOpen}"></or-mwc-input><or-mwc-dialog id="notification-modal" heading="${this.title}" .actions="${notificationPickerModalActions}"></or-mwc-dialog><slot class="notification-form-slot"></slot>`diff --git a/ui/component/or-rules/src/json-viewer/modals/or-rule-radial-modal.ts b/ui/component/or-rules/src/json-viewer/modals/or-rule-radial-modal.tsindex c6a79ab55..bf446e43a 100644--- a/ui/component/or-rules/src/json-viewer/modals/or-rule-radial-modal.ts+++ b/ui/component/or-rules/src/json-viewer/modals/or-rule-radial-modal.ts@@ -123,7 +123,7 @@ export class OrRuleRadialModal extends translate(i18next)(LitElement) {const radiusPickerModalActions: DialogAction[] = [{actionName: "cancel",- content: html`<or-mwc-input class="button" .type="${InputType.BUTTON}" .label="${i18next.t("cancel")}"></or-mwc-input>`,+ content: html`<or-mwc-input class="button" .type="${InputType.BUTTON}" label="cancel"></or-mwc-input>`,action: () => {// Nothing to do here}@@ -131,7 +131,7 @@ export class OrRuleRadialModal extends translate(i18next)(LitElement) {{actionName: "ok",default: true,- content: html`<or-mwc-input class="button" .type="${InputType.BUTTON}" .label="${i18next.t("ok")}"></or-mwc-input>`,+ content: html`<or-mwc-input class="button" .type="${InputType.BUTTON}" label="ok"></or-mwc-input>`,action: () => {}}@@ -151,7 +151,7 @@ export class OrRuleRadialModal extends translate(i18next)(LitElement) {this.renderDialogHTML(value);return html`- <or-mwc-input .type="${InputType.BUTTON}" .label="${i18next.t("area")}" @or-mwc-input-changed="${radialPickerModalOpen}"></or-mwc-input>+ <or-mwc-input .type="${InputType.BUTTON}" label="area" @or-mwc-input-changed="${radialPickerModalOpen}"></or-mwc-input><or-mwc-dialog id="radial-modal" heading="area" .actions="${radiusPickerModalActions}"></or-mwc-dialog>`}diff --git a/ui/component/or-rules/src/json-viewer/modals/or-rule-webhook-modal.ts b/ui/component/or-rules/src/json-viewer/modals/or-rule-webhook-modal.tsindex 33c23bd23..460bbcbae 100644--- a/ui/component/or-rules/src/json-viewer/modals/or-rule-webhook-modal.ts+++ b/ui/component/or-rules/src/json-viewer/modals/or-rule-webhook-modal.ts@@ -56,7 +56,7 @@ export class OrRuleWebhookModal extends LitElement {const webhookModalActions: DialogAction[] = [{actionName: "", content: html`- <or-mwc-input .type="${InputType.BUTTON}" .label="${i18next.t("ok")}"+ <or-mwc-input .type="${InputType.BUTTON}" label="ok"@or-mwc-input-changed="${this.closeForm}"></or-mwc-input>`}];@@ -67,7 +67,7 @@ export class OrRuleWebhookModal extends LitElement {}};return html`- <or-mwc-input type="${InputType.BUTTON}" label="${i18next.t('message')}"+ <or-mwc-input type="${InputType.BUTTON}" label="message"@or-mwc-input-changed="${webhookModalOpen}"></or-mwc-input><or-mwc-dialog id="webhook-modal" heading="${this.title}" .actions="${webhookModalActions}"></or-mwc-dialog><slot class="webhook-form-slot"></slot>diff --git a/ui/component/or-rules/src/json-viewer/or-rule-asset-query.ts b/ui/component/or-rules/src/json-viewer/or-rule-asset-query.tsindex 1e49817df..db7daf228 100644--- a/ui/component/or-rules/src/json-viewer/or-rule-asset-query.ts+++ b/ui/component/or-rules/src/json-viewer/or-rule-asset-query.ts@@ -381,7 +381,7 @@ export class OrRuleAssetQuery extends translate(i18next)(LitElement) {}) : ``}${showAddAttribute ? html`<or-mwc-input class="plus-button" type="${InputType.BUTTON}" icon="plus"- .label="${i18next.t("rulesEditorAddAttribute")}" @or-mwc-input-changed="${(ev: OrInputChangedEvent) => this.addAttributePredicate(this.query!.attributes!)}"></or-mwc-input>+ label="rulesEditorAddAttribute" @or-mwc-input-changed="${(ev: OrInputChangedEvent) => this.addAttributePredicate(this.query!.attributes!)}"></or-mwc-input>`: ``}</div>`;diff --git a/ui/component/or-rules/src/json-viewer/or-rule-then-otherwise.ts b/ui/component/or-rules/src/json-viewer/or-rule-then-otherwise.tsindex 09529fe66..0df306b2b 100644--- a/ui/component/or-rules/src/json-viewer/or-rule-then-otherwise.ts+++ b/ui/component/or-rules/src/json-viewer/or-rule-then-otherwise.ts@@ -256,14 +256,14 @@ class OrRuleThenOtherwise extends translate(i18next)(LitElement) {if(readonly) {recurrenceTemplate = html`<div style="--or-mwc-input-color: ${buttonColor}; margin-right: 6px;">- <or-mwc-input .type="${InputType.BUTTON}" .label="${i18next.t(value)}"></or-mwc-input>+ <or-mwc-input .type="${InputType.BUTTON}" label="${value}"></or-mwc-input></div>`;} else {recurrenceTemplate = html`<div style="--or-mwc-input-color: ${buttonColor}; margin-right: 6px;">${getContentWithMenuTemplate(- html`<or-mwc-input .type="${InputType.BUTTON}" .label="${i18next.t(value)}"></or-mwc-input>`,+ html`<or-mwc-input .type="${InputType.BUTTON}" label="${value}"></or-mwc-input>`,getRecurrenceMenu(this.config),value,(value) => this.setRecurrenceOption(value as RecurrenceOption))}diff --git a/ui/component/or-rules/src/json-viewer/or-rule-trigger-query.ts b/ui/component/or-rules/src/json-viewer/or-rule-trigger-query.tsindex c2edecd7c..c18f76b86 100644--- a/ui/component/or-rules/src/json-viewer/or-rule-trigger-query.ts+++ b/ui/component/or-rules/src/json-viewer/or-rule-trigger-query.ts@@ -126,7 +126,7 @@ export class OrRuleTriggerQuery extends LitElement {render() {const modalActions: DialogAction[] = [- { actionName: "close", default: true, content: html`<or-mwc-input class="button" .type="${InputType.BUTTON}" label="${i18next.t('close')}"></or-mwc-input>`, action: () => {} }+ { actionName: "close", default: true, content: html`<or-mwc-input class="button" .type="${InputType.BUTTON}" label="close"></or-mwc-input>`, action: () => {} }];const onMapModalOpen = () => {const dialog: OrMwcDialog = this.shadowRoot!.getElementById("map-modal") as OrMwcDialog;@@ -153,7 +153,7 @@ export class OrRuleTriggerQuery extends LitElement {<or-mwc-input class="min-width width" type="${InputType.NUMBER}" .value="${this.condition.sun?.offsetMins}" label="${i18next.t('offsetInMinutes')}"@or-mwc-input-changed="${(ev: OrInputChangedEvent) => { this.setOffset(ev.detail.value) }}"></or-mwc-input>- <or-mwc-input type="${InputType.BUTTON}" class="min-width" @or-mwc-input-changed="${onMapModalOpen}" label="${i18next.t('location')}"></or-mwc-input>+ <or-mwc-input type="${InputType.BUTTON}" class="min-width" @or-mwc-input-changed="${onMapModalOpen}" label="location"></or-mwc-input><or-mwc-dialog id="map-modal" heading="${i18next.t('pickLocation')}" .actions="${modalActions}"></or-mwc-dialog>`}` : undefined}diff --git a/ui/component/or-rules/src/or-rule-list.ts b/ui/component/or-rules/src/or-rule-list.tsindex a61d8823e..b2f9f47a8 100644--- a/ui/component/or-rules/src/or-rule-list.ts+++ b/ui/component/or-rules/src/or-rule-list.ts@@ -231,7 +231,7 @@ export class OrRuleList extends translate(i18next)(LitElement) {addTemplate = getContentWithMenuTemplate(html`<or-mwc-input type="${InputType.BUTTON}" icon="plus"></or-mwc-input>`,allowedLanguages.map((l) => {- return {value: l, text: i18next.t(l)} as ListItem;+ return {value: l, text: i18next.t("rulesLanguages." + l)} as ListItem;}),this.language,(v) => this._onAddClicked(v as RulesetLang));@@ -340,19 +340,19 @@ export class OrRuleList extends translate(i18next)(LitElement) {switch (node.ruleset.lang) {case (RulesetLang.JSON):nodeIcon = "ray-start-arrow";- nodeTitle = "When-Then";+ nodeTitle = "rulesLanguages.JSON";break;case (RulesetLang.FLOW):nodeIcon = "transit-connection-variant";- nodeTitle = "Flow";+ nodeTitle = "rulesLanguages.FLOW";break;case (RulesetLang.GROOVY):nodeIcon = "alpha-g-box-outline";- nodeTitle = "Groovy";+ nodeTitle = "rulesLanguages.GROOVY";break;case (RulesetLang.JAVASCRIPT):nodeIcon = "language-javascript";- nodeTitle = "JavaScript";+ nodeTitle = "rulesLanguages.JAVASCRIPT";break;default:nodeIcon = "mdi-state-machine";diff --git a/ui/component/or-rules/src/or-rule-validity.ts b/ui/component/or-rules/src/or-rule-validity.tsindex 6618b9a44..5db513ac9 100644--- a/ui/component/or-rules/src/or-rule-validity.ts+++ b/ui/component/or-rules/src/or-rule-validity.ts@@ -234,7 +234,7 @@ export class OrRuleValidity extends translate(i18next)(LitElement) {if(!this.ruleset) return html``;return html`- <or-mwc-input .type="${InputType.BUTTON}" .label="${this.timeLabel()}" @or-mwc-input-changed="${() => this.showDialog()}"></or-mwc-input>+ <or-mwc-input outlined .type="${InputType.BUTTON}" label="${this.timeLabel()}" @or-mwc-input-changed="${() => this.showDialog()}"></or-mwc-input>`;}@@ -267,7 +267,7 @@ export class OrRuleValidity extends translate(i18next)(LitElement) {.setActions([{actionName: "cancel",- content: html`<or-mwc-input class="button" .type="${InputType.BUTTON}" .label="${i18next.t("cancel")}"></or-mwc-input>`,+ content: html`<or-mwc-input class="button" .type="${InputType.BUTTON}" label="cancel"></or-mwc-input>`,action: () => {this._dialog = undefined;}@@ -275,7 +275,7 @@ export class OrRuleValidity extends translate(i18next)(LitElement) {{actionName: "ok",default: true,- content: html`<or-mwc-input class="button" .type="${InputType.BUTTON}" .label="${i18next.t("apply")}"></or-mwc-input>`,+ content: html`<or-mwc-input class="button" .type="${InputType.BUTTON}" label="apply"></or-mwc-input>`,action: () => {if (this.ruleset && this.ruleset.meta) {if (this.getValidityType() === "validityAlways") {diff --git a/ui/component/or-rules/src/or-rule-viewer.ts b/ui/component/or-rules/src/or-rule-viewer.tsindex d4fcc1ee7..49a0a218f 100644--- a/ui/component/or-rules/src/or-rule-viewer.ts+++ b/ui/component/or-rules/src/or-rule-viewer.ts@@ -88,10 +88,6 @@ export const style = css`align-items: center;}- #active-wrapper > or-translate {- margin-right: 10px;- }-#rule-view {flex-grow: 1;background-color: var(--internal-or-rules-background-color);@@ -185,7 +181,7 @@ export class OrRuleViewer extends translate(i18next)(LitElement) {<or-mwc-input .type="${InputType.SWITCH}" .value="${this.ruleset && this.ruleset.enabled}" ?disabled="${!this.ruleset.id}" @or-mwc-input-changed="${this._toggleEnabled}"></or-mwc-input></span>- <or-mwc-input .type="${InputType.BUTTON}" id="save-btn" .label="${i18next.t("save")}" raised ?disabled="${this._cannotSave()}" @or-mwc-input-changed="${this._onSaveClicked}"></or-mwc-input>+ <or-mwc-input .type="${InputType.BUTTON}" id="save-btn" label="save" raised ?disabled="${this._cannotSave()}" @or-mwc-input-changed="${this._onSaveClicked}"></or-mwc-input></div></div>