I18n: Fix blank translations
This commit is contained in:
parent
62b9766ec8
commit
313eeb2743
@ -120,8 +120,10 @@ export function getTranslation(key: string, value?: any, format?: 'i') {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const template = langString[typeof value === 'number' ? getPluralOption(value) : 'value'];
|
const template = langString[typeof value === 'number' ? getPluralOption(value) : 'value'];
|
||||||
if (!template) {
|
if (!template || !template.trim()) {
|
||||||
return key;
|
const parts = key.split('.');
|
||||||
|
|
||||||
|
return parts[parts.length - 1];
|
||||||
}
|
}
|
||||||
|
|
||||||
if (value !== undefined) {
|
if (value !== undefined) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user