I18n: Fix blank translations

This commit is contained in:
Alexander Zinchuk 2021-04-13 23:19:05 +03:00
parent 62b9766ec8
commit 313eeb2743

View File

@ -120,8 +120,10 @@ export function getTranslation(key: string, value?: any, format?: 'i') {
}
const template = langString[typeof value === 'number' ? getPluralOption(value) : 'value'];
if (!template) {
return key;
if (!template || !template.trim()) {
const parts = key.split('.');
return parts[parts.length - 1];
}
if (value !== undefined) {