aboutsummaryrefslogtreecommitdiff
path: root/ext/js/data
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2021-07-26 19:45:30 -0400
committerGitHub <noreply@github.com>2021-07-26 19:45:30 -0400
commitb0596c8a3c6eb7073750ed07ba862b0ba2d44140 (patch)
tree71df0f7b1a70a7495bc41a28bdf24d4cac4ff5db /ext/js/data
parenta9710b8acf6370f229098b172eb2a3aa65ae5dc7 (diff)
Rename pitchAccent in source code (#1852)
* Rename pitchAccentPosition to pitchAccentDownstepPosition * Rename function * Rename * Rename * pitches => pronunciations
Diffstat (limited to 'ext/js/data')
-rw-r--r--ext/js/data/sandbox/anki-note-data-creator.js10
1 files changed, 5 insertions, 5 deletions
diff --git a/ext/js/data/sandbox/anki-note-data-creator.js b/ext/js/data/sandbox/anki-note-data-creator.js
index e09c6d7b..b7abc0c5 100644
--- a/ext/js/data/sandbox/anki-note-data-creator.js
+++ b/ext/js/data/sandbox/anki-note-data-creator.js
@@ -157,10 +157,10 @@ class AnkiNoteDataCreator {
_getPitches(dictionaryEntry) {
const results = [];
if (dictionaryEntry.type === 'term') {
- for (const {dictionary, pitches} of DictionaryDataUtil.getPitchAccentInfos(dictionaryEntry)) {
- const pitches2 = [];
- for (const {terms, reading, position, nasalPositions, devoicePositions, tags, exclusiveTerms, exclusiveReadings} of pitches) {
- pitches2.push({
+ for (const {dictionary, pronunciations} of DictionaryDataUtil.getGroupedPronunciations(dictionaryEntry)) {
+ const pitches = [];
+ for (const {terms, reading, position, nasalPositions, devoicePositions, tags, exclusiveTerms, exclusiveReadings} of pronunciations) {
+ pitches.push({
expressions: terms,
reading,
position,
@@ -171,7 +171,7 @@ class AnkiNoteDataCreator {
exclusiveReadings
});
}
- results.push({dictionary, pitches: pitches2});
+ results.push({dictionary, pitches});
}
}
return results;