From 38dc9ca31432f19641d80cd6f89354d66c5bebc1 Mon Sep 17 00:00:00 2001 From: "Tadashi G. Takaoka" <takaoka@google.com> Date: Fri, 15 Jun 2012 21:53:12 -0700 Subject: [PATCH] Fix duplicate period on Persian tablet keyboard Bug: 6679579 Change-Id: I8bccbfbdf7ea1fa1b78a5af05eb1df100f22ab0c --- java/res/xml-sw600dp/key_apostrophe.xml | 10 ++++++++++ java/res/xml-sw600dp/key_dash.xml | 1 + java/res/xml-sw600dp/rowkeys_farsi3.xml | 12 ++++++++---- java/res/xml-sw600dp/rows_farsi.xml | 2 -- java/res/xml-sw768dp/rows_farsi.xml | 2 -- .../keyboard/internal/KeyboardTextsSet.java | 8 +++++--- .../res/values-fa/donottranslate-more-keys.xml | 8 ++++++-- 7 files changed, 30 insertions(+), 13 deletions(-) diff --git a/java/res/xml-sw600dp/key_apostrophe.xml b/java/res/xml-sw600dp/key_apostrophe.xml index 0c838db567..2aec347290 100644 --- a/java/res/xml-sw600dp/key_apostrophe.xml +++ b/java/res/xml-sw600dp/key_apostrophe.xml @@ -28,6 +28,16 @@ <Key latin:keyLabel="-" /> </case> + <case + latin:languageCode="fa" + > + <Key + latin:keyLabel="!text/keylabel_for_apostrophe" + latin:keyHintLabel="!text/keyhintlabel_for_apostrophe" + latin:keyLabelFlags="hasPopupHint" + latin:moreKeys="!text/more_keys_for_apostrophe" + latin:keyStyle="hasShiftedLetterHintStyle" /> + </case> <default> <Key latin:keyLabel="!text/keylabel_for_apostrophe" diff --git a/java/res/xml-sw600dp/key_dash.xml b/java/res/xml-sw600dp/key_dash.xml index 118b67f272..b139c29c82 100644 --- a/java/res/xml-sw600dp/key_dash.xml +++ b/java/res/xml-sw600dp/key_dash.xml @@ -34,6 +34,7 @@ <Key latin:keyLabel="." latin:keyHintLabel="!text/keyhintlabel_for_arabic_diacritics" + latin:keyLabelFlags="hasPopupHint" latin:moreKeys="!text/more_keys_for_arabic_diacritics" latin:keyStyle="hasShiftedLetterHintStyle" /> </case> diff --git a/java/res/xml-sw600dp/rowkeys_farsi3.xml b/java/res/xml-sw600dp/rowkeys_farsi3.xml index cb81840030..998ba72d64 100644 --- a/java/res/xml-sw600dp/rowkeys_farsi3.xml +++ b/java/res/xml-sw600dp/rowkeys_farsi3.xml @@ -27,11 +27,12 @@ <!-- U+0637: "Ø·" ARABIC LETTER TAH --> <Key latin:keyLabel="ط" /> - <!-- U+0632: "ز" ARABIC LETTER ZAIN - U+0698: "Ú˜" ARABIC LETTER JEH --> + <!-- U+0698: "Ú˜" ARABIC LETTER JEH --> <Key - latin:keyLabel="ز" - latin:moreKeys="ژ" /> + latin:keyLabel="ژ" /> + <!-- U+0632: "ز" ARABIC LETTER ZAIN --> + <Key + latin:keyLabel="ز" /> <!-- U+0631: "ر" ARABIC LETTER REH --> <Key latin:keyLabel="ر" /> @@ -49,4 +50,7 @@ <Key latin:keyLabel="و" latin:moreKeys="ؤ" /> + <!-- U+0622: "Ø¢" ARABIC LETTER ALEF WITH MADDA ABOVE --> + <Key + latin:keyLabel="آ" /> </merge> diff --git a/java/res/xml-sw600dp/rows_farsi.xml b/java/res/xml-sw600dp/rows_farsi.xml index 1ce658648d..52c2d93290 100644 --- a/java/res/xml-sw600dp/rows_farsi.xml +++ b/java/res/xml-sw600dp/rows_farsi.xml @@ -44,8 +44,6 @@ <include latin:keyboardLayout="@xml/rowkeys_farsi3" latin:keyXPos="4.091%p" /> - <include - latin:keyboardLayout="@xml/keys_comma_period" /> <Key latin:keyStyle="enterKeyStyle" latin:keyWidth="fillRight" /> diff --git a/java/res/xml-sw768dp/rows_farsi.xml b/java/res/xml-sw768dp/rows_farsi.xml index 28031bb82d..4b4c970fd9 100644 --- a/java/res/xml-sw768dp/rows_farsi.xml +++ b/java/res/xml-sw768dp/rows_farsi.xml @@ -52,8 +52,6 @@ <include latin:keyboardLayout="@xml/rowkeys_farsi3" latin:keyXPos="13.829%p" /> - <include - latin:keyboardLayout="@xml/keys_comma_period" /> <Key latin:keyStyle="enterKeyStyle" latin:keyWidth="fillRight" /> diff --git a/java/src/com/android/inputmethod/keyboard/internal/KeyboardTextsSet.java b/java/src/com/android/inputmethod/keyboard/internal/KeyboardTextsSet.java index 1e3a0a5bae..8c218c6d3c 100644 --- a/java/src/com/android/inputmethod/keyboard/internal/KeyboardTextsSet.java +++ b/java/src/com/android/inputmethod/keyboard/internal/KeyboardTextsSet.java @@ -1101,14 +1101,16 @@ public final class KeyboardTextsSet { // U+060C: "ØŒ" ARABIC COMMA // U+061B: "Ø›" ARABIC SEMICOLON // U+061F: "ØŸ" ARABIC QUESTION MARK + // U+00AB: "«" LEFT-POINTING DOUBLE ANGLE QUOTATION MARK + // U+00BB: "»" RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK /* 98 */ "\u060C", /* 99 */ "!", /* 100 */ "!,\\,", /* 101 */ "\u061F", /* 102 */ "\u061F,?", - /* 103 */ null, - /* 104 */ null, - /* 105 */ "\u061F,\u061B,!,:,-,/,\',\"", + /* 103 */ "\u060C", + /* 104 */ "\u061F", + /* 105 */ "!fixedColumnOrder!4,:,!,\u061F,\u061B,-,/,\u00AB|\u00BB,\u00BB|\u00AB", }; /* Language fi: Finnish */ diff --git a/tools/maketext/res/values-fa/donottranslate-more-keys.xml b/tools/maketext/res/values-fa/donottranslate-more-keys.xml index e64af95c47..3519eea39e 100644 --- a/tools/maketext/res/values-fa/donottranslate-more-keys.xml +++ b/tools/maketext/res/values-fa/donottranslate-more-keys.xml @@ -63,13 +63,17 @@ <string name="more_keys_for_symbols_percent">\\%,‰</string> <!-- U+060C: "ØŒ" ARABIC COMMA U+061B: "Ø›" ARABIC SEMICOLON - U+061F: "ØŸ" ARABIC QUESTION MARK --> + U+061F: "ØŸ" ARABIC QUESTION MARK + U+00AB: "«" LEFT-POINTING DOUBLE ANGLE QUOTATION MARK + U+00BB: "»" RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK --> <string name="keylabel_for_tablet_comma">"،"</string> <string name="keyhintlabel_for_tablet_comma">"!"</string> <string name="more_keys_for_tablet_comma">"!,\\,"</string> <string name="keyhintlabel_for_tablet_period">"؟"</string> <string name="more_keys_for_tablet_period">"؟,\?"</string> - <string name="more_keys_for_apostrophe">"؟,؛,!,:,-,/,\',\""</string> + <string name="keylabel_for_apostrophe">،</string> + <string name="keyhintlabel_for_apostrophe">؟</string> + <string name="more_keys_for_apostrophe">"!fixedColumnOrder!4,:,!,؟,؛,-,/,«|»,»|«"</string> <!-- U+061F: "ØŸ" ARABIC QUESTION MARK U+060C: "ØŒ" ARABIC COMMA U+061B: "Ø›" ARABIC SEMICOLON --> -- GitLab