aboutsummaryrefslogtreecommitdiff
path: root/ext/bg/js/backend.js
diff options
context:
space:
mode:
Diffstat (limited to 'ext/bg/js/backend.js')
-rw-r--r--ext/bg/js/backend.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/ext/bg/js/backend.js b/ext/bg/js/backend.js
index 3ef7c62c..1e8c979f 100644
--- a/ext/bg/js/backend.js
+++ b/ext/bg/js/backend.js
@@ -25,6 +25,7 @@
* BackendApiForwarder
* ClipboardMonitor
* Database
+ * DictionaryImporter
* JsonSchema
* Mecab
* Translator
@@ -45,6 +46,7 @@
class Backend {
constructor() {
this.database = new Database();
+ this.dictionaryImporter = new DictionaryImporter();
this.translator = new Translator(this.database);
this.anki = new AnkiNull();
this.mecab = new Mecab();
@@ -300,7 +302,7 @@ class Backend {
}
async importDictionary(archiveSource, onProgress, details) {
- return await this.translator.database.importDictionary(archiveSource, onProgress, details);
+ return await this.dictionaryImporter.import(this.database, archiveSource, onProgress, details);
}
// Message handlers