From d527a15ec44089930dd23c9e20b8672024a4555b Mon Sep 17 00:00:00 2001 From: Jean Chalard Date: Wed, 23 May 2012 20:49:43 +0900 Subject: [PATCH] Add new locales for the spell checker. Bug: 6533167 Change-Id: I1581e8446b1af5dc3679e01be16d4fc34af725cc --- java/res/xml/spellchecker.xml | 16 ++++++++++++++++ .../spellcheck/AndroidSpellCheckerService.java | 6 ++++++ 2 files changed, 22 insertions(+) diff --git a/java/res/xml/spellchecker.xml b/java/res/xml/spellchecker.xml index 2e4448c44..66cd66280 100644 --- a/java/res/xml/spellchecker.xml +++ b/java/res/xml/spellchecker.xml @@ -27,6 +27,14 @@ android:label="@string/subtype_generic" android:subtypeLocale="en" /> + + + + diff --git a/java/src/com/android/inputmethod/latin/spellcheck/AndroidSpellCheckerService.java b/java/src/com/android/inputmethod/latin/spellcheck/AndroidSpellCheckerService.java index afd59c3f8..aa3250185 100644 --- a/java/src/com/android/inputmethod/latin/spellcheck/AndroidSpellCheckerService.java +++ b/java/src/com/android/inputmethod/latin/spellcheck/AndroidSpellCheckerService.java @@ -102,13 +102,19 @@ public class AndroidSpellCheckerService extends SpellCheckerService // will never have any suggestions, so it makes no sense checking them. mLanguageToScript = new TreeMap(); mLanguageToScript.put("en", SCRIPT_LATIN); + mLanguageToScript.put("en_US", SCRIPT_LATIN); + mLanguageToScript.put("en_GB", SCRIPT_LATIN); mLanguageToScript.put("fr", SCRIPT_LATIN); mLanguageToScript.put("de", SCRIPT_LATIN); mLanguageToScript.put("nl", SCRIPT_LATIN); mLanguageToScript.put("cs", SCRIPT_LATIN); mLanguageToScript.put("es", SCRIPT_LATIN); mLanguageToScript.put("it", SCRIPT_LATIN); + mLanguageToScript.put("hr", SCRIPT_LATIN); + mLanguageToScript.put("pt_BR", SCRIPT_LATIN); mLanguageToScript.put("ru", SCRIPT_CYRILLIC); + // TODO: Make a persian proximity, and activate the Farsi subtype. + // mLanguageToScript.put("fa", SCRIPT_PERSIAN); } @Override public void onCreate() {