1
0
Fork 0

the LF4 key now displays the language in Predictive mode (also no more toast on mode change, except in invisible mode)

This commit is contained in:
sspanak 2025-04-30 18:06:11 +03:00 committed by Dimo Karaivanov
parent 348627bfbf
commit 6e0c32b17d
3 changed files with 13 additions and 6 deletions

View file

@ -318,7 +318,7 @@ public abstract class HotkeyHandler extends CommandHandler {
statusBar.setText(mInputMode);
suggestionOps.setRTL(isLanguageRTL);
mainView.render();
if (!suggestionOps.isEmpty() || settings.isMainLayoutStealth()) {
if (settings.isMainLayoutStealth() && !settings.isStatusIconEnabled()) {
UI.toastShortSingle(this, mInputMode.getClass().getSimpleName(), mInputMode.toString());
}
@ -347,7 +347,7 @@ public abstract class HotkeyHandler extends CommandHandler {
statusBar.setText(mInputMode);
mainView.render();
if (settings.isMainLayoutStealth()) {
if (settings.isMainLayoutStealth() && !settings.isStatusIconEnabled()) {
UI.toastShortSingle(this, mInputMode.getClass().getSimpleName(), mInputMode.toString());
}
@ -373,7 +373,7 @@ public abstract class HotkeyHandler extends CommandHandler {
statusBar.setText(mInputMode);
mainView.render();
if (settings.isMainLayoutStealth()) {
if (settings.isMainLayoutStealth() && !settings.isStatusIconEnabled()) {
UI.toastShortSingle(this, mInputMode.getClass().getSimpleName(), mInputMode.toString());
}

View file

@ -136,7 +136,7 @@ abstract public class MainViewHandler extends HotkeyHandler {
} else if (InputModeKind.isKatakana(mInputMode)) {
return "";
} else if (InputModeKind.isPredictive(mInputMode)) {
return "T9";
return mLanguage != null ? mLanguage.getCode().toUpperCase(mLanguage.getLocale()) : "T9";
} else if (InputModeKind.isNumeric(mInputMode)){
return "123";
} else {

View file

@ -41,15 +41,22 @@ class LocaleCompat {
return switch (language) {
case "ar" -> "ع";
case "bg" -> "бг";
case "en" -> ("in".equals(country)) ? "hn" : language; // en-IN = Hinglish
case "en" -> "in".equals(country) ? "hn" : language; // en-IN = Hinglish
case "fa" -> "ف";
case "fi" -> "su";
case "el" -> "ελ";
case "gu" -> "ગુ";
case "he", "iw" -> "אב";
case "hi" -> "";
case "hu" -> "mg";
case "ji", "yi" -> "יי";
case "ja" -> "";
case "ko" -> "";
case "ru" -> "ру";
case "th" -> "ไท";
case "uk" -> "ук";
case "zgh" -> "tm";
case "zgh" -> "dz".equals(country) ? "tm" : "ⵜⵎ";
case "zh" -> "cn".equals(country) ? "" : language;
case "ca", "ga", "sw" -> language;
default -> country;
};