LatinIME: Enable spellchecker for additional languages
We include more dictionaries than stock builds so let's
also enable spell checking for languages that use only
the supported unicode characters.
Change-Id: Iff9aea56edde10e47a754df39682f4f72c269756
LatinIME: Enable Greek spell checking
* We already ship a dictionary for Greek
Change-Id: I99ee7c98a88515c4c69b654210c10696135d7560
Add support for Ukrainian spell checking
Change-Id: Ie8a39c9206ec1a2e4cccc43d77890abe00080747
Add support for Polish spell checking
* The script type for Polish is Latin, so no need to add it
to ScriptUtils
Change-Id: I5203c56858912ea53bc6069e23fa136af60361bf
Add support for Czech spell checking
* Czech script type is Latin so no need to add it in ScriptUtils
Change-Id: I62085658ff7f7bbbca79e9895d57f1adb48592d4
Add support for Croatian spell checking
* The script type for Croatian is Latin, so no need to add it to
ScriptUtils
Change-Id: I057ba38adf705e62b16ee9e2d2aa7d46bf3b865f
Add support for Hebrew spell checking
* Hebrew type is already declared in ScriptUtils
Change-Id: Id420c256b298d9692d8c415dfc75bd4d3116ca29
Add support for Portuguese spell checking
* Script type for Portuguese (Portugal) is Latin
so no need to add it in ScriptUtils
Change-Id: I2955f267a1f7d81b9180cf4c53718f72724f782d
Add support for Bulgarian spell checking
Change-Id: I9ff3c73979e68a7a11a657aa6e83769da6607115
Add support for Georgian spell checking
* Georgian script type is already defined in ScriptUtils
Change-Id: I7e1eb3e985aa44903baed918f58bb6aaace15147
Add in spellchecker.xml support for en_AU, lt, lv, nl, ro, sl, sr, tr
Settings for missing dictionaries in menu.
Now the xml file have the same amount of 32 (+hu_zz) languages as all .dict files.
https://github.com/LineageOS/android_vendor_lineage/tree/lineage-16.0/overlay/dictionaries/packages/inputmethods/LatinIME/java/res/raw
https://github.com/LineageOS/android_packages_inputmethods_LatinIME/tree/lineage-16.0/java/res/raw
Change-Id: I9fa6245f57a0976d96e0dab37c2e25ef1180e899
Change-Id: I425f0163cd0b34917d6041d75c0e244526ddc268
diff --git a/java/res/xml/spellchecker.xml b/java/res/xml/spellchecker.xml
index 13e6132..40844e0 100644
--- a/java/res/xml/spellchecker.xml
+++ b/java/res/xml/spellchecker.xml
@@ -59,4 +59,85 @@
android:label="@string/subtype_generic"
android:subtypeLocale="pt_BR"
/>
+ <!-- LineageOS additions -->
+ <subtype
+ android:label="@string/subtype_generic"
+ android:subtypeLocale="bg"
+ />
+ <subtype
+ android:label="@string/subtype_generic"
+ android:subtypeLocale="cs"
+ />
+ <subtype
+ android:label="@string/subtype_generic"
+ android:subtypeLocale="da"
+ />
+ <subtype
+ android:label="@string/subtype_generic"
+ android:subtypeLocale="el"
+ />
+ <subtype
+ android:label="@string/subtype_generic"
+ android:subtypeLocale="fi"
+ />
+ <subtype
+ android:label="@string/subtype_generic"
+ android:subtypeLocale="hr"
+ />
+ <subtype
+ android:label="@string/subtype_generic"
+ android:subtypeLocale="iw"
+ />
+ <subtype
+ android:label="@string/subtype_generic"
+ android:subtypeLocale="ka"
+ />
+ <subtype
+ android:label="@string/subtype_generic"
+ android:subtypeLocale="lt"
+ />
+ <subtype
+ android:label="@string/subtype_generic"
+ android:subtypeLocale="lv"
+ />
+ <subtype
+ android:label="@string/subtype_generic"
+ android:subtypeLocale="nb"
+ />
+ <subtype
+ android:label="@string/subtype_generic"
+ android:subtypeLocale="nl"
+ />
+ <subtype
+ android:label="@string/subtype_generic"
+ android:subtypeLocale="pl"
+ />
+ <subtype
+ android:label="@string/subtype_generic"
+ android:subtypeLocale="pt_PT"
+ />
+ <subtype
+ android:label="@string/subtype_generic"
+ android:subtypeLocale="ro"
+ />
+ <subtype
+ android:label="@string/subtype_generic"
+ android:subtypeLocale="sl"
+ />
+ <subtype
+ android:label="@string/subtype_generic"
+ android:subtypeLocale="sr"
+ />
+ <subtype
+ android:label="@string/subtype_generic"
+ android:subtypeLocale="sv"
+ />
+ <subtype
+ android:label="@string/subtype_generic"
+ android:subtypeLocale="tr"
+ />
+ <subtype
+ android:label="@string/subtype_generic"
+ android:subtypeLocale="uk"
+ />
</spell-checker>
diff --git a/java/src/com/android/inputmethod/latin/utils/ScriptUtils.java b/java/src/com/android/inputmethod/latin/utils/ScriptUtils.java
index 535b73d..81d489f 100644
--- a/java/src/com/android/inputmethod/latin/utils/ScriptUtils.java
+++ b/java/src/com/android/inputmethod/latin/utils/ScriptUtils.java
@@ -54,8 +54,8 @@
mLanguageCodeToScriptCode.put("", SCRIPT_LATIN); // default
mLanguageCodeToScriptCode.put("ar", SCRIPT_ARABIC);
mLanguageCodeToScriptCode.put("hy", SCRIPT_ARMENIAN);
+ mLanguageCodeToScriptCode.put("bg", SCRIPT_BULGARIAN);
mLanguageCodeToScriptCode.put("bn", SCRIPT_BENGALI);
- mLanguageCodeToScriptCode.put("bg", SCRIPT_CYRILLIC);
mLanguageCodeToScriptCode.put("sr", SCRIPT_CYRILLIC);
mLanguageCodeToScriptCode.put("ru", SCRIPT_CYRILLIC);
mLanguageCodeToScriptCode.put("ka", SCRIPT_GEORGIAN);
@@ -69,6 +69,7 @@
mLanguageCodeToScriptCode.put("ta", SCRIPT_TAMIL);
mLanguageCodeToScriptCode.put("te", SCRIPT_TELUGU);
mLanguageCodeToScriptCode.put("th", SCRIPT_THAI);
+ mLanguageCodeToScriptCode.put("uk", SCRIPT_CYRILLIC);
}
/*