aboutsummaryrefslogtreecommitdiff
path: root/ext/js/data/options-util.js
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2021-03-26 19:50:54 -0400
committerGitHub <noreply@github.com>2021-03-26 19:50:54 -0400
commit90f7d5ba07340413aa7e43c3a0cc038690b32db3 (patch)
treeb3c57f9240de2e3a86cbc8dba5fe93d71e4067ae /ext/js/data/options-util.js
parent482dd8c8d8339d29c9e7a202cbf4c54bf7cf291d (diff)
Add part of speech info (#1561)
* Add part of speech info to headwords * Expose parts of speech to Anki template rendering * Expose parts of speech * Update pitch accent categories * Update docs * Add part-of-speech * Update options and tests * Update markers * Update test data
Diffstat (limited to 'ext/js/data/options-util.js')
-rw-r--r--ext/js/data/options-util.js6
1 files changed, 4 insertions, 2 deletions
diff --git a/ext/js/data/options-util.js b/ext/js/data/options-util.js
index 334445c6..fd62a558 100644
--- a/ext/js/data/options-util.js
+++ b/ext/js/data/options-util.js
@@ -459,7 +459,7 @@ class OptionsUtil {
{async: false, update: this._updateVersion7.bind(this)},
{async: true, update: this._updateVersion8.bind(this)},
{async: false, update: this._updateVersion9.bind(this)},
- {async: false, update: this._updateVersion10.bind(this)}
+ {async: true, update: this._updateVersion10.bind(this)}
];
}
@@ -750,9 +750,11 @@ class OptionsUtil {
return options;
}
- _updateVersion10(options) {
+ async _updateVersion10(options) {
// Version 10 changes:
// Removed global option useSettingsV2.
+ // Added part-of-speech field template.
+ await this._applyAnkiFieldTemplatesPatch(options, '/data/templates/anki-field-templates-upgrade-v10.handlebars');
delete options.global.useSettingsV2;
return options;
}