diff --git a/source/main.ts b/source/main.ts index 73e60f9..f864248 100644 --- a/source/main.ts +++ b/source/main.ts @@ -54,17 +54,26 @@ namespace _dali {"kind": "console", "data": {"threshold": "info"}}, ] ); - await lib_plankton.translate.initialize( - { - "verbosity": 1, - "packages": [ - JSON.parse(await lib_plankton.file.read("data/localization/deu.loc.json")), - JSON.parse(await lib_plankton.file.read("data/localization/eng.loc.json")), - ], - "order": ["deu", "eng"], - "autopromote": false, - } - ); + // init:localization + { + const order : Array = ["deu", "eng"]; + await lib_plankton.translate.initialize( + { + "verbosity": 1, + "packages": await Promise.all( + order.map( + async (code) => JSON.parse( + await lib_plankton.file.read( + "data/localization/" + code + ".loc.json" + ) + ) + ) + ), + "order": order, + "autopromote": false, + } + ); + } await _dali.backend.initialize( _dali.conf.get()["backend"] );