From 2b87c919bcd879c7f356308bc522b95f33e35f3b Mon Sep 17 00:00:00 2001 From: StefanVukovic99 Date: Sat, 20 Jan 2024 02:25:23 +0100 Subject: Dictionary deinflections (#503) * wip * wip * fix v3 * wip * fix tests * fix maxitems * hide deinflection definitions * fix anki template * undo unnecessary change * delete console.log * refactor * add set false to handlebars * lint * fix tests * fix comments * fix * use Map in areArraysEqualIgnoreOrder * move inflection source icons to css * lint * improve naming * fix tests * add test * typescript * use for of * wip * comments * anki template upgrade * update descriptions --- ext/js/background/backend.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'ext/js/background') diff --git a/ext/js/background/backend.js b/ext/js/background/backend.js index a5a42272..bc4f222f 100644 --- a/ext/js/background/backend.js +++ b/ext/js/background/backend.js @@ -2428,7 +2428,8 @@ export class Backend { index: enabledDictionaryMap.size, priority: 0, allowSecondarySearches: false, - partsOfSpeechFilter: true + partsOfSpeechFilter: true, + useDeinflections: true }); excludeDictionaryDefinitions = new Set(); excludeDictionaryDefinitions.add(mainDictionary); @@ -2474,12 +2475,13 @@ export class Backend { const enabledDictionaryMap = new Map(); for (const dictionary of options.dictionaries) { if (!dictionary.enabled) { continue; } - const {name, priority, allowSecondarySearches, partsOfSpeechFilter} = dictionary; + const {name, priority, allowSecondarySearches, partsOfSpeechFilter, useDeinflections} = dictionary; enabledDictionaryMap.set(name, { index: enabledDictionaryMap.size, priority, allowSecondarySearches, - partsOfSpeechFilter + partsOfSpeechFilter, + useDeinflections }); } return enabledDictionaryMap; -- cgit v1.2.3