Update Arabic keyboard

Bug: 4161983
Change-Id: Ie163cd17c87773bf2ca37fff7cff79611fff644f
main
Tadashi G. Takaoka 2011-07-12 20:49:04 -07:00
parent 94c05c7d0f
commit 6989e0b804
17 changed files with 385 additions and 193 deletions

View File

@ -0,0 +1,70 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
/*
**
** Copyright 2011, 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">
<!-- \u060c: ARABIC COMMA
\u061b: ARABIC SEMICOLON
\u061f: ARABIC QUESTION MARK
\u0651: ARABIC SHADDA
\u0652: ARABIC SUKUN
\u064c: ARABIC DAMMATAN
\u0640: ARABIC TATWEEL
\u064f: ARABIC DAMMA
\u064e: ARABIC FATHA
\u0650: ARABIC KASRA
\u064b: ARABIC FATHATAN
\u064d: ARABIC KASRATAN -->
<string name="alternates_for_punctuation">"\u060c,\u061b,\u061f,!,:,-,/,\',\",\u0651,\u0652,\u064c,\u0640,\u064f,\u064e,\u0650,\u064b,\u064d"</string>
<string name="alternates_for_web_tab_punctuation">".,\u060c,\u061b,\u061f,!,:,-,/,\',\",\u0651,\u0652,\u064c,\u0640,\u064f,\u064e,\u0650,\u064b,\u064d"</string>
<integer name="popup_keyboard_column_for_punctuation">9</integer>
<integer name="popup_keyboard_column_for_web_punctuation">10</integer>
<string name="keyhintlabel_for_punctuation">\u064b</string>
<string name="keylabel_for_symbols_1">"١"</string>
<string name="keylabel_for_symbols_2">"٢"</string>
<string name="keylabel_for_symbols_3">"٣"</string>
<string name="keylabel_for_symbols_4">"٤"</string>
<string name="keylabel_for_symbols_5">"٥"</string>
<string name="keylabel_for_symbols_6">"٦"</string>
<string name="keylabel_for_symbols_7">"٧"</string>
<string name="keylabel_for_symbols_8">"٨"</string>
<string name="keylabel_for_symbols_9">"٩"</string>
<string name="keylabel_for_symbols_0">"٠"</string>
<string name="alternates_for_symbols_1">1,¹,½,⅓,¼,⅛</string>
<string name="alternates_for_symbols_2">2,²,⅔</string>
<string name="alternates_for_symbols_3">3,³,¾,⅜</string>
<string name="alternates_for_symbols_4">4,⁴</string>
<string name="alternates_for_symbols_5">5,⅝</string>
<string name="alternates_for_symbols_6">6</string>
<string name="alternates_for_symbols_7">7,⅞</string>
<string name="alternates_for_symbols_8">8</string>
<string name="alternates_for_symbols_9">9</string>
<string name="alternates_for_symbols_0">0,ⁿ,∅</string>
<string name="keylabel_for_symbols_comma">\u060c</string>
<string name="keylabel_for_symbols_question">\u061f</string>
<string name="keylabel_for_symbols_semicolon">\u061b</string>
<string name="alternates_for_symbols_comma">,</string>
<string name="alternates_for_symbols_question">\?,¿</string>
<string name="alternates_for_symbols_semicolon">;</string>
<string name="keylabel_for_apostrophe">"،"</string>
<string name="keylabel_for_dash">"."</string>
<string name="keyhintlabel_for_apostrophe">"؟"</string>
<string name="keyhintlabel_for_dash">"\u064b"</string>
<string name="alternates_for_apostrophe">"\u061f,\u061b,!,:,-,/,\',\""</string>
<string name="alternates_for_dash">"\u0651,\u0652,\u064c,\u0640,\u064f,\u064e,\u0650,\u064b,\u064d"</string>
</resources>

View File

@ -51,7 +51,42 @@
<string name="alternates_for_smiley">":-)|:-) ,:-(|:-( ,;-)|;-) ,:-P|:-P ,=-O|=-O ,:-*|:-* ,:O|:O ,B-)|B-) ,:-$|:-$ ,:-!|:-! ,:-[|:-[ ,O:-)|O:-) ,:-\\\\\\\\|:-\\\\\\\\ ,:\'(|:\'( ,:-D|:-D "</string>
<string name="alternates_for_punctuation">"\\,,\?,!,:,-,\',\",(,),/,;,+,&amp;,\@"</string>
<string name="alternates_for_web_tab_punctuation">".,\\,,\?,!,:,-,\',\",(,),/,;,+,&amp;,\@"</string>
<integer name="popup_keyboard_column_for_punctuation">7</integer>
<integer name="popup_keyboard_column_for_web_punctuation">8</integer>
<string name="keyhintlabel_for_punctuation"></string>
<string name="keylabel_for_popular_domain">".com"</string>
<!-- popular web domains for the locale - most popular, displayed on the keyboard -->
<string name="alternates_for_popular_domain">".net,.org,.gov,.edu"</string>
<string name="keylabel_for_symbols_1">1</string>
<string name="keylabel_for_symbols_2">2</string>
<string name="keylabel_for_symbols_3">3</string>
<string name="keylabel_for_symbols_4">4</string>
<string name="keylabel_for_symbols_5">5</string>
<string name="keylabel_for_symbols_6">6</string>
<string name="keylabel_for_symbols_7">7</string>
<string name="keylabel_for_symbols_8">8</string>
<string name="keylabel_for_symbols_9">9</string>
<string name="keylabel_for_symbols_0">0</string>
<string name="alternates_for_symbols_1">¹,½,⅓,¼,⅛</string>
<string name="alternates_for_symbols_2">²,⅔</string>
<string name="alternates_for_symbols_3">³,¾,⅜</string>
<string name="alternates_for_symbols_4"></string>
<string name="alternates_for_symbols_5"></string>
<string name="alternates_for_symbols_6"></string>
<string name="alternates_for_symbols_7"></string>
<string name="alternates_for_symbols_8"></string>
<string name="alternates_for_symbols_9"></string>
<string name="alternates_for_symbols_0">ⁿ,∅</string>
<string name="keylabel_for_symbols_comma">,</string>
<string name="keylabel_for_symbols_question">\?</string>
<string name="keylabel_for_symbols_semicolon">;</string>
<string name="alternates_for_symbols_comma"></string>
<string name="alternates_for_symbols_question">¿</string>
<string name="alternates_for_symbols_semicolon"></string>
<string name="keylabel_for_apostrophe">\'</string>
<string name="keylabel_for_dash">-</string>
<string name="keyhintlabel_for_apostrophe">\"</string>
<string name="keyhintlabel_for_dash">_</string>
<string name="alternates_for_apostrophe">\"</string>
<string name="alternates_for_dash">_</string>
</resources>

View File

@ -51,7 +51,7 @@
latin:parentStyle="functionalKeyStyle"
latin:isSticky="true" />
<switch>
<case latin:languageCode="iw">
<case latin:languageCode="ar|iw">
<key-style
latin:styleName="deleteKeyStyle"
latin:code="@integer/key_delete"

View File

@ -39,10 +39,10 @@
</case>
<default>
<Key
latin:keyLabel="\'"
latin:keyLabel="@string/keylabel_for_apostrophe"
latin:keyLabelOption="hasUppercaseLetter"
latin:keyHintLabel="&quot;"
latin:popupCharacters="&quot;" />
latin:keyHintLabel="@string/keyhintlabel_for_apostrophe"
latin:popupCharacters="@string/alternates_for_apostrophe" />
</default>
</switch>
<switch>
@ -54,10 +54,10 @@
</case>
<default>
<Key
latin:keyLabel="-"
latin:keyLabel="@string/keylabel_for_dash"
latin:keyLabelOption="hasUppercaseLetter"
latin:keyHintLabel="_"
latin:popupCharacters="_" />
latin:keyHintLabel="@string/keyhintlabel_for_dash"
latin:popupCharacters="@string/alternates_for_dash" />
</default>
</switch>
</merge>

View File

@ -18,9 +18,6 @@
*/
-->
<!-- This file for Arabic layout is an alpha version. It allows to enter -->
<!-- some right-to-left text, but it has gone through no study whatsoever, -->
<!-- and needs to be run through UX. -->
<merge
xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
>
@ -40,21 +37,23 @@
latin:keyLabel="ق" />
<Key
latin:keyLabel="ف"
latin:popupCharacters="ف,ڤ" />
latin:popupCharacters="ڤ" />
<Key
latin:keyLabel="غ" />
<Key
latin:keyLabel="ع" />
<!-- \ufeeb: ARABIC LETTER HEH INITIAL FORM
\u0647\u0640: ARABIC LETTER HEH + ARABIC TATWEEL -->
<Key
latin:keyLabel="ه"
latin:popupCharacters="ه,هـ" />
latin:popupCharacters="\ufeeb|\u0647\u0640" />
<Key
latin:keyLabel="خ" />
<Key
latin:keyLabel="ح" />
<Key
latin:keyLabel="ج"
latin:popupCharacters="ج,چ" />
latin:popupCharacters="چ" />
<Key
latin:keyStyle="deleteKeyStyle"
latin:keyXPos="-10.0%p"
@ -73,13 +72,25 @@
latin:keyLabel="ي" />
<Key
latin:keyLabel="ب"
latin:popupCharacters="ب,پ" />
latin:popupCharacters="پ" />
<!-- \ufefb: ARABIC LIGATURE LAM WITH ALEF ISOLATED FORM
\u0644: ARABIC LETTER LAM
\u0627: ARABIC LETTER ALEF
\ufef7: ARABIC LIGATURE LAM WITH ALEF WITH HAMZA ABOVE ISOLATED FORM
\u0623: ARABIC LETTER ALEF WITH HAMZA ABOVE
\ufef9: ARABIC LIGATURE LAM WITH ALEF WITH HAMZA BELOW ISOLATED FORM
\u0625: ARABIC LETTER ALEF WITH HAMZA BELOW
\ufef5: ARABIC LIGATURE LAM WITH ALEF WITH MADDA ABOVE ISOLATED FORM
\u0622: ARABIC LETTER ALEF WITH MADDA ABOVE -->
<Key
latin:keyLabel="ل"
latin:popupCharacters="ل,لا" />
latin:popupCharacters="\ufefb|\u0644\u0627,\ufef7|\u0644\u0623,\ufef9|\u0644\u0625,\ufef5|\u0644\u0622" />
<!-- \u0623: ARABIC LETTER ALEF WITH HAMZA ABOVE
\u0625: ARABIC LETTER ALEF WITH HAMZA BELOW
\u0622: ARABIC LETTER ALEF WITH MADDA ABOVE -->
<Key
latin:keyLabel="ا"
latin:popupCharacters="ا,أ,إ,آ" />
latin:popupCharacters="\u0623,\u0625,\u0622" />
<Key
latin:keyLabel="ت" />
<Key
@ -88,7 +99,7 @@
latin:keyLabel="م" />
<Key
latin:keyLabel="ك"
latin:popupCharacters="ك,گ" />
latin:popupCharacters="گ" />
<Key
latin:keyLabel="ط" />
<Key
@ -98,12 +109,43 @@
latin:keyEdgeFlags="right" />
</Row>
<Row
latin:keyWidth="7.65%p"
latin:keyWidth="8.0%p"
>
<Key
latin:keyStyle="shiftKeyStyle"
latin:keyWidth="8.0%p"
latin:keyEdgeFlags="left" />
<!-- kbd_row3_smiley -->
<switch>
<case
latin:mode="email"
>
<Key
latin:keyLabel="\@"
latin:keyEdgeFlags="left" />
</case>
<case
latin:mode="url"
>
<Key
latin:keyLabel="-"
latin:keyLabelOption="hasUppercaseLetter"
latin:keyHintLabel="_"
latin:popupCharacters="_"
latin:keyEdgeFlags="left" />
</case>
<case
latin:imeAction="actionSearch"
>
<Key
latin:keyLabel=":"
latin:keyLabelOption="hasUppercaseLetter"
latin:keyHintLabel="+"
latin:popupCharacters="+"
latin:keyEdgeFlags="left" />
</case>
<default>
<Key
latin:keyStyle="smileyKeyStyle"
latin:keyEdgeFlags="left" />
</default>
</switch>
<Key
latin:keyLabel="ئ" />
<Key
@ -122,13 +164,12 @@
latin:keyLabel="و" />
<Key
latin:keyLabel="ز"
latin:popupCharacters="ز,ژ" />
latin:popupCharacters="ژ" />
<Key
latin:keyLabel="ظ" />
<Key
latin:keyLabel="د" />
<include
latin:keyboardLayout="@xml/kbd_row3_smiley" />
</Row>
<include latin:keyboardLayout="@xml/kbd_qwerty_row4" />
</Row>
<include
latin:keyboardLayout="@xml/kbd_qwerty_row4" />
</merge>

View File

@ -30,32 +30,36 @@
latin:keyWidth="9.0%p"
>
<Key
latin:keyLabel="1"
latin:popupCharacters="¹,½,⅓,¼,⅛" />
latin:keyLabel="@string/keylabel_for_symbols_1"
latin:popupCharacters="@string/alternates_for_symbols_1"
latin:keyEdgeFlags="left" />
<Key
latin:keyLabel="2"
latin:popupCharacters="²,⅔" />
latin:keyLabel="@string/keylabel_for_symbols_2"
latin:popupCharacters="@string/alternates_for_symbols_2" />
<Key
latin:keyLabel="3"
latin:popupCharacters="³,¾,⅜" />
latin:keyLabel="@string/keylabel_for_symbols_3"
latin:popupCharacters="@string/alternates_for_symbols_3" />
<Key
latin:keyLabel="4"
latin:popupCharacters="" />
latin:keyLabel="@string/keylabel_for_symbols_4"
latin:popupCharacters="@string/alternates_for_symbols_4" />
<Key
latin:keyLabel="5"
latin:popupCharacters="" />
latin:keyLabel="@string/keylabel_for_symbols_5"
latin:popupCharacters="@string/alternates_for_symbols_5" />
<Key
latin:keyLabel="6" />
latin:keyLabel="@string/keylabel_for_symbols_6"
latin:popupCharacters="@string/alternates_for_symbols_6" />
<Key
latin:keyLabel="7"
latin:popupCharacters="" />
latin:keyLabel="@string/keylabel_for_symbols_7"
latin:popupCharacters="@string/alternates_for_symbols_7" />
<Key
latin:keyLabel="8" />
latin:keyLabel="@string/keylabel_for_symbols_8"
latin:popupCharacters="@string/alternates_for_symbols_8" />
<Key
latin:keyLabel="9" />
latin:keyLabel="@string/keylabel_for_symbols_9"
latin:popupCharacters="@string/alternates_for_symbols_9" />
<Key
latin:keyLabel="0"
latin:popupCharacters="ⁿ,∅" />
latin:keyLabel="@string/keylabel_for_symbols_0"
latin:popupCharacters="@string/alternates_for_symbols_0" />
<Key
latin:keyStyle="deleteKeyStyle"
latin:keyXPos="-10.0%p"
@ -126,17 +130,19 @@
</default>
</switch>
<Key
latin:keyLabel=";" />
latin:keyLabel="@string/keylabel_for_symbols_semicolon"
latin:popupCharacters="@string/alternates_for_symbols_semicolon" />
<Key
latin:keyLabel="," />
latin:keyLabel="@string/keylabel_for_symbols_comma"
latin:popupCharacters="@string/alternates_for_symbols_comma" />
<Key
latin:keyLabel="." />
<Key
latin:keyLabel="!"
latin:popupCharacters="¡" />
<Key
latin:keyLabel="\?"
latin:popupCharacters="¿" />
latin:keyLabel="@string/keylabel_for_symbols_question"
latin:popupCharacters="@string/alternates_for_symbols_question" />
<Key
latin:keyLabel="/"
latin:keyWidth="fillRight" />

View File

@ -33,7 +33,7 @@
latin:parentStyle="functionalKeyStyle"
latin:isSticky="true" />
<switch>
<case latin:languageCode="iw">
<case latin:languageCode="ar|iw">
<key-style
latin:styleName="deleteKeyStyle"
latin:code="@integer/key_delete"

View File

@ -39,10 +39,10 @@
</case>
<default>
<Key
latin:keyLabel="\'"
latin:keyLabel="@string/keylabel_for_apostrophe"
latin:keyLabelOption="hasUppercaseLetter"
latin:keyHintLabel="&quot;"
latin:popupCharacters="&quot;" />
latin:keyHintLabel="@string/keyhintlabel_for_apostrophe"
latin:popupCharacters="@string/alternates_for_apostrophe" />
</default>
</switch>
<switch>
@ -54,10 +54,10 @@
</case>
<default>
<Key
latin:keyLabel="-"
latin:keyLabel="@string/keylabel_for_dash"
latin:keyLabelOption="hasUppercaseLetter"
latin:keyHintLabel="_"
latin:popupCharacters="_" />
latin:keyHintLabel="@string/keyhintlabel_for_dash"
latin:popupCharacters="@string/alternates_for_dash" />
</default>
</switch>
</merge>

View File

@ -18,9 +18,6 @@
*/
-->
<!-- This file for Arabic layout is an alpha version. It allows to enter -->
<!-- some right-to-left text, but it has gone through no study whatsoever, -->
<!-- and needs to be run through UX. -->
<merge
xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
>
@ -44,21 +41,23 @@
latin:keyLabel="ق" />
<Key
latin:keyLabel="ف"
latin:popupCharacters="ف,ڤ" />
latin:popupCharacters="ڤ" />
<Key
latin:keyLabel="غ" />
<Key
latin:keyLabel="ع" />
<!-- \ufeeb: ARABIC LETTER HEH INITIAL FORM
\u0647\u0640: ARABIC LETTER HEH + ARABIC TATWEEL -->
<Key
latin:keyLabel="ه"
latin:popupCharacters="ه,هـ" />
latin:popupCharacters="\ufeeb|\u0647\u0640" />
<Key
latin:keyLabel="خ" />
<Key
latin:keyLabel="ح" />
<Key
latin:keyLabel="ج"
latin:popupCharacters="ج,چ" />
latin:popupCharacters="چ" />
<Key
latin:keyStyle="deleteKeyStyle"
latin:keyXPos="-11.500%p"
@ -81,13 +80,25 @@
latin:keyLabel="ي" />
<Key
latin:keyLabel="ب"
latin:popupCharacters="ب,پ" />
latin:popupCharacters="پ" />
<!-- \ufefb: ARABIC LIGATURE LAM WITH ALEF ISOLATED FORM
\u0644: ARABIC LETTER LAM
\u0627: ARABIC LETTER ALEF
\ufef7: ARABIC LIGATURE LAM WITH ALEF WITH HAMZA ABOVE ISOLATED FORM
\u0623: ARABIC LETTER ALEF WITH HAMZA ABOVE
\ufef9: ARABIC LIGATURE LAM WITH ALEF WITH HAMZA BELOW ISOLATED FORM
\u0625: ARABIC LETTER ALEF WITH HAMZA BELOW
\ufef5: ARABIC LIGATURE LAM WITH ALEF WITH MADDA ABOVE ISOLATED FORM
\u0622: ARABIC LETTER ALEF WITH MADDA ABOVE -->
<Key
latin:keyLabel="ل"
latin:popupCharacters="ل,لا" />
latin:popupCharacters="\ufefb|\u0644\u0627,\ufef7|\u0644\u0623,\ufef9|\u0644\u0625,\ufef5|\u0644\u0622" />
<!-- \u0623: ARABIC LETTER ALEF WITH HAMZA ABOVE
\u0625: ARABIC LETTER ALEF WITH HAMZA BELOW
\u0622: ARABIC LETTER ALEF WITH MADDA ABOVE -->
<Key
latin:keyLabel="ا"
latin:popupCharacters="ا,أ,إ,آ" />
latin:popupCharacters="\u0623,\u0625,\u0622" />
<Key
latin:keyLabel="ت" />
<Key
@ -96,7 +107,7 @@
latin:keyLabel="م" />
<Key
latin:keyLabel="ك"
latin:popupCharacters="ك,گ" />
latin:popupCharacters="گ" />
<Key
latin:keyLabel="ط" />
<Key
@ -109,11 +120,8 @@
latin:keyWidth="7.375%p"
>
<Key
latin:keyStyle="shiftKeyStyle"
latin:keyWidth="12.750%p"
latin:keyEdgeFlags="left" />
<Key
latin:keyLabel="ئ" />
latin:keyLabel="ئ"
latin:keyXPos="12.750%p" />
<Key
latin:keyLabel="ء" />
<Key
@ -130,11 +138,12 @@
latin:keyLabel="و" />
<Key
latin:keyLabel="ز"
latin:popupCharacters="ز,ژ" />
latin:popupCharacters="ژ" />
<Key
latin:keyLabel="ظ" />
<Key
latin:keyLabel="د" />
</Row>
<include latin:keyboardLayout="@xml/kbd_qwerty_row4" />
<include
latin:keyboardLayout="@xml/kbd_qwerty_row4" />
</merge>

View File

@ -35,32 +35,35 @@
latin:keyWidth="7.969%p"
latin:keyEdgeFlags="left" />
<Key
latin:keyLabel="1"
latin:popupCharacters="¹,½,⅓,¼,⅛" />
latin:keyLabel="@string/keylabel_for_symbols_1"
latin:popupCharacters="@string/alternates_for_symbols_1" />
<Key
latin:keyLabel="2"
latin:popupCharacters="²,⅔" />
latin:keyLabel="@string/keylabel_for_symbols_2"
latin:popupCharacters="@string/alternates_for_symbols_2" />
<Key
latin:keyLabel="3"
latin:popupCharacters="³,¾,⅜" />
latin:keyLabel="@string/keylabel_for_symbols_3"
latin:popupCharacters="@string/alternates_for_symbols_3" />
<Key
latin:keyLabel="4"
latin:popupCharacters="" />
latin:keyLabel="@string/keylabel_for_symbols_4"
latin:popupCharacters="@string/alternates_for_symbols_4" />
<Key
latin:keyLabel="5"
latin:popupCharacters="" />
latin:keyLabel="@string/keylabel_for_symbols_5"
latin:popupCharacters="@string/alternates_for_symbols_5" />
<Key
latin:keyLabel="6" />
latin:keyLabel="@string/keylabel_for_symbols_6"
latin:popupCharacters="@string/alternates_for_symbols_6" />
<Key
latin:keyLabel="7"
latin:popupCharacters="" />
latin:keyLabel="@string/keylabel_for_symbols_7"
latin:popupCharacters="@string/alternates_for_symbols_7" />
<Key
latin:keyLabel="8" />
latin:keyLabel="@string/keylabel_for_symbols_8"
latin:popupCharacters="@string/alternates_for_symbols_8" />
<Key
latin:keyLabel="9" />
latin:keyLabel="@string/keylabel_for_symbols_9"
latin:popupCharacters="@string/alternates_for_symbols_9" />
<Key
latin:keyLabel="0"
latin:popupCharacters="ⁿ,∅" />
latin:keyLabel="@string/keylabel_for_symbols_0"
latin:popupCharacters="@string/alternates_for_symbols_0" />
<Key
latin:keyStyle="deleteKeyStyle"
latin:keyXPos="-9.219%p"
@ -135,17 +138,19 @@
</default>
</switch>
<Key
latin:keyLabel=";" />
latin:keyLabel="@string/keylabel_for_symbols_semicolon"
latin:popupCharacters="@string/alternates_for_symbols_semicolon" />
<Key
latin:keyLabel="," />
latin:keyLabel="@string/keylabel_for_symbols_comma"
latin:popupCharacters="@string/alternates_for_symbols_comma" />
<Key
latin:keyLabel="." />
<Key
latin:keyLabel="!"
latin:popupCharacters="¡" />
<Key
latin:keyLabel="\?"
latin:popupCharacters="¿" />
latin:keyLabel="@string/keylabel_for_symbols_question"
latin:popupCharacters="@string/alternates_for_symbols_question" />
<Key
latin:keyStyle="moreKeyStyle"
latin:keyXPos="-13.750%p"

View File

@ -60,7 +60,9 @@
latin:parentStyle="functionalKeyStyle"
latin:isSticky="true" />
<switch>
<case latin:languageCode="ar|iw">
<case
latin:languageCode="ar|iw"
>
<key-style
latin:styleName="deleteKeyStyle"
latin:code="@integer/key_delete"
@ -225,4 +227,27 @@
latin:parentStyle="functionalKeyStyle" />
</default>
</switch>
<switch>
<case
latin:navigateAction="true"
>
<key-style
latin:styleName="punctuationKeyStyle"
latin:keyHintLabel="@string/keyhintlabel_for_punctuation"
latin:keyLabelOption="hasPopupHint"
latin:popupCharacters="@string/alternates_for_web_tab_punctuation"
latin:maxPopupKeyboardColumn="@integer/popup_keyboard_column_for_web_punctuation"
latin:parentStyle="tabKeyStyle" />
</case>
<default>
<key-style
latin:styleName="punctuationKeyStyle"
latin:keyLabel="."
latin:keyHintLabel="@string/keyhintlabel_for_punctuation"
latin:keyLabelOption="hasPopupHint"
latin:popupCharacters="@string/alternates_for_punctuation"
latin:maxPopupKeyboardColumn="@integer/popup_keyboard_column_for_punctuation"
latin:parentStyle="functionalKeyStyle" />
</default>
</switch>
</merge>

View File

@ -41,27 +41,9 @@
<Key
latin:keyStyle="spaceKeyStyle"
latin:keyWidth="35.83%p" />
<switch>
<case
latin:navigateAction="true"
>
<Key
latin:keyStyle="tabKeyStyle"
latin:keyLabelOption="hasPopupHint"
latin:popupCharacters="@string/alternates_for_web_tab_punctuation"
latin:keyWidth="9.2%p"
latin:maxPopupKeyboardColumn="8" />
</case>
<default>
<Key
latin:keyLabel="."
latin:keyLabelOption="hasPopupHint"
latin:popupCharacters="@string/alternates_for_punctuation"
latin:keyWidth="9.2%p"
latin:maxPopupKeyboardColumn="7"
latin:keyStyle="functionalKeyStyle" />
</default>
</switch>
<Key
latin:keyStyle="punctuationKeyStyle"
latin:keyWidth="9.2%p" />
</case>
<!-- latin:hasSettingsKey="false" -->
<default>
@ -74,25 +56,8 @@
<Key
latin:keyStyle="spaceKeyStyle"
latin:keyWidth="50%p" />
<switch>
<case
latin:navigateAction="true"
>
<Key
latin:keyStyle="tabKeyStyle"
latin:keyLabelOption="hasPopupHint"
latin:popupCharacters="@string/alternates_for_web_tab_punctuation"
latin:maxPopupKeyboardColumn="8" />
</case>
<default>
<Key
latin:keyLabel="."
latin:keyLabelOption="hasPopupHint"
latin:popupCharacters="@string/alternates_for_punctuation"
latin:maxPopupKeyboardColumn="7"
latin:keyStyle="functionalKeyStyle" />
</default>
</switch>
<Key
latin:keyStyle="punctuationKeyStyle" />
</default>
</switch>
<switch>

View File

@ -18,9 +18,6 @@
*/
-->
<!-- This file for Arabic layout is an alpha version. It allows to enter -->
<!-- some right-to-left text, but it has gone through no study whatsoever, -->
<!-- and needs to be run through UX. -->
<merge
xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
>
@ -31,28 +28,49 @@
>
<Key
latin:keyLabel="ض"
latin:keyHintLabel="1"
latin:popupCharacters="1,١"
latin:keyEdgeFlags="left" />
<Key
latin:keyLabel="ص" />
latin:keyLabel="ص"
latin:keyHintLabel="2"
latin:popupCharacters="2,٢" />
<Key
latin:keyLabel="ق" />
latin:keyLabel="ق"
latin:keyHintLabel="3"
latin:popupCharacters="3,٣" />
<!-- \u06a4: ARABIC LETTER VEH -->
<Key
latin:keyLabel="ف"
latin:popupCharacters="ڤ" />
latin:keyHintLabel="4"
latin:popupCharacters="\u06a4,4,٤" />
<Key
latin:keyLabel="غ" />
latin:keyLabel="غ"
latin:keyHintLabel="5"
latin:popupCharacters="5,٥" />
<Key
latin:keyLabel="ع" />
latin:keyLabel="ع"
latin:keyHintLabel="6"
latin:popupCharacters="6,٦" />
<!-- \ufeeb: ARABIC LETTER HEH INITIAL FORM
\u0647\u0640: ARABIC LETTER HEH + ARABIC TATWEEL -->
<Key
latin:keyLabel="ه"
latin:popupCharacters="هـ" />
latin:keyHintLabel="7"
latin:popupCharacters="7,٧,\ufeeb|\u0647\u0640" />
<Key
latin:keyLabel="خ" />
latin:keyLabel="خ"
latin:keyHintLabel="8"
latin:popupCharacters="8,٨" />
<Key
latin:keyLabel="ح" />
latin:keyLabel="ح"
latin:keyHintLabel="9"
latin:popupCharacters="9,٩" />
<!-- \u0686: ARABIC LETTER TCHEH -->
<Key
latin:keyLabel="ج"
latin:popupCharacters="چ"
latin:keyHintLabel="0"
latin:popupCharacters="0,٠,\u0686"
latin:keyWidth="fillRight"
latin:keyEdgeFlags="right" />
</Row>
@ -64,20 +82,36 @@
latin:keyEdgeFlags="left" />
<Key
latin:keyLabel="س" />
<!-- \u0626: ARABIC LETTER YEH WITH HAMZA ABOVE
\u0649: ARABIC LETTER ALEF MAKSURA -->
<Key
latin:keyLabel="ي"
latin:popupCharacters="ى,ئ" />
latin:popupCharacters="\u0626,\u0649" />
<Key
latin:keyLabel="ب"
latin:popupCharacters="پ" />
<!-- \ufefb: ARABIC LIGATURE LAM WITH ALEF ISOLATED FORM
\u0644: ARABIC LETTER LAM
\u0627: ARABIC LETTER ALEF
\ufef7: ARABIC LIGATURE LAM WITH ALEF WITH HAMZA ABOVE ISOLATED FORM
\u0623: ARABIC LETTER ALEF WITH HAMZA ABOVE
\ufef9: ARABIC LIGATURE LAM WITH ALEF WITH HAMZA BELOW ISOLATED FORM
\u0625: ARABIC LETTER ALEF WITH HAMZA BELOW
\ufef5: ARABIC LIGATURE LAM WITH ALEF WITH MADDA ABOVE ISOLATED FORM
\u0622: ARABIC LETTER ALEF WITH MADDA ABOVE -->
<Key
latin:keyLabel="ل"
latin:popupCharacters="لا" />
latin:popupCharacters="\ufefb|\u0644\u0627,\ufef7|\u0644\u0623,\ufef9|\u0644\u0625,\ufef5|\u0644\u0622" />
<!-- \u0621: ARABIC LETTER HAMZA
\u0623: ARABIC LETTER ALEF WITH HAMZA ABOVE
\u0625: ARABIC LETTER ALEF WITH HAMZA BELOW
\u0622: ARABIC LETTER ALEF WITH MADDA ABOVE -->
<Key
latin:keyLabel="ا"
latin:popupCharacters="أ,إ,آ,ء" />
latin:popupCharacters="\u0621,\u0623,\u0625,\u0622" />
<Key
latin:keyLabel="ت" />
latin:keyLabel="ت"
latin:popupCharacters="ث" />
<Key
latin:keyLabel="ن" />
<Key
@ -89,10 +123,11 @@
latin:keyEdgeFlags="right" />
</Row>
<Row
latin:keyWidth="9.7%p"
latin:keyWidth="10%p"
>
<Key
latin:keyLabel="ظ"
latin:keyXPos="5.0%p"
latin:keyEdgeFlags="left" />
<Key
latin:keyLabel="ط" />
@ -105,18 +140,17 @@
latin:popupCharacters="ژ" />
<Key
latin:keyLabel="ر" />
<Key
latin:keyLabel="و"
latin:popupCharacters="ؤ" />
<Key
latin:keyLabel="ة" />
<Key
latin:keyLabel="ث" />
latin:keyLabel="و"
latin:popupCharacters="ؤ" />
<Key
latin:keyStyle="deleteKeyStyle"
latin:keyWidth="fillRight"
latin:visualInsetsLeft="1%p"
latin:keyEdgeFlags="right" />
</Row>
<include latin:keyboardLayout="@xml/kbd_qwerty_row4" />
<include
latin:keyboardLayout="@xml/kbd_qwerty_row4" />
</merge>

View File

@ -30,33 +30,36 @@
latin:rowEdgeFlags="top"
>
<Key
latin:keyLabel="1"
latin:popupCharacters="¹,½,⅓,¼,⅛"
latin:keyLabel="@string/keylabel_for_symbols_1"
latin:popupCharacters="@string/alternates_for_symbols_1"
latin:keyEdgeFlags="left" />
<Key
latin:keyLabel="2"
latin:popupCharacters="²,⅔" />
latin:keyLabel="@string/keylabel_for_symbols_2"
latin:popupCharacters="@string/alternates_for_symbols_2" />
<Key
latin:keyLabel="3"
latin:popupCharacters="³,¾,⅜" />
latin:keyLabel="@string/keylabel_for_symbols_3"
latin:popupCharacters="@string/alternates_for_symbols_3" />
<Key
latin:keyLabel="4"
latin:popupCharacters="" />
latin:keyLabel="@string/keylabel_for_symbols_4"
latin:popupCharacters="@string/alternates_for_symbols_4" />
<Key
latin:keyLabel="5"
latin:popupCharacters="" />
latin:keyLabel="@string/keylabel_for_symbols_5"
latin:popupCharacters="@string/alternates_for_symbols_5" />
<Key
latin:keyLabel="6" />
latin:keyLabel="@string/keylabel_for_symbols_6"
latin:popupCharacters="@string/alternates_for_symbols_6" />
<Key
latin:keyLabel="7"
latin:popupCharacters="" />
latin:keyLabel="@string/keylabel_for_symbols_7"
latin:popupCharacters="@string/alternates_for_symbols_7" />
<Key
latin:keyLabel="8" />
latin:keyLabel="@string/keylabel_for_symbols_8"
latin:popupCharacters="@string/alternates_for_symbols_8" />
<Key
latin:keyLabel="9" />
latin:keyLabel="@string/keylabel_for_symbols_9"
latin:popupCharacters="@string/alternates_for_symbols_9" />
<Key
latin:keyLabel="0"
latin:popupCharacters="ⁿ,∅"
latin:keyLabel="@string/keylabel_for_symbols_0"
latin:popupCharacters="@string/alternates_for_symbols_0"
latin:keyWidth="fillRight"
latin:keyEdgeFlags="right" />
</Row>
@ -112,17 +115,19 @@
<Key
latin:keyLabel=":" />
<Key
latin:keyLabel=";" />
latin:keyLabel="@string/keylabel_for_symbols_semicolon"
latin:popupCharacters="@string/alternates_for_symbols_semicolon" />
<Key
latin:keyLabel="/" />
<Key
latin:keyLabel="\?"
latin:popupCharacters="¿" />
latin:keyLabel="@string/keylabel_for_symbols_question"
latin:popupCharacters="@string/alternates_for_symbols_question" />
<Key
latin:keyStyle="deleteKeyStyle"
latin:keyWidth="fillRight"
latin:visualInsetsLeft="1%p"
latin:keyEdgeFlags="right" />
</Row>
<include latin:keyboardLayout="@xml/kbd_symbols_row4" />
<include
latin:keyboardLayout="@xml/kbd_symbols_row4" />
</Keyboard>

View File

@ -36,7 +36,8 @@
<!-- latin:hasVoiceKey="false" -->
<default>
<Key
latin:keyLabel=","
latin:keyLabel="@string/keylabel_for_symbols_comma"
latin:popupCharacters="@string/alternates_for_symbols_comma"
latin:keyWidth="9.2%p"
latin:keyStyle="settingsPopupStyle" />
</default>
@ -54,7 +55,8 @@
<!-- latin:hasVoiceKey="false" -->
<default>
<Key
latin:keyLabel=","
latin:keyLabel="@string/keylabel_for_symbols_comma"
latin:popupCharacters="@string/alternates_for_symbols_comma"
latin:keyStyle="settingsPopupStyle" />
</default>
</switch>

View File

@ -42,12 +42,8 @@
latin:keyStyle="spaceKeyStyle"
latin:keyWidth="35.83%p" />
<Key
latin:keyLabel="."
latin:keyLabelOption="hasPopupHint"
latin:popupCharacters="@string/alternates_for_punctuation"
latin:keyWidth="9.2%p"
latin:maxPopupKeyboardColumn="7"
latin:keyStyle="functionalKeyStyle" />
latin:keyStyle="punctuationKeyStyle"
latin:keyWidth="9.2%p" />
</case>
<!-- latin:hasSettingsKey="false" -->
<default>
@ -61,11 +57,7 @@
latin:keyStyle="spaceKeyStyle"
latin:keyWidth="50%p" />
<Key
latin:keyLabel="."
latin:keyLabelOption="hasPopupHint"
latin:popupCharacters="@string/alternates_for_punctuation"
latin:maxPopupKeyboardColumn="7"
latin:keyStyle="functionalKeyStyle" />
latin:keyStyle="punctuationKeyStyle" />
</default>
</switch>
<switch>

View File

@ -257,10 +257,13 @@ public class Key {
final CharSequence[] popupCharacters = style.getTextArray(keyAttr,
R.styleable.Keyboard_Key_popupCharacters);
if (res.getBoolean(R.bool.config_digit_popup_characters_enabled)) {
mPopupCharacters = popupCharacters;
} else {
// In Arabic symbol layouts, we'd like to keep digits in popup characters regardless of
// config_digit_popup_characters_enabled.
if (mKeyboard.mId.isAlphabetKeyboard() && !res.getBoolean(
R.bool.config_digit_popup_characters_enabled)) {
mPopupCharacters = filterOutDigitPopupCharacters(popupCharacters);
} else {
mPopupCharacters = popupCharacters;
}
mMaxPopupColumn = style.getInt(keyboardAttr,
R.styleable.Keyboard_Key_maxPopupKeyboardColumn,