aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rw-r--r--tools/dicttool/Android.mk22
-rw-r--r--tools/dicttool/compat/android/test/AndroidTestCase.java35
-rw-r--r--tools/dicttool/compat/android/test/MoreAsserts.java35
-rw-r--r--tools/dicttool/compat/android/test/suitebuilder/annotation/LargeTest.java25
-rw-r--r--tools/dicttool/compat/android/util/Log.java37
-rw-r--r--tools/dicttool/compat/android/util/SparseArray.java84
-rwxr-xr-xtools/dicttool/etc/dicttool_aosp12
-rw-r--r--tools/dicttool/src/com/android/inputmethod/latin/dicttool/CommandList.java1
-rw-r--r--tools/dicttool/src/com/android/inputmethod/latin/dicttool/Crypt.java4
-rw-r--r--tools/dicttool/src/com/android/inputmethod/latin/dicttool/Dicttool.java13
-rw-r--r--tools/dicttool/src/com/android/inputmethod/latin/dicttool/Package.java6
-rw-r--r--tools/dicttool/src/com/android/inputmethod/latin/dicttool/Test.java108
-rw-r--r--tools/dicttool/tests/com/android/inputmethod/latin/makedict/FusionDictionaryTest.java4
-rw-r--r--tools/maketext/res/com/android/inputmethod/keyboard/internal/KeyboardTextsSet.tmpl2
-rw-r--r--tools/maketext/res/values-az/donottranslate-more-keys.xml59
-rw-r--r--tools/maketext/res/values-kk/donottranslate-more-keys.xml57
-rw-r--r--tools/maketext/res/values/donottranslate-more-keys.xml3
17 files changed, 490 insertions, 17 deletions
diff --git a/tools/dicttool/Android.mk b/tools/dicttool/Android.mk
index 666887a2e..d06be58a7 100644
--- a/tools/dicttool/Android.mk
+++ b/tools/dicttool/Android.mk
@@ -16,10 +16,19 @@
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
-LATINIME_BASE_SOURCE_DIRECTORY := ../../java/src/com/android/inputmethod
+BUILD_TOP := ../../../../..
+LATINIME_DIR := $(BUILD_TOP)/packages/inputmethods/LatinIME
+LATINIME_BASE_SOURCE_DIRECTORY := $(LATINIME_DIR)/java/src/com/android/inputmethod
LATINIME_CORE_SOURCE_DIRECTORY := $(LATINIME_BASE_SOURCE_DIRECTORY)/latin
LATINIME_ANNOTATIONS_SOURCE_DIRECTORY := $(LATINIME_BASE_SOURCE_DIRECTORY)/annotations
MAKEDICT_CORE_SOURCE_DIRECTORY := $(LATINIME_CORE_SOURCE_DIRECTORY)/makedict
+DICTTOOL_COMPAT_TESTS_DIRECTORY := compat
+DICTTOOL_ONDEVICE_TESTS_DIRECTORY := \
+ $(LATINIME_DIR)/tests/src/com/android/inputmethod/latin/makedict/
+
+USED_TARGETTED_UTILS := \
+ $(LATINIME_CORE_SOURCE_DIRECTORY)/utils/ByteArrayWrapper.java \
+ $(LATINIME_CORE_SOURCE_DIRECTORY)/utils/CollectionUtils.java
LOCAL_MAIN_SRC_FILES := $(call all-java-files-under, $(MAKEDICT_CORE_SOURCE_DIRECTORY))
LOCAL_TOOL_SRC_FILES := $(call all-java-files-under, src)
@@ -28,12 +37,13 @@ LOCAL_ANNOTATIONS_SRC_FILES := \
LOCAL_SRC_FILES := $(LOCAL_TOOL_SRC_FILES) \
$(filter-out $(addprefix %/, $(notdir $(LOCAL_TOOL_SRC_FILES))), $(LOCAL_MAIN_SRC_FILES)) \
$(LOCAL_ANNOTATIONS_SRC_FILES) \
- $(LATINIME_CORE_SOURCE_DIRECTORY)/Constants.java
+ $(LATINIME_CORE_SOURCE_DIRECTORY)/Constants.java \
+ $(call all-java-files-under, tests) \
+ $(call all-java-files-under, $(DICTTOOL_ONDEVICE_TESTS_DIRECTORY)) \
+ $(call all-java-files-under, $(DICTTOOL_COMPAT_TESTS_DIRECTORY)) \
+ $(USED_TARGETTED_UTILS)
-ifeq ($(DICTTOOL_UNITTEST), true)
- LOCAL_SRC_FILES += $(call all-java-files-under, tests)
- LOCAL_JAVA_LIBRARIES := junit
-endif
+LOCAL_JAVA_LIBRARIES := junit
LOCAL_JAR_MANIFEST := etc/manifest.txt
LOCAL_MODULE := dicttool_aosp
diff --git a/tools/dicttool/compat/android/test/AndroidTestCase.java b/tools/dicttool/compat/android/test/AndroidTestCase.java
new file mode 100644
index 000000000..d01b7ad7c
--- /dev/null
+++ b/tools/dicttool/compat/android/test/AndroidTestCase.java
@@ -0,0 +1,35 @@
+/*
+ * Copyright (C) 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.
+ */
+
+package android.test;
+
+import junit.framework.TestCase;
+
+import java.io.File;
+
+/**
+ * This is a compatibility class that aims at emulating android.test.AndroidTestcase from the
+ * Android library as simply as possible, and only to the extent that is used by the client classes.
+ * Its purpose is to provide compatibility without having to pull the whole Android library.
+ */
+public class AndroidTestCase extends TestCase {
+ public File getCacheDir() {
+ return new File(".");
+ }
+ public AndroidTestCase getContext() {
+ return this;
+ }
+}
diff --git a/tools/dicttool/compat/android/test/MoreAsserts.java b/tools/dicttool/compat/android/test/MoreAsserts.java
new file mode 100644
index 000000000..f56420b9c
--- /dev/null
+++ b/tools/dicttool/compat/android/test/MoreAsserts.java
@@ -0,0 +1,35 @@
+/*
+ * Copyright (C) 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.
+ */
+
+package android.test;
+
+import junit.framework.Assert;
+
+/**
+ * This is a compatibility class that aims at emulating android.test.MoreAsserts from the
+ * Android library as simply as possible, and only to the extent that is used by the client classes.
+ * Its purpose is to provide compatibility without having to pull the whole Android library.
+ */
+public class MoreAsserts {
+ public static void assertNotEqual(Object unexpected, Object actual) {
+ if (equal(unexpected, actual)) {
+ Assert.fail("expected not to be:<" + unexpected + ">");
+ }
+ }
+ private static boolean equal(Object a, Object b) {
+ return a == b || (a != null && a.equals(b));
+ }
+}
diff --git a/tools/dicttool/compat/android/test/suitebuilder/annotation/LargeTest.java b/tools/dicttool/compat/android/test/suitebuilder/annotation/LargeTest.java
new file mode 100644
index 000000000..ed00f8d5f
--- /dev/null
+++ b/tools/dicttool/compat/android/test/suitebuilder/annotation/LargeTest.java
@@ -0,0 +1,25 @@
+/*
+ * Copyright (C) 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.
+ */
+
+package android.test.suitebuilder.annotation;
+
+/**
+ * This is a compatibility class that aims at emulating the LargeTest annotation from the
+ * Android library as simply as possible, and only to the extent that is used by the client classes.
+ * Its purpose is to provide compatibility without having to pull the whole Android library.
+ */
+public @interface LargeTest {
+}
diff --git a/tools/dicttool/compat/android/util/Log.java b/tools/dicttool/compat/android/util/Log.java
new file mode 100644
index 000000000..d9df3a4ae
--- /dev/null
+++ b/tools/dicttool/compat/android/util/Log.java
@@ -0,0 +1,37 @@
+/*
+ * Copyright (C) 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.
+ */
+
+package android.util;
+
+/**
+ * This is a compatibility class that aims at emulating android.util.Log from the
+ * Android library as simply as possible, and only to the extent that is used by the client classes.
+ * Its purpose is to provide compatibility without having to pull the whole Android library.
+ */
+public class Log {
+ public static void d(final String tag, final String message) {
+ System.out.println(tag + " : " + message);
+ }
+ public static void d(final String tag, final String message, final Exception e) {
+ System.out.println(tag + " : " + message + " : " + e);
+ }
+ public static void e(final String tag, final String message) {
+ d(tag, message);
+ }
+ public static void e(final String tag, final String message, final Exception e) {
+ e(tag, message, e);
+ }
+}
diff --git a/tools/dicttool/compat/android/util/SparseArray.java b/tools/dicttool/compat/android/util/SparseArray.java
new file mode 100644
index 000000000..6c76f19f4
--- /dev/null
+++ b/tools/dicttool/compat/android/util/SparseArray.java
@@ -0,0 +1,84 @@
+/*
+ * Copyright (C) 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.
+ */
+
+package android.util;
+
+import com.android.inputmethod.latin.utils.CollectionUtils;
+
+import java.util.ArrayList;
+import java.util.Collections;
+
+public class SparseArray<E> {
+ private final ArrayList<Integer> mKeys;
+ private final ArrayList<E> mValues;
+
+ public SparseArray() {
+ this(10);
+ }
+
+ public SparseArray(final int initialCapacity) {
+ mKeys = CollectionUtils.newArrayList(initialCapacity);
+ mValues = CollectionUtils.newArrayList(initialCapacity);
+ }
+
+ public int size() {
+ return mKeys.size();
+ }
+
+ public void clear() {
+ mKeys.clear();
+ mValues.clear();
+ }
+
+ public void put(final int key, final E value) {
+ final int index = Collections.binarySearch(mKeys, key);
+ if (index >= 0) {
+ mValues.set(index, value);
+ return;
+ }
+ final int insertIndex = ~index;
+ mKeys.add(insertIndex, key);
+ mValues.add(insertIndex, value);
+ }
+
+ public E get(final int key) {
+ return get(key, null);
+ }
+
+ public E get(final int key, final E valueIfKeyNotFound) {
+ final int index = Collections.binarySearch(mKeys, key);
+ if (index >= 0) {
+ return mValues.get(index);
+ }
+ return valueIfKeyNotFound;
+ }
+
+ public int indexOfKey(final int key) {
+ return mKeys.indexOf(key);
+ }
+
+ public int indexOfValue(final E value) {
+ return mValues.indexOf(value);
+ }
+
+ public int keyAt(final int index) {
+ return mKeys.get(index);
+ }
+
+ public E valueAt(final int index) {
+ return mValues.get(index);
+ }
+}
diff --git a/tools/dicttool/etc/dicttool_aosp b/tools/dicttool/etc/dicttool_aosp
index a4879a279..cc7111a2c 100755
--- a/tools/dicttool/etc/dicttool_aosp
+++ b/tools/dicttool/etc/dicttool_aosp
@@ -33,6 +33,7 @@ progdir=`pwd`
prog="${progdir}"/`basename "${prog}"`
cd "${oldwd}"
+classname=com.android.inputmethod.latin.dicttool.Dicttool
jarfile=dicttool_aosp.jar
frameworkdir="$progdir"
if [ ! -r "$frameworkdir/$jarfile" ]
@@ -51,12 +52,21 @@ then
exit 1
fi
+lib=junit.jar
+if [ ! -r "$frameworkdir/$lib" ]
+then
+ echo `basename "$prog"`": can't find lib $lib"
+ exit 1
+fi
+
if [ "$OSTYPE" = "cygwin" ] ; then
jarpath=`cygpath -w "$frameworkdir/$jarfile"`
+ libpath=`cygpath -w "$frameworkdir/$lib"`
progdir=`cygpath -w "$progdir"`
else
jarpath="$frameworkdir/$jarfile"
+ libpath="$frameworkdir/$lib"
fi
# might need more memory, e.g. -Xmx128M
-exec java -ea -jar "$jarpath" "$@"
+exec java -ea -classpath "$libpath":"$jarpath" "$classname" "$@"
diff --git a/tools/dicttool/src/com/android/inputmethod/latin/dicttool/CommandList.java b/tools/dicttool/src/com/android/inputmethod/latin/dicttool/CommandList.java
index 0e0095bd6..0d93c7fa9 100644
--- a/tools/dicttool/src/com/android/inputmethod/latin/dicttool/CommandList.java
+++ b/tools/dicttool/src/com/android/inputmethod/latin/dicttool/CommandList.java
@@ -27,5 +27,6 @@ public class CommandList {
Dicttool.addCommand("package", Package.Packager.class);
Dicttool.addCommand("unpackage", Package.Unpackager.class);
Dicttool.addCommand("makedict", Makedict.class);
+ Dicttool.addCommand("test", Test.class);
}
}
diff --git a/tools/dicttool/src/com/android/inputmethod/latin/dicttool/Crypt.java b/tools/dicttool/src/com/android/inputmethod/latin/dicttool/Crypt.java
index f8990231e..4612ae4ab 100644
--- a/tools/dicttool/src/com/android/inputmethod/latin/dicttool/Crypt.java
+++ b/tools/dicttool/src/com/android/inputmethod/latin/dicttool/Crypt.java
@@ -40,10 +40,12 @@ public class Crypt {
public Encrypter() {
}
+ @Override
public String getHelp() {
return COMMAND + " <src_filename> <dst_filename>: Encrypts a file";
}
+ @Override
public void run() {
throw new UnsupportedOperationException();
}
@@ -55,10 +57,12 @@ public class Crypt {
public Decrypter() {
}
+ @Override
public String getHelp() {
return COMMAND + " <src_filename> <dst_filename>: Decrypts a file";
}
+ @Override
public void run() {
throw new UnsupportedOperationException();
}
diff --git a/tools/dicttool/src/com/android/inputmethod/latin/dicttool/Dicttool.java b/tools/dicttool/src/com/android/inputmethod/latin/dicttool/Dicttool.java
index 7b311c3ec..cacee5268 100644
--- a/tools/dicttool/src/com/android/inputmethod/latin/dicttool/Dicttool.java
+++ b/tools/dicttool/src/com/android/inputmethod/latin/dicttool/Dicttool.java
@@ -72,15 +72,21 @@ public class Dicttool {
return command;
}
- private void execute(final String[] arguments) {
+ /**
+ * Executes the specified command with the specified arguments.
+ * @param arguments the arguments passed to dicttool.
+ * @return 0 for success, an error code otherwise (always 1 at the moment)
+ */
+ private int execute(final String[] arguments) {
final Command command = getCommand(arguments);
try {
command.run();
+ return 0;
} catch (Exception e) {
System.out.println("Exception while processing command "
+ command.getClass().getSimpleName() + " : " + e);
e.printStackTrace();
- return;
+ return 1;
}
}
@@ -89,6 +95,7 @@ public class Dicttool {
help();
return;
}
- new Dicttool().execute(arguments);
+ // Exit with the success/error code from #execute() as status.
+ System.exit(new Dicttool().execute(arguments));
}
}
diff --git a/tools/dicttool/src/com/android/inputmethod/latin/dicttool/Package.java b/tools/dicttool/src/com/android/inputmethod/latin/dicttool/Package.java
index b29480764..9274dcd2e 100644
--- a/tools/dicttool/src/com/android/inputmethod/latin/dicttool/Package.java
+++ b/tools/dicttool/src/com/android/inputmethod/latin/dicttool/Package.java
@@ -22,9 +22,7 @@ import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
-import java.io.InputStream;
import java.io.IOException;
-import java.io.OutputStream;
public class Package {
private Package() {
@@ -39,10 +37,12 @@ public class Package {
public Packager() {
}
+ @Override
public String getHelp() {
return COMMAND + " <src_filename> <dst_filename>: Package a file for distribution";
}
+ @Override
public void run() throws IOException {
if (mArgs.length != 2) {
throw new RuntimeException("Too many/too few arguments for command " + COMMAND);
@@ -67,11 +67,13 @@ public class Package {
public Unpackager() {
}
+ @Override
public String getHelp() {
return COMMAND + " <src_filename> <dst_filename>: Detects how a file is packaged and\n"
+ "decrypts/uncompresses as necessary to produce a raw binary file.";
}
+ @Override
public void run() throws FileNotFoundException, IOException {
if (mArgs.length != 2) {
throw new RuntimeException("Too many/too few arguments for command " + COMMAND);
diff --git a/tools/dicttool/src/com/android/inputmethod/latin/dicttool/Test.java b/tools/dicttool/src/com/android/inputmethod/latin/dicttool/Test.java
new file mode 100644
index 000000000..972b6e7e6
--- /dev/null
+++ b/tools/dicttool/src/com/android/inputmethod/latin/dicttool/Test.java
@@ -0,0 +1,108 @@
+/**
+ * Copyright (C) 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.
+ */
+
+package com.android.inputmethod.latin.dicttool;
+
+import com.android.inputmethod.latin.makedict.BinaryDictIOTests;
+import com.android.inputmethod.latin.makedict.BinaryDictIOUtilsTests;
+import com.android.inputmethod.latin.makedict.BinaryDictInputOutputTest;
+import com.android.inputmethod.latin.makedict.FusionDictionaryTest;
+
+import java.lang.reflect.Constructor;
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+import java.util.ArrayList;
+
+/**
+ * Dicttool command implementing self-tests.
+ */
+public class Test extends Dicttool.Command {
+ public static final String COMMAND = "test";
+ private long mSeed = System.currentTimeMillis();
+ private int mMaxUnigrams = BinaryDictIOUtilsTests.DEFAULT_MAX_UNIGRAMS;
+
+ private static final Class<?>[] sClassesToTest = {
+ BinaryDictOffdeviceUtilsTests.class,
+ FusionDictionaryTest.class,
+ BinaryDictInputOutputTest.class,
+ BinaryDictIOUtilsTests.class,
+ BinaryDictIOTests.class
+ };
+ private ArrayList<Method> mAllTestMethods = new ArrayList<Method>();
+ private ArrayList<String> mUsedTestMethods = new ArrayList<String>();
+
+ public Test() {
+ for (final Class<?> c : sClassesToTest) {
+ for (final Method m : c.getDeclaredMethods()) {
+ if (m.getName().startsWith("test") && Void.TYPE == m.getReturnType()
+ && 0 == m.getParameterTypes().length) {
+ mAllTestMethods.add(m);
+ }
+ }
+ }
+ }
+
+ @Override
+ public String getHelp() {
+ final StringBuilder s = new StringBuilder("test [-s seed] [-m maxUnigrams] [testName...]\n"
+ + "If seed is not specified, the current time is used.\nTest list is:\n");
+ for (final Method m : mAllTestMethods) {
+ s.append(" ");
+ s.append(m.getName());
+ s.append("\n");
+ }
+ return s.toString();
+ }
+
+ @Override
+ public void run() throws IllegalAccessException, InstantiationException,
+ InvocationTargetException {
+ int i = 0;
+ while (i < mArgs.length) {
+ final String arg = mArgs[i++];
+ if ("-s".equals(arg)) {
+ mSeed = Long.parseLong(mArgs[i++]);
+ } else if ("-m".equals(arg)) {
+ mMaxUnigrams = Integer.parseInt(mArgs[i++]);
+ } else {
+ mUsedTestMethods.add(arg);
+ }
+ }
+ runChosenTests();
+ }
+
+ private void runChosenTests() throws IllegalAccessException, InstantiationException,
+ InvocationTargetException {
+ for (final Method m : mAllTestMethods) {
+ final Class<?> declaringClass = m.getDeclaringClass();
+ if (!mUsedTestMethods.isEmpty() && !mUsedTestMethods.contains(m.getName())) continue;
+ // Some of the test classes expose a two-argument constructor, taking a long as a
+ // seed for Random, and an int for a vocabulary size to test the dictionary with. They
+ // correspond respectively to the -s and -m numerical arguments to this command, which
+ // are stored in mSeed and mMaxUnigrams. If the two-arguments constructor is present,
+ // then invoke it; otherwise, invoke the default constructor.
+ Constructor<?> twoArgsConstructor = null;
+ try {
+ twoArgsConstructor = declaringClass.getDeclaredConstructor(Long.TYPE, Integer.TYPE);
+ } catch (NoSuchMethodException e) {
+ // No constructor with two args
+ }
+ final Object instance = null == twoArgsConstructor ? declaringClass.newInstance()
+ : twoArgsConstructor.newInstance(mSeed, mMaxUnigrams);
+ m.invoke(instance);
+ }
+ }
+}
diff --git a/tools/dicttool/tests/com/android/inputmethod/latin/makedict/FusionDictionaryTest.java b/tools/dicttool/tests/com/android/inputmethod/latin/makedict/FusionDictionaryTest.java
index fe3781d80..76071133d 100644
--- a/tools/dicttool/tests/com/android/inputmethod/latin/makedict/FusionDictionaryTest.java
+++ b/tools/dicttool/tests/com/android/inputmethod/latin/makedict/FusionDictionaryTest.java
@@ -73,10 +73,6 @@ public class FusionDictionaryTest extends TestCase {
for (final String word : words) {
if (--limit < 0) return;
final CharGroup cg = FusionDictionary.findWordInTree(dict.mRoot, word);
- if (null == cg) {
- System.out.println("word " + dumpWord(word));
- dumpDict(dict);
- }
assertNotNull(cg);
}
}
diff --git a/tools/maketext/res/com/android/inputmethod/keyboard/internal/KeyboardTextsSet.tmpl b/tools/maketext/res/com/android/inputmethod/keyboard/internal/KeyboardTextsSet.tmpl
index 2fc97b5c6..479a766fb 100644
--- a/tools/maketext/res/com/android/inputmethod/keyboard/internal/KeyboardTextsSet.tmpl
+++ b/tools/maketext/res/com/android/inputmethod/keyboard/internal/KeyboardTextsSet.tmpl
@@ -20,7 +20,7 @@ import android.content.Context;
import android.content.res.Resources;
import com.android.inputmethod.annotations.UsedForTesting;
-import com.android.inputmethod.latin.CollectionUtils;
+import com.android.inputmethod.latin.utils.CollectionUtils;
import java.util.HashMap;
diff --git a/tools/maketext/res/values-az/donottranslate-more-keys.xml b/tools/maketext/res/values-az/donottranslate-more-keys.xml
new file mode 100644
index 000000000..db1784c17
--- /dev/null
+++ b/tools/maketext/res/values-az/donottranslate-more-keys.xml
@@ -0,0 +1,59 @@
+<?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">
+ <!-- U+00E2: "â" LATIN SMALL LETTER A WITH CIRCUMFLEX -->
+ <string name="more_keys_for_a">&#x00E2;</string>
+ <!-- U+0259: "ə" LATIN SMALL LETTER SCHWA -->
+ <string name="more_keys_for_e">&#x0259;</string>
+ <!-- U+0131: "ı" LATIN SMALL LETTER DOTLESS I
+ U+00EE: "î" LATIN SMALL LETTER I WITH CIRCUMFLEX
+ U+00EF: "ï" LATIN SMALL LETTER I WITH DIAERESIS
+ U+00EC: "ì" LATIN SMALL LETTER I WITH GRAVE
+ U+00ED: "í" LATIN SMALL LETTER I WITH ACUTE
+ U+012F: "į" LATIN SMALL LETTER I WITH OGONEK
+ U+012B: "ī" LATIN SMALL LETTER I WITH MACRON -->
+ <string name="more_keys_for_i">&#x0131;,&#x00EE;,&#x00EF;,&#x00EC;,&#x00ED;,&#x012F;,&#x012B;</string>
+ <!-- U+00F6: "ö" LATIN SMALL LETTER O WITH DIAERESIS
+ U+00F4: "ô" LATIN SMALL LETTER O WITH CIRCUMFLEX
+ U+0153: "œ" LATIN SMALL LIGATURE OE
+ U+00F2: "ò" LATIN SMALL LETTER O WITH GRAVE
+ U+00F3: "ó" LATIN SMALL LETTER O WITH ACUTE
+ U+00F5: "õ" LATIN SMALL LETTER O WITH TILDE
+ U+00F8: "ø" LATIN SMALL LETTER O WITH STROKE
+ U+014D: "ō" LATIN SMALL LETTER O WITH MACRON -->
+ <string name="more_keys_for_o">&#x00F6;,&#x00F4;,&#x0153;,&#x00F2;,&#x00F3;,&#x00F5;,&#x00F8;,&#x014D;</string>
+ <!-- U+00FC: "ü" LATIN SMALL LETTER U WITH DIAERESIS
+ U+00FB: "û" LATIN SMALL LETTER U WITH CIRCUMFLEX
+ U+00F9: "ù" LATIN SMALL LETTER U WITH GRAVE
+ U+00FA: "ú" LATIN SMALL LETTER U WITH ACUTE
+ U+016B: "ū" LATIN SMALL LETTER U WITH MACRON -->
+ <string name="more_keys_for_u">&#x00FC;,&#x00FB;,&#x00F9;,&#x00FA;,&#x016B;</string>
+ <!-- U+015F: "ş" LATIN SMALL LETTER S WITH CEDILLA
+ U+00DF: "ß" LATIN SMALL LETTER SHARP S
+ U+015B: "ś" LATIN SMALL LETTER S WITH ACUTE
+ U+0161: "š" LATIN SMALL LETTER S WITH CARON -->
+ <string name="more_keys_for_s">&#x015F;,&#x00DF;,&#x015B;,&#x0161;</string>
+ <!-- U+011F: "ğ" LATIN SMALL LETTER G WITH BREVE -->
+ <string name="more_keys_for_g">&#x011F;</string>
+ <!-- U+00E7: "ç" LATIN SMALL LETTER C WITH CEDILLA
+ 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>
+</resources>
diff --git a/tools/maketext/res/values-kk/donottranslate-more-keys.xml b/tools/maketext/res/values-kk/donottranslate-more-keys.xml
new file mode 100644
index 000000000..0e953ff21
--- /dev/null
+++ b/tools/maketext/res/values-kk/donottranslate-more-keys.xml
@@ -0,0 +1,57 @@
+<?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">
+ <!-- U+0449: "щ" CYRILLIC SMALL LETTER SHCHA -->
+ <string name="keylabel_for_east_slavic_row1_9">&#x0449;</string>
+ <!-- U+044A: "ъ" CYRILLIC SMALL LETTER HARD SIGN -->
+ <string name="keylabel_for_east_slavic_row1_12">&#x044A;</string>
+ <!-- U+044B: "ы" CYRILLIC SMALL LETTER YERU -->
+ <string name="keylabel_for_east_slavic_row2_1">&#x044B;</string>
+ <!-- U+044D: "э" CYRILLIC SMALL LETTER E -->
+ <string name="keylabel_for_east_slavic_row2_11">&#x044D;</string>
+ <!-- U+0438: "и" CYRILLIC SMALL LETTER I -->
+ <string name="keylabel_for_east_slavic_row3_5">&#x0438;</string>
+ <!-- U+04AF: "ү" CYRILLIC SMALL LETTER STRAIGHT U
+ U+04B1: "ұ" CYRILLIC SMALL LETTER STRAIGHT U WITH STROKE -->
+ <string name="more_keys_for_cyrillic_u">&#x04AF;,&#x04B1;</string>
+ <!-- U+049B: "қ" CYRILLIC SMALL LETTER KA WITH DESCENDER -->
+ <string name="more_keys_for_cyrillic_ka">&#x049B;</string>
+ <!-- U+0451: "ё" CYRILLIC SMALL LETTER IO -->
+ <string name="more_keys_for_cyrillic_ie">&#x0451;</string>
+ <!-- U+04A3: "ң" CYRILLIC SMALL LETTER EN WITH DESCENDER -->
+ <string name="more_keys_for_cyrillic_en">&#x04A3;</string>
+ <!-- U+0493: "ғ" CYRILLIC SMALL LETTER GHE WITH STROKE -->
+ <string name="more_keys_for_cyrillic_ghe">&#x0493;</string>
+ <!-- U+0456: "і" CYRILLIC SMALL LETTER BYELORUSSIAN-UKRAINIAN I -->
+ <string name="more_keys_for_east_slavic_row2_1">&#x0456;</string>
+ <!-- U+04D9: "ә" CYRILLIC SMALL LETTER SCHWA -->
+ <string name="more_keys_for_cyrillic_a">&#x04D9;</string>
+ <!-- U+04E9: "ө" CYRILLIC SMALL LETTER BARRED O -->
+ <string name="more_keys_for_cyrillic_o">&#x04E9;</string>
+ <!-- U+04BB: "һ" CYRILLIC SMALL LETTER SHHA -->
+ <string name="more_keys_for_east_slavic_row2_11">&#x04BB;</string>
+ <!-- U+044A: "ъ" CYRILLIC SMALL LETTER HARD SIGN -->
+ <string name="more_keys_for_cyrillic_soft_sign">&#x044A;</string>
+ <!-- Label for "switch to alphabetic" key.
+ U+0410: "А" CYRILLIC CAPITAL LETTER A
+ U+0411: "Б" CYRILLIC CAPITAL LETTER BE
+ U+0412: "В" CYRILLIC CAPITAL LETTER VE -->
+ <string name="label_to_alpha_key">&#x0410;&#x0411;&#x0412;</string>
+</resources>
diff --git a/tools/maketext/res/values/donottranslate-more-keys.xml b/tools/maketext/res/values/donottranslate-more-keys.xml
index b766b15e5..4cf26505f 100644
--- a/tools/maketext/res/values/donottranslate-more-keys.xml
+++ b/tools/maketext/res/values/donottranslate-more-keys.xml
@@ -49,11 +49,14 @@
<string name="keylabel_for_east_slavic_row2_11"></string>
<string name="keylabel_for_east_slavic_row3_5"></string>
<string name="more_keys_for_cyrillic_u"></string>
+ <string name="more_keys_for_cyrillic_ka"></string>
<string name="more_keys_for_cyrillic_en"></string>
<string name="more_keys_for_cyrillic_ghe"></string>
<string name="more_keys_for_east_slavic_row2_1"></string>
+ <string name="more_keys_for_cyrillic_a"></string>
<string name="more_keys_for_cyrillic_o"></string>
<string name="more_keys_for_cyrillic_soft_sign"></string>
+ <string name="more_keys_for_east_slavic_row2_11"></string>
<string name="keylabel_for_south_slavic_row1_6"></string>
<string name="keylabel_for_south_slavic_row2_11"></string>
<string name="keylabel_for_south_slavic_row3_1"></string>