From 56f96fe05b2b01c488ce569eb2eefc13ee917fd3 Mon Sep 17 00:00:00 2001 From: Amith Yamasani Date: Mon, 3 Aug 2009 18:16:19 -0700 Subject: [PATCH] AI 150810: Fix for 2023252 & 2023256: Turkish accented characters for the keyboard BUG=2023252,2023256 Automated import of CL 150810 --- res/values-tr/donottranslate.xml | 23 +++++++++++++++++++ res/values-tr/strings.xml | 3 ++- res/values/donottranslate.xml | 2 ++ res/values/strings.xml | 5 +++- res/xml/kbd_qwerty.xml | 7 ++++-- .../android/inputmethod/latin/LatinIME.java | 5 ++-- 6 files changed, 39 insertions(+), 6 deletions(-) create mode 100644 res/values-tr/donottranslate.xml diff --git a/res/values-tr/donottranslate.xml b/res/values-tr/donottranslate.xml new file mode 100644 index 000000000..f206e4c43 --- /dev/null +++ b/res/values-tr/donottranslate.xml @@ -0,0 +1,23 @@ + + + + + ğ + diff --git a/res/values-tr/strings.xml b/res/values-tr/strings.xml index d510f15df..664c2cd0f 100644 --- a/res/values-tr/strings.xml +++ b/res/values-tr/strings.xml @@ -56,13 +56,14 @@ "%s : Kaydedildi" "àáâãäåæ" "èéêë" - "ıìíîï" + "iìíîï" "öòóôõœø" "üùúû" "ş§ß" "ñ" "ç" "ýÿ" + "ı" "Vurguları görmek için bir tuşu basılı tutun (ø, ö, v.b.)" "Klavyeyi herhangi bir anda kapatmak için geri tuşuna ↶ basın" "Sayılara ve simgelere erişin" diff --git a/res/values/donottranslate.xml b/res/values/donottranslate.xml index d9649f3b1..c6941949e 100644 --- a/res/values/donottranslate.xml +++ b/res/values/donottranslate.xml @@ -32,4 +32,6 @@ + + diff --git a/res/values/strings.xml b/res/values/strings.xml index c01630a78..ec9a8b731 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -125,7 +125,10 @@ ç ýÿ - + + + i + Hold a key down to see accents (ø, ö, etc.) diff --git a/res/xml/kbd_qwerty.xml b/res/xml/kbd_qwerty.xml index 2fa6c90e1..0493b9932 100755 --- a/res/xml/kbd_qwerty.xml +++ b/res/xml/kbd_qwerty.xml @@ -46,7 +46,7 @@ android:popupKeyboard="@xml/kbd_popup_template" android:popupCharacters="@string/alternates_for_u" /> - @@ -70,7 +70,10 @@ android:popupKeyboard="@xml/kbd_popup_template" android:popupCharacters="@string/alternates_for_d"/> - + + /> diff --git a/src/com/android/inputmethod/latin/LatinIME.java b/src/com/android/inputmethod/latin/LatinIME.java index b358df394..6ee9bd127 100644 --- a/src/com/android/inputmethod/latin/LatinIME.java +++ b/src/com/android/inputmethod/latin/LatinIME.java @@ -692,7 +692,8 @@ public class LatinIME extends InputMethodService } } if (mInputView.isShifted()) { - primaryCode = Character.toUpperCase(primaryCode); + // TODO: This doesn't work with ß, need to fix it in the next release. + primaryCode = new String(keyCodes, 0, 1).toUpperCase().charAt(0); } if (mPredicting) { if (mInputView.isShifted() && mComposing.length() == 0) { @@ -871,7 +872,7 @@ public class LatinIME extends InputMethodService suggestion = suggestion.toString().toUpperCase(); } else if (preferCapitalization() || (mKeyboardSwitcher.isAlphabetMode() && mInputView.isShifted())) { - suggestion = Character.toUpperCase(suggestion.charAt(0)) + suggestion = suggestion.toString().toUpperCase().charAt(0) + suggestion.subSequence(1, suggestion.length()).toString(); } InputConnection ic = getCurrentInputConnection();