aboutsummaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
Diffstat (limited to 'ext')
-rw-r--r--ext/bg/js/translator.js14
1 files changed, 13 insertions, 1 deletions
diff --git a/ext/bg/js/translator.js b/ext/bg/js/translator.js
index e11d0269..3767b47e 100644
--- a/ext/bg/js/translator.js
+++ b/ext/bg/js/translator.js
@@ -199,7 +199,7 @@ class Translator {
const compatibilityDefinition = this._createMergedTermDefinition(
source,
rawSource,
- definitions2,
+ this._convertTermDefinitionsToMergedGlossaryTermDefinitions(definitions2),
[expression],
[reading],
termDetailsList,
@@ -647,6 +647,18 @@ class Translator {
}
}
+ _convertTermDefinitionsToMergedGlossaryTermDefinitions(definitions) {
+ const convertedDefinitions = [];
+ for (const definition of definitions) {
+ const {source, rawSource, expression, reading} = definition;
+ const expressions = new Set([expression]);
+ const readings = new Set([reading]);
+ const convertedDefinition = this._createMergedGlossaryTermDefinition(source, rawSource, [definition], expressions, readings, expressions, readings);
+ convertedDefinitions.push(convertedDefinition);
+ }
+ return convertedDefinitions;
+ }
+
// Metadata building
async _buildTermMeta(definitions, enabledDictionaryMap) {