aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rw-r--r--tools/dicttool/src/android/inputmethod/latin/dicttool/XmlDictInputOutput.java8
-rw-r--r--tools/dicttool/tests/com/android/inputmethod/latin/makedict/BinaryDictInputOutputTest.java10
-rw-r--r--tools/maketext/res/values-eo/donottranslate-more-keys.xml146
-rw-r--r--tools/maketext/res/values/donottranslate-more-keys.xml8
4 files changed, 164 insertions, 8 deletions
diff --git a/tools/dicttool/src/android/inputmethod/latin/dicttool/XmlDictInputOutput.java b/tools/dicttool/src/android/inputmethod/latin/dicttool/XmlDictInputOutput.java
index 9ce8c4934..c31cd724a 100644
--- a/tools/dicttool/src/android/inputmethod/latin/dicttool/XmlDictInputOutput.java
+++ b/tools/dicttool/src/android/inputmethod/latin/dicttool/XmlDictInputOutput.java
@@ -50,6 +50,7 @@ public class XmlDictInputOutput {
private static final String SHORTCUT_TAG = "shortcut";
private static final String FREQUENCY_ATTR = "f";
private static final String WORD_ATTR = "word";
+ private static final String NOT_A_WORD_ATTR = "not_a_word";
private static final int SHORTCUT_ONLY_DEFAULT_FREQ = 1;
@@ -92,7 +93,7 @@ public class XmlDictInputOutput {
final FusionDictionary dict = mDictionary;
for (final String shortcutOnly : mShortcutsMap.keySet()) {
if (dict.hasWord(shortcutOnly)) continue;
- dict.add(shortcutOnly, 0, mShortcutsMap.get(shortcutOnly));
+ dict.add(shortcutOnly, 0, mShortcutsMap.get(shortcutOnly), true /* isNotAWord */);
}
mDictionary = null;
mShortcutsMap.clear();
@@ -144,7 +145,7 @@ public class XmlDictInputOutput {
@Override
public void endElement(String uri, String localName, String qName) {
if (WORD == mState) {
- mDictionary.add(mWord, mFreq, mShortcutsMap.get(mWord));
+ mDictionary.add(mWord, mFreq, mShortcutsMap.get(mWord), false /* isNotAWord */);
mState = START;
}
}
@@ -345,7 +346,8 @@ public class XmlDictInputOutput {
destination.write("<!-- Warning: there is no code to read this format yet. -->\n");
for (Word word : set) {
destination.write(" <" + WORD_TAG + " " + WORD_ATTR + "=\"" + word.mWord + "\" "
- + FREQUENCY_ATTR + "=\"" + word.mFrequency + "\">");
+ + FREQUENCY_ATTR + "=\"" + word.mFrequency
+ + (word.mIsNotAWord ? "\" " + NOT_A_WORD_ATTR + "=\"true" : "") + "\">");
if (null != word.mShortcutTargets) {
destination.write("\n");
for (WeightedString target : word.mShortcutTargets) {
diff --git a/tools/dicttool/tests/com/android/inputmethod/latin/makedict/BinaryDictInputOutputTest.java b/tools/dicttool/tests/com/android/inputmethod/latin/makedict/BinaryDictInputOutputTest.java
index 24042f120..88589b815 100644
--- a/tools/dicttool/tests/com/android/inputmethod/latin/makedict/BinaryDictInputOutputTest.java
+++ b/tools/dicttool/tests/com/android/inputmethod/latin/makedict/BinaryDictInputOutputTest.java
@@ -43,11 +43,11 @@ public class BinaryDictInputOutputTest extends TestCase {
final FusionDictionary dict = new FusionDictionary(new Node(),
new DictionaryOptions(new HashMap<String, String>(),
false /* germanUmlautProcessing */, false /* frenchLigatureProcessing */));
- dict.add("foo", 1, null);
- dict.add("fta", 1, null);
- dict.add("ftb", 1, null);
- dict.add("bar", 1, null);
- dict.add("fool", 1, null);
+ dict.add("foo", 1, null, false /* isNotAWord */);
+ dict.add("fta", 1, null, false /* isNotAWord */);
+ dict.add("ftb", 1, null, false /* isNotAWord */);
+ dict.add("bar", 1, null, false /* isNotAWord */);
+ dict.add("fool", 1, null, false /* isNotAWord */);
final ArrayList<Node> result = BinaryDictInputOutput.flattenTree(dict.mRoot);
assertEquals(4, result.size());
while (!result.isEmpty()) {
diff --git a/tools/maketext/res/values-eo/donottranslate-more-keys.xml b/tools/maketext/res/values-eo/donottranslate-more-keys.xml
new file mode 100644
index 000000000..e929869e2
--- /dev/null
+++ b/tools/maketext/res/values-eo/donottranslate-more-keys.xml
@@ -0,0 +1,146 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+**
+** Copyright 2012, 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">
+ <!-- U+00E1: "á" LATIN SMALL LETTER A WITH ACUTE
+ U+00E0: "à" LATIN SMALL LETTER A WITH GRAVE
+ U+00E2: "â" LATIN SMALL LETTER A WITH CIRCUMFLEX
+ U+00E4: "ä" LATIN SMALL LETTER A WITH DIAERESIS
+ U+00E6: "æ" LATIN SMALL LETTER AE
+ U+00E3: "ã" LATIN SMALL LETTER A WITH TILDE
+ U+00E5: "å" LATIN SMALL LETTER A WITH RING ABOVE
+ U+0101: "ā" LATIN SMALL LETTER A WITH MACRON
+ U+0103: "ă" LATIN SMALL LETTER A WITH BREVE
+ U+0105: "ą" LATIN SMALL LETTER A WITH OGONEK
+ U+00AA: "ª" FEMININE ORDINAL INDICATOR -->
+ <string name="more_keys_for_a">&#x00E1;,&#x00E0;,&#x00E2;,&#x00E4;,&#x00E6;,&#x00E3;,&#x00E5;,&#x0101;,&#x0103;,&#x0105;,&#x00AA;</string>
+ <!-- U+00E9: "é" LATIN SMALL LETTER E WITH ACUTE
+ U+011B: "ě" LATIN SMALL LETTER E WITH CARON
+ U+00E8: "è" LATIN SMALL LETTER E WITH GRAVE
+ U+00EA: "ê" LATIN SMALL LETTER E WITH CIRCUMFLEX
+ U+00EB: "ë" LATIN SMALL LETTER E WITH DIAERESIS
+ U+0119: "ę" LATIN SMALL LETTER E WITH OGONEK
+ U+0117: "ė" LATIN SMALL LETTER E WITH DOT ABOVE
+ U+0113: "ē" LATIN SMALL LETTER E WITH MACRON -->
+ <string name="more_keys_for_e">&#x00E9;,&#x011B;,&#x00E8;,&#x00EA;,&#x00EB;,&#x0119;,&#x0117;,&#x0113;</string>
+ <!-- U+00ED: "í" LATIN SMALL LETTER I WITH ACUTE
+ U+00EE: "î" LATIN SMALL LETTER I WITH CIRCUMFLEX
+ U+00EF: "ï" LATIN SMALL LETTER I WITH DIAERESIS
+ U+0129: "ĩ" LATIN SMALL LETTER I WITH TILDE
+ U+00EC: "ì" LATIN SMALL LETTER I WITH GRAVE
+ U+012F: "į" LATIN SMALL LETTER I WITH OGONEK
+ U+012B: "ī" LATIN SMALL LETTER I WITH MACRON
+ U+0131: "ı" LATIN SMALL LETTER DOTLESS I
+ U+0133: "ij" LATIN SMALL LIGATURE IJ -->
+ <string name="more_keys_for_i">&#x00ED;,&#x00EE;,&#x00EF;,&#x0129;,&#x00EC;,&#x012F;,&#x012B;,&#x0131;,&#x0133;</string>
+ <!-- U+00F3: "ó" LATIN SMALL LETTER O WITH ACUTE
+ U+00F6: "ö" LATIN SMALL LETTER O WITH DIAERESIS
+ U+00F4: "ô" LATIN SMALL LETTER O WITH CIRCUMFLEX
+ U+00F2: "ò" LATIN SMALL LETTER O WITH GRAVE
+ U+00F5: "õ" LATIN SMALL LETTER O WITH TILDE
+ U+0153: "œ" LATIN SMALL LIGATURE OE
+ U+00F8: "ø" LATIN SMALL LETTER O WITH STROKE
+ U+014D: "ō" LATIN SMALL LETTER O WITH MACRON
+ U+0151: "ő" LATIN SMALL LETTER O WITH DOUBLE ACUTE
+ U+00BA: "º" MASCULINE ORDINAL INDICATOR -->
+ <string name="more_keys_for_o">&#x00F3;,&#x00F6;,&#x00F4;,&#x00F2;,&#x00F5;,&#x0153;,&#x00F8;,&#x014D;,&#x0151;,&#x00BA;</string>
+ <!-- U+00FA: "ú" LATIN SMALL LETTER U WITH ACUTE
+ U+016F: "ů" LATIN SMALL LETTER U WITH RING ABOVE
+ U+00FB: "û" LATIN SMALL LETTER U WITH CIRCUMFLEX
+ U+00FC: "ü" LATIN SMALL LETTER U WITH DIAERESIS
+ U+00F9: "ù" LATIN SMALL LETTER U WITH GRAVE
+ U+016B: "ū" LATIN SMALL LETTER U WITH MACRON
+ U+0169: "ũ" LATIN SMALL LETTER U WITH TILDE
+ U+0171: "ű" LATIN SMALL LETTER U WITH DOUBLE ACUTE
+ U+0173: "ų" LATIN SMALL LETTER U WITH OGONEK
+ U+00B5: "µ" MICRO SIGN -->
+ <string name="more_keys_for_u">&#x00FA;,&#x016F;,&#x00FB;,&#x00FC;,&#x00F9;,&#x016B;,&#x0169;,&#x0171;,&#x0173;,&#x00B5;</string>
+ <!-- U+00DF: "ß" LATIN SMALL LETTER SHARP S
+ U+0161: "š" LATIN SMALL LETTER S WITH CARON
+ U+015B: "ś" LATIN SMALL LETTER S WITH ACUTE
+ U+0219: "ș" LATIN SMALL LETTER S WITH COMMA BELOW
+ U+015F: "ş" LATIN SMALL LETTER S WITH CEDILLA -->
+ <string name="more_keys_for_s">&#x00DF;,&#x0161;,&#x015B;,&#x0219;,&#x015F;</string>
+ <!-- U+00F1: "ñ" LATIN SMALL LETTER N WITH TILDE
+ U+0144: "ń" LATIN SMALL LETTER N WITH ACUTE
+ U+0146: "ņ" LATIN SMALL LETTER N WITH CEDILLA
+ U+0148: "ň" LATIN SMALL LETTER N WITH CARON
+ U+0149: "ʼn" LATIN SMALL LETTER N PRECEDED BY APOSTROPHE
+ U+014B: "ŋ" LATIN SMALL LETTER ENG -->
+ <string name="more_keys_for_n">&#x00F1;,&#x0144;,&#x0146;,&#x0148;,&#x0149;,&#x014B;</string>
+ <!-- U+0107: "ć" LATIN SMALL LETTER C WITH ACUTE
+ U+010D: "č" LATIN SMALL LETTER C WITH CARON
+ U+00E7: "ç" LATIN SMALL LETTER C WITH CEDILLA
+ U+010B: "ċ" LATIN SMALL LETTER C WITH DOT ABOVE -->
+ <string name="more_keys_for_c">&#x0107;,&#x010D;,&#x00E7;,&#x010B;</string>
+ <!-- U+00FD: "ý" LATIN SMALL LETTER Y WITH ACUTE
+ U+0177: "ŷ" LATIN SMALL LETTER Y WITH CIRCUMFLEX
+ U+00FF: "ÿ" LATIN SMALL LETTER Y WITH DIAERESIS
+ U+00FE: "þ" LATIN SMALL LETTER THORN -->
+ <string name="more_keys_for_y">y,&#x00FD;,&#x0177;,&#x00FF;,&#x00FE;</string>
+ <!-- U+00F0: "ð" LATIN SMALL LETTER ETH
+ U+010F: "ď" LATIN SMALL LETTER D WITH CARON
+ U+0111: "đ" LATIN SMALL LETTER D WITH STROKE -->
+ <string name="more_keys_for_d">&#x00F0;,&#x010F;,&#x0111;</string>
+ <!-- U+0159: "ř" LATIN SMALL LETTER R WITH CARON
+ U+0155: "ŕ" LATIN SMALL LETTER R WITH ACUTE
+ U+0157: "ŗ" LATIN SMALL LETTER R WITH CEDILLA -->
+ <string name="more_keys_for_r">&#x0159;,&#x0155;,&#x0157;</string>
+ <!-- U+0165: "ť" LATIN SMALL LETTER T WITH CARON
+ U+021B: "ț" LATIN SMALL LETTER T WITH COMMA BELOW
+ U+0163: "ţ" LATIN SMALL LETTER T WITH CEDILLA
+ U+0167: "ŧ" LATIN SMALL LETTER T WITH STROKE -->
+ <string name="more_keys_for_t">&#x0165;,&#x021B;,&#x0163;,&#x0167;</string>
+ <!-- U+017A: "ź" LATIN SMALL LETTER Z WITH ACUTE
+ U+017C: "ż" LATIN SMALL LETTER Z WITH DOT ABOVE
+ U+017E: "ž" LATIN SMALL LETTER Z WITH CARON -->
+ <string name="more_keys_for_z">&#x017A;,&#x017C;,&#x017E;</string>
+ <!-- U+0137: "ķ" LATIN SMALL LETTER K WITH CEDILLA
+ U+0138: "ĸ" LATIN SMALL LETTER KRA -->
+ <string name="more_keys_for_k">&#x0137;,&#x0138;</string>
+ <!-- U+013A: "ĺ" LATIN SMALL LETTER L WITH ACUTE
+ U+013C: "ļ" LATIN SMALL LETTER L WITH CEDILLA
+ U+013E: "ľ" LATIN SMALL LETTER L WITH CARON
+ U+0140: "ŀ" LATIN SMALL LETTER L WITH MIDDLE DOT
+ U+0142: "ł" LATIN SMALL LETTER L WITH STROKE -->
+ <string name="more_keys_for_l">&#x013A;,&#x013C;,&#x013E;,&#x0140;,&#x0142;</string>
+ <!-- U+011F: "ğ" LATIN SMALL LETTER G WITH BREVE
+ U+0121: "ġ" LATIN SMALL LETTER G WITH DOT ABOVE
+ U+0123: "ģ" LATIN SMALL LETTER G WITH CEDILLA -->
+ <string name="more_keys_for_g">&#x011F;,&#x0121;,&#x0123;</string>
+ <!-- U+0175: "ŵ" LATIN SMALL LETTER W WITH CIRCUMFLEX -->
+ <string name="more_keys_for_v">w,&#x0175;</string>
+ <!-- U+0125: "ĥ" LATIN SMALL LETTER H WITH CIRCUMFLEX
+ U+0127: "ħ" LATIN SMALL LETTER H WITH STROKE -->
+ <string name="more_keys_for_h">&#x0125;,&#x0127;</string>
+ <!-- U+0175: "ŵ" LATIN SMALL LETTER W WITH CIRCUMFLEX -->
+ <string name="more_keys_for_w">w,&#x0175;</string>
+ <string name="more_keys_for_q">q</string>
+ <string name="more_keys_for_x">x</string>
+ <!-- U+015D: "ŝ" LATIN SMALL LETTER S WITH CIRCUMFLEX -->
+ <string name="keylabel_for_q">&#x015D;</string>
+ <!-- U+011D: "ĝ" LATIN SMALL LETTER G WITH CIRCUMFLEX -->
+ <string name="keylabel_for_w">&#x011D;</string>
+ <!-- U+016D: "ŭ" LATIN SMALL LETTER U WITH BREVE -->
+ <string name="keylabel_for_y">&#x016D;</string>
+ <!-- U+0109: "ĉ" LATIN SMALL LETTER C WITH CIRCUMFLEX -->
+ <string name="keylabel_for_x">&#x0109;</string>
+ <!-- U+0135: "ĵ" LATIN SMALL LETTER J WITH CIRCUMFLEX -->
+ <string name="keylabel_for_spanish_row2_10">&#x0135;</string>
+</resources>
diff --git a/tools/maketext/res/values/donottranslate-more-keys.xml b/tools/maketext/res/values/donottranslate-more-keys.xml
index 543e93620..4d7100b8c 100644
--- a/tools/maketext/res/values/donottranslate-more-keys.xml
+++ b/tools/maketext/res/values/donottranslate-more-keys.xml
@@ -177,6 +177,14 @@
<string name="keylabel_for_apostrophe">\'</string>
<string name="keyhintlabel_for_apostrophe">\"</string>
<string name="more_keys_for_apostrophe">\"</string>
+ <string name="more_keys_for_q"></string>
+ <string name="more_keys_for_x"></string>
+ <string name="keylabel_for_q">q</string>
+ <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="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>