aboutsummaryrefslogtreecommitdiff
path: root/ext/bg/js/translator.js
diff options
context:
space:
mode:
Diffstat (limited to 'ext/bg/js/translator.js')
-rw-r--r--ext/bg/js/translator.js7
1 files changed, 4 insertions, 3 deletions
diff --git a/ext/bg/js/translator.js b/ext/bg/js/translator.js
index f373fe83..9fd1ab59 100644
--- a/ext/bg/js/translator.js
+++ b/ext/bg/js/translator.js
@@ -41,15 +41,16 @@ class Translator {
this.loaded = true;
callback();
}).catch(() => {
+ this.dictionary.initDb();
return Translator.loadData('bg/data/edict.json');
}).then((response) => {
- this.dictionary.importTermDict('edict', JSON.parse(response));
+ this.dictionary.importTermDict(JSON.parse(response));
return Translator.loadData('bg/data/enamdict.json');
}).then((response) => {
- this.dictionary.importTermDict('enamdict', JSON.parse(response));
+ this.dictionary.importTermDict(JSON.parse(response));
return Translator.loadData('bg/data/kanjidic.json');
}).then((response) => {
- this.dictionary.importKanjiDict('kanjidic', JSON.parse(response));
+ this.dictionary.importKanjiDict(JSON.parse(response));
this.loaded = true;
callback();
});