From d87515ec125189ceeae251d37013b511c7bf8baf Mon Sep 17 00:00:00 2001 From: toasted-nutbread Date: Sat, 5 Jun 2021 22:27:58 -0400 Subject: Translator id updates (#1730) * Allow unsequenced definitions to be added to multiple groups * Update translator data to store multiple IDs * Update Anki note data * Update test data * Update docs --- ext/js/data/anki-note-data-creator.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'ext/js/data') diff --git a/ext/js/data/anki-note-data-creator.js b/ext/js/data/anki-note-data-creator.js index 4cf62788..c76369c3 100644 --- a/ext/js/data/anki-note-data-creator.js +++ b/ext/js/data/anki-note-data-creator.js @@ -274,7 +274,7 @@ class AnkiNoteDataCreator { case 'merge': type = 'termMerged'; break; } - const {id, inflections, score, dictionaryIndex, dictionaryPriority, sourceTermExactMatchCount} = dictionaryEntry; + const {ids, inflections, score, dictionaryIndex, dictionaryPriority, sourceTermExactMatchCount} = dictionaryEntry; const { screenshotFileName=null, @@ -301,7 +301,7 @@ class AnkiNoteDataCreator { return { type, - id: (type === 'term' ? id : void 0), + id: (type === 'term' ? ids[0] : void 0), source: (primarySource !== null ? primarySource.transformedText : null), rawSource: (primarySource !== null ? primarySource.originalText : null), sourceTerm: (type !== 'termMerged' ? (primarySource !== null ? primarySource.deinflectedText : null) : void 0), -- cgit v1.2.3