diff options
author | Darius Jahandarie <djahandarie@gmail.com> | 2023-10-14 23:41:09 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-10-14 23:41:09 +0000 |
commit | c3be9af7b6f00dad7107fcdae60a8004cc81936a (patch) | |
tree | ac96fc7576d7f483b54ccd5125dc7615bfd046fa | |
parent | 5701cb1c832076c9f4ec9a20ba816d3fd15109ef (diff) | |
parent | 30cbe0e1da33b8eeee480619c5720abfc3e2ecf6 (diff) |
Merge pull request #274 from praschke/search-page-parsed-frequency
add sort dictionary data to parse results on the search page
-rw-r--r-- | ext/js/language/translator.js | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/ext/js/language/translator.js b/ext/js/language/translator.js index edb38bfb..3b47cc51 100644 --- a/ext/js/language/translator.js +++ b/ext/js/language/translator.js @@ -93,6 +93,12 @@ class Translator { } if (mode === 'simple') { + if (sortFrequencyDictionary !== null) { + const sortDictionaryMap = [sortFrequencyDictionary] + .filter((key) => enabledDictionaryMap.has(key)) + .reduce((subMap, key) => subMap.set(key, enabledDictionaryMap.get(key)), new Map()); + await this._addTermMeta(dictionaryEntries, sortDictionaryMap); + } this._clearTermTags(dictionaryEntries); } else { await this._addTermMeta(dictionaryEntries, enabledDictionaryMap); |