From 942ca3b525d67a74ce01a9e3138ccee2a764f892 Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Thu, 9 Apr 2020 11:19:40 +0100 Subject: [PATCH] make error translatable Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> --- src/i18n/strings/en_EN.json | 1 + src/vector/app.js | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/i18n/strings/en_EN.json b/src/i18n/strings/en_EN.json index 9468bb8b..a7f2f40c 100644 --- a/src/i18n/strings/en_EN.json +++ b/src/i18n/strings/en_EN.json @@ -1,4 +1,5 @@ { + "Missing indexeddb worker script!": "Missing indexeddb worker script!", "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 is misconfigured": "Your Riot is misconfigured", diff --git a/src/vector/app.js b/src/vector/app.js index d446b38b..930576e2 100644 --- a/src/vector/app.js +++ b/src/vector/app.js @@ -135,7 +135,7 @@ export async function loadApp(fragParams: {}) { // the bundling. The js-sdk will just fall back to accessing // indexeddb directly with no worker script, but we want to // make sure the indexeddb script is present, so fail hard. - throw new Error("Missing indexeddb worker script!"); + throw newTranslatableError(_td("Missing indexeddb worker script!")); } MatrixClientPeg.setIndexedDbWorkerScript(vectorIndexeddbWorkerScript); CallHandler.setConferenceHandler(VectorConferenceHandler);