From 85015b17766c7279d9efbbcd1dff2e1776bc0da2 Mon Sep 17 00:00:00 2001 From: Alex Yatskov Date: Wed, 18 May 2016 12:19:40 -0700 Subject: [PATCH] Fixing certain definitions not showing up --- ext/bg/js/translator.js | 7 ++++--- 1 file 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,