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.js5
1 files changed, 2 insertions, 3 deletions
diff --git a/ext/bg/js/translator.js b/ext/bg/js/translator.js
index b8cad6de..2cc97e1c 100644
--- a/ext/bg/js/translator.js
+++ b/ext/bg/js/translator.js
@@ -35,15 +35,14 @@ class Translator {
return loadJson('bg/data/tags.json');
}).then(tagMeta => {
this.tagMeta = tagMeta;
- return this.dictionary.existsDb();
+ return this.dictionary.prepareDb();
}).then(exists => {
- this.dictionary.initDb();
if (!exists) {
return Promise.all([
this.dictionary.importKanjiDict('bg/data/kanjidic/index.json'),
this.dictionary.importTermDict('bg/data/edict/index.json'),
this.dictionary.importTermDict('bg/data/enamdict/index.json')
- ]);
+ ]).then(() => this.dictionary.sealDb());
}
}).then(() => {
this.loaded = true;