From f48df993ac2c5d60f20ed71445a23dd94abf0704 Mon Sep 17 00:00:00 2001 From: Laurent Mazet Date: Wed, 10 Jun 2020 22:19:34 +0200 Subject: [PATCH] handle dictionary loading error --- l10n/po/fr/trivabble.po | 3 +++ l10n/pot/trivabble.pot | 3 +++ public/trivabble.js | 2 +- 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/l10n/po/fr/trivabble.po b/l10n/po/fr/trivabble.po index ebebaf0..7b5f5b4 100644 --- a/l10n/po/fr/trivabble.po +++ b/l10n/po/fr/trivabble.po @@ -177,3 +177,6 @@ msgstr "Tous les mots sont corrects : {0}" msgid "No new word found" msgstr "Aucun nouveau mot trouvé" + +msgid "Incorrect dictionary file." +msgstr "Dictionaire incorrect." diff --git a/l10n/pot/trivabble.pot b/l10n/pot/trivabble.pot index 1eed9ad..862322c 100644 --- a/l10n/pot/trivabble.pot +++ b/l10n/pot/trivabble.pot @@ -183,3 +183,6 @@ msgstr "" msgid "No new word found" msgstr "" + +msgid "Incorrect dictionary file." +msgstr "" diff --git a/public/trivabble.js b/public/trivabble.js index c614ab1..454d62e 100644 --- a/public/trivabble.js +++ b/public/trivabble.js @@ -167,7 +167,7 @@ dictionary = file.responseText.split("\n"); document.getElementById("check-spelling").disabled = false; } catch (e) { - console.error(e); + myAlert(_("Incorrect dictionary file.")); } } }; -- 2.30.2