diff --git a/src/i18n/strings/en_EN.json b/src/i18n/strings/en_EN.json index b77de12273..3582ca3598 100644 --- a/src/i18n/strings/en_EN.json +++ b/src/i18n/strings/en_EN.json @@ -1,11 +1,12 @@ { + "Unexpected error preparing the app. See console for details.": "Unexpected error preparing the app. See console for details.", + "Your Riot is misconfigured": "Your Riot is misconfigured", + "Invalid configuration: can only specify one of default_server_config, default_server_name, or default_hs_url.": "Invalid configuration: can only specify one of default_server_config, default_server_name, or default_hs_url.", + "Invalid configuration: no default server specified.": "Invalid configuration: no default server specified.", "Your Riot configuration contains invalid JSON. Please correct the problem and reload the page.": "Your Riot configuration contains invalid JSON. Please correct the problem and reload the page.", "The message from the parser is: %(message)s": "The message from the parser is: %(message)s", "Invalid JSON": "Invalid JSON", - "Your Riot is misconfigured": "Your Riot is misconfigured", - "Unexpected error preparing the app. See console for details.": "Unexpected error preparing the app. See console for details.", - "Invalid configuration: can only specify one of default_server_config, default_server_name, or default_hs_url.": "Invalid configuration: can only specify one of default_server_config, default_server_name, or default_hs_url.", - "Invalid configuration: no default server specified.": "Invalid configuration: no default server specified.", + "Unable to load config file: please refresh the page to try again.": "Unable to load config file: please refresh the page to try again.", "Open user settings": "Open user settings", "Riot Desktop on %(platformName)s": "Riot Desktop on %(platformName)s", "Go to your browser to complete Sign In": "Go to your browser to complete Sign In", diff --git a/src/vector/index.ts b/src/vector/index.ts index 0d3a8e8775..f3c091f566 100644 --- a/src/vector/index.ts +++ b/src/vector/index.ts @@ -33,11 +33,13 @@ if ('serviceWorker' in navigator) { navigator.serviceWorker.register('sw.js'); } -async function settled(prom: Promise) { - try { - await prom; - } catch (e) { - console.error(e); +async function settled(...promises: Array>) { + for (const prom of promises) { + try { + await prom; + } catch (e) { + console.error(e); + } } } @@ -141,9 +143,7 @@ async function start() { const loadSkinPromise = loadSkin(); // await things settling so that any errors we have to render have features like i18n running - await settled(loadSkinPromise); - await settled(loadThemePromise); - await settled(loadLanguagePromise); + await settled(loadSkinPromise, loadThemePromise, loadLanguagePromise); // ########################## // error handling begins here @@ -173,7 +173,7 @@ async function start() { // await things starting successfully // ################################## await loadOlmPromise; - await settled(loadSkinPromise); + await loadSkinPromise; await loadThemePromise; await loadLanguagePromise;