Semantic tags: Fix missing translations in case of missing label (#1986)

Fixes #1976.
Follow-up for #1882.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
pull/1993/head
Florian Hotze 2023-07-26 17:24:59 +02:00 committed by GitHub
parent 59695c65d0
commit 2230f522f0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 1 deletions

View File

@ -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)