diff options
author | Alex Yatskov <alex@foosoft.net> | 2016-08-10 08:44:52 -0700 |
---|---|---|
committer | Alex Yatskov <alex@foosoft.net> | 2016-08-10 08:44:52 -0700 |
commit | 5cc989b87f671702912e28c0bce3747b6b79b87b (patch) | |
tree | 5f02fec89d585e5e773becdaea09f293c2b9d13a | |
parent | 0ef6a2f6c963f11a97b62eacca7476ee4ec2c071 (diff) |
Rename references of "vocab" to "term"
-rw-r--r-- | README.md | 2 | ||||
-rw-r--r-- | ext/bg/js/options-form.js | 12 | ||||
-rw-r--r-- | ext/bg/js/options.js | 6 | ||||
-rw-r--r-- | ext/bg/js/templates.js | 6 | ||||
-rw-r--r-- | ext/bg/js/yomichan.js | 10 | ||||
-rw-r--r-- | ext/bg/options.html | 12 | ||||
-rw-r--r-- | ext/fg/img/add_term_kana.png (renamed from ext/fg/img/add_vocab_kana.png) | bin | 286 -> 286 bytes | |||
-rw-r--r-- | ext/fg/img/add_term_kanji.png (renamed from ext/fg/img/add_vocab_kanji.png) | bin | 733 -> 733 bytes | |||
-rw-r--r-- | ext/fg/js/client.js | 2 | ||||
-rw-r--r-- | ext/manifest.json | 4 | ||||
-rw-r--r-- | tmpl/term.html | 4 |
11 files changed, 29 insertions, 29 deletions
@@ -40,7 +40,7 @@ Store](https://chrome.google.com/webstore/detail/yomichan/ogmnaimimemjmbakcfefmn ## Screenshots ## -[![Vocabulary definitions](https://foosoft.net/projects/yomichan-chrome/img/vocab-thumb.png)](https://foosoft.net/projects/yomichan-chrome/img/vocab.png) +[![Term definitions](https://foosoft.net/projects/yomichan-chrome/img/term-thumb.png)](https://foosoft.net/projects/yomichan-chrome/img/term.png) [![Kanji information](https://foosoft.net/projects/yomichan-chrome/img/kanji-thumb.png)](https://foosoft.net/projects/yomichan-chrome/img/kanji.png) [![Options page](https://foosoft.net/projects/yomichan-chrome/img/options-thumb.png)](https://foosoft.net/projects/yomichan-chrome/img/options.png) diff --git a/ext/bg/js/options-form.js b/ext/bg/js/options-form.js index a3250ab3..99d01db4 100644 --- a/ext/bg/js/options-form.js +++ b/ext/bg/js/options-form.js @@ -31,7 +31,7 @@ function fieldsToDict(selection) { } function modelIdToFieldOptKey(id) { - return {'anki-vocab-model': 'ankiVocabFields', 'anki-kanji-model': 'ankiKanjiFields'}[id]; + return {'anki-term-model': 'ankiTermFields', 'anki-kanji-model': 'ankiKanjiFields'}[id]; } function formToOptions(section, callback) { @@ -50,9 +50,9 @@ function formToOptions(section, callback) { case 'anki': optsNew.ankiCardTags = $('#anki-card-tags').val().split(/[,; ]+/); optsNew.sentenceExtent = parseInt($('#sentence-extent').val(), 10); - optsNew.ankiVocabDeck = $('#anki-vocab-deck').val(); - optsNew.ankiVocabModel = $('#anki-vocab-model').val(); - optsNew.ankiVocabFields = fieldsToDict($('#vocab .anki-field-value')); + optsNew.ankiTermDeck = $('#anki-term-deck').val(); + optsNew.ankiTermModel = $('#anki-term-model').val(); + optsNew.ankiTermFields = fieldsToDict($('#term .anki-field-value')); optsNew.ankiKanjiDeck = $('#anki-kanji-deck').val(); optsNew.ankiKanjiModel = $('#anki-kanji-model').val(); optsNew.ankiKanjiFields = fieldsToDict($('#kanji .anki-field-value')); @@ -73,7 +73,7 @@ function populateAnkiDeckAndModel(opts) { names.forEach((name) => ankiDeck.append($('<option/>', {value: name, text: name}))); } - $('#anki-vocab-deck').val(opts.ankiVocabDeck); + $('#anki-term-deck').val(opts.ankiTermDeck); $('#anki-kanji-deck').val(opts.ankiKanjiDeck); }}); @@ -84,7 +84,7 @@ function populateAnkiDeckAndModel(opts) { names.forEach((name) => ankiModel.append($('<option/>', {value: name, text: name}))); } - populateAnkiFields($('#anki-vocab-model').val(opts.ankiVocabModel), opts); + populateAnkiFields($('#anki-term-model').val(opts.ankiTermModel), opts); populateAnkiFields($('#anki-kanji-model').val(opts.ankiKanjiModel), opts); }}); } diff --git a/ext/bg/js/options.js b/ext/bg/js/options.js index 3f31aff8..1c54dfe7 100644 --- a/ext/bg/js/options.js +++ b/ext/bg/js/options.js @@ -27,9 +27,9 @@ function sanitizeOptions(options) { enableAnkiConnect: false, ankiCardTags: ['yomichan'], sentenceExtent: 200, - ankiVocabDeck: '', - ankiVocabModel: '', - ankiVocabFields: {}, + ankiTermDeck: '', + ankiTermModel: '', + ankiTermFields: {}, ankiKanjiDeck: '', ankiKanjiModel: '', ankiKanjiFields: {} diff --git a/ext/bg/js/templates.js b/ext/bg/js/templates.js index eec28982..1f9e3c30 100644 --- a/ext/bg/js/templates.js +++ b/ext/bg/js/templates.js @@ -112,15 +112,15 @@ templates['term.html'] = template({"1":function(container,depth0,helpers,partial },"4":function(container,depth0,helpers,partials,data,blockParams,depths) { var helper, alias1=depth0 != null ? depth0 : {}, alias2=helpers.helperMissing, alias3="function", alias4=container.escapeExpression, alias5=container.lambda; - return " <a href=\"#\" title=\"Add vocabulary as expression\" class=\"action-add-note disabled\" data-mode=\"vocab_kanji\" data-index=\"" + return " <a href=\"#\" title=\"Add term as expression\" class=\"action-add-note disabled\" data-mode=\"term_kanji\" data-index=\"" + alias4(((helper = (helper = helpers.index || (data && data.index)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"index","hash":{},"data":data}) : helper))) + "\"><img src=\"" + alias4(alias5((depths[1] != null ? depths[1].root : depths[1]), depth0)) - + "/img/add_vocab_kanji.png\"></a>\n <a href=\"#\" title=\"Add vocabulary as reading\" class=\"action-add-note disabled\" data-mode=\"vocab_kana\" data-index=\"" + + "/img/add_term_kanji.png\"></a>\n <a href=\"#\" title=\"Add term as reading\" class=\"action-add-note disabled\" data-mode=\"term_kana\" data-index=\"" + alias4(((helper = (helper = helpers.index || (data && data.index)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"index","hash":{},"data":data}) : helper))) + "\"><img src=\"" + alias4(alias5((depths[1] != null ? depths[1].root : depths[1]), depth0)) - + "/img/add_vocab_kana.png\"></a>\n"; + + "/img/add_term_kana.png\"></a>\n"; },"6":function(container,depth0,helpers,partials,data) { var stack1, helper, options, alias1=depth0 != null ? depth0 : {}, alias2=helpers.helperMissing, alias3="function", buffer = " <div class=\"term-expression\"><ruby>"; diff --git a/ext/bg/js/yomichan.js b/ext/bg/js/yomichan.js index 6aca4b5d..c6288e57 100644 --- a/ext/bg/js/yomichan.js +++ b/ext/bg/js/yomichan.js @@ -183,12 +183,12 @@ class Yomichan { value = ''; break; case 'expression': - if (mode === 'vocab_kana' && definition.reading) { + if (mode === 'term_kana' && definition.reading) { value = definition.reading; } break; case 'reading': - if (mode === 'vocab_kana') { + if (mode === 'term_kana') { value = null; } break; @@ -227,9 +227,9 @@ class Yomichan { note.deckName = this.options.ankiKanjiDeck; note.modelName = this.options.ankiKanjiModel; } else { - fields = this.options.ankiVocabFields; - note.deckName = this.options.ankiVocabDeck; - note.modelName = this.options.ankiVocabModel; + fields = this.options.ankiTermFields; + note.deckName = this.options.ankiTermDeck; + note.modelName = this.options.ankiTermModel; const audio = { kanji: definition.expression, diff --git a/ext/bg/options.html b/ext/bg/options.html index 7e03ea15..331e5e98 100644 --- a/ext/bg/options.html +++ b/ext/bg/options.html @@ -98,23 +98,23 @@ </div> <ul class="nav nav-tabs col-sm-offset-2 col-sm-10"> - <li class="active"><a href="#vocab" data-toggle="tab">Vocabulary</a></li> + <li class="active"><a href="#term" data-toggle="tab">Terms</a></li> <li><a href="#kanji" data-toggle="tab">Kanji</a></li> </ul> <div class="tab-content col-sm-offset-2 col-sm-10"> - <div id="vocab" class="tab-pane fade in active"> + <div id="term" class="tab-pane fade in active"> <div class="form-group"> - <label class="col-sm-2 control-label" for="anki-vocab-deck">Deck</label> + <label class="col-sm-2 control-label" for="anki-term-deck">Deck</label> <div class="col-sm-10"> - <select class="form-control anki-deck" id="anki-vocab-deck"></select> + <select class="form-control anki-deck" id="anki-term-deck"></select> </div> </div> <div class="form-group"> - <label class="col-sm-2 control-label" for="anki-vocab-model">Model</label> + <label class="col-sm-2 control-label" for="anki-term-model">Model</label> <div class="col-sm-10"> - <select class="form-control anki-model" id="anki-vocab-model"></select> + <select class="form-control anki-model" id="anki-term-model"></select> </div> </div> diff --git a/ext/fg/img/add_vocab_kana.png b/ext/fg/img/add_term_kana.png Binary files differindex 41ff8335..41ff8335 100644 --- a/ext/fg/img/add_vocab_kana.png +++ b/ext/fg/img/add_term_kana.png diff --git a/ext/fg/img/add_vocab_kanji.png b/ext/fg/img/add_term_kanji.png Binary files differindex 6332fefe..6332fefe 100644 --- a/ext/fg/img/add_vocab_kanji.png +++ b/ext/fg/img/add_term_kanji.png diff --git a/ext/fg/js/client.js b/ext/fg/js/client.js index 202d6dbd..1bd68aea 100644 --- a/ext/fg/js/client.js +++ b/ext/fg/js/client.js @@ -117,7 +117,7 @@ class Client { this.definitions = defs; this.showPopup(textSource, content); - return bgCanAddDefinitions(defs, ['vocab_kanji', 'vocab_kana']); + return bgCanAddDefinitions(defs, ['term_kanji', 'term_kana']); }) .then((states) => { if (states !== null) { diff --git a/ext/manifest.json b/ext/manifest.json index 380f4c71..c4a70bf6 100644 --- a/ext/manifest.json +++ b/ext/manifest.json @@ -28,8 +28,8 @@ "web_accessible_resources": [ "fg/css/frame.css", "fg/img/add_kanji.png", - "fg/img/add_vocab_kana.png", - "fg/img/add_vocab_kanji.png", + "fg/img/add_term_kana.png", + "fg/img/add_term_kanji.png", "fg/img/play_audio.png", "fg/js/frame.js", "fg/ttf/kanji-stroke-orders.ttf", diff --git a/tmpl/term.html b/tmpl/term.html index ca96ab24..aff3e2ff 100644 --- a/tmpl/term.html +++ b/tmpl/term.html @@ -5,8 +5,8 @@ <a href="#" title="Play audio" class="action-play-audio" data-index="{{@index}}"><img src="{{../root}}/img/play_audio.png"></a> {{/if}} {{#if enableAnkiConnect}} - <a href="#" title="Add vocabulary as expression" class="action-add-note disabled" data-mode="vocab_kanji" data-index="{{@index}}"><img src="{{../root}}/img/add_vocab_kanji.png"></a> - <a href="#" title="Add vocabulary as reading" class="action-add-note disabled" data-mode="vocab_kana" data-index="{{@index}}"><img src="{{../root}}/img/add_vocab_kana.png"></a> + <a href="#" title="Add term as expression" class="action-add-note disabled" data-mode="term_kanji" data-index="{{@index}}"><img src="{{../root}}/img/add_term_kanji.png"></a> + <a href="#" title="Add term as reading" class="action-add-note disabled" data-mode="term_kana" data-index="{{@index}}"><img src="{{../root}}/img/add_term_kana.png"></a> {{/if}} </div> {{/with}} |