aboutsummaryrefslogtreecommitdiff
path: root/ext/data/templates/default-anki-field-templates.handlebars
diff options
context:
space:
mode:
Diffstat (limited to 'ext/data/templates/default-anki-field-templates.handlebars')
-rw-r--r--ext/data/templates/default-anki-field-templates.handlebars31
1 files changed, 31 insertions, 0 deletions
diff --git a/ext/data/templates/default-anki-field-templates.handlebars b/ext/data/templates/default-anki-field-templates.handlebars
index 0f390e8d..ec57a826 100644
--- a/ext/data/templates/default-anki-field-templates.handlebars
+++ b/ext/data/templates/default-anki-field-templates.handlebars
@@ -341,4 +341,35 @@
{{~/scope~}}
{{/inline}}
+{{#*inline "part-of-speech-pretty"}}
+ {{~#if (op "===" . "v1")~}}Ichidan verb
+ {{~else if (op "===" . "v5")~}}Godan verb
+ {{~else if (op "===" . "vk")~}}Kuru verb
+ {{~else if (op "===" . "vs")~}}Suru verb
+ {{~else if (op "===" . "vz")~}}Zuru verb
+ {{~else if (op "===" . "adj-i")~}}I-adjective
+ {{~else if (op "===" . "n")~}}Noun
+ {{~else~}}{{.}}
+ {{~/if~}}
+{{/inline}}
+
+{{#*inline "part-of-speech"}}
+ {{~#scope~}}
+ {{~#if (op "!==" definition.type "kanji")~}}
+ {{~#set "first" true}}{{/set~}}
+ {{~#each definition.expressions~}}
+ {{~#each wordClasses~}}
+ {{~#unless (get (concat "used_" .))~}}
+ {{~> part-of-speech-pretty . ~}}
+ {{~#unless (get "first")}}, {{/unless~}}
+ {{~#set (concat "used_" .) true~}}{{~/set~}}
+ {{~#set "first" false~}}{{~/set~}}
+ {{~/unless~}}
+ {{~/each~}}
+ {{~/each~}}
+ {{~#if (get "first")~}}Unknown{{~/if~}}
+ {{~/if~}}
+ {{~/scope~}}
+{{/inline}}
+
{{~> (lookup . "marker") ~}}