aboutsummaryrefslogtreecommitdiff
path: root/ext/bg/js/translator.js
diff options
context:
space:
mode:
Diffstat (limited to 'ext/bg/js/translator.js')
-rw-r--r--ext/bg/js/translator.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/ext/bg/js/translator.js b/ext/bg/js/translator.js
index 6ddf5431..0f89111f 100644
--- a/ext/bg/js/translator.js
+++ b/ext/bg/js/translator.js
@@ -326,12 +326,13 @@ class Translator {
Translator.getTextOptionEntryVariants(translationOptions.convertHalfWidthCharacters),
Translator.getTextOptionEntryVariants(translationOptions.convertNumericCharacters),
Translator.getTextOptionEntryVariants(translationOptions.convertAlphabeticCharacters),
+ Translator.getTextOptionEntryVariants(translationOptions.convertHiraganaToKatakana),
Translator.getTextOptionEntryVariants(translationOptions.convertKatakanaToHiragana)
];
const deinflections = [];
const used = new Set();
- for (const [halfWidth, numeric, alphabetic, hiragana] of Translator.getArrayVariants(textOptionVariantArray)) {
+ for (const [halfWidth, numeric, alphabetic, katakana, hiragana] of Translator.getArrayVariants(textOptionVariantArray)) {
let text2 = text;
let sourceMapping = null;
if (halfWidth) {
@@ -345,6 +346,9 @@ class Translator {
if (sourceMapping === null) { sourceMapping = Translator.createTextSourceMapping(text2); }
text2 = jpConvertAlphabeticToKana(text2, sourceMapping);
}
+ if (katakana) {
+ text2 = jpHiraganaToKatakana(text2);
+ }
if (hiragana) {
text2 = jpKatakanaToHiragana(text2);
}