aboutsummaryrefslogtreecommitdiff
path: root/ext/js/data/options-util.js
diff options
context:
space:
mode:
authorStefanVukovic99 <stefanvukovic44@gmail.com>2024-01-13 12:41:38 +0100
committerGitHub <noreply@github.com>2024-01-13 11:41:38 +0000
commit273c2f22603abe563435a0f1d7a84c0d9037fe2c (patch)
tree0fe7600db81217379fa6e06d38945f10b7aec58a /ext/js/data/options-util.js
parent2aea9291d66fd619c484abc2ab04b4350807f308 (diff)
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
Diffstat (limited to 'ext/js/data/options-util.js')
-rw-r--r--ext/js/data/options-util.js15
1 files changed, 13 insertions, 2 deletions
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;
+ }
+ }
}
/**