summaryrefslogtreecommitdiff
path: root/ext/bg/js/translator.js
diff options
context:
space:
mode:
Diffstat (limited to 'ext/bg/js/translator.js')
-rw-r--r--ext/bg/js/translator.js26
1 files changed, 18 insertions, 8 deletions
diff --git a/ext/bg/js/translator.js b/ext/bg/js/translator.js
index bf1538e2..000271b6 100644
--- a/ext/bg/js/translator.js
+++ b/ext/bg/js/translator.js
@@ -168,16 +168,26 @@ class Translator {
let popular = false;
let tagItems = [];
for (let tag of entry.tags) {
- const tagItem = this.tags[tag];
- if (tagItem && entry.addons.indexOf(tag) === -1) {
- tagItems.push({
- class: tagItem.class || 'default',
- order: tagItem.order || Number.MAX_SAFE_INTEGER,
- desc: tagItem.desc,
- name: tag
- });
+ if (entry.addons.indexOf(tag) !== -1) {
+ continue;
}
+ const tagItem = {
+ class: 'default',
+ order: Number.MAX_SAFE_INTEGER,
+ desc: entry.entities[tag] || '',
+ name: tag
+ };
+
+ const tagMeta = this.tags[tag];
+ if (tagMeta) {
+ for (const key in tagMeta) {
+ tagItem[key] = tagMeta[key] || tagItem[key];
+ }
+ }
+
+ tagItems.push(tagItem);
+
//
// TODO: Handle tagging as popular through data.
//