diff options
author | toasted-nutbread <toasted-nutbread@users.noreply.github.com> | 2024-02-25 11:20:44 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-25 16:20:44 +0000 |
commit | 2e9ea19207a7410f929bb908759d48cb2340f29c (patch) | |
tree | a6bde1297d693bb8d50e4c93a963aa3179e5a2ce /ext/js/language/language-descriptors.js | |
parent | 73169f06dff767020718a5715eba97d3575ba7e1 (diff) |
"isJapanese" check move (#730)
* Move isStringPartiallyJapanese out of ClipboardMonitor
* Create isStringPartiallyJapanese function
* Add textMayBeTranslatable
* Rename API function
* Rename internal function
* Add helper
* Update translatable check
* Pass language to TextScanner
* Pass language explicitly
* Use textMayBeTranslatable
* No redundant translatable check
* Update eslint
* Remove double newline
* Collapse
* Rename
Diffstat (limited to 'ext/js/language/language-descriptors.js')
-rw-r--r-- | ext/js/language/language-descriptors.js | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/ext/js/language/language-descriptors.js b/ext/js/language/language-descriptors.js index beb1417e..d78a96e5 100644 --- a/ext/js/language/language-descriptors.js +++ b/ext/js/language/language-descriptors.js @@ -18,6 +18,7 @@ import {removeArabicScriptDiacritics} from './ar/arabic-text-preprocessors.js'; import {eszettPreprocessor} from './de/german-text-preprocessors.js'; import {collapseEmphaticSequences, convertAlphabeticCharacters, convertHalfWidthCharacters, convertHiraganaToKatakana, convertNumericCharacters} from './ja/japanese-text-preprocessors.js'; +import {isStringPartiallyJapanese} from './ja/japanese.js'; import {removeLatinDiacritics} from './la/latin-text-preprocessors.js'; import {removeRussianDiacritics, yoToE} from './ru/russian-text-preprocessors.js'; import {capitalizeFirstLetter, decapitalize} from './text-preprocessors.js'; @@ -114,6 +115,7 @@ const languageDescriptors = [ iso: 'ja', name: 'Japanese', exampleText: '読め', + isTextLookupWorthy: isStringPartiallyJapanese, textPreprocessors: { convertHalfWidthCharacters, convertNumericCharacters, |