diff options
Diffstat (limited to 'tools/make-keyboard-text')
-rw-r--r-- | tools/make-keyboard-text/res/com/android/inputmethod/keyboard/internal/KeyboardTextsSet.tmpl | 11 | ||||
-rw-r--r-- | tools/make-keyboard-text/res/values/donottranslate-more-keys.xml | 1 |
2 files changed, 7 insertions, 5 deletions
diff --git a/tools/make-keyboard-text/res/com/android/inputmethod/keyboard/internal/KeyboardTextsSet.tmpl b/tools/make-keyboard-text/res/com/android/inputmethod/keyboard/internal/KeyboardTextsSet.tmpl index db1dde39f..7a6284f69 100644 --- a/tools/make-keyboard-text/res/com/android/inputmethod/keyboard/internal/KeyboardTextsSet.tmpl +++ b/tools/make-keyboard-text/res/com/android/inputmethod/keyboard/internal/KeyboardTextsSet.tmpl @@ -25,6 +25,7 @@ import com.android.inputmethod.latin.Constants; import com.android.inputmethod.latin.utils.CollectionUtils; import java.util.HashMap; +import java.util.Locale; /** * !!!!! DO NOT EDIT THIS FILE !!!!! @@ -52,15 +53,17 @@ public final class KeyboardTextsSet { private static final int MAX_STRING_REFERENCE_INDIRECTION = 10; // Language to texts map. - private static final HashMap<String, String[]> sLocaleToTextsMap = CollectionUtils.newHashMap(); + private static final HashMap<String, String[]> sLanguageToTextsMap = + CollectionUtils.newHashMap(); private static final HashMap<String, Integer> sNameToIdsMap = CollectionUtils.newHashMap(); private String[] mTexts; // Resource name to text map. private HashMap<String, String> mResourceNameToTextsMap = CollectionUtils.newHashMap(); - public void setLanguage(final String language) { - mTexts = sLocaleToTextsMap.get(language); + public void setLocale(final Locale locale) { + final String language = locale.getLanguage(); + mTexts = sLanguageToTextsMap.get(language); if (mTexts == null) { mTexts = LANGUAGE_DEFAULT; } @@ -195,7 +198,7 @@ public final class KeyboardTextsSet { for (int i = 0; i < LANGUAGES_AND_TEXTS.length; i += 2) { final String language = (String)LANGUAGES_AND_TEXTS[i]; final String[] texts = (String[])LANGUAGES_AND_TEXTS[i + 1]; - sLocaleToTextsMap.put(language, texts); + sLanguageToTextsMap.put(language, texts); } } } diff --git a/tools/make-keyboard-text/res/values/donottranslate-more-keys.xml b/tools/make-keyboard-text/res/values/donottranslate-more-keys.xml index 6b64652f2..46eab571a 100644 --- a/tools/make-keyboard-text/res/values/donottranslate-more-keys.xml +++ b/tools/make-keyboard-text/res/values/donottranslate-more-keys.xml @@ -215,7 +215,6 @@ <string name="keylabel_for_popular_domain">".com"</string> <!-- popular web domains for the locale - most popular, displayed on the keyboard --> <string name="more_keys_for_popular_domain">"!hasLabels!,.net,.org,.gov,.edu"</string> - <string name="more_keys_for_smiley">"!fixedColumnOrder!5,!hasLabels!,=-O|=-O ,:-P|:-P ,;-)|;-) ,:-(|:-( ,:-)|:-) ,:-!|:-! ,:-$|:-$ ,B-)|B-) ,:O|:O ,:-*|:-* ,:-D|:-D ,:\'(|:\'( ,:-\\\\|:-\\\\ ,O:-)|O:-) ,:-[|:-[ "</string> <!-- U+2039: "‹" SINGLE LEFT-POINTING ANGLE QUOTATION MARK U+203A: "›" SINGLE RIGHT-POINTING ANGLE QUOTATION MARK U+00AB: "«" LEFT-POINTING DOUBLE ANGLE QUOTATION MARK |