aboutsummaryrefslogtreecommitdiff
path: root/ext/bg/js/translator.js
diff options
context:
space:
mode:
authorAlex Yatskov <alex@foosoft.net>2017-01-07 21:11:52 -0800
committerAlex Yatskov <alex@foosoft.net>2017-01-07 21:11:52 -0800
commita5efe5032247162e2a88554d39110ae1270544a8 (patch)
tree2bec8db0fea3111d377bb077a083ecef49ce5c28 /ext/bg/js/translator.js
parentf7d7b1bd84a460c4bc602576495ec4c0fe357acb (diff)
add dictionary tags
Diffstat (limited to 'ext/bg/js/translator.js')
-rw-r--r--ext/bg/js/translator.js9
1 files changed, 8 insertions, 1 deletions
diff --git a/ext/bg/js/translator.js b/ext/bg/js/translator.js
index 2b6b87c1..374c6087 100644
--- a/ext/bg/js/translator.js
+++ b/ext/bg/js/translator.js
@@ -54,6 +54,13 @@ class Translator {
let definitions = [];
for (const deinflection of deinflections) {
for (const definition of deinflection.definitions) {
+ const tags = definition.tags.map(tag => buildTag(tag, definition.tagMeta));
+ tags.push(sanitizeTag({
+ name: definition.dictionary,
+ category: 'dictionary',
+ order: 100
+ }));
+
definitions.push({
source: deinflection.source,
reasons: deinflection.reasons,
@@ -63,7 +70,7 @@ class Translator {
expression: definition.expression,
reading: definition.reading,
glossary: definition.glossary,
- tags: sortTags(definition.tags.map(tag => buildTag(tag, definition.tagMeta)))
+ tags: sortTags(tags)
});
}
}