i18n: Use English as fallback language.

In case app.getLocale() returns a falsey value, English is used as the
app language.
This commit is contained in:
Kanishk Kakar
2019-08-01 22:14:05 +05:30
committed by Akash Nimare
parent 6d34da5953
commit 47b729cbc2

View File

@@ -28,7 +28,7 @@ class TranslationUtil {
}
__(phrase: string): string {
return i18n.__({ phrase, locale: app.getLocale() });
return i18n.__({ phrase, locale: app.getLocale() ? app.getLocale() : 'en' });
}
}