Merge "Add Swiss French and German keyboard layouts."

This commit is contained in:
Ken Wakasa 2013-10-09 22:13:10 +00:00 committed by Android (Google) Code Review
commit 064661a35c
13 changed files with 973 additions and 576 deletions

View file

@ -0,0 +1,63 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
/*
**
** Copyright 2013, 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.
*/
-->
<merge
xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
>
<include
latin:keyboardLayout="@xml/key_styles_common" />
<Row
latin:keyWidth="8.182%p"
>
<include
latin:keyboardLayout="@xml/rowkeys_swiss1" />
<Key
latin:keyStyle="deleteKeyStyle"
latin:keyWidth="fillRight" />
</Row>
<Row
latin:keyWidth="8.182%p"
>
<include
latin:keyboardLayout="@xml/rowkeys_swiss2" />
<Key
latin:keyStyle="enterKeyStyle"
latin:keyWidth="fillRight" />
</Row>
<Row
latin:keyWidth="8.182%p"
>
<Key
latin:keyStyle="shiftKeyStyle"
latin:keyWidth="10.0%p" />
<Spacer
latin:keyWidth="3.181%p" />
<include
latin:keyboardLayout="@xml/rowkeys_qwertz3" />
<include
latin:keyboardLayout="@xml/keys_exclamation_question" />
<Key
latin:keyStyle="shiftKeyStyle"
latin:keyXPos="-10.0%p"
latin:keyWidth="fillRight" />
</Row>
<include
latin:keyboardLayout="@xml/row_qwerty4" />
</merge>

View file

@ -0,0 +1,26 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
/*
**
** Copyright 2013, 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.
*/
-->
<Keyboard
xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
>
<include
latin:keyboardLayout="@xml/rows_swiss" />
</Keyboard>

View file

@ -0,0 +1,42 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
/*
**
** Copyright 2013, 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.
*/
-->
<KeyboardLayoutSet
xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin">
<Element
latin:elementName="alphabet"
latin:elementKeyboard="@xml/kbd_swiss"
latin:enableProximityCharsCorrection="true" />
<Element
latin:elementName="symbols"
latin:elementKeyboard="@xml/kbd_symbols" />
<Element
latin:elementName="symbolsShifted"
latin:elementKeyboard="@xml/kbd_symbols_shift" />
<Element
latin:elementName="phone"
latin:elementKeyboard="@xml/kbd_phone" />
<Element
latin:elementName="phoneSymbols"
latin:elementKeyboard="@xml/kbd_phone_symbols" />
<Element
latin:elementName="number"
latin:elementKeyboard="@xml/kbd_number" />
</KeyboardLayoutSet>

View file

@ -32,6 +32,7 @@
cs: Czech/qwertz
da: Danish/nordic
de: German/qwertz
de_CH: German Switzerland/swiss
el: Greek/greek
en_US: English United States/qwerty
en_GB: English Great Britain/qwerty
@ -44,6 +45,7 @@
fi: Finnish/nordic
fr: French/azerty
fr_CA: French Canada/qwerty
fr_CH: French Switzerland/swiss
hi: Hindi/hindi
hr: Croatian/qwertz
hu: Hungarian/qwertz
@ -179,6 +181,13 @@
android:imeSubtypeMode="keyboard"
android:imeSubtypeExtraValue="AsciiCapable,SupportTouchPositionCorrection,EmojiCapable"
/>
<subtype android:icon="@drawable/ic_ime_switcher_dark"
android:label="@string/subtype_generic"
android:subtypeId="0x7acfd0aa"
android:imeSubtypeLocale="de_CH"
android:imeSubtypeMode="keyboard"
android:imeSubtypeExtraValue="KeyboardLayoutSet=swiss,AsciiCapable,SupportTouchPositionCorrection,EmojiCapable"
/>
<subtype android:icon="@drawable/ic_ime_switcher_dark"
android:label="@string/subtype_generic"
android:subtypeId="0x0e7802d3"
@ -251,6 +260,13 @@
android:imeSubtypeMode="keyboard"
android:imeSubtypeExtraValue="AsciiCapable,SupportTouchPositionCorrection,EmojiCapable"
/>
<subtype android:icon="@drawable/ic_ime_switcher_dark"
android:label="@string/subtype_generic"
android:subtypeId="0xeadc55f5"
android:imeSubtypeLocale="fr_CH"
android:imeSubtypeMode="keyboard"
android:imeSubtypeExtraValue="KeyboardLayoutSet=swiss,AsciiCapable,SupportTouchPositionCorrection,EmojiCapable"
/>
<subtype android:icon="@drawable/ic_ime_switcher_dark"
android:label="@string/subtype_generic"
android:subtypeId="0x39753b7f"

View file

@ -0,0 +1,29 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
/*
**
** Copyright 2013, 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.
*/
-->
<merge
xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
>
<include
latin:keyboardLayout="@xml/rowkeys_qwertz1" />
<Key
latin:keyLabel="!text/keylabel_for_swiss_row1_11"
latin:moreKeys="!text/more_keys_for_swiss_row1_11" />
</merge>

View file

@ -0,0 +1,32 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
/*
**
** Copyright 2013, 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.
*/
-->
<merge
xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
>
<include
latin:keyboardLayout="@xml/rowkeys_qwerty2" />
<Key
latin:keyLabel="!text/keylabel_for_swiss_row2_10"
latin:moreKeys="!text/more_keys_for_swiss_row2_10" />
<Key
latin:keyLabel="!text/keylabel_for_swiss_row2_11"
latin:moreKeys="!text/more_keys_for_swiss_row2_11" />
</merge>

View file

@ -0,0 +1,57 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
/*
**
** Copyright 2013, 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.
*/
-->
<merge
xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
>
<include
latin:keyboardLayout="@xml/key_styles_common" />
<Row
latin:keyWidth="9.091%p"
>
<include
latin:keyboardLayout="@xml/rowkeys_swiss1" />
</Row>
<Row
latin:keyWidth="9.091%p"
>
<include
latin:keyboardLayout="@xml/rowkeys_swiss2" />
</Row>
<Row
latin:keyWidth="9.2%p"
>
<Key
latin:keyStyle="shiftKeyStyle"
latin:keyWidth="15%p"
latin:visualInsetsRight="1%p" />
<Spacer
latin:keyWidth="2.8%p" />
<include
latin:keyboardLayout="@xml/rowkeys_qwertz3" />
<Key
latin:keyStyle="deleteKeyStyle"
latin:keyXPos="-15%p"
latin:keyWidth="fillRight"
latin:visualInsetsLeft="1%p" />
</Row>
<include
latin:keyboardLayout="@xml/row_qwerty4" />
</merge>

View file

@ -197,7 +197,9 @@ public final class SubtypeLocaleUtils {
// es_US spanish F Español (EE.UU.) exception
// fr azerty F Français
// fr_CA qwerty F Français (Canada)
// fr_CH swiss F Français (Suisse)
// de qwertz F Deutsch
// de_CH swiss T Deutsch (Schweiz)
// zz qwerty F No language (QWERTY) in system locale
// fr qwertz T Français (QWERTZ)
// de qwerty T Deutsch (QWERTY)
@ -298,7 +300,9 @@ public final class SubtypeLocaleUtils {
// es_US spanish F Es Español Español (EE.UU.) exception
// fr azerty F Fr Français Français
// fr_CA qwerty F Fr Français Français (Canada)
// fr_CH swiss F Fr Français Français (Suisse)
// de qwertz F De Deutsch Deutsch
// de_CH swiss T De Deutsch Deutsch (Schweiz)
// zz qwerty F QWERTY QWERTY
// fr qwertz T Fr Français Français
// de qwerty T De Deutsch Deutsch

View file

@ -41,7 +41,9 @@ public class SubtypeLocaleUtilsTests extends AndroidTestCase {
InputMethodSubtype ES_US;
InputMethodSubtype FR;
InputMethodSubtype FR_CA;
InputMethodSubtype FR_CH;
InputMethodSubtype DE;
InputMethodSubtype DE_CH;
InputMethodSubtype ZZ;
InputMethodSubtype DE_QWERTY;
InputMethodSubtype FR_QWERTZ;
@ -70,8 +72,12 @@ public class SubtypeLocaleUtilsTests extends AndroidTestCase {
Locale.FRENCH.toString(), "azerty");
FR_CA = mRichImm.findSubtypeByLocaleAndKeyboardLayoutSet(
Locale.CANADA_FRENCH.toString(), "qwerty");
FR_CH = mRichImm.findSubtypeByLocaleAndKeyboardLayoutSet(
"fr_CH", "swiss");
DE = mRichImm.findSubtypeByLocaleAndKeyboardLayoutSet(
Locale.GERMAN.toString(), "qwertz");
DE_CH = mRichImm.findSubtypeByLocaleAndKeyboardLayoutSet(
"de_CH", "swiss");
ZZ = mRichImm.findSubtypeByLocaleAndKeyboardLayoutSet(
SubtypeLocaleUtils.NO_LANGUAGE, "qwerty");
DE_QWERTY = AdditionalSubtypeUtils.createAdditionalSubtype(
@ -112,7 +118,9 @@ public class SubtypeLocaleUtilsTests extends AndroidTestCase {
assertEquals("es_US", "spanish", SubtypeLocaleUtils.getKeyboardLayoutSetName(ES_US));
assertEquals("fr ", "azerty", SubtypeLocaleUtils.getKeyboardLayoutSetName(FR));
assertEquals("fr_CA", "qwerty", SubtypeLocaleUtils.getKeyboardLayoutSetName(FR_CA));
assertEquals("fr_CH", "swiss", SubtypeLocaleUtils.getKeyboardLayoutSetName(FR_CH));
assertEquals("de ", "qwertz", SubtypeLocaleUtils.getKeyboardLayoutSetName(DE));
assertEquals("de_CH", "swiss", SubtypeLocaleUtils.getKeyboardLayoutSetName(DE_CH));
assertEquals("zz ", "qwerty", SubtypeLocaleUtils.getKeyboardLayoutSetName(ZZ));
}
@ -125,7 +133,9 @@ public class SubtypeLocaleUtilsTests extends AndroidTestCase {
// es_US spanish F Spanish (US) exception
// fr azerty F French
// fr_CA qwerty F French (Canada)
// fr_CH swiss F French (Switzerland)
// de qwertz F German
// de_CH swiss F German (Switzerland)
// zz qwerty F Alphabet (QWERTY)
// fr qwertz T French (QWERTZ)
// de qwerty T German (QWERTY)
@ -148,8 +158,12 @@ public class SubtypeLocaleUtilsTests extends AndroidTestCase {
SubtypeLocaleUtils.getSubtypeDisplayNameInSystemLocale(FR));
assertEquals("fr_CA", "French (Canada)",
SubtypeLocaleUtils.getSubtypeDisplayNameInSystemLocale(FR_CA));
assertEquals("fr_CH", "French (Switzerland)",
SubtypeLocaleUtils.getSubtypeDisplayNameInSystemLocale(FR_CH));
assertEquals("de ", "German",
SubtypeLocaleUtils.getSubtypeDisplayNameInSystemLocale(DE));
assertEquals("de_CH", "German (Switzerland)",
SubtypeLocaleUtils.getSubtypeDisplayNameInSystemLocale(DE_CH));
assertEquals("zz ", "Alphabet (QWERTY)",
SubtypeLocaleUtils.getSubtypeDisplayNameInSystemLocale(ZZ));
return null;
@ -189,7 +203,9 @@ public class SubtypeLocaleUtilsTests extends AndroidTestCase {
// es_US spanish F Espagnol (États-Unis) exception
// fr azerty F Français
// fr_CA qwerty F Français (Canada)
// fr_CH swiss F Français (Suisse)
// de qwertz F Allemand
// de_CH swiss F Allemand (Suisse)
// zz qwerty F Aucune langue (QWERTY)
// fr qwertz T Français (QWERTZ)
// de qwerty T Allemand (QWERTY)
@ -212,8 +228,12 @@ public class SubtypeLocaleUtilsTests extends AndroidTestCase {
SubtypeLocaleUtils.getSubtypeDisplayNameInSystemLocale(FR));
assertEquals("fr_CA", "Français (Canada)",
SubtypeLocaleUtils.getSubtypeDisplayNameInSystemLocale(FR_CA));
assertEquals("fr_CH", "Français (Suisse)",
SubtypeLocaleUtils.getSubtypeDisplayNameInSystemLocale(FR_CH));
assertEquals("de ", "Allemand",
SubtypeLocaleUtils.getSubtypeDisplayNameInSystemLocale(DE));
assertEquals("de_CH", "Allemand (Suisse)",
SubtypeLocaleUtils.getSubtypeDisplayNameInSystemLocale(DE_CH));
assertEquals("zz ", "Alphabet latin (QWERTY)",
SubtypeLocaleUtils.getSubtypeDisplayNameInSystemLocale(ZZ));
return null;
@ -300,7 +320,9 @@ public class SubtypeLocaleUtilsTests extends AndroidTestCase {
// es_US spanish F Es Español Español (EE.UU.) exception
// fr azerty F Fr Français Français
// fr_CA qwerty F Fr Français Français (Canada)
// fr_CH swiss F Fr Français Français (Suisse)
// de qwertz F De Deutsch Deutsch
// de_CH swiss F De Deutsch Deutsch (Schweiz)
// zz qwerty F QWERTY QWERTY
// fr qwertz T Fr Français Français
// de qwerty T De Deutsch Deutsch
@ -317,7 +339,11 @@ public class SubtypeLocaleUtilsTests extends AndroidTestCase {
assertEquals("fr ", "Français", SubtypeLocaleUtils.getFullDisplayName(FR));
assertEquals("fr_CA", "Français (Canada)",
SubtypeLocaleUtils.getFullDisplayName(FR_CA));
assertEquals("fr_CH", "Français (Suisse)",
SubtypeLocaleUtils.getFullDisplayName(FR_CH));
assertEquals("de ", "Deutsch", SubtypeLocaleUtils.getFullDisplayName(DE));
assertEquals("de_CH", "Deutsch (Schweiz)",
SubtypeLocaleUtils.getFullDisplayName(DE_CH));
assertEquals("zz ", "QWERTY", SubtypeLocaleUtils.getFullDisplayName(ZZ));
assertEquals("en_US", "English", SubtypeLocaleUtils.getMiddleDisplayName(EN_US));
@ -325,7 +351,9 @@ public class SubtypeLocaleUtilsTests extends AndroidTestCase {
assertEquals("es_US", "Español", SubtypeLocaleUtils.getMiddleDisplayName(ES_US));
assertEquals("fr ", "Français", SubtypeLocaleUtils.getMiddleDisplayName(FR));
assertEquals("fr_CA", "Français", SubtypeLocaleUtils.getMiddleDisplayName(FR_CA));
assertEquals("fr_CH", "Français", SubtypeLocaleUtils.getMiddleDisplayName(FR_CH));
assertEquals("de ", "Deutsch", SubtypeLocaleUtils.getMiddleDisplayName(DE));
assertEquals("de_CH", "Deutsch", SubtypeLocaleUtils.getMiddleDisplayName(DE_CH));
assertEquals("zz ", "QWERTY", SubtypeLocaleUtils.getMiddleDisplayName(ZZ));
assertEquals("en_US", "En", SubtypeLocaleUtils.getShortDisplayName(EN_US));
@ -333,7 +361,9 @@ public class SubtypeLocaleUtilsTests extends AndroidTestCase {
assertEquals("es_US", "Es", SubtypeLocaleUtils.getShortDisplayName(ES_US));
assertEquals("fr ", "Fr", SubtypeLocaleUtils.getShortDisplayName(FR));
assertEquals("fr_CA", "Fr", SubtypeLocaleUtils.getShortDisplayName(FR_CA));
assertEquals("fr_CH", "Fr", SubtypeLocaleUtils.getShortDisplayName(FR_CH));
assertEquals("de ", "De", SubtypeLocaleUtils.getShortDisplayName(DE));
assertEquals("de_CH", "De", SubtypeLocaleUtils.getShortDisplayName(DE_CH));
assertEquals("zz ", "", SubtypeLocaleUtils.getShortDisplayName(ZZ));
return null;
}

View file

@ -55,6 +55,18 @@
<!-- U+00F1: "ñ" LATIN SMALL LETTER N WITH TILDE
U+0144: "ń" LATIN SMALL LETTER N WITH ACUTE -->
<string name="more_keys_for_n">&#x00F1;,&#x0144;</string>
<!-- U+00FC: "ü" LATIN SMALL LETTER U WITH DIAERESIS -->
<string name="keylabel_for_swiss_row1_11">&#x00FC;</string>
<!-- U+00E8: "è" LATIN SMALL LETTER E WITH GRAVE -->
<string name="more_keys_for_swiss_row1_11">&#x00E8;</string>
<!-- U+00F6: "ö" LATIN SMALL LETTER O WITH DIAERESIS -->
<string name="keylabel_for_swiss_row2_10">&#x00F6;</string>
<!-- U+00E9: "é" LATIN SMALL LETTER E WITH ACUTE -->
<string name="more_keys_for_swiss_row2_10">&#x00E9;</string>
<!-- U+00E4: "ä" LATIN SMALL LETTER A WITH DIAERESIS -->
<string name="keylabel_for_swiss_row2_11">&#x00E4;</string>
<!-- U+00E0: "à" LATIN SMALL LETTER A WITH GRAVE -->
<string name="more_keys_for_swiss_row2_11">&#x00E0;</string>
<string name="single_quotes">!text/single_9qm_lqm</string>
<string name="double_quotes">!text/double_9qm_lqm</string>
<string name="single_angle_quotes">!text/single_raqm_laqm</string>

View file

@ -65,4 +65,16 @@
<string name="more_keys_for_c">&#x00E7;,&#x0107;,&#x010D;</string>
<!-- U+00FF: "ÿ" LATIN SMALL LETTER Y WITH DIAERESIS -->
<string name="more_keys_for_y">%,&#x00FF;</string>
<!-- U+00E8: "è" LATIN SMALL LETTER E WITH GRAVE -->
<string name="keylabel_for_swiss_row1_11">&#x00E8;</string>
<!-- U+00FC: "ü" LATIN SMALL LETTER U WITH DIAERESIS -->
<string name="more_keys_for_swiss_row1_11">&#x00FC;</string>
<!-- U+00E9: "é" LATIN SMALL LETTER E WITH ACUTE -->
<string name="keylabel_for_swiss_row2_10">&#x00E9;</string>
<!-- U+00F6: "ö" LATIN SMALL LETTER O WITH DIAERESIS -->
<string name="more_keys_for_swiss_row2_10">&#x00F6;</string>
<!-- U+00E0: "à" LATIN SMALL LETTER A WITH GRAVE -->
<string name="keylabel_for_swiss_row2_11">&#x00E0;</string>
<!-- U+00E4: "ä" LATIN SMALL LETTER A WITH DIAERESIS -->
<string name="more_keys_for_swiss_row2_11">&#x00E4;</string>
</resources>

View file

@ -63,6 +63,12 @@
<string name="keylabel_for_south_slavic_row3_8"></string>
<string name="more_keys_for_cyrillic_ie"></string>
<string name="more_keys_for_cyrillic_i"></string>
<string name="keylabel_for_swiss_row1_11"></string>
<string name="keylabel_for_swiss_row2_10"></string>
<string name="keylabel_for_swiss_row2_11"></string>
<string name="more_keys_for_swiss_row1_11"></string>
<string name="more_keys_for_swiss_row2_10"></string>
<string name="more_keys_for_swiss_row2_11"></string>
<!-- Label for "switch to alphabetic" key. -->
<string name="label_to_alpha_key">ABC</string>
<string name="single_quotes">!text/single_lqm_rqm</string>