diff options
author | toasted-nutbread <toasted-nutbread@users.noreply.github.com> | 2020-08-09 13:21:14 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-08-09 13:21:14 -0400 |
commit | 480e0e15e3109165d077c18985893d7cca79959e (patch) | |
tree | a4f4712ba27796b72136fc19b982b6e864074d17 /ext/bg/js/backend.js | |
parent | 427cf99b9fb08ac8066fdbcefe5f9069e87aa972 (diff) |
Translator refactor (#720)
* Move simple find sort into translator.js
* Remove unused
* Use direct reference to database
* Make field private
* Remove statics
* Convert functions to private
* Organize by public/private
Diffstat (limited to 'ext/bg/js/backend.js')
-rw-r--r-- | ext/bg/js/backend.js | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/ext/bg/js/backend.js b/ext/bg/js/backend.js index 07920e01..ba87a560 100644 --- a/ext/bg/js/backend.js +++ b/ext/bg/js/backend.js @@ -32,7 +32,6 @@ * TemplateRenderer * Translator * conditionsTestValue - * dictTermsSort * jp * profileConditionsDescriptor * profileConditionsDescriptorPromise @@ -707,11 +706,11 @@ class Backend { } async _onApiGetDictionaryInfo() { - return await this._translator.database.getDictionaryInfo(); + return await this._dictionaryDatabase.getDictionaryInfo(); } async _onApiGetDictionaryCounts({dictionaryNames, getTotal}) { - return await this._translator.database.getDictionaryCounts(dictionaryNames, getTotal); + return await this._dictionaryDatabase.getDictionaryCounts(dictionaryNames, getTotal); } async _onApiPurgeDatabase() { @@ -1064,7 +1063,6 @@ class Backend { options ); if (definitions.length > 0 && sourceLength > 0) { - dictTermsSort(definitions); const {expression, reading} = definitions[0]; const source = text.substring(0, sourceLength); for (const {text: text2, furigana} of jp.distributeFuriganaInflected(expression, reading, source)) { |