AI 150810: Fix for 2023252 & 2023256: Turkish accented characters for the keyboard

BUG=2023252,2023256

Automated import of CL 150810
main
Amith Yamasani 2009-08-03 18:16:19 -07:00 committed by Amith Yamasani
parent 5442c7d4ba
commit 56f96fe05b
6 changed files with 39 additions and 6 deletions

View File

@ -0,0 +1,23 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
/*
**
** Copyright 2009, The Android Open Source Project
**
** Licensed under the Apache License, Version 2.0 (the "License");
** you may not use this file except in compliance with the License.
** You may obtain a copy of the License at
**
** http://www.apache.org/licenses/LICENSE-2.0
**
** Unless required by applicable law or agreed to in writing, software
** distributed under the License is distributed on an "AS IS" BASIS,
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
** See the License for the specific language governing permissions and
** limitations under the License.
*/
-->
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<!-- Accented characters related to "g" -->
<string name="alternates_for_g">ğ</string>
</resources>

View File

@ -56,13 +56,14 @@
<string name="added_word" msgid="8993883354622484372">"<xliff:g id="WORD">%s</xliff:g> : Kaydedildi"</string> <string name="added_word" msgid="8993883354622484372">"<xliff:g id="WORD">%s</xliff:g> : Kaydedildi"</string>
<string name="alternates_for_a" msgid="2566516493365324765">"àáâãäåæ"</string> <string name="alternates_for_a" msgid="2566516493365324765">"àáâãäåæ"</string>
<string name="alternates_for_e" msgid="3900510936875547555">"èéêë"</string> <string name="alternates_for_e" msgid="3900510936875547555">"èéêë"</string>
<string name="alternates_for_i" msgid="7097915268629342242">"ıìíîï"</string> <string name="alternates_for_i" msgid="7097915268629342242">"iìíîï"</string>
<string name="alternates_for_o" msgid="6151402748321267776">"öòóôõœø"</string> <string name="alternates_for_o" msgid="6151402748321267776">"öòóôõœø"</string>
<string name="alternates_for_u" msgid="5899096818189442934">"üùúû"</string> <string name="alternates_for_u" msgid="5899096818189442934">"üùúû"</string>
<string name="alternates_for_s" msgid="348762530927662188">"ş§ß"</string> <string name="alternates_for_s" msgid="348762530927662188">"ş§ß"</string>
<string name="alternates_for_n" msgid="6257322556221886400">"ñ"</string> <string name="alternates_for_n" msgid="6257322556221886400">"ñ"</string>
<string name="alternates_for_c" msgid="151699780720639892">"ç"</string> <string name="alternates_for_c" msgid="151699780720639892">"ç"</string>
<string name="alternates_for_y" msgid="1722776806607271199">"ýÿ"</string> <string name="alternates_for_y" msgid="1722776806607271199">"ýÿ"</string>
<string name="key_i">"ı"</string>
<string name="tip_long_press" msgid="6101270866284343344">"Vurguları görmek için bir tuşu basılı tutun (ø, ö, v.b.)"</string> <string name="tip_long_press" msgid="6101270866284343344">"Vurguları görmek için bir tuşu basılı tutun (ø, ö, v.b.)"</string>
<string name="tip_dismiss" msgid="7585579046862204381">"Klavyeyi herhangi bir anda kapatmak için geri tuşuna ↶ basın"</string> <string name="tip_dismiss" msgid="7585579046862204381">"Klavyeyi herhangi bir anda kapatmak için geri tuşuna ↶ basın"</string>
<string name="tip_access_symbols" msgid="6344098517525531652">"Sayılara ve simgelere erişin"</string> <string name="tip_access_symbols" msgid="6344098517525531652">"Sayılara ve simgelere erişin"</string>

View File

@ -32,4 +32,6 @@
<string name="alternates_for_z"></string> <string name="alternates_for_z"></string>
<!-- Accented characters related to "l" --> <!-- Accented characters related to "l" -->
<string name="alternates_for_l"></string> <string name="alternates_for_l"></string>
<!-- Accented characters related to "g" -->
<string name="alternates_for_g"></string>
</resources> </resources>

View File

@ -125,7 +125,10 @@
<string name="alternates_for_c">ç</string> <string name="alternates_for_c">ç</string>
<!-- Accented forms of "y" --> <!-- Accented forms of "y" -->
<string name="alternates_for_y">ýÿ</string> <string name="alternates_for_y">ýÿ</string>
<!-- Label to display on the "i" key -->
<string name="key_i">i</string>
<!-- Tip to long press on keys --> <!-- Tip to long press on keys -->
<string name="tip_long_press">Hold a key down to see accents (ø, ö, etc.)</string> <string name="tip_long_press">Hold a key down to see accents (ø, ö, etc.)</string>
<!-- Tip to dismiss keyboard --> <!-- Tip to dismiss keyboard -->

View File

@ -46,7 +46,7 @@
android:popupKeyboard="@xml/kbd_popup_template" android:popupKeyboard="@xml/kbd_popup_template"
android:popupCharacters="@string/alternates_for_u" android:popupCharacters="@string/alternates_for_u"
/> />
<Key android:codes="105" android:keyLabel="i" <Key android:keyLabel="@string/key_i"
android:popupKeyboard="@xml/kbd_popup_template" android:popupKeyboard="@xml/kbd_popup_template"
android:popupCharacters="@string/alternates_for_i" android:popupCharacters="@string/alternates_for_i"
/> />
@ -70,7 +70,10 @@
android:popupKeyboard="@xml/kbd_popup_template" android:popupKeyboard="@xml/kbd_popup_template"
android:popupCharacters="@string/alternates_for_d"/> android:popupCharacters="@string/alternates_for_d"/>
<Key android:codes="102" android:keyLabel="f"/> <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="104" android:keyLabel="h"/>
<Key android:codes="106" android:keyLabel="j"/> <Key android:codes="106" android:keyLabel="j"/>
<Key android:codes="107" android:keyLabel="k"/> <Key android:codes="107" android:keyLabel="k"/>

View File

@ -692,7 +692,8 @@ public class LatinIME extends InputMethodService
} }
} }
if (mInputView.isShifted()) { 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 (mPredicting) {
if (mInputView.isShifted() && mComposing.length() == 0) { if (mInputView.isShifted() && mComposing.length() == 0) {
@ -871,7 +872,7 @@ public class LatinIME extends InputMethodService
suggestion = suggestion.toString().toUpperCase(); suggestion = suggestion.toString().toUpperCase();
} else if (preferCapitalization() } else if (preferCapitalization()
|| (mKeyboardSwitcher.isAlphabetMode() && mInputView.isShifted())) { || (mKeyboardSwitcher.isAlphabetMode() && mInputView.isShifted())) {
suggestion = Character.toUpperCase(suggestion.charAt(0)) suggestion = suggestion.toString().toUpperCase().charAt(0)
+ suggestion.subSequence(1, suggestion.length()).toString(); + suggestion.subSequence(1, suggestion.length()).toString();
} }
InputConnection ic = getCurrentInputConnection(); InputConnection ic = getCurrentInputConnection();