Skip to content

Commit

Permalink
Semantic tags: Fix missing translations in case of missing label (#1986)
Browse files Browse the repository at this point in the history
Fixes #1976.
Follow-up for #1882.

Signed-off-by: Florian Hotze <[email protected]>
  • Loading branch information
florian-h05 authored Jul 26, 2023
1 parent 59695c6 commit 2230f52
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion bundles/org.openhab.ui/web/src/js/store/modules/semantics.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 2230f52

Please sign in to comment.