summaryrefslogtreecommitdiff
path: root/ext/bg/js/translator.js
diff options
context:
space:
mode:
authorAlex Yatskov <alex@foosoft.net>2016-05-18 12:19:40 -0700
committerAlex Yatskov <alex@foosoft.net>2016-05-18 12:19:40 -0700
commit85015b17766c7279d9efbbcd1dff2e1776bc0da2 (patch)
treef0bca90e9583e52665185b4af3bd201170e92076 /ext/bg/js/translator.js
parent7dcad6bd71f86031a3ff16c6f363fd6fbb4be0ce (diff)
Fixing certain definitions not showing up
Diffstat (limited to 'ext/bg/js/translator.js')
-rw-r--r--ext/bg/js/translator.js7
1 files changed, 4 insertions, 3 deletions
diff --git a/ext/bg/js/translator.js b/ext/bg/js/translator.js
index 1c397780..c2b92357 100644
--- a/ext/bg/js/translator.js
+++ b/ext/bg/js/translator.js
@@ -151,9 +151,10 @@ class Translator {
return definitions;
}
- processTerm(groups, source, tags, rules=[], root='') {
+ processTerm(groups, source, tags, rules=[], root) {
for (const entry of this.dictionary.findTerm(root)) {
- if (entry.id in groups) {
+ const groupId = `${source}_${entry.id}`;
+ if (groupId in groups) {
continue;
}
@@ -208,7 +209,7 @@ class Translator {
});
if (matched) {
- groups[entry.id] = {
+ groups[groupId] = {
expression: entry.expression,
reading: entry.reading,
glossary: entry.glossary,