From efef6d32a9880a3d34f661f8c5f4c27cb5a168c2 Mon Sep 17 00:00:00 2001 From: motinados <69296148+motinados@users.noreply.github.com> Date: Fri, 4 Sep 2020 17:38:33 +0900 Subject: [PATCH] fill in all empty values in all languageCaches. (#3606) * fill in all empty values in all languageCaches. * add semicolon Co-authored-by: baghappening --- packages/page-settings/src/I18n/index.tsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/page-settings/src/I18n/index.tsx b/packages/page-settings/src/I18n/index.tsx index 788c043e8c..a8ba3db6b9 100644 --- a/packages/page-settings/src/I18n/index.tsx +++ b/packages/page-settings/src/I18n/index.tsx @@ -68,11 +68,13 @@ async function retrieveAll (): Promise { ? await Promise.all(missing.map((lng) => retrieveJson(`${lng}/translation.json`))) : []; + // setup the language cache missing.forEach((lng, index): void => { - // setup the language cache languageCache[lng] = translations[index] as Record; + }); - // fill in all empty values (useful for download, filling in) + // fill in all empty values (useful for download, filling in) + keys.forEach((lng):void => { Object.keys(english).forEach((record): void => { Object.keys(english[record]).forEach((key): void => { if (!languageCache[lng][key]) {