aboutsummaryrefslogtreecommitdiffstats
path: root/tools/make-keyboard-text/src
diff options
context:
space:
mode:
authorTadashi G. Takaoka <takaoka@google.com>2014-02-14 11:01:38 +0900
committerTadashi G. Takaoka <takaoka@google.com>2014-02-14 16:27:26 +0900
commite422c94634da4d0e61a9106addebf06cbcf70c2e (patch)
tree808bddf9c084b32c1aaccbc1394166200fb24aa1 /tools/make-keyboard-text/src
parentd4469756beca3b890fa52ff21aefa0559b0c38ac (diff)
downloadlatinime-e422c94634da4d0e61a9106addebf06cbcf70c2e.tar.gz
latinime-e422c94634da4d0e61a9106addebf06cbcf70c2e.tar.xz
latinime-e422c94634da4d0e61a9106addebf06cbcf70c2e.zip
Fix test resource declarations and parsing a bit
Change-Id: I882a41b2934c48f4405f1ea5bf4d6ad41e87322c
Diffstat (limited to 'tools/make-keyboard-text/src')
-rw-r--r--tools/make-keyboard-text/src/com/android/inputmethod/keyboard/tools/MoreKeysResources.java19
1 files changed, 2 insertions, 17 deletions
diff --git a/tools/make-keyboard-text/src/com/android/inputmethod/keyboard/tools/MoreKeysResources.java b/tools/make-keyboard-text/src/com/android/inputmethod/keyboard/tools/MoreKeysResources.java
index 872ef19e3..e9d6c864f 100644
--- a/tools/make-keyboard-text/src/com/android/inputmethod/keyboard/tools/MoreKeysResources.java
+++ b/tools/make-keyboard-text/src/com/android/inputmethod/keyboard/tools/MoreKeysResources.java
@@ -29,6 +29,7 @@ import java.util.Comparator;
import java.util.HashMap;
import java.util.Locale;
import java.util.jar.JarFile;
+import java.util.regex.Pattern;
public class MoreKeysResources {
private static final String TEXT_RESOURCE_NAME = "donottranslate-more-keys.xml";
@@ -287,23 +288,7 @@ public class MoreKeysResources {
sb.append(String.format("\\u%04X", (int)c));
}
}
- return replaceIncompatibleEscape(sb.toString());
- }
-
- private static String replaceIncompatibleEscape(final String text) {
- String t = text;
- t = replaceAll(t, "\\?", "?");
- t = replaceAll(t, "\\@", "@");
- t = replaceAll(t, "@string/", "!text/");
- return t;
- }
-
- private static String replaceAll(final String text, final String target, final String replace) {
- String t = text;
- while (t.indexOf(target) >= 0) {
- t = t.replace(target, replace);
- }
- return t;
+ return sb.toString();
}
private static void close(final Closeable stream) {