diff options
author | StefanVukovic99 <stefanvukovic44@gmail.com> | 2024-01-20 02:25:23 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-01-20 01:25:23 +0000 |
commit | 2b87c919bcd879c7f356308bc522b95f33e35f3b (patch) | |
tree | 1301aa8bf3d9b91ad96bbe9372a66dceba190346 /ext/js/background/backend.js | |
parent | 48f1d012ad5045319d4e492dfbefa39da92817b2 (diff) |
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
Diffstat (limited to 'ext/js/background/backend.js')
-rw-r--r-- | ext/js/background/backend.js | 8 |
1 files changed, 5 insertions, 3 deletions
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; |