From c71f0b3fda9db6eeea9e8253e5fd74dc04102446 Mon Sep 17 00:00:00 2001 From: SabreCat Date: Tue, 22 Aug 2023 12:23:02 -0500 Subject: [PATCH] Squashed commit of the following: commit 6d74f87db332fd28c7522cabc0f96a390d36e64f Author: SabreCat Date: Fri Aug 18 20:04:52 2023 -0500 fix(i18n): default to EN for empties --- website/server/libs/i18n.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/website/server/libs/i18n.js b/website/server/libs/i18n.js index bec852768c..3edd543298 100644 --- a/website/server/libs/i18n.js +++ b/website/server/libs/i18n.js @@ -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); });