Squashed commit of the following:

commit 6d74f87db332fd28c7522cabc0f96a390d36e64f
Author: SabreCat <sabe@habitica.com>
Date:   Fri Aug 18 20:04:52 2023 -0500

    fix(i18n): default to EN for empties
This commit is contained in:
SabreCat
2023-08-22 12:23:02 -05:00
parent e8f5958f77
commit c71f0b3fda

View File

@@ -50,7 +50,8 @@ approvedLanguages.forEach(file => {
if (file === 'en' || fs.statSync(path.join(localePath, file)).isDirectory() === false) return;
_loadTranslations(file);
// Merge missing strings from english
// Strip empty strings, then merge missing strings from english
translations[file] = _.pickBy(translations[file], string => string !== '');
_.defaults(translations[file], translations.en);
});