mirror of
https://github.com/danog/telegram-tt.git
synced 2024-11-27 04:45:08 +01:00
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'];
|
||||
if (!template) {
|
||||
return key;
|
||||
if (!template || !template.trim()) {
|
||||
const parts = key.split('.');
|
||||
|
||||
return parts[parts.length - 1];
|
||||
}
|
||||
|
||||
if (value !== undefined) {
|
||||
|
Loading…
Reference in New Issue
Block a user