aboutsummaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2021-06-05 23:17:13 -0400
committerGitHub <noreply@github.com>2021-06-05 23:17:13 -0400
commit3a095b1f6cfe10b4d6cfa2e1c6d1ad3587dcfea2 (patch)
tree75377850a2959271e786fe4ee52b5a145a6e2742 /ext
parentd87515ec125189ceeae251d37013b511c7bf8baf (diff)
Improve secondary definitions (#1731)
* Improve secondary search definitions * Simplify
Diffstat (limited to 'ext')
-rw-r--r--ext/js/language/translator.js12
1 files changed, 5 insertions, 7 deletions
diff --git a/ext/js/language/translator.js b/ext/js/language/translator.js
index a36ef48c..54cd281f 100644
--- a/ext/js/language/translator.js
+++ b/ext/js/language/translator.js
@@ -425,17 +425,13 @@ class Translator {
let target = targetMap.get(key);
if (typeof target === 'undefined') {
target = {
- groups: [],
- searchSecondary: false
+ groups: []
};
targetMap.set(key, target);
}
target.groups.push(group);
- if (!dictionaryEntry.isPrimary && !target.searchSecondary) {
- target.searchSecondary = true;
- termList.push({term, reading});
- targetList.push(target);
- }
+ termList.push({term, reading});
+ targetList.push(target);
}
}
@@ -495,6 +491,8 @@ class Translator {
return newDictionaryEntries;
}
+ // Removing data
+
_removeExcludedDefinitions(dictionaryEntries, excludeDictionaryDefinitions) {
for (let i = dictionaryEntries.length - 1; i >= 0; --i) {
const dictionaryEntry = dictionaryEntries[i];