Skip to content

Commit

Permalink
Merge pull request #274 from praschke/search-page-parsed-frequency
Browse files Browse the repository at this point in the history
add sort dictionary data to parse results on the search page
  • Loading branch information
djahandarie authored Oct 14, 2023
2 parents 5701cb1 + 30cbe0e commit c3be9af
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions ext/js/language/translator.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit c3be9af

Please sign in to comment.