Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e1370a5f authored by Vasyl Gello's avatar Vasyl Gello
Browse files

Add new type for Bulgarian script



Declaring the script type as Cyrillic leads to usage of 'east_slvic'
template, which is incorrect for Bulgarian layout.

Signed-Off-By: default avatarVasyl Gello <vasek.gello@gmail.com>
Change-Id: Ieec27701367f00c4b5e345cee7bf387f923da8f1
parent 3dfa4b90
Loading
Loading
Loading
Loading
+2 −0
Original line number Original line Diff line number Diff line
@@ -119,6 +119,8 @@ public final class AndroidSpellCheckerService extends SpellCheckerService
            return "greek";
            return "greek";
        case ScriptUtils.SCRIPT_HEBREW:
        case ScriptUtils.SCRIPT_HEBREW:
            return "hebrew";
            return "hebrew";
        case ScriptUtils.SCRIPT_BULGARIAN:
            return "bulgarian";
        default:
        default:
            throw new RuntimeException("Wrong script supplied: " + script);
            throw new RuntimeException("Wrong script supplied: " + script);
        }
        }
+2 −0
Original line number Original line Diff line number Diff line
@@ -45,6 +45,7 @@ public class ScriptUtils {
    public static final int SCRIPT_TAMIL = 15;
    public static final int SCRIPT_TAMIL = 15;
    public static final int SCRIPT_TELUGU = 16;
    public static final int SCRIPT_TELUGU = 16;
    public static final int SCRIPT_THAI = 17;
    public static final int SCRIPT_THAI = 17;
    public static final int SCRIPT_BULGARIAN = 18;


    private static final TreeMap<String, Integer> mLanguageCodeToScriptCode;
    private static final TreeMap<String, Integer> mLanguageCodeToScriptCode;


@@ -102,6 +103,7 @@ public class ScriptUtils {
        case SCRIPT_BENGALI:
        case SCRIPT_BENGALI:
            // Bengali unicode block is U+0980..U+09FF
            // Bengali unicode block is U+0980..U+09FF
            return (codePoint >= 0x980 && codePoint <= 0x9FF);
            return (codePoint >= 0x980 && codePoint <= 0x9FF);
        case SCRIPT_BULGARIAN:
        case SCRIPT_CYRILLIC:
        case SCRIPT_CYRILLIC:
            // All Cyrillic characters are in the 400~52F block. There are some in the upper
            // All Cyrillic characters are in the 400~52F block. There are some in the upper
            // Unicode range, but they are archaic characters that are not used in modern
            // Unicode range, but they are archaic characters that are not used in modern