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 <florianh_dev@icloud.com>
(cherry picked from commit 2230f52)
  • Loading branch information
florian-h05 committed Jul 26, 2023
1 parent 4378199 commit 177382b
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
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 177382b

Please sign in to comment.