Skip to content

armgit / core

Public Imported from GitHub
0

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

Add titles to several icon buttons (#1822)

DonWillems37afb15b74f7
diff --git a/ui/app/shared/locales/en/or.json b/ui/app/shared/locales/en/or.json
index 21e976503..9e1720afc 100644
--- a/ui/app/shared/locales/en/or.json
+++ b/ui/app/shared/locales/en/or.json
@@ -21,6 +21,11 @@
"login": "Log in",
"reload": "Reload",
"edit": "Edit",
+ "deselect": "Deselect",
+ "duplicate": "Duplicate",
+ "sort": "Sort",
+ "openList": "Open list",
+ "closeList": "Close list",
"monday": "Monday",
"tuesday": "Tuesday",
"wednesday": "Wednesday",
@@ -105,6 +110,7 @@
"rulesEditorAddGroup": "Add group",
"rulesEditorAddAction": "Add action",
"rulesEditorDuration": "Duration (min)",
+ "rulesEditorAddDuration": "Add duration to condition",
"sortBy": "Sort by",
"assetType": "Asset type",
"creationDate": "Creation date",
@@ -656,6 +662,8 @@
"no": "No",
"linked": "Linked",
"filter": {
+ "close": "Close filter",
+ "open": "Open filter",
"filter": "Filter",
"clear": "CLEAR",
"action": "FILTER",
@@ -668,6 +676,7 @@
},
"realmDeleteConfirm": "Warning! this will delete everything in this realm, type the realm name '{{realmName}}' to confirm.",
"realmDeleteFailed": "Failed to delete realm",
+ "addRule": "Add rule",
"rulesetStatus": {
"DEPLOYED": "Successfully deployed",
"NOSTATUS": "Disabled",
@@ -690,6 +699,7 @@
"uploadFile" : "Upload file",
"thresholds": "Thresholds",
"threshold": "Threshold",
+ "addInsights": "Add dashboard",
"noDashboardSelected": "Please select a dashboard on the left",
"noDashboardSelected-mobile": "Please select a dashboard in the top left menu",
"noDashboardFound": "No dashboard could be found.",
@@ -706,7 +716,9 @@
"markerCoordinates": "Marker Coordinates",
"imageSettings": "Image Settings",
"dataManagement": "Data Options",
+ "refresh": "Refresh",
"defaultRefreshInterval": "Default refresh interval",
+ "refreshInterval": "Refresh interval",
"presets.wrap_to_single_column": "Wrap to single column",
"presets.keep_layout": "Keep layout",
"presets.block_device": "Block this device",
@@ -721,7 +733,7 @@
"access.public": "Public",
"access.shared": "Realm Users",
"access.private": "Only me",
- "interval.off": "Off",
+ "interval.off": "Auto-refresh off",
"interval.one_min": "1 min",
"interval.five_min": "5 min",
"interval.quarter": "15 min",
@@ -738,6 +750,7 @@
"setToMobilePreset": "Set Mobile Preset",
"zoomPercent": "Zoom %",
"presetSize": "Preview size",
+ "previewScreenSizes": "Preview screen sizes",
"renderingGrid": "Rendering grid...",
"deviceNotSupported": "This dashboard does not support your device.",
"deletePermanentWarning": "This will delete {{dashboard}} permanently.",
diff --git a/ui/app/shared/locales/nl/or.json b/ui/app/shared/locales/nl/or.json
index db3ef46e2..4c6ee395a 100644
--- a/ui/app/shared/locales/nl/or.json
+++ b/ui/app/shared/locales/nl/or.json
@@ -7,6 +7,7 @@
"asset": "Asset",
"asset_plural": "Assets",
"assets": "Assets",
+ "allAssetsofType": "Alle assets van dit type",
"attribute": "Attribuut",
"attributes": "Attributen",
"attribute_plural": "Attributen",
@@ -20,6 +21,11 @@
"login": "Log in",
"reload": "Herladen",
"edit": "Aanpassen",
+ "deselect": "Deselecteren",
+ "duplicate": "Dupliceren",
+ "sort": "Sorteren",
+ "openList": "Lijst openen",
+ "closeList": "Lijst sluiten",
"monday": "maandag",
"tuesday": "dinsdag",
"wednesday": "woensdag",
@@ -104,6 +110,7 @@
"rulesEditorAddGroup": "Groep",
"rulesEditorAddAction": "Voeg actie toe",
"rulesEditorDuration": "Tijdsduur (min)",
+ "rulesEditorAddDuration": "Voeg tijdsduur aan conditie toe",
"sortBy": "Sorteren op",
"assetType": "Asset type",
"creationDate": "Aangemaakt op",
@@ -124,7 +131,7 @@
"path": "Pad",
"showOnMap": "Tonen op kaart",
"noAssetSelected": "Kies een asset uit de lijst aan de linkerkant",
- "multiAssetSelected": "{{assetNbr}} assets selected",
+ "multiAssetSelected": "{{assetNbr}} assets geselecteerd",
"changeParent": "Wijzig Parent",
"setParent": "Kies parent asset",
"noAssetTypeSelected": "Kies een asset type uit de lijst aan de linkerkant",
@@ -171,6 +178,28 @@
"export": "exporteer",
"addAssetAttribute": "Voeg asset attribuut toe",
"add": "toevoegen",
+ "input": "Input",
+ "processors": "Processors",
+ "output": "Output",
+ "selectAsset": "Selecteer asset",
+ "selectAssetOnTheLeft": "Selecteer een asset aan de linkerkant",
+ "selectAssetTypeOnTheLeft": "Selecteer een asset type aan de linkerkant",
+ "noRuleStateAttributes": "Geen attributen met 'rule state' of 'agent link' configuratie item gevonden",
+ "noDatapointsAttributes": "Geen attributen met 'store data points' of 'agent link' configuratie item gevonden",
+ "noAttributesToShow": "Geen attributen gevonden",
+ "noAttributeConnected": "Geen atribuut verbonden",
+ "noAttributesConnected": "Geen attributen verbonden",
+ "noAttributeDataTimeout": "Dataverzoek verlopen",
+ "datapointRequestTooLarge": "Teveel data opgevraagd",
+ "noDatapointsOrRuleStateAttributes": "Geen attributen met 'rule state', 'store data points', of 'agent link' configuratie item gevonden",
+ "copy": "Kopiëren",
+ "paste": "Plakken",
+ "delete": "Verwijderen",
+ "fitViewToSelectedNodes": "Pas beeld aan op selectie",
+ "resetView": "Reset beeld",
+ "fitView": "Pas beeld aan op project",
+ "areYouSure": "Weet je het zeker?",
+ "flowEditor": "Flow editor",
"flow":{
"EQUALS_COMPARATOR": "Gelijk aan",
"GREATER_THAN": "Groter dan",
@@ -191,42 +220,20 @@
"NUMBER_SWITCH": "Nummer schakeling",
"TEXT_SWITCH": "Tekst schakeling",
"ROUND_NODE": "Afronden",
- "LOG_OUTPUT": "Write to Logs",
- "DERIVATIVE": "Attribute derivative",
- "INTEGRAL": "Attribute integral",
- "HISTORIC_VALUE": "Attribute history",
+ "LOG_OUTPUT": "Naar logs schrijven",
+ "DERIVATIVE": "Attribute derivaat",
+ "INTEGRAL": "Attribute integraal",
+ "HISTORIC_VALUE": "Attribute geschiedenis",
"MAX_PROCESSOR": "Maximum",
"MIN_PROCESSOR": "Minimum",
- "AVERAGE_PROCESSOR": "Average",
- "MEDIAN_PROCESSOR": "Median",
- "SUM_OPERATOR": "Sum",
+ "AVERAGE_PROCESSOR": "Gemiddelde",
+ "MEDIAN_PROCESSOR": "Mediaan",
+ "SUM_OPERATOR": "Som",
"max": "Max",
"min": "Min",
"avg": "Avg",
"med": "Med"
},
- "input": "Input",
- "processors": "Processors",
- "output": "Output",
- "selectAsset": "Selecteer asset",
- "selectAssetOnTheLeft": "Selecteer een asset aan de linkerkant",
- "selectAssetTypeOnTheLeft": "Selecteer een asset type aan de linkerkant",
- "noRuleStateAttributes": "Geen attributen met 'rule state' of 'agent link' configuratie item gevonden",
- "noDatapointsAttributes": "Geen attributen met 'store data points' of 'agent link' configuratie item gevonden",
- "noAttributesToShow": "Geen attributen gevonden",
- "noAttributeConnected": "Geen atribuut verbonden",
- "noAttributesConnected": "Geen attributen verbonden",
- "noAttributeDataTimeout": "Dataverzoek verlopen",
- "datapointRequestTooLarge": "Teveel data opgevraagd",
- "noDatapointsOrRuleStateAttributes": "Geen attributen met 'rule state', 'store data points', of 'agent link' configuratie item gevonden",
- "copy": "Kopiëren",
- "paste": "Plakken",
- "delete": "Verwijderen",
- "fitViewToSelectedNodes": "Pas beeld aan op selectie",
- "resetView": "Reset beeld",
- "fitView": "Pas beeld aan op project",
- "areYouSure": "Weet je het zeker?",
- "flowEditor": "Flow editor",
"else": "anders",
"english": "Engels",
"arabic": "Arabisch",
@@ -386,7 +393,8 @@
"createNew": "Maak een nieuwe Gateway tunnel",
"selectAsset": "Selecteer gateway asset",
"closeSuccessful": "Tunnel gesloten",
- "closesAt": "Sluit op"
+ "closesAt": "Sluit op",
+ "offline": "Offline"
},
"tunnels": "tunnels",
"tunnel": "tunnel",
@@ -653,6 +661,8 @@
"no": "Nee",
"linked": "Gelinkt",
"filter": {
+ "close": "Filter sluiten",
+ "open": "Filter openen",
"filter": "Filter",
"clear": "LEEGMAKEN",
"action": "FILTER",
@@ -665,6 +675,7 @@
},
"realmDeleteConfirm": "Let op! Hiermee verwijder je alles in deze realm, typ de realm naam '{{realmName}}' om te bevestigen.",
"realmDeleteFailed": "Realm verwijderen mislukt",
+ "addRule": "Regel toevoegen"
"rulesetStatus": {
"DEPLOYED": "Succesvol aangemaakt",
"NOSTATUS": "Uitgeschakeld",
@@ -687,6 +698,7 @@
"uploadFile" : "Uploaden bestand",
"thresholds": "Drempelwaardes",
"threshold": "Drempelwaarde",
+ "addInsights": "Dashboard toevoegen"
"noDashboardSelected": "Selecteer een dashboard aan de linkerkant",
"noDashboardSelected-mobile": "Selecteer een dashboard in het menu linksboven",
"noDashboardFound": "Geen dashboard gevonden.",
@@ -703,7 +715,9 @@
"markerCoordinates": "Marker coordinaten",
"imageSettings": "Afbeeldingsinstellingen",
"dataManagement": "Weergave van data",
+ "refresh": "Verversen",
"defaultRefreshInterval": "Standaard interval van data verversen",
+ "refreshInterval": "Ververs interval",
"presets.wrap_to_single_column": "Widgets onder elkaar zetten",
"presets.keep_layout": "Behoud indeling",
"presets.block_device": "Blokkeer dit apparaat",
@@ -718,7 +732,7 @@
"access.public": "Openbaar",
"access.shared": "Realm gebruikers",
"access.private": "Alleen ik",
- "interval.off": "Uit",
+ "interval.off": "Autom-verversing uit",
"interval.one_min": "1 min",
"interval.five_min": "5 min",
"interval.quarter": "15 min",
@@ -735,6 +749,7 @@
"setToMobilePreset": "Stel mobiel preset in",
"zoomPercent": "Zoom %",
"presetSize": "Voorbeeld grootte",
+ "previewScreenSizes": "Preview schermformaten",
"renderingGrid": "Grid aan het renderen...",
"deviceNotSupported": "Dit dashboard wordt niet ondersteund op dit apparaat.",
"deletePermanentWarning": "Dit zal {{dashboard}} permanent verwijderen.",
diff --git a/ui/component/or-app/src/or-header.ts b/ui/component/or-app/src/or-header.ts
index 682898b00..26fc05225 100644
--- a/ui/component/or-app/src/or-header.ts
+++ b/ui/component/or-app/src/or-header.ts
@@ -20,6 +20,7 @@ import {Alarm, AlarmEvent, AlarmStatus, PersistenceEvent, Realm} from "@openremo
import {AppStateKeyed, router, updateRealm} from "./index";
import {AnyAction, Store} from "@reduxjs/toolkit";
import * as Model from "@openremote/model";
+import {i18next} from "@openremote/or-translate";
export {DEFAULT_LANGUAGES, Languages}
@@ -426,7 +427,7 @@ export class OrHeader extends LitElement {
<div id="desktop-right">
<div id="alarm-btn">
<a class="menu-item" @click="${(e: MouseEvent) => router.navigate('alarms')}">
- <or-icon icon="${this.alarmButton}" style="color:var(${this.alarmColor})"></or-icon>
+ <or-icon icon="${this.alarmButton}" style="color:var(${this.alarmColor})" title="${i18next.t("alarm.alarm_plural")}"></or-icon>
</a>
</div>
${this._getRealmMenu((value: string) => this._onRealmSelect(value))}
diff --git a/ui/component/or-asset-tree/src/index.ts b/ui/component/or-asset-tree/src/index.ts
index a8a7830c4..71959ad22 100644
--- a/ui/component/or-asset-tree/src/index.ts
+++ b/ui/component/or-asset-tree/src/index.ts
@@ -461,13 +461,13 @@ export class OrAssetTree extends subscribe(manager)(LitElement) {
</div>
<div id="header-btns">
- <or-mwc-input ?hidden="${!this.selectedIds || this.selectedIds.length === 0 || !this.showDeselectBtn}" type="${InputType.BUTTON}" icon="close" @or-mwc-input-changed="${() => this._onDeselectClicked()}"></or-mwc-input>
- <or-mwc-input ?hidden="${this._isReadonly() || !this.selectedIds || this.selectedIds.length !== 1 || !canAdd}" type="${InputType.BUTTON}" icon="content-copy" @or-mwc-input-changed="${() => this._onCopyClicked()}"></or-mwc-input>
- <or-mwc-input ?hidden="${this._isReadonly() || !this.selectedIds || this.selectedIds.length === 0 || this._gatewayDescendantIsSelected()}" type="${InputType.BUTTON}" icon="delete" @or-mwc-input-changed="${() => this._onDeleteClicked()}"></or-mwc-input>
- <or-mwc-input ?hidden="${this._isReadonly() || !canAdd}" type="${InputType.BUTTON}" icon="plus" @or-mwc-input-changed="${() => this._onAddClicked()}"></or-mwc-input>
+ <or-mwc-input ?hidden="${!this.selectedIds || this.selectedIds.length === 0 || !this.showDeselectBtn}" type="${InputType.BUTTON}" icon="close" title="${i18next.t("deselect")}" @or-mwc-input-changed="${() => this._onDeselectClicked()}"></or-mwc-input>
+ <or-mwc-input ?hidden="${this._isReadonly() || !this.selectedIds || this.selectedIds.length !== 1 || !canAdd}" type="${InputType.BUTTON}" icon="content-copy" title="${i18next.t("duplicate")}" @or-mwc-input-changed="${() => this._onCopyClicked()}"></or-mwc-input>
+ <or-mwc-input ?hidden="${this._isReadonly() || !this.selectedIds || this.selectedIds.length === 0 || this._gatewayDescendantIsSelected()}" type="${InputType.BUTTON}" icon="delete" title="${i18next.t("delete")}" @or-mwc-input-changed="${() => this._onDeleteClicked()}"></or-mwc-input>
+ <or-mwc-input ?hidden="${this._isReadonly() || !canAdd}" type="${InputType.BUTTON}" icon="plus" title="${i18next.t("addAsset")}" @or-mwc-input-changed="${() => this._onAddClicked()}"></or-mwc-input>
${getContentWithMenuTemplate(
- html`<or-mwc-input type="${InputType.BUTTON}" ?hidden="${!this.showSortBtn}" icon="sort-variant"></or-mwc-input>`,
+ html`<or-mwc-input type="${InputType.BUTTON}" ?hidden="${!this.showSortBtn}" icon="sort-variant" title="${i18next.t("sort")}" ></or-mwc-input>`,
["name", "type", "createdOn"].map((sort) => { return {value: sort, text: i18next.t(sort)} as ListItem; }),
this.sortBy,
(v) => this._onSortClicked(v as string))}
@@ -492,7 +492,7 @@ export class OrAssetTree extends subscribe(manager)(LitElement) {
this._onFilterInput((e.detail.value as string) || undefined, true);
}}">
</or-mwc-input>
- <or-icon id="filterSettingsIcon" icon="${this._filterSettingOpen ? "window-close" : "tune"}" @click="${() => {
+ <or-icon id="filterSettingsIcon" icon="${this._filterSettingOpen ? "window-close" : "tune"}" title="${i18next.t(this._filterSettingOpen ? "filter.close" : "filter.open")}" @click="${() => {
if (this._filterSettingOpen) {
this._filterSettingOpen = false;
} else {
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.ts
index 48a40bf84..600bfa7be 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
@@ -5,6 +5,7 @@ import {html, LitElement, PropertyValues, TemplateResult} from "lit";
import {customElement, property} from "lit/decorators.js";
import {when} from "lit/directives/when.js";
import {DashboardRefreshInterval} from "@openremote/model";
+import {i18next} from "@openremote/or-translate";
export function intervalToMillis(interval: DashboardRefreshInterval): number | undefined {
switch (interval) {
@@ -62,16 +63,16 @@ export class DashboardRefreshControls extends LitElement {
<div style="height: 100%; display: flex; align-items: center;">
${when(this.readonly, () => html`
${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>
+ <or-mwc-input .type="${InputType.BUTTON}" icon="pause" disabled="true" title="${i18next.t("dashboard.interval.off")}" style="height: 36px; margin-top: -12px;"></or-mwc-input>
`, () => html`
- <or-mwc-input .type="${InputType.BUTTON}" label="${value}" disabled="true"></or-mwc-input>
+ <or-mwc-input .type="${InputType.BUTTON}" label="${value}" disabled="true" title="${i18next.t("dashboard.refreshInterval")}"></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>
+ <or-mwc-input .type="${InputType.BUTTON}" icon="pause" title="${i18next.t("dashboard.interval.off")}" style="height: 36px; margin-top: -12px;"></or-mwc-input>
` : html`
- <or-mwc-input .type="${InputType.BUTTON}" label="${value}"></or-mwc-input>
+ <or-mwc-input .type="${InputType.BUTTON}" label="${value}" title="${i18next.t("dashboard.refreshInterval")}"></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.ts
index d7a7c14fb..4e83bc981 100644
--- a/ui/component/or-dashboard-builder/src/index.ts
+++ b/ui/component/or-dashboard-builder/src/index.ts
@@ -607,13 +607,13 @@ export class OrDashboardBuilder extends LitElement {
<div id="header-actions">
<div id="header-actions-content">
${when(this.selectedDashboard, () => html`
- <or-mwc-input id="refresh-btn" class="small-btn" .disabled="${this.isLoading}" type="${InputType.BUTTON}" icon="refresh"
+ <or-mwc-input id="refresh-btn" class="small-btn" .disabled="${this.isLoading}" type="${InputType.BUTTON}" icon="refresh" title="${i18next.t("dashboard.refresh")}"
@or-mwc-input-changed="${() => { this.deselectWidget(); this.dashboardPreview?.refreshPreview(); }}">
</or-mwc-input>
- <or-mwc-input id="responsive-btn" class="small-btn" .disabled="${this.isLoading}" type="${InputType.BUTTON}" icon="responsive"
+ <or-mwc-input id="responsive-btn" class="small-btn" .disabled="${this.isLoading}" type="${InputType.BUTTON}" icon="responsive" title="${i18next.t("dashboard.previewScreenSizes")}"
@or-mwc-input-changed="${() => { this.dispatchEvent(new CustomEvent('fullscreenToggle', { detail: !this.fullscreen })); }}">
</or-mwc-input>
- <or-mwc-input id="share-btn" class="small-btn" .disabled="${this.isLoading}" type="${InputType.BUTTON}" icon="open-in-new"
+ <or-mwc-input id="share-btn" class="small-btn" .disabled="${this.isLoading}" type="${InputType.BUTTON}" icon="open-in-new" title="${i18next.t("dashboard.openInNewTab")}"
@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="save"
@@ -632,19 +632,19 @@ export class OrDashboardBuilder extends LitElement {
<div id="fullscreen-header-wrapper">
<div id="fullscreen-header-title" style="display: flex; align-items: center;">
<or-icon class="showMobile" style="margin-right: 10px; cursor: pointer;" icon="chevron-left" @click="${() => { this.selectedDashboard = undefined; }}"></or-icon>
- <or-icon class="hideMobile" style="margin-right: 10px; cursor: pointer;" icon="menu" @click="${() => { this.showDashboardTree = !this.showDashboardTree; }}"></or-icon>
+ <or-icon class="hideMobile" style="margin-right: 10px; cursor: pointer;" icon="menu" title="${i18next.t(this.showDashboardTree ? "closeList" : "openList")}" @click="${() => { this.showDashboardTree = !this.showDashboardTree; }}"></or-icon>
<span>${this.selectedDashboard?.displayName}</span>
</div>
<div id="fullscreen-header-actions">
<div id="fullscreen-header-actions-content">
${when(this.selectedDashboard, () => html`
- <or-mwc-input id="refresh-btn" class="small-btn" .disabled="${(this.selectedDashboard == null)}" type="${InputType.BUTTON}" icon="refresh"
+ <or-mwc-input id="refresh-btn" class="small-btn" .disabled="${(this.selectedDashboard == null)}" type="${InputType.BUTTON}" icon="refresh" title="${i18next.t("dashboard.refresh")}"
@or-mwc-input-changed="${() => { this.deselectWidget(); this.dashboardPreview?.refreshPreview(); }}"
></or-mwc-input>
<dashboard-refresh-controls .interval="${this.refreshInterval}" .readonly="${false}"
@interval-select="${(ev: IntervalSelectEvent) => this.onIntervalSelect(ev)}"
></dashboard-refresh-controls>
- <or-mwc-input id="share-btn" class="small-btn" .disabled="${(this.selectedDashboard == null)}" type="${InputType.BUTTON}" icon="open-in-new"
+ <or-mwc-input id="share-btn" class="small-btn" .disabled="${(this.selectedDashboard == null)}" type="${InputType.BUTTON}" icon="open-in-new" title="${i18next.t("dashboard.openInNewTab")}"
@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="editAsset"
diff --git a/ui/component/or-dashboard-builder/src/or-dashboard-tree.ts b/ui/component/or-dashboard-builder/src/or-dashboard-tree.ts
index b91465d1b..f15cb1d56 100644
--- a/ui/component/or-dashboard-builder/src/or-dashboard-tree.ts
+++ b/ui/component/or-dashboard-builder/src/or-dashboard-tree.ts
@@ -247,16 +247,16 @@ export class OrDashboardTree extends LitElement {
${this.showControls ? html`
<div id="header-btns">
${this.selected != null ? html`
- <or-mwc-input type="${InputType.BUTTON}" icon="close" @or-mwc-input-changed="${() => {
+ <or-mwc-input type="${InputType.BUTTON}" icon="close" title="${i18next.t("deselect")}" @or-mwc-input-changed="${() => {
this.selectDashboard(undefined);
}}"></or-mwc-input>
${!this.readonly ? html`
- <or-mwc-input type="${InputType.BUTTON}" class="hideMobile" icon="content-copy"
+ <or-mwc-input type="${InputType.BUTTON}" class="hideMobile" icon="content-copy" title="${i18next.t("duplicate")}"
@or-mwc-input-changed="${() => {
this.duplicateDashboard(this.selected!);
}}"
></or-mwc-input>
- <or-mwc-input type="${InputType.BUTTON}" icon="delete" @or-mwc-input-changed="${() => {
+ <or-mwc-input type="${InputType.BUTTON}" icon="delete" title="${i18next.t("delete")}" @or-mwc-input-changed="${() => {
if (this.selected != null) {
showOkCancelDialog(i18next.t('areYouSure'), i18next.t('dashboard.deletePermanentWarning', {dashboard: this.selected.displayName}), i18next.t('delete')).then((ok: boolean) => {
if (ok) {
@@ -268,7 +268,7 @@ export class OrDashboardTree extends LitElement {
` : undefined}
` : undefined}
${!this.readonly ? html`
- <or-mwc-input type="${InputType.BUTTON}" class="hideMobile" icon="plus"
+ <or-mwc-input type="${InputType.BUTTON}" class="hideMobile" icon="plus" title="${i18next.t("addInsights")}"
@or-mwc-input-changed="${() => {
this.createDashboard(DashboardSizeOption.DESKTOP);
}}"
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.ts
index 211bd66f5..5dd0bf26d 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
@@ -339,7 +339,7 @@ export class OrRuleAssetQuery extends translate(i18next)(LitElement) {
} else {
return html`
<or-mwc-input type="${InputType.BUTTON}" .readonly="${this.readonly || false}" icon="clock-plus-outline"
- @or-mwc-input-changed="${() => onAdd(index)}"
+ title="${i18next.t("rulesEditorAddDuration")}" @or-mwc-input-changed="${() => onAdd(index)}"
></or-mwc-input>
`;
}
diff --git a/ui/component/or-rules/src/or-rule-tree.ts b/ui/component/or-rules/src/or-rule-tree.ts
index 17b80bb82..1a393727a 100644
--- a/ui/component/or-rules/src/or-rule-tree.ts
+++ b/ui/component/or-rules/src/or-rule-tree.ts
@@ -443,7 +443,7 @@ export class OrRuleTree extends OrTreeMenu {
return getContentWithMenuTemplate(
html`
- <or-mwc-input type=${InputType.BUTTON} icon="plus"></or-mwc-input>`,
+ <or-mwc-input type=${InputType.BUTTON} icon="plus" title="${i18next.t("addRule")}"></or-mwc-input>`,
menuOptions,
undefined,
value => onValueChange(String(value))
diff --git a/ui/component/or-tree-menu/src/index.ts b/ui/component/or-tree-menu/src/index.ts
index 0b647b16a..01a002933 100644
--- a/ui/component/or-tree-menu/src/index.ts
+++ b/ui/component/or-tree-menu/src/index.ts
@@ -29,6 +29,7 @@ import {OrTreeNode} from "./or-tree-node";
import {OrTreeGroup} from "./or-tree-group";
import {moveNodesToGroupNode} from "./util";
import {OrTreeDragEvent, OrTreeSelectEvent, TreeMenuSelection, TreeMenuSorting, TreeNode} from "./model";
+import {i18next} from "@openremote/or-translate";
import "./or-tree-group";
import "./or-tree-node";
@@ -326,7 +327,7 @@ export class OrTreeMenu extends LitElement {
*/
protected _getSortActionTemplate(value?: string, options?: TreeMenuSorting[]): TemplateResult {
return getContentWithMenuTemplate(
- html`<or-mwc-input type=${InputType.BUTTON} icon="sort-variant"></or-mwc-input>`,
+ html`<or-mwc-input type=${InputType.BUTTON} icon="sort-variant" title="${i18next.t("sort")}"></or-mwc-input>`,
(options || []).map(sort => ({ value: sort, text: sort } as ListItem)),
value,
value => this._onSortClick(String(value))