From b0596c8a3c6eb7073750ed07ba862b0ba2d44140 Mon Sep 17 00:00:00 2001 From: toasted-nutbread Date: Mon, 26 Jul 2021 19:45:30 -0400 Subject: Rename pitchAccent in source code (#1852) * Rename pitchAccentPosition to pitchAccentDownstepPosition * Rename function * Rename * Rename * pitches => pronunciations --- ext/js/data/sandbox/anki-note-data-creator.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'ext/js/data') 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; -- cgit v1.2.3