From ee04cf6de3037a92524bad5c65349ca1e7b4174f Mon Sep 17 00:00:00 2001
From: rhgg2 <richard.garner@mq.edu.au>
Date: Tue, 21 May 2024 11:58:06 +1000
Subject: 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>
---
 ext/data/templates/anki-field-templates-upgrade-v36.handlebars | 3 +++
 ext/data/templates/default-anki-field-templates.handlebars     | 4 ++++
 2 files changed, 7 insertions(+)
 create mode 100644 ext/data/templates/anki-field-templates-upgrade-v36.handlebars

(limited to 'ext/data')

diff --git a/ext/data/templates/anki-field-templates-upgrade-v36.handlebars b/ext/data/templates/anki-field-templates-upgrade-v36.handlebars
new file mode 100644
index 00000000..0b07e483
--- /dev/null
+++ b/ext/data/templates/anki-field-templates-upgrade-v36.handlebars
@@ -0,0 +1,3 @@
+{{#*inline "onyomi-hiragana"}}
+    {{~#each definition.onyomi}}{{hiragana .}}{{#unless @last}}, {{/unless}}{{/each~}}
+{{/inline}}
\ No newline at end of file
diff --git a/ext/data/templates/default-anki-field-templates.handlebars b/ext/data/templates/default-anki-field-templates.handlebars
index 53dab1c1..bbeff830 100644
--- a/ext/data/templates/default-anki-field-templates.handlebars
+++ b/ext/data/templates/default-anki-field-templates.handlebars
@@ -173,6 +173,10 @@
     {{~#each definition.onyomi}}{{.}}{{#unless @last}}, {{/unless}}{{/each~}}
 {{/inline}}
 
+{{#*inline "onyomi-hiragana"}}
+    {{~#each definition.onyomi}}{{hiragana .}}{{#unless @last}}, {{/unless}}{{/each~}}
+{{/inline}}
+
 {{#*inline "reading"}}
     {{~#unless modeTermKana~}}
         {{~#if merge~}}
-- 
cgit v1.2.3