diff options
author | Cashew <52880648+Scrub1492@users.noreply.github.com> | 2023-12-20 21:36:27 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-12-20 12:36:27 +0000 |
commit | 229f04ba358b3485fa7952088e03dad9e651bb23 (patch) | |
tree | dfb4a0431368e2067d7e6f5d9ce08bf88e1730cd /ext/js/language | |
parent | 8b943cc97fab890085448122e7c13dd035d0e238 (diff) |
rename variables (#409)
* rename variables
* add comment to ambiguous variable
* rename variables
* add comments
* rename functions
Diffstat (limited to 'ext/js/language')
-rw-r--r-- | ext/js/language/translator.js | 8 |
1 files changed, 4 insertions, 4 deletions
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<import('translator').FindTermsResult>} */ - 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<import('translation-internal').DatabaseDeinflection[]>} */ - async _findTermsInternal2(text, enabledDictionaryMap, options) { + async _findTermsInternal(text, enabledDictionaryMap, options) { const deinflections = ( options.deinflect ? this._getAllDeinflections(text, options) : |