diff options
author | rhgg2 <richard.garner@mq.edu.au> | 2024-05-21 11:58:06 +1000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-05-21 01:58:06 +0000 |
commit | ee04cf6de3037a92524bad5c65349ca1e7b4174f (patch) | |
tree | 0950cca0af45f5f414bd3d040370c62d4a669e83 /ext/js/data | |
parent | ee0302295817a5face5a2e3e0de2cc08fbe141e8 (diff) |
Add onyomi-hiragana handlebars (#960)
* Add onyomi-hiragana handlebars
* Add onyomi-hiragana handlebars
* Add docs
* Fix typo in documentation of kunyomi/onyomi handlebars
* Update ext/data/templates/anki-field-templates-upgrade-v36.handlebars
Co-authored-by: StefanVukovic99 <stefanvukovic44@gmail.com>
Signed-off-by: rhgg2 <richard.garner@mq.edu.au>
* Update tests for onyomi-hiragana handlebars
* Update tests for onyomi-hiragana handlebars
* Fix typo in code
---------
Signed-off-by: rhgg2 <richard.garner@mq.edu.au>
Co-authored-by: StefanVukovic99 <stefanvukovic44@gmail.com>
Diffstat (limited to 'ext/js/data')
-rw-r--r-- | ext/js/data/anki-template-util.js | 1 | ||||
-rw-r--r-- | ext/js/data/options-util.js | 10 |
2 files changed, 10 insertions, 1 deletions
diff --git a/ext/js/data/anki-template-util.js b/ext/js/data/anki-template-util.js index 20170dae..1c74d747 100644 --- a/ext/js/data/anki-template-util.js +++ b/ext/js/data/anki-template-util.js @@ -83,6 +83,7 @@ export function getStandardFieldMarkers(type) { 'glossary', 'kunyomi', 'onyomi', + 'onyomi-hiragana', 'screenshot', 'search-query', 'selection-text', diff --git a/ext/js/data/options-util.js b/ext/js/data/options-util.js index 521b4c9b..e2fd2789 100644 --- a/ext/js/data/options-util.js +++ b/ext/js/data/options-util.js @@ -542,7 +542,8 @@ export class OptionsUtil { this._updateVersion32, this._updateVersion33, this._updateVersion34, - this._updateVersion35 + this._updateVersion35, + this._updateVersion36 ]; /* eslint-enable @typescript-eslint/unbound-method */ if (typeof targetVersion === 'number' && targetVersion < result.length) { @@ -1286,6 +1287,13 @@ export class OptionsUtil { await this._applyAnkiFieldTemplatesPatch(options, '/data/templates/anki-field-templates-upgrade-v35.handlebars'); } + /** + * - Added handlebars for onyomi reading in hiragana. + * @type {import('options-util').UpdateFunction} + */ + async _updateVersion36(options) { + await this._applyAnkiFieldTemplatesPatch(options, '/data/templates/anki-field-templates-upgrade-v36.handlebars'); + } /** * @param {string} url |