aboutsummaryrefslogtreecommitdiff
path: root/ext/bg/js/translator.js
diff options
context:
space:
mode:
Diffstat (limited to 'ext/bg/js/translator.js')
-rw-r--r--ext/bg/js/translator.js16
1 files changed, 8 insertions, 8 deletions
diff --git a/ext/bg/js/translator.js b/ext/bg/js/translator.js
index 606f6ec5..1a7b9bb4 100644
--- a/ext/bg/js/translator.js
+++ b/ext/bg/js/translator.js
@@ -89,12 +89,12 @@ class Translator {
}
}
- let results = [];
+ let definitions = [];
for (const key in groups) {
- results.push(groups[key]);
+ definitions.push(groups[key]);
}
- results = results.sort((v1, v2) => {
+ definitions = definitions.sort((v1, v2) => {
const sl1 = v1.source.length;
const sl2 = v2.source.length;
if (sl1 > sl2) {
@@ -123,25 +123,25 @@ class Translator {
});
let length = 0;
- for (const result of results) {
+ for (const result of definitions) {
length = Math.max(length, result.source.length);
}
- return {results: results, length: length};
+ return {definitions: definitions, length: length};
}
findKanji(text) {
- let results = [];
+ let definitions = [];
const processed = {};
for (const c of text) {
if (!processed[c]) {
- results = results.concat(this.dictionary.findKanji(c));
+ definitions = definitions.concat(this.dictionary.findKanji(c));
processed[c] = true;
}
}
- return results;
+ return definitions;
}
processTerm(groups, source, tags, rules=[], root='') {