From 2230f522f036c9e2ad8f41029d2021f3776fbe55 Mon Sep 17 00:00:00 2001 From: Florian Hotze Date: Wed, 26 Jul 2023 17:24:59 +0200 Subject: [PATCH] Semantic tags: Fix missing translations in case of missing label (#1986) Fixes #1976. Follow-up for #1882. Signed-off-by: Florian Hotze --- .../org.openhab.ui/web/src/js/store/modules/semantics.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/bundles/org.openhab.ui/web/src/js/store/modules/semantics.js b/bundles/org.openhab.ui/web/src/js/store/modules/semantics.js index cb4c776f95..7272957027 100644 --- a/bundles/org.openhab.ui/web/src/js/store/modules/semantics.js +++ b/bundles/org.openhab.ui/web/src/js/store/modules/semantics.js @@ -26,7 +26,11 @@ const actions = { state.Properties = tags.filter(t => t.uid.startsWith('Property_')).map(t => t.name) // Store i18n labels Object.values(tags).forEach(t => { - if (t.label) state.Labels[t.name] = t.label + if (t.label) { + state.Labels[t.name] = t.label + } else { + state.Labels[t.name] = t.name + } }) // Save as i18n messages i18n.mergeLocaleMessage(this.getters.locale, state.Labels)