This commit is contained in:
Alex Yatskov 2016-08-29 20:27:04 -07:00
parent c55ba3b2be
commit 133abb6f58

View File

@ -31,13 +31,13 @@ class Translator {
return; return;
} }
loadJson('bg/data/rules.json').then((rules) => { loadJson('bg/data/rules.json').then(rules => {
this.deinflector.setRules(rules); this.deinflector.setRules(rules);
return loadJson('bg/data/tags.json'); return loadJson('bg/data/tags.json');
}).then((tagMeta) => { }).then(tagMeta => {
this.tagMeta = tagMeta; this.tagMeta = tagMeta;
return this.dictionary.existsDb(); return this.dictionary.existsDb();
}).then((exists) => { }).then(exists => {
this.dictionary.initDb(); this.dictionary.initDb();
if (exists) { if (exists) {
return Promise.resolve(); return Promise.resolve();
@ -49,10 +49,6 @@ class Translator {
this.dictionary.importTermDict('bg/data/enamdict/index.json') this.dictionary.importTermDict('bg/data/enamdict/index.json')
]); ]);
}).then(() => { }).then(() => {
this.dictionary.findTerm('猫').then((result) => {
console.log(result);
});
this.loaded = true; this.loaded = true;
callback(); callback();
}); });