From fe829139914bbcb9584f11b6bece798b987fbd8b Mon Sep 17 00:00:00 2001 From: toasted-nutbread Date: Mon, 4 Nov 2019 19:36:50 -0500 Subject: [PATCH] Rename function --- ext/bg/js/translator.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ext/bg/js/translator.js b/ext/bg/js/translator.js index d04b1cb3..305619a5 100644 --- a/ext/bg/js/translator.js +++ b/ext/bg/js/translator.js @@ -143,7 +143,7 @@ class Translator { async findTermsGrouped(text, dictionaries, alphanumeric, options) { const titles = Object.keys(dictionaries); - const {length, definitions} = await this.findTerms(text, dictionaries, alphanumeric); + const {length, definitions} = await this.findTermsInternal(text, dictionaries, alphanumeric); const definitionsGrouped = dictTermsGroup(definitions, dictionaries); await this.buildTermFrequencies(definitionsGrouped, titles); @@ -160,7 +160,7 @@ class Translator { async findTermsMerged(text, dictionaries, alphanumeric, options) { const secondarySearchTitles = Object.keys(options.dictionaries).filter(dict => options.dictionaries[dict].allowSecondarySearches); const titles = Object.keys(dictionaries); - const {length, definitions} = await this.findTerms(text, dictionaries, alphanumeric); + const {length, definitions} = await this.findTermsInternal(text, dictionaries, alphanumeric); const {sequencedDefinitions, defaultDefinitions} = await this.getSequencedDefinitions(definitions, options.general.mainDictionary); const definitionsMerged = []; const mergedByTermIndices = new Set(); @@ -196,14 +196,14 @@ class Translator { async findTermsSplit(text, dictionaries, alphanumeric) { const titles = Object.keys(dictionaries); - const {length, definitions} = await this.findTerms(text, dictionaries, alphanumeric); + const {length, definitions} = await this.findTermsInternal(text, dictionaries, alphanumeric); await this.buildTermFrequencies(definitions, titles); return {length, definitions}; } - async findTerms(text, dictionaries, alphanumeric) { + async findTermsInternal(text, dictionaries, alphanumeric) { if (!alphanumeric && text.length > 0) { const c = text[0]; if (!jpIsKana(c) && !jpIsKanji(c)) {