From 087c8a84a57eea1801a98b38857566874080eeca Mon Sep 17 00:00:00 2001
From: "Tadashi G. Takaoka" <takaoka@google.com>
Date: Wed, 31 Jul 2013 12:44:48 +0900
Subject: [PATCH] Fix Catalan keyboard layout

Bug: 10098472
Change-Id: I60e4aa6716f8166ca60ab5687b0faf2d84cd846b
---
 java/res/xml-sw600dp/rowkeys_symbols2.xml     |  5 +--
 java/res/xml/rowkeys_symbols2.xml             |  5 +--
 .../keyboard/internal/KeyboardTextsSet.java   | 31 ++++++++++++++++---
 .../values-ca/donottranslate-more-keys.xml    |  9 ++++--
 .../values-es/donottranslate-more-keys.xml    |  2 ++
 .../res/values/donottranslate-more-keys.xml   |  3 +-
 6 files changed, 43 insertions(+), 12 deletions(-)

diff --git a/java/res/xml-sw600dp/rowkeys_symbols2.xml b/java/res/xml-sw600dp/rowkeys_symbols2.xml
index 7d7dcfe31c..14abb42f97 100644
--- a/java/res/xml-sw600dp/rowkeys_symbols2.xml
+++ b/java/res/xml-sw600dp/rowkeys_symbols2.xml
@@ -62,10 +62,11 @@
         latin:keyLabel="*"
         latin:moreKeys="!text/more_keys_for_star" />
     <!-- U+2013: "–" EN DASH
-         U+2014: "—" EM DASH -->
+         U+2014: "—" EM DASH
+         U+00B7: "·" MIDDLE DOT -->
     <Key
         latin:keyLabel="-"
-        latin:moreKeys="_,&#x2013;,&#x2014;" />
+        latin:moreKeys="_,&#x2013;,&#x2014;,&#x00B7;" />
     <Key
         latin:keyLabel="+"
         latin:moreKeys="!text/more_keys_for_plus" />
diff --git a/java/res/xml/rowkeys_symbols2.xml b/java/res/xml/rowkeys_symbols2.xml
index d3c1278dac..3e27f1579e 100644
--- a/java/res/xml/rowkeys_symbols2.xml
+++ b/java/res/xml/rowkeys_symbols2.xml
@@ -54,10 +54,11 @@
         latin:keyLabel="*"
         latin:moreKeys="!text/more_keys_for_star" />
     <!-- U+2013: "–" EN DASH
-         U+2014: "—" EM DASH -->
+         U+2014: "—" EM DASH
+         U+00B7: "·" MIDDLE DOT -->
     <Key
         latin:keyLabel="-"
-        latin:moreKeys="_,&#x2013;,&#x2014;" />
+        latin:moreKeys="_,&#x2013;,&#x2014;,&#x00B7;" />
     <Key
         latin:keyLabel="+"
         latin:moreKeys="!text/more_keys_for_plus" />
diff --git a/java/src/com/android/inputmethod/keyboard/internal/KeyboardTextsSet.java b/java/src/com/android/inputmethod/keyboard/internal/KeyboardTextsSet.java
index 00cb8355d7..7bb7442f3e 100644
--- a/java/src/com/android/inputmethod/keyboard/internal/KeyboardTextsSet.java
+++ b/java/src/com/android/inputmethod/keyboard/internal/KeyboardTextsSet.java
@@ -374,8 +374,7 @@ public final class KeyboardTextsSet {
         /* 115 */ "w",
         /* 116 */ "y",
         /* 117 */ "x",
-        // U+00F1: "ñ" LATIN SMALL LETTER N WITH TILDE
-        /* 118 */ "\u00F1",
+        /* 118 */ EMPTY,
         /* 119 */ "!fixedColumnOrder!2,!hasLabels!,!text/label_time_am,!text/label_time_pm",
         /* 120 */ "!icon/settings_key|!code/key_settings",
         /* 121 */ "!icon/shortcut_key|!code/key_shortcut",
@@ -777,9 +776,28 @@ public final class KeyboardTextsSet {
         /* 8~ */
         null, null, null, null, null, null,
         /* ~13 */
-        // U+0140: "Å€" LATIN SMALL LETTER L WITH MIDDLE DOT
+        // U+00B7: "·" MIDDLE DOT
         // U+0142: "Å‚" LATIN SMALL LETTER L WITH STROKE
-        /* 14 */ "\u0140,\u0142",
+        /* 14 */ "l\u00B7l,\u0142",
+        /* 15~ */
+        null, null, null, null, null, null, null, null, null, null, null, null, null, null, null,
+        null, null, null, null, null, null, null, null, null, null, null, null, null, null, null,
+        null, null, null, null, null, null, null, null,
+        /* ~52 */
+        // U+00B7: "·" MIDDLE DOT
+        /* 53 */ "!fixedColumnOrder!9,\u00B7,\",\',#,-,:,!,\\,,?,@,&,\\%,+,;,/,(,)",
+        /* 54~ */
+        null, null, null, null, null, null, null, null, null, null, null, null, null, null, null,
+        null, null, null, null, null, null, null, null, null, null, null, null, null, null, null,
+        null, null, null, null, null, null, null, null, null, null, null, null, null, null, null,
+        null, null, null, null, null, null, null, null, null,
+        /* ~107 */
+        /* 108 */ "?,\u00B7",
+        /* 109~ */
+        null, null, null, null, null, null, null, null, null,
+        /* ~117 */
+        // U+00E7: "ç" LATIN SMALL LETTER C WITH CEDILLA
+        /* 118 */ "\u00E7",
     };
 
     /* Language cs: Czech */
@@ -1254,6 +1272,11 @@ public final class KeyboardTextsSet {
         /* 109 */ "\"",
         /* 110 */ "\'",
         /* 111 */ "\'",
+        /* 112~ */
+        null, null, null, null, null, null,
+        /* ~117 */
+        // U+00F1: "ñ" LATIN SMALL LETTER N WITH TILDE
+        /* 118 */ "\u00F1",
     };
 
     /* Language et: Estonian */
diff --git a/tools/maketext/res/values-ca/donottranslate-more-keys.xml b/tools/maketext/res/values-ca/donottranslate-more-keys.xml
index baa23bf9c1..8624dfb65a 100644
--- a/tools/maketext/res/values-ca/donottranslate-more-keys.xml
+++ b/tools/maketext/res/values-ca/donottranslate-more-keys.xml
@@ -67,7 +67,12 @@
          U+0107: "ć" LATIN SMALL LETTER C WITH ACUTE
          U+010D: "č" LATIN SMALL LETTER C WITH CARON -->
     <string name="more_keys_for_c">&#x00E7;,&#x0107;,&#x010D;</string>
-    <!-- U+0140: "Å€" LATIN SMALL LETTER L WITH MIDDLE DOT
+    <!-- U+00B7: "·" MIDDLE DOT
          U+0142: "Å‚" LATIN SMALL LETTER L WITH STROKE -->
-    <string name="more_keys_for_l">&#x0140;,&#x0142;</string>
+    <string name="more_keys_for_l">l&#x00B7;l,&#x0142;</string>
+    <!-- U+00B7: "·" MIDDLE DOT -->
+    <string name="more_keys_for_punctuation">"!fixedColumnOrder!9,&#x00B7;,\",\',#,-,:,!,\\,,\?,\@,&amp;,\\%,+,;,/,(,)"</string>
+    <string name="more_keys_for_tablet_period">\?,&#x00B7;</string>
+    <!-- U+00E7: "ç" LATIN SMALL LETTER C WITH CEDILLA -->
+    <string name="keylabel_for_spanish_row2_10">&#x00E7;</string>
 </resources>
diff --git a/tools/maketext/res/values-es/donottranslate-more-keys.xml b/tools/maketext/res/values-es/donottranslate-more-keys.xml
index 961193bfa2..0e58c14401 100644
--- a/tools/maketext/res/values-es/donottranslate-more-keys.xml
+++ b/tools/maketext/res/values-es/donottranslate-more-keys.xml
@@ -67,6 +67,8 @@
          U+0107: "ć" LATIN SMALL LETTER C WITH ACUTE
          U+010D: "č" LATIN SMALL LETTER C WITH CARON -->
     <string name="more_keys_for_c">&#x00E7;,&#x0107;,&#x010D;</string>
+    <!-- U+00F1: "ñ" LATIN SMALL LETTER N WITH TILDE -->
+    <string name="keylabel_for_spanish_row2_10">&#x00F1;</string>
     <!-- U+00A1: "¡" INVERTED EXCLAMATION MARK
          U+00BF: "¿" INVERTED QUESTION MARK -->
     <string name="more_keys_for_punctuation">"!fixedColumnOrder!9,&#x00A1;,\",\',#,-,:,!,\\,,\?,&#x00BF;,\@,&amp;,\\%,+,;,/,(,)"</string>
diff --git a/tools/maketext/res/values/donottranslate-more-keys.xml b/tools/maketext/res/values/donottranslate-more-keys.xml
index b53a369175..4cf26505f4 100644
--- a/tools/maketext/res/values/donottranslate-more-keys.xml
+++ b/tools/maketext/res/values/donottranslate-more-keys.xml
@@ -180,8 +180,7 @@
     <string name="keylabel_for_w">w</string>
     <string name="keylabel_for_y">y</string>
     <string name="keylabel_for_x">x</string>
-    <!-- U+00F1: "ñ" LATIN SMALL LETTER N WITH TILDE -->
-    <string name="keylabel_for_spanish_row2_10">&#x00F1;</string>
+    <string name="keylabel_for_spanish_row2_10"></string>
     <string name="more_keys_for_am_pm">!fixedColumnOrder!2,!hasLabels!,\@string/label_time_am,\@string/label_time_pm</string>
     <string name="settings_as_more_key">!icon/settings_key|!code/key_settings</string>
     <string name="shortcut_as_more_key">!icon/shortcut_key|!code/key_shortcut</string>
-- 
GitLab