aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Yatskov <alex@foosoft.net>2016-12-17 19:30:26 -0800
committerAlex Yatskov <alex@foosoft.net>2016-12-17 19:30:26 -0800
commit5c755043fa2fb23f94f898fc57828277d7b02049 (patch)
treecb589e3f0c0200005977d1ef18e7a6b3c2d9b25a
parent15e1cf3358e357968d6c48465fcd15a877bc433a (diff)
CWIP
-rw-r--r--ext/bg/js/database.js4
-rw-r--r--ext/bg/js/templates.js4
-rw-r--r--ext/bg/js/translator.js4
-rw-r--r--ext/bg/js/util.js2
-rw-r--r--tmpl/kanji.html2
-rw-r--r--tmpl/term.html2
6 files changed, 9 insertions, 9 deletions
diff --git a/ext/bg/js/database.js b/ext/bg/js/database.js
index 05cb8acd..980e9e40 100644
--- a/ext/bg/js/database.js
+++ b/ext/bg/js/database.js
@@ -231,7 +231,7 @@ class Database {
for (const tag in tagMeta || {}) {
const meta = tagMeta[tag];
rows.push({
- tag,
+ name: tag,
category: meta.category,
notes: meta.notes,
order: meta.order,
@@ -252,8 +252,8 @@ class Database {
reading,
tags,
rules,
+ score,
glossary,
- score: parseInt(score),
dictionary: title
});
}
diff --git a/ext/bg/js/templates.js b/ext/bg/js/templates.js
index 2070f276..1e35f17e 100644
--- a/ext/bg/js/templates.js
+++ b/ext/bg/js/templates.js
@@ -70,7 +70,7 @@ templates['kanji.html'] = template({"1":function(container,depth0,helpers,partia
+ "\" title=\""
+ alias4(((helper = (helper = helpers.notes || (depth0 != null ? depth0.notes : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"notes","hash":{},"data":data}) : helper)))
+ "\">"
- + alias4(((helper = (helper = helpers.tag || (depth0 != null ? depth0.tag : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"tag","hash":{},"data":data}) : helper)))
+ + alias4(((helper = (helper = helpers.name || (depth0 != null ? depth0.name : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"name","hash":{},"data":data}) : helper)))
+ "</span>\n";
},"8":function(container,depth0,helpers,partials,data) {
return " <li><span>"
@@ -194,7 +194,7 @@ templates['term.html'] = template({"1":function(container,depth0,helpers,partial
+ "\" title=\""
+ alias4(((helper = (helper = helpers.notes || (depth0 != null ? depth0.notes : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"notes","hash":{},"data":data}) : helper)))
+ "\">"
- + alias4(((helper = (helper = helpers.tag || (depth0 != null ? depth0.tag : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"tag","hash":{},"data":data}) : helper)))
+ + alias4(((helper = (helper = helpers.name || (depth0 != null ? depth0.name : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"name","hash":{},"data":data}) : helper)))
+ "</span>\n";
},"15":function(container,depth0,helpers,partials,data) {
return " <li><span>"
diff --git a/ext/bg/js/translator.js b/ext/bg/js/translator.js
index 1d143320..13bf1427 100644
--- a/ext/bg/js/translator.js
+++ b/ext/bg/js/translator.js
@@ -140,7 +140,7 @@ class Translator {
const tagItems = [];
for (const tag of definition.tags) {
const tagItem = {
- tag,
+ name: tag,
category: 'default',
order: Number.MAX_SAFE_INTEGER,
notes: ''
@@ -168,7 +168,7 @@ class Translator {
const tagItems = [];
for (const tag of definition.tags) {
const tagItem = {
- tag,
+ name: tag,
category: 'default',
order: Number.MAX_SAFE_INTEGER,
notes: ''
diff --git a/ext/bg/js/util.js b/ext/bg/js/util.js
index a28692dc..dc606a73 100644
--- a/ext/bg/js/util.js
+++ b/ext/bg/js/util.js
@@ -97,7 +97,7 @@ function sortTermDefs(definitions) {
}
function applyTagMeta(tag, meta) {
- const symbol = tag.tag.split(':')[0];
+ const symbol = tag.name.split(':')[0];
for (const prop in meta[symbol] || {}) {
tag[prop] = meta[symbol][prop];
}
diff --git a/tmpl/kanji.html b/tmpl/kanji.html
index c40bb3bc..380e16ff 100644
--- a/tmpl/kanji.html
+++ b/tmpl/kanji.html
@@ -30,7 +30,7 @@
<div class="kanji-tags">
{{#each tags}}
- <span class="tag tag-{{category}}" title="{{notes}}">{{tag}}</span>
+ <span class="tag tag-{{category}}" title="{{notes}}">{{name}}</span>
{{/each}}
</div>
diff --git a/tmpl/term.html b/tmpl/term.html
index fb50e7d7..36f8f4fc 100644
--- a/tmpl/term.html
+++ b/tmpl/term.html
@@ -23,7 +23,7 @@
<div class="term-tags">
{{#each tags}}
- <span class="tag tag-{{category}}" title="{{notes}}">{{tag}}</span>
+ <span class="tag tag-{{category}}" title="{{notes}}">{{name}}</span>
{{/each}}
</div>