From 273c2f22603abe563435a0f1d7a84c0d9037fe2c Mon Sep 17 00:00:00 2001 From: StefanVukovic99 Date: Sat, 13 Jan 2024 12:41:38 +0100 Subject: add option to disable part of speech rule check (#438) * pos filter wip * add part of speech filter option * add part of speech filter option * remove from deinflector * update test * remove return * tie to dictionary * duplicate to welcome page * delete unused html * fix ts * typo --- ext/js/data/options-util.js | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'ext/js/data') diff --git a/ext/js/data/options-util.js b/ext/js/data/options-util.js index c6acf373..c93e261d 100644 --- a/ext/js/data/options-util.js +++ b/ext/js/data/options-util.js @@ -555,7 +555,8 @@ export class OptionsUtil { this._updateVersion19, this._updateVersion20, this._updateVersion21, - this._updateVersion22 + this._updateVersion22, + this._updateVersion23 ]; if (typeof targetVersion === 'number' && targetVersion < result.length) { result.splice(targetVersion); @@ -1140,8 +1141,18 @@ export class OptionsUtil { for (const {options: profileOptions} of options.profiles) { profileOptions.translation.searchResolution = 'letter'; } + } - return options; + /** + * - Added dictionaries[].partsOfSpeechFilter. + * @type {import('options-util').UpdateFunction} + */ + _updateVersion23(options) { + for (const {options: profileOptions} of options.profiles) { + for (const dictionary of profileOptions.dictionaries) { + dictionary.partsOfSpeechFilter = true; + } + } } /** -- cgit v1.2.3