aboutsummaryrefslogtreecommitdiff
path: root/ext/bg/js/translator.js
diff options
context:
space:
mode:
authorAlex Yatskov <alex@foosoft.net>2016-09-10 22:25:16 -0700
committerAlex Yatskov <alex@foosoft.net>2016-09-10 22:25:16 -0700
commit3ec57d5bf658c247835fc933c2c41ea4e5ea52f6 (patch)
tree05afad7b1e62c990b0cbfe21b54f0a1e1f6c62dc /ext/bg/js/translator.js
parent058739988302513c8496e569cf3a4fd1eb5920b4 (diff)
Fixes
Diffstat (limited to 'ext/bg/js/translator.js')
-rw-r--r--ext/bg/js/translator.js10
1 files changed, 8 insertions, 2 deletions
diff --git a/ext/bg/js/translator.js b/ext/bg/js/translator.js
index ccf1876f..6c028c5c 100644
--- a/ext/bg/js/translator.js
+++ b/ext/bg/js/translator.js
@@ -59,12 +59,18 @@ class Translator {
const promises = [];
for (let i = text.length; i > 0; --i) {
- promises.append(
+ promises.push(
this.deinflector.deinflect(text.slice(0, i), term => {
return this.dictionary.findTerm(term).then(definitions => definitions.map(def => def.tags));
}).then(inflects => {
for (const inflect of inflects) {
- this.processTerm(groups, df.source, df.tags, df.rules, df.root);
+ this.processTerm(
+ groups,
+ inflect.source,
+ inflect.tags,
+ inflect.rules,
+ inflect.root
+ );
}
})
);