diff options
author | 2010-03-04 04:43:15 -0800 | |
---|---|---|
committer | 2010-03-04 04:59:05 -0800 | |
commit | 0a2df340e5bb3f7df4b5a1ddb3e611f08d195948 (patch) | |
tree | 651709d48cfffdd492ae080b09a1e5bd1544bc58 | |
parent | ec99869272d6d96e5823eaf391c7270caf90f891 (diff) | |
download | latinime-0a2df340e5bb3f7df4b5a1ddb3e611f08d195948.tar.gz latinime-0a2df340e5bb3f7df4b5a1ddb3e611f08d195948.tar.xz latinime-0a2df340e5bb3f7df4b5a1ddb3e611f08d195948.zip |
Blacklist asian languages from input selection list, since this is LatinIME.
Bug: 2488167
Don't show ko, ja and zh languages in the list.
Remove a debug println.
Add alternates_for_g to the keyboard for it to work on turkish. This
must have not gotten merged from donut.
-rwxr-xr-x | Android.mk | 2 | ||||
-rw-r--r-- | res/values/donottranslate.xml | 2 | ||||
-rw-r--r-- | res/values/strings.xml | 3 | ||||
-rwxr-xr-x | res/xml/kbd_qwerty.xml | 5 | ||||
-rw-r--r-- | src/com/android/inputmethod/latin/BinaryDictionary.java | 1 | ||||
-rw-r--r-- | src/com/android/inputmethod/latin/InputLanguageSelection.java | 13 |
6 files changed, 23 insertions, 3 deletions
diff --git a/Android.mk b/Android.mk index e45357911..5396ed518 100755 --- a/Android.mk +++ b/Android.mk @@ -15,7 +15,7 @@ LOCAL_STATIC_JAVA_LIBRARIES := android-common #LOCAL_AAPT_FLAGS := -0 .dict -#LOCAL_SDK_VERSION := current +LOCAL_SDK_VERSION := current LOCAL_PROGUARD_FLAGS := -include $(LOCAL_PATH)/proguard.flags diff --git a/res/values/donottranslate.xml b/res/values/donottranslate.xml index 87c28aeba..d5017353d 100644 --- a/res/values/donottranslate.xml +++ b/res/values/donottranslate.xml @@ -34,4 +34,6 @@ <string name="alternates_for_z"></string> <!-- Accented characters related to "l" --> <string name="alternates_for_l"></string> + <!-- Accented characters related to "g" --> + <string name="alternates_for_g"></string> </resources> diff --git a/res/values/strings.xml b/res/values/strings.xml index 9025ca0f6..35dd3e089 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -319,4 +319,7 @@ <!-- Add to dictionary hint --> <string name="hint_add_to_dictionary">\u2190 Tap again to save</string> + + <!-- Inform the user that a particular language has an available dictionary --> + <string name="has_dictionary">Dictionary available</string> </resources> diff --git a/res/xml/kbd_qwerty.xml b/res/xml/kbd_qwerty.xml index 4aa476136..1a9ea5c31 100755 --- a/res/xml/kbd_qwerty.xml +++ b/res/xml/kbd_qwerty.xml @@ -70,7 +70,10 @@ android:popupKeyboard="@xml/kbd_popup_template" android:popupCharacters="@string/alternates_for_d"/> <Key android:codes="102" android:keyLabel="f"/> - <Key android:codes="103" android:keyLabel="g"/> + <Key android:codes="103" android:keyLabel="g" + android:popupKeyboard="@xml/kbd_popup_template" + android:popupCharacters="@string/alternates_for_g" + /> <Key android:codes="104" android:keyLabel="h"/> <Key android:codes="106" android:keyLabel="j"/> <Key android:codes="107" android:keyLabel="k"/> diff --git a/src/com/android/inputmethod/latin/BinaryDictionary.java b/src/com/android/inputmethod/latin/BinaryDictionary.java index ec467c88d..43f4c4cb6 100644 --- a/src/com/android/inputmethod/latin/BinaryDictionary.java +++ b/src/com/android/inputmethod/latin/BinaryDictionary.java @@ -138,7 +138,6 @@ public class BinaryDictionary extends Dictionary { @Override public synchronized void close() { if (mNativeDict != 0) { - System.err.println("Closing BinaryDictionary"); closeNative(mNativeDict); mNativeDict = 0; } diff --git a/src/com/android/inputmethod/latin/InputLanguageSelection.java b/src/com/android/inputmethod/latin/InputLanguageSelection.java index 73298e33c..b1ddb2175 100644 --- a/src/com/android/inputmethod/latin/InputLanguageSelection.java +++ b/src/com/android/inputmethod/latin/InputLanguageSelection.java @@ -34,6 +34,9 @@ public class InputLanguageSelection extends PreferenceActivity { private String mSelectedLanguages; private ArrayList<Loc> mAvailableLanguages = new ArrayList<Loc>(); + private static final String[] BLACKLIST_LANGUAGES = { + "ko", "ja", "zh" + }; private static class Loc implements Comparable { static Collator sCollator = Collator.getInstance(); @@ -137,6 +140,9 @@ public class InputLanguageSelection extends PreferenceActivity { String country = s.substring(3, 5); Locale l = new Locale(language, country); + // Exclude languages that are not relevant to LatinIME + if (arrayContains(BLACKLIST_LANGUAGES, language)) continue; + if (finalSize == 0) { preprocess[finalSize++] = new Loc(LanguageSwitcher.toTitleCase(l.getDisplayName(l)), l); @@ -167,4 +173,11 @@ public class InputLanguageSelection extends PreferenceActivity { } return uniqueLocales; } + + private boolean arrayContains(String[] array, String value) { + for (int i = 0; i < array.length; i++) { + if (array[i].equalsIgnoreCase(value)) return true; + } + return false; + } } |