fill in all empty values in all languageCaches. (#3606)
* fill in all empty values in all languageCaches. * add semicolon Co-authored-by: baghappening <baghappening@gmail.com>
This commit is contained in:
parent
34ca0ba375
commit
efef6d32a9
@ -68,11 +68,13 @@ async function retrieveAll (): Promise<Defaults> {
|
||||
? 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<string, string>;
|
||||
});
|
||||
|
||||
// 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]) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user