aboutsummaryrefslogtreecommitdiff
path: root/ext/data/templates
diff options
context:
space:
mode:
Diffstat (limited to 'ext/data/templates')
-rw-r--r--ext/data/templates/anki-field-templates-upgrade-v24.handlebars52
-rw-r--r--ext/data/templates/default-anki-field-templates.handlebars22
2 files changed, 69 insertions, 5 deletions
diff --git a/ext/data/templates/anki-field-templates-upgrade-v24.handlebars b/ext/data/templates/anki-field-templates-upgrade-v24.handlebars
new file mode 100644
index 00000000..2288737c
--- /dev/null
+++ b/ext/data/templates/anki-field-templates-upgrade-v24.handlebars
@@ -0,0 +1,52 @@
+{{#*inline "phonetic-transcriptions"}}
+ {{~#if (op ">" definition.phoneticTranscriptions.length 0)~}}
+ <ul>
+ {{~#each definition.phoneticTranscriptions~}}
+ {{~#each phoneticTranscriptions~}}
+ <li>
+ {{~set "any" false~}}
+ {{~#each tags~}}
+ {{~#if (get "any")}}, {{else}}<i>({{/if~}}
+ {{name}}
+ {{~set "any" true~}}
+ {{~/each~}}
+ {{~#if (get "any")}})</i> {{/if~}}
+ {{ipa~}}
+ </li>
+ {{~/each~}}
+ {{~/each~}}
+ </ul>
+ {{~/if~}}
+{{/inline}}
+
+{{<<<<<<<}}
+{{#*inline "conjugation"}}
+ {{~#if (op ">" definition.inflectionRuleChainCandidates.length 0)~}}
+ {{~set "multiple" false~}}
+ {{~#if (op ">" definition.inflectionRuleChainCandidates.length 1)~}}
+ {{~set "multiple" true~}}
+ {{~/if~}}
+ {{~#if (get "multiple")~}}<ul>{{/if~}}
+ {{~#each definition.inflectionRuleChainCandidates~}}
+ {{~#if (op ">" inflectionRules.length 0)~}}
+ {{~#if (get "multiple")~}}<li>{{/if~}}
+ {{~#each inflectionRules~}}
+ {{~#if (op ">" @index 0)}} « {{/if~}}
+ {{.}}
+ {{~/each~}}
+ {{~#if (get "multiple")~}}</li>{{/if~}}
+ {{~/if~}}
+ {{~/each~}}
+ {{~#if (get "multiple")~}}</ul>{{/if~}}
+ {{~/if~}}
+{{/inline}}
+{{=======}}
+{{#*inline "conjugation"}}
+ {{~#if definition.reasons~}}
+ {{~#each definition.reasons~}}
+ {{~#if (op ">" @index 0)}} « {{/if~}}
+ {{.}}
+ {{~/each~}}
+ {{~/if~}}
+{{/inline}}
+{{>>>>>>>>}}
diff --git a/ext/data/templates/default-anki-field-templates.handlebars b/ext/data/templates/default-anki-field-templates.handlebars
index f23b9d0b..818677ce 100644
--- a/ext/data/templates/default-anki-field-templates.handlebars
+++ b/ext/data/templates/default-anki-field-templates.handlebars
@@ -261,11 +261,23 @@
{{/inline}}
{{#*inline "conjugation"}}
- {{~#if definition.reasons~}}
- {{~#each definition.reasons~}}
- {{~#if (op ">" @index 0)}} « {{/if~}}
- {{.}}
- {{~/each~}}
+ {{~#if (op ">" definition.inflectionRuleChainCandidates.length 0)~}}
+ {{~set "multiple" false~}}
+ {{~#if (op ">" definition.inflectionRuleChainCandidates.length 1)~}}
+ {{~set "multiple" true~}}
+ {{~/if~}}
+ {{~#if (get "multiple")~}}<ul>{{/if~}}
+ {{~#each definition.inflectionRuleChainCandidates~}}
+ {{~#if (op ">" inflectionRules.length 0)~}}
+ {{~#if (get "multiple")~}}<li>{{/if~}}
+ {{~#each inflectionRules~}}
+ {{~#if (op ">" @index 0)}} « {{/if~}}
+ {{.}}
+ {{~/each~}}
+ {{~#if (get "multiple")~}}</li>{{/if~}}
+ {{~/if~}}
+ {{~/each~}}
+ {{~#if (get "multiple")~}}</ul>{{/if~}}
{{~/if~}}
{{/inline}}