aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rw-r--r--tools/dicttool/src/com/android/inputmethod/latin/dicttool/BinaryDictOffdeviceUtils.java2
-rw-r--r--tools/dicttool/src/com/android/inputmethod/latin/dicttool/DictionaryMaker.java19
-rw-r--r--tools/make-keyboard-text/res/values-hy/donottranslate-more-keys.xml20
-rw-r--r--tools/make-keyboard-text/res/values-km/donottranslate-more-keys.xml29
-rw-r--r--tools/make-keyboard-text/res/values-lo/donottranslate-more-keys.xml28
-rw-r--r--tools/make-keyboard-text/res/values-ne/donottranslate-more-keys.xml63
-rw-r--r--tools/make-keyboard-text/res/values/donottranslate-more-keys.xml2
7 files changed, 152 insertions, 11 deletions
diff --git a/tools/dicttool/src/com/android/inputmethod/latin/dicttool/BinaryDictOffdeviceUtils.java b/tools/dicttool/src/com/android/inputmethod/latin/dicttool/BinaryDictOffdeviceUtils.java
index fa80385fc..6c4cbcf9d 100644
--- a/tools/dicttool/src/com/android/inputmethod/latin/dicttool/BinaryDictOffdeviceUtils.java
+++ b/tools/dicttool/src/com/android/inputmethod/latin/dicttool/BinaryDictOffdeviceUtils.java
@@ -185,7 +185,7 @@ public final class BinaryDictOffdeviceUtils {
crash(filename, new RuntimeException(
filename + " does not seem to be a dictionary file"));
} else {
- final DictDecoder dictDecoder = FormatSpec.getDictDecoder(file,
+ final DictDecoder dictDecoder = FormatSpec.getDictDecoder(decodedSpec.mFile,
DictDecoder.USE_BYTEARRAY);
if (report) {
System.out.println("Format : Binary dictionary format");
diff --git a/tools/dicttool/src/com/android/inputmethod/latin/dicttool/DictionaryMaker.java b/tools/dicttool/src/com/android/inputmethod/latin/dicttool/DictionaryMaker.java
index 5302e976e..5c7e8b4f2 100644
--- a/tools/dicttool/src/com/android/inputmethod/latin/dicttool/DictionaryMaker.java
+++ b/tools/dicttool/src/com/android/inputmethod/latin/dicttool/DictionaryMaker.java
@@ -23,8 +23,8 @@ import com.android.inputmethod.latin.makedict.FormatSpec;
import com.android.inputmethod.latin.makedict.FusionDictionary;
import com.android.inputmethod.latin.makedict.MakedictLog;
import com.android.inputmethod.latin.makedict.UnsupportedFormatException;
-import com.android.inputmethod.latin.makedict.Ver3DictDecoder;
import com.android.inputmethod.latin.makedict.Ver3DictEncoder;
+import com.android.inputmethod.latin.makedict.Ver4DictEncoder;
import java.io.BufferedWriter;
import java.io.File;
@@ -45,9 +45,9 @@ import org.xml.sax.SAXException;
public class DictionaryMaker {
static class Arguments {
- private static final String OPTION_VERSION_1 = "-1";
private static final String OPTION_VERSION_2 = "-2";
private static final String OPTION_VERSION_3 = "-3";
+ private static final String OPTION_VERSION_4 = "-4";
private static final String OPTION_INPUT_SOURCE = "-s";
private static final String OPTION_INPUT_BIGRAM_XML = "-b";
private static final String OPTION_INPUT_SHORTCUT_XML = "-c";
@@ -128,12 +128,12 @@ public class DictionaryMaker {
+ "| [-s <combined format input]"
+ "| [-s <binary input>] [-d <binary output>] [-x <xml output>] "
+ " [-o <combined output>]"
- + "[-1] [-2] [-3]\n"
+ + "[-2] [-3] [-4]\n"
+ "\n"
+ " Converts a source dictionary file to one or several outputs.\n"
+ " Source can be an XML file, with an optional XML bigrams file, or a\n"
+ " binary dictionary file.\n"
- + " Binary version 1 (Ice Cream Sandwich), 2 (Jelly Bean), 3, XML and\n"
+ + " Binary version 2 (Jelly Bean), 3, 4, XML and\n"
+ " combined format outputs are supported.";
}
@@ -160,8 +160,8 @@ public class DictionaryMaker {
// Do nothing, this is the default
} else if (OPTION_VERSION_3.equals(arg)) {
outputBinaryFormatVersion = 3;
- } else if (OPTION_VERSION_1.equals(arg)) {
- outputBinaryFormatVersion = 1;
+ } else if (OPTION_VERSION_4.equals(arg)) {
+ outputBinaryFormatVersion = 4;
} else if (OPTION_HELP.equals(arg)) {
displayHelp();
} else {
@@ -357,7 +357,12 @@ public class DictionaryMaker {
throws FileNotFoundException, IOException, UnsupportedFormatException {
final File outputFile = new File(outputFilename);
final FormatSpec.FormatOptions formatOptions = new FormatSpec.FormatOptions(version);
- final DictEncoder dictEncoder = new Ver3DictEncoder(outputFile);
+ final DictEncoder dictEncoder;
+ if (version == 4) {
+ dictEncoder = new Ver4DictEncoder(outputFile);
+ } else {
+ dictEncoder = new Ver3DictEncoder(outputFile);
+ }
dictEncoder.writeDictionary(dict, formatOptions);
}
diff --git a/tools/make-keyboard-text/res/values-hy/donottranslate-more-keys.xml b/tools/make-keyboard-text/res/values-hy/donottranslate-more-keys.xml
index f6c64285c..2f34128bd 100644
--- a/tools/make-keyboard-text/res/values-hy/donottranslate-more-keys.xml
+++ b/tools/make-keyboard-text/res/values-hy/donottranslate-more-keys.xml
@@ -18,7 +18,23 @@
*/
-->
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <!-- U+058A: "֊" ARMENIAN HYPHEN -->
+ <!-- U+055C: "՜" ARMENIAN EXCLAMATION MARK -->
+ <!-- U+055D: "՝" ARMENIAN COMMA -->
<!-- U+055E: "՞" ARMENIAN QUESTION MARK -->
- <string name="more_keys_for_punctuation">"!fixedColumnOrder!4,&#x055E;,!,\\,,\?,:,;,\@"</string>
- <string name="more_keys_for_tablet_period">&#x055E;,\?</string>
+ <!-- U+0559: "ՙ" ARMENIAN MODIFIER LETTER LEFT HALF RING -->
+ <!-- U+055A: "՚" ARMENIAN APOSTROPHE -->
+ <!-- U+055B: "՛" ARMENIAN EMPHASIS MARK -->
+ <!-- U+055F: "՟" ARMENIAN ABBREVIATION MARK -->
+ <string name="more_keys_for_punctuation">"!fixedColumnOrder!8,!,?,\\,,.,&#x058A;,&#x055C;,&#x055D;,&#x055E;,:,;,\@,&#x0559;,&#x055A;,&#x055B;,&#x055F;"</string>
+ <!-- U+055E: "՞" ARMENIAN QUESTION MARK -->
+ <!-- U+00BF: "¿" INVERTED QUESTION MARK -->
+ <string name="more_keys_for_symbols_question">&#x055E;,&#x00BF;</string>
+ <!-- U+055C: "՜" ARMENIAN EXCLAMATION MARK -->
+ <!-- U+00A1: "¡" INVERTED EXCLAMATION MARK -->
+ <string name="more_keys_for_symbols_exclamation">&#x055C;,&#x00A1;</string>
+ <!-- U+058F: "֏" ARMENIAN DRAM SIGN -->
+ <!-- TODO: Enable this when we have glyph for the following letter
+ <string name="keylabel_for_currency">&#x058F;</string>
+ -->
</resources>
diff --git a/tools/make-keyboard-text/res/values-km/donottranslate-more-keys.xml b/tools/make-keyboard-text/res/values-km/donottranslate-more-keys.xml
new file mode 100644
index 000000000..c33831c56
--- /dev/null
+++ b/tools/make-keyboard-text/res/values-km/donottranslate-more-keys.xml
@@ -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.
+*/
+-->
+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <!-- Label for "switch to alphabetic" key.
+ U+1780: "ក" KHMER LETTER KA
+ U+1781: "ខ" KHMER LETTER KHA
+ U+1782: "គ" KHMER LETTER KO -->
+ <string name="label_to_alpha_key">&#x1780;&#x1781;&#x1782;</string>
+ <!-- U+17DB: "៛" KHMER CURRENCY SYMBOL RIEL -->
+ <string name="more_keys_for_currency_dollar">&#x17DB;,&#x00A2;,&#x00A3;,&#x20AC;,&#x00A5;,&#x20B1;</string>
+
+</resources>
diff --git a/tools/make-keyboard-text/res/values-lo/donottranslate-more-keys.xml b/tools/make-keyboard-text/res/values-lo/donottranslate-more-keys.xml
new file mode 100644
index 000000000..1d8ffa8cf
--- /dev/null
+++ b/tools/make-keyboard-text/res/values-lo/donottranslate-more-keys.xml
@@ -0,0 +1,28 @@
+<?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.
+*/
+-->
+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <!-- Label for "switch to alphabetic" key.
+ U+0E81: "ກ" LAO LETTER KO
+ U+0E82: "ຂ" LAO LETTER KHO SUNG
+ U+0E84: "ຄ" LAO LETTER KHO TAM -->
+ <string name="label_to_alpha_key">&#x0E81;&#x0E82;&#x0E84;</string>
+ <!-- U+20AD: "₭" KIP SIGN -->
+ <string name="keylabel_for_currency">&#x20AD;</string>
+</resources>
diff --git a/tools/make-keyboard-text/res/values-ne/donottranslate-more-keys.xml b/tools/make-keyboard-text/res/values-ne/donottranslate-more-keys.xml
new file mode 100644
index 000000000..9205e5309
--- /dev/null
+++ b/tools/make-keyboard-text/res/values-ne/donottranslate-more-keys.xml
@@ -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.
+*/
+-->
+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <!-- Label for "switch to alphabetic" key.
+ U+0915: "क" DEVANAGARI LETTER KA
+ U+0916: "ख" DEVANAGARI LETTER KHA
+ U+0917: "ग" DEVANAGARI LETTER GA -->
+ <string name="label_to_alpha_key">&#x0915;&#x0916;&#x0917;</string>
+ <!-- U+0967: "१" DEVANAGARI DIGIT ONE -->
+ <string name="keylabel_for_symbols_1">&#x0967;</string>
+ <!-- U+0968: "२" DEVANAGARI DIGIT TWO -->
+ <string name="keylabel_for_symbols_2">&#x0968;</string>
+ <!-- U+0969: "३" DEVANAGARI DIGIT THREE -->
+ <string name="keylabel_for_symbols_3">&#x0969;</string>
+ <!-- U+096A: "४" DEVANAGARI DIGIT FOUR -->
+ <string name="keylabel_for_symbols_4">&#x096A;</string>
+ <!-- U+096B: "५" DEVANAGARI DIGIT FIVE -->
+ <string name="keylabel_for_symbols_5">&#x096B;</string>
+ <!-- U+096C: "६" DEVANAGARI DIGIT SIX -->
+ <string name="keylabel_for_symbols_6">&#x096C;</string>
+ <!-- U+096D: "७" DEVANAGARI DIGIT SEVEN -->
+ <string name="keylabel_for_symbols_7">&#x096D;</string>
+ <!-- U+096E: "८" DEVANAGARI DIGIT EIGHT -->
+ <string name="keylabel_for_symbols_8">&#x096E;</string>
+ <!-- U+096F: "९" DEVANAGARI DIGIT NINE -->
+ <string name="keylabel_for_symbols_9">&#x096F;</string>
+ <!-- U+0966: "०" DEVANAGARI DIGIT ZERO -->
+ <string name="keylabel_for_symbols_0">&#x0966;</string>
+ <!-- Label for "switch to symbols" key. -->
+ <string name="label_to_symbol_key">\?&#x0967;&#x0968;&#x0969;</string>
+ <!-- Label for "switch to symbols with microphone" key. This string shouldn't include the "mic"
+ part because it'll be appended by the code. -->
+ <string name="label_to_symbol_with_microphone_key">&#x0967;&#x0968;&#x0969;</string>
+ <string name="additional_more_keys_for_symbols_1">1</string>
+ <string name="additional_more_keys_for_symbols_2">2</string>
+ <string name="additional_more_keys_for_symbols_3">3</string>
+ <string name="additional_more_keys_for_symbols_4">4</string>
+ <string name="additional_more_keys_for_symbols_5">5</string>
+ <string name="additional_more_keys_for_symbols_6">6</string>
+ <string name="additional_more_keys_for_symbols_7">7</string>
+ <string name="additional_more_keys_for_symbols_8">8</string>
+ <string name="additional_more_keys_for_symbols_9">9</string>
+ <string name="additional_more_keys_for_symbols_0">0</string>
+ <!-- U+0930/U+0941/U+002E "रु." NEPALESE RUPEE SIGN -->
+ <string name="keylabel_for_currency">&#x0930;&#x0941;&#x002E;</string>
+</resources>
diff --git a/tools/make-keyboard-text/res/values/donottranslate-more-keys.xml b/tools/make-keyboard-text/res/values/donottranslate-more-keys.xml
index a4c2f126d..cc09f7fe5 100644
--- a/tools/make-keyboard-text/res/values/donottranslate-more-keys.xml
+++ b/tools/make-keyboard-text/res/values/donottranslate-more-keys.xml
@@ -190,7 +190,7 @@
<!-- Label for "switch to more symbol" modifier key. Must be short to fit on key! -->
<string name="label_to_more_symbol_key">= \\ &lt;</string>
<!-- Label for "switch to more symbol" modifier key on tablets. Must be short to fit on key! -->
- <string name="label_to_more_symbol_for_tablet_key">~ [ {</string>
+ <string name="label_to_more_symbol_for_tablet_key">~ [ &lt;</string>
<!-- Label for "Tab" key. Must be short to fit on key! -->
<string name="label_tab_key">Tab</string>
<!-- Label for "switch to phone numeric" key. Must be short to fit on key! -->