diff options
author | Alex Yatskov <alex@foosoft.net> | 2016-11-06 11:01:35 -0800 |
---|---|---|
committer | Alex Yatskov <alex@foosoft.net> | 2016-11-06 11:01:35 -0800 |
commit | 3f606a0ab00a084e7f22b232cdd5a7006ab7d636 (patch) | |
tree | 986300aaccef69f137a6395aa9dcc9b86798012d /ext/bg/js/translator.js | |
parent | 84fd2d13f5d0f7321d0aa708902dd94cdbd3bac8 (diff) |
Combined import
Diffstat (limited to 'ext/bg/js/translator.js')
-rw-r--r-- | ext/bg/js/translator.js | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/ext/bg/js/translator.js b/ext/bg/js/translator.js index 44f37e31..8e0c522f 100644 --- a/ext/bg/js/translator.js +++ b/ext/bg/js/translator.js @@ -46,7 +46,7 @@ class Translator { } const banks = {}; - const bankCallback = (loaded, total, indexUrl) => { + const bankCallback = (total, loaded, indexUrl) => { banks[indexUrl] = {loaded, total}; let percent = 0.0; @@ -62,9 +62,9 @@ class Translator { }; return Promise.all([ - this.dictionary.importTermDict('bg/data/edict/index.json', bankCallback), - this.dictionary.importTermDict('bg/data/enamdict/index.json', bankCallback), - this.dictionary.importKanjiDict('bg/data/kanjidic/index.json', bankCallback), + this.dictionary.importDb('bg/data/edict/index.json', bankCallback), + this.dictionary.importDb('bg/data/enamdict/index.json', bankCallback), + this.dictionary.importDb('bg/data/kanjidic/index.json', bankCallback), ]).then(() => { return this.dictionary.sealDb(); }).then(() => { |