Cleanup
This commit is contained in:
parent
8c22f53f3e
commit
c11b24cb37
@ -153,7 +153,7 @@ class Dictionary {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
importDb(indexUrl, callback) {
|
importDictionary(indexUrl, callback) {
|
||||||
if (this.db === null) {
|
if (this.db === null) {
|
||||||
return Promise.reject('database not initialized');
|
return Promise.reject('database not initialized');
|
||||||
}
|
}
|
||||||
|
@ -62,9 +62,9 @@ class Translator {
|
|||||||
};
|
};
|
||||||
|
|
||||||
return Promise.all([
|
return Promise.all([
|
||||||
this.dictionary.importDb('bg/data/edict/index.json', bankCallback),
|
this.dictionary.importDictionary('bg/data/edict/index.json', bankCallback),
|
||||||
this.dictionary.importDb('bg/data/enamdict/index.json', bankCallback),
|
this.dictionary.importDictionary('bg/data/enamdict/index.json', bankCallback),
|
||||||
this.dictionary.importDb('bg/data/kanjidic/index.json', bankCallback),
|
this.dictionary.importDictionary('bg/data/kanjidic/index.json', bankCallback),
|
||||||
]).then(() => {
|
]).then(() => {
|
||||||
return this.dictionary.sealDb();
|
return this.dictionary.sealDb();
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
|
Loading…
Reference in New Issue
Block a user