From 229f04ba358b3485fa7952088e03dad9e651bb23 Mon Sep 17 00:00:00 2001 From: Cashew <52880648+Scrub1492@users.noreply.github.com> Date: Wed, 20 Dec 2023 21:36:27 +0900 Subject: rename variables (#409) * rename variables * add comment to ambiguous variable * rename variables * add comments * rename functions --- ext/js/language/translator.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'ext/js/language') diff --git a/ext/js/language/translator.js b/ext/js/language/translator.js index bf22ee6b..ddbd8578 100644 --- a/ext/js/language/translator.js +++ b/ext/js/language/translator.js @@ -70,7 +70,7 @@ export class Translator { async findTerms(mode, text, options) { const {enabledDictionaryMap, excludeDictionaryDefinitions, sortFrequencyDictionary, sortFrequencyDictionaryOrder} = options; const tagAggregator = new TranslatorTagAggregator(); - let {dictionaryEntries, originalTextLength} = await this._findTermsInternal(text, enabledDictionaryMap, options, tagAggregator); + let {dictionaryEntries, originalTextLength} = await this._findTermsInternalWrapper(text, enabledDictionaryMap, options, tagAggregator); switch (mode) { case 'group': @@ -208,7 +208,7 @@ export class Translator { * @param {TranslatorTagAggregator} tagAggregator * @returns {Promise} */ - async _findTermsInternal(text, enabledDictionaryMap, options, tagAggregator) { + async _findTermsInternalWrapper(text, enabledDictionaryMap, options, tagAggregator) { if (options.removeNonJapaneseCharacters) { text = this._getJapaneseOnlyText(text); } @@ -216,7 +216,7 @@ export class Translator { return {dictionaryEntries: [], originalTextLength: 0}; } - const deinflections = await this._findTermsInternal2(text, enabledDictionaryMap, options); + const deinflections = await this._findTermsInternal(text, enabledDictionaryMap, options); let originalTextLength = 0; const dictionaryEntries = []; @@ -242,7 +242,7 @@ export class Translator { * @param {import('translation').FindTermsOptions} options * @returns {Promise} */ - async _findTermsInternal2(text, enabledDictionaryMap, options) { + async _findTermsInternal(text, enabledDictionaryMap, options) { const deinflections = ( options.deinflect ? this._getAllDeinflections(text, options) : -- cgit v1.2.3