Skip to content

Commit

Permalink
Adding a handlebar to return pitch accent categories of a word (#563)
Browse files Browse the repository at this point in the history
* Fixing logic in isNonNounVerbOrAdjective function

* Adding handlebar to return pitch accent categories of a word
  • Loading branch information
arbyste authored Jan 27, 2024
1 parent 1c258f7 commit 1b9422d
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
4 changes: 4 additions & 0 deletions ext/data/templates/default-anki-field-templates.handlebars
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,10 @@
{{#*inline "pitch-accent-positions"}}
{{~> pitch-accent-list format='position'~}}
{{/inline}}

{{~#*inline "pitch-accent-categories"~}}
{{~#each (pitchCategories @root)~}}{{~.~}}{{~#unless @last~}},{{~/unless~}}{{~/each~}}
{{~/inline~}}
{{! End Pitch Accents }}

{{#*inline "phonetic-transcriptions"}}
Expand Down
2 changes: 1 addition & 1 deletion ext/js/dictionary/dictionary-data-util.js
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ export class DictionaryDataUtil {
case 'vs':
isVerbOrAdjective = true;
isSuruVerb = true;
break;
// falls through
case 'n':
isNoun = true;
break;
Expand Down
1 change: 1 addition & 0 deletions ext/js/pages/settings/anki-controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@ export class AnkiController {
'pitch-accents',
'pitch-accent-graphs',
'pitch-accent-positions',
'pitch-accent-categories',
'phonetic-transcriptions',
'reading',
'screenshot',
Expand Down

0 comments on commit 1b9422d

Please sign in to comment.