From a5bb606d2172cd9e322396929219d122fd225e14 Mon Sep 17 00:00:00 2001 From: "pdroidandroid@gmail.com" Date: Sun, 23 Jan 2022 21:14:56 +0100 Subject: [PATCH] Added tools:make-keyboard-text module --- settings.gradle | 2 + tools/build.gradle | 0 tools/make-keyboard-text/build.gradle | 26 ++ .../tools/ArrayInitializerFormatter.java | 104 +++++++ .../inputmethod/keyboard/tools/JarUtils.java | 117 ++++++++ .../keyboard/tools/LocaleUtils.java | 167 +++++++++++ .../keyboard/tools/MakeKeyboardText.java | 65 +++++ .../keyboard/tools/MoreKeysResources.java | 255 +++++++++++++++++ .../keyboard/tools/StringResource.java | 29 ++ .../keyboard/tools/StringResourceMap.java | 158 ++++++++++ .../keyboard/internal/KeyboardTextsTable.tmpl | 112 ++++++++ .../values-af/donottranslate-more-keys.xml | 68 +++++ .../values-ar/donottranslate-more-keys.xml | 132 +++++++++ .../values-az/donottranslate-more-keys.xml | 70 +++++ .../values-be/donottranslate-more-keys.xml | 40 +++ .../values-bg/donottranslate-more-keys.xml | 28 ++ .../donottranslate-more-keys.xml | 28 ++ .../donottranslate-more-keys.xml | 28 ++ .../values-ca/donottranslate-more-keys.xml | 78 +++++ .../values-cs/donottranslate-more-keys.xml | 91 ++++++ .../values-da/donottranslate-more-keys.xml | 79 +++++ .../values-de/donottranslate-more-keys.xml | 74 +++++ .../values-el/donottranslate-more-keys.xml | 26 ++ .../values-en/donottranslate-more-keys.xml | 63 ++++ .../values-eo/donottranslate-more-keys.xml | 146 ++++++++++ .../values-es/donottranslate-more-keys.xml | 73 +++++ .../values-et/donottranslate-more-keys.xml | 115 ++++++++ .../values-eu/donottranslate-more-keys.xml | 70 +++++ .../values-fa/donottranslate-more-keys.xml | 138 +++++++++ .../values-fi/donottranslate-more-keys.xml | 59 ++++ .../values-fr/donottranslate-more-keys.xml | 80 ++++++ .../values-gl/donottranslate-more-keys.xml | 70 +++++ .../donottranslate-more-keys.xml | 31 ++ .../values-hi/donottranslate-more-keys.xml | 65 +++++ .../values-hr/donottranslate-more-keys.xml | 42 +++ .../values-hu/donottranslate-more-keys.xml | 66 +++++ .../values-hy/donottranslate-more-keys.xml | 54 ++++ .../values-is/donottranslate-more-keys.xml | 69 +++++ .../values-it/donottranslate-more-keys.xml | 74 +++++ .../values-iw/donottranslate-more-keys.xml | 57 ++++ .../values-ka/donottranslate-more-keys.xml | 28 ++ .../values-kk/donottranslate-more-keys.xml | 55 ++++ .../values-km/donottranslate-more-keys.xml | 28 ++ .../values-kn/donottranslate-more-keys.xml | 28 ++ .../values-ky/donottranslate-more-keys.xml | 44 +++ .../values-lo/donottranslate-more-keys.xml | 28 ++ .../values-lt/donottranslate-more-keys.xml | 108 +++++++ .../values-lv/donottranslate-more-keys.xml | 107 +++++++ .../values-mk/donottranslate-more-keys.xml | 40 +++ .../values-ml/donottranslate-more-keys.xml | 26 ++ .../values-mn/donottranslate-more-keys.xml | 28 ++ .../values-mr/donottranslate-more-keys.xml | 60 ++++ .../values-my/donottranslate-more-keys.xml | 35 +++ .../values-nb/donottranslate-more-keys.xml | 65 +++++ .../values-ne/donottranslate-more-keys.xml | 65 +++++ .../values-nl/donottranslate-more-keys.xml | 68 +++++ .../values-pl/donottranslate-more-keys.xml | 67 +++++ .../values-pt/donottranslate-more-keys.xml | 65 +++++ .../values-rm/donottranslate-more-keys.xml | 29 ++ .../values-ro/donottranslate-more-keys.xml | 47 +++ .../values-ru/donottranslate-more-keys.xml | 40 +++ .../values-si/donottranslate-more-keys.xml | 27 ++ .../values-sk/donottranslate-more-keys.xml | 110 +++++++ .../values-sl/donottranslate-more-keys.xml | 34 +++ .../donottranslate-more-keys.xml | 42 +++ .../values-sr/donottranslate-more-keys.xml | 61 ++++ .../values-sv/donottranslate-more-keys.xml | 99 +++++++ .../values-sw/donottranslate-more-keys.xml | 65 +++++ .../donottranslate-more-keys.xml | 28 ++ .../donottranslate-more-keys.xml | 28 ++ .../donottranslate-more-keys.xml | 26 ++ .../values-te/donottranslate-more-keys.xml | 28 ++ .../values-th/donottranslate-more-keys.xml | 28 ++ .../values-tl/donottranslate-more-keys.xml | 70 +++++ .../values-tr/donottranslate-more-keys.xml | 69 +++++ .../values-uk/donottranslate-more-keys.xml | 44 +++ .../values-uz/donottranslate-more-keys.xml | 70 +++++ .../values-vi/donottranslate-more-keys.xml | 97 +++++++ .../values-zu/donottranslate-more-keys.xml | 64 +++++ .../values-zz/donottranslate-more-keys.xml | 139 +++++++++ .../values/donottranslate-more-keys.xml | 270 ++++++++++++++++++ 81 files changed, 5509 insertions(+) create mode 100644 tools/build.gradle create mode 100644 tools/make-keyboard-text/build.gradle create mode 100644 tools/make-keyboard-text/src/main/java/com/android/inputmethod/keyboard/tools/ArrayInitializerFormatter.java create mode 100644 tools/make-keyboard-text/src/main/java/com/android/inputmethod/keyboard/tools/JarUtils.java create mode 100644 tools/make-keyboard-text/src/main/java/com/android/inputmethod/keyboard/tools/LocaleUtils.java create mode 100644 tools/make-keyboard-text/src/main/java/com/android/inputmethod/keyboard/tools/MakeKeyboardText.java create mode 100644 tools/make-keyboard-text/src/main/java/com/android/inputmethod/keyboard/tools/MoreKeysResources.java create mode 100644 tools/make-keyboard-text/src/main/java/com/android/inputmethod/keyboard/tools/StringResource.java create mode 100644 tools/make-keyboard-text/src/main/java/com/android/inputmethod/keyboard/tools/StringResourceMap.java create mode 100644 tools/make-keyboard-text/src/main/resources/org/dslul/openboard/inputmethod/keyboard/internal/KeyboardTextsTable.tmpl create mode 100644 tools/make-keyboard-text/src/main/resources/values-af/donottranslate-more-keys.xml create mode 100644 tools/make-keyboard-text/src/main/resources/values-ar/donottranslate-more-keys.xml create mode 100644 tools/make-keyboard-text/src/main/resources/values-az/donottranslate-more-keys.xml create mode 100644 tools/make-keyboard-text/src/main/resources/values-be/donottranslate-more-keys.xml create mode 100644 tools/make-keyboard-text/src/main/resources/values-bg/donottranslate-more-keys.xml create mode 100644 tools/make-keyboard-text/src/main/resources/values-bn-rBD/donottranslate-more-keys.xml create mode 100644 tools/make-keyboard-text/src/main/resources/values-bn-rIN/donottranslate-more-keys.xml create mode 100644 tools/make-keyboard-text/src/main/resources/values-ca/donottranslate-more-keys.xml create mode 100644 tools/make-keyboard-text/src/main/resources/values-cs/donottranslate-more-keys.xml create mode 100644 tools/make-keyboard-text/src/main/resources/values-da/donottranslate-more-keys.xml create mode 100644 tools/make-keyboard-text/src/main/resources/values-de/donottranslate-more-keys.xml create mode 100644 tools/make-keyboard-text/src/main/resources/values-el/donottranslate-more-keys.xml create mode 100644 tools/make-keyboard-text/src/main/resources/values-en/donottranslate-more-keys.xml create mode 100644 tools/make-keyboard-text/src/main/resources/values-eo/donottranslate-more-keys.xml create mode 100644 tools/make-keyboard-text/src/main/resources/values-es/donottranslate-more-keys.xml create mode 100644 tools/make-keyboard-text/src/main/resources/values-et/donottranslate-more-keys.xml create mode 100644 tools/make-keyboard-text/src/main/resources/values-eu/donottranslate-more-keys.xml create mode 100644 tools/make-keyboard-text/src/main/resources/values-fa/donottranslate-more-keys.xml create mode 100644 tools/make-keyboard-text/src/main/resources/values-fi/donottranslate-more-keys.xml create mode 100644 tools/make-keyboard-text/src/main/resources/values-fr/donottranslate-more-keys.xml create mode 100644 tools/make-keyboard-text/src/main/resources/values-gl/donottranslate-more-keys.xml create mode 100644 tools/make-keyboard-text/src/main/resources/values-hi-rZZ/donottranslate-more-keys.xml create mode 100644 tools/make-keyboard-text/src/main/resources/values-hi/donottranslate-more-keys.xml create mode 100644 tools/make-keyboard-text/src/main/resources/values-hr/donottranslate-more-keys.xml create mode 100644 tools/make-keyboard-text/src/main/resources/values-hu/donottranslate-more-keys.xml create mode 100644 tools/make-keyboard-text/src/main/resources/values-hy/donottranslate-more-keys.xml create mode 100644 tools/make-keyboard-text/src/main/resources/values-is/donottranslate-more-keys.xml create mode 100644 tools/make-keyboard-text/src/main/resources/values-it/donottranslate-more-keys.xml create mode 100644 tools/make-keyboard-text/src/main/resources/values-iw/donottranslate-more-keys.xml create mode 100644 tools/make-keyboard-text/src/main/resources/values-ka/donottranslate-more-keys.xml create mode 100644 tools/make-keyboard-text/src/main/resources/values-kk/donottranslate-more-keys.xml create mode 100644 tools/make-keyboard-text/src/main/resources/values-km/donottranslate-more-keys.xml create mode 100644 tools/make-keyboard-text/src/main/resources/values-kn/donottranslate-more-keys.xml create mode 100644 tools/make-keyboard-text/src/main/resources/values-ky/donottranslate-more-keys.xml create mode 100644 tools/make-keyboard-text/src/main/resources/values-lo/donottranslate-more-keys.xml create mode 100644 tools/make-keyboard-text/src/main/resources/values-lt/donottranslate-more-keys.xml create mode 100644 tools/make-keyboard-text/src/main/resources/values-lv/donottranslate-more-keys.xml create mode 100644 tools/make-keyboard-text/src/main/resources/values-mk/donottranslate-more-keys.xml create mode 100644 tools/make-keyboard-text/src/main/resources/values-ml/donottranslate-more-keys.xml create mode 100644 tools/make-keyboard-text/src/main/resources/values-mn/donottranslate-more-keys.xml create mode 100644 tools/make-keyboard-text/src/main/resources/values-mr/donottranslate-more-keys.xml create mode 100644 tools/make-keyboard-text/src/main/resources/values-my/donottranslate-more-keys.xml create mode 100644 tools/make-keyboard-text/src/main/resources/values-nb/donottranslate-more-keys.xml create mode 100644 tools/make-keyboard-text/src/main/resources/values-ne/donottranslate-more-keys.xml create mode 100644 tools/make-keyboard-text/src/main/resources/values-nl/donottranslate-more-keys.xml create mode 100644 tools/make-keyboard-text/src/main/resources/values-pl/donottranslate-more-keys.xml create mode 100644 tools/make-keyboard-text/src/main/resources/values-pt/donottranslate-more-keys.xml create mode 100644 tools/make-keyboard-text/src/main/resources/values-rm/donottranslate-more-keys.xml create mode 100644 tools/make-keyboard-text/src/main/resources/values-ro/donottranslate-more-keys.xml create mode 100644 tools/make-keyboard-text/src/main/resources/values-ru/donottranslate-more-keys.xml create mode 100644 tools/make-keyboard-text/src/main/resources/values-si/donottranslate-more-keys.xml create mode 100644 tools/make-keyboard-text/src/main/resources/values-sk/donottranslate-more-keys.xml create mode 100644 tools/make-keyboard-text/src/main/resources/values-sl/donottranslate-more-keys.xml create mode 100644 tools/make-keyboard-text/src/main/resources/values-sr-rZZ/donottranslate-more-keys.xml create mode 100644 tools/make-keyboard-text/src/main/resources/values-sr/donottranslate-more-keys.xml create mode 100644 tools/make-keyboard-text/src/main/resources/values-sv/donottranslate-more-keys.xml create mode 100644 tools/make-keyboard-text/src/main/resources/values-sw/donottranslate-more-keys.xml create mode 100644 tools/make-keyboard-text/src/main/resources/values-ta-rIN/donottranslate-more-keys.xml create mode 100644 tools/make-keyboard-text/src/main/resources/values-ta-rLK/donottranslate-more-keys.xml create mode 100644 tools/make-keyboard-text/src/main/resources/values-ta-rSG/donottranslate-more-keys.xml create mode 100644 tools/make-keyboard-text/src/main/resources/values-te/donottranslate-more-keys.xml create mode 100644 tools/make-keyboard-text/src/main/resources/values-th/donottranslate-more-keys.xml create mode 100644 tools/make-keyboard-text/src/main/resources/values-tl/donottranslate-more-keys.xml create mode 100644 tools/make-keyboard-text/src/main/resources/values-tr/donottranslate-more-keys.xml create mode 100644 tools/make-keyboard-text/src/main/resources/values-uk/donottranslate-more-keys.xml create mode 100644 tools/make-keyboard-text/src/main/resources/values-uz/donottranslate-more-keys.xml create mode 100644 tools/make-keyboard-text/src/main/resources/values-vi/donottranslate-more-keys.xml create mode 100644 tools/make-keyboard-text/src/main/resources/values-zu/donottranslate-more-keys.xml create mode 100644 tools/make-keyboard-text/src/main/resources/values-zz/donottranslate-more-keys.xml create mode 100644 tools/make-keyboard-text/src/main/resources/values/donottranslate-more-keys.xml diff --git a/settings.gradle b/settings.gradle index e7b4def49..4a955bd2c 100755 --- a/settings.gradle +++ b/settings.gradle @@ -1 +1,3 @@ include ':app' +include ':tools' +include ':tools:make-keyboard-text' diff --git a/tools/build.gradle b/tools/build.gradle new file mode 100644 index 000000000..e69de29bb diff --git a/tools/make-keyboard-text/build.gradle b/tools/make-keyboard-text/build.gradle new file mode 100644 index 000000000..627b17430 --- /dev/null +++ b/tools/make-keyboard-text/build.gradle @@ -0,0 +1,26 @@ +apply plugin: 'java' + +version 'unspecified' + +jar { + manifest { + attributes["Main-Class"] = 'com.android.inputmethod.keyboard.tools.MakeKeyboardText' + } +} + +task makeText(type: JavaExec, dependsOn: ['jar']) { + main = '-jar' + args jar.archiveFile.get() + args '-java' + args project.rootProject.project('app').projectDir.path + File.separator + 'src' + + File.separator + 'main' + File.separator + 'java' +} + +repositories { + mavenCentral() +} + +java { + sourceCompatibility = JavaVersion.VERSION_1_8 + targetCompatibility = JavaVersion.VERSION_1_8 +} \ No newline at end of file diff --git a/tools/make-keyboard-text/src/main/java/com/android/inputmethod/keyboard/tools/ArrayInitializerFormatter.java b/tools/make-keyboard-text/src/main/java/com/android/inputmethod/keyboard/tools/ArrayInitializerFormatter.java new file mode 100644 index 000000000..48bf8010a --- /dev/null +++ b/tools/make-keyboard-text/src/main/java/com/android/inputmethod/keyboard/tools/ArrayInitializerFormatter.java @@ -0,0 +1,104 @@ +/* + * Copyright (C) 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. + */ + +package com.android.inputmethod.keyboard.tools; + +import java.io.PrintStream; + +public class ArrayInitializerFormatter { + private final PrintStream mOut; + private final int mMaxWidth; + private final String mIndent; + // String resource names array; indexed by {@link #CurrentIndex} and + // {@link #mStartIndexOfBuffer}. + private final String[] mResourceNames; + + private int mCurrentIndex = 0; + private String mLastElement; + private final StringBuilder mBuffer = new StringBuilder(); + private int mBufferedLen; + private int mStartIndexOfBuffer = Integer.MIN_VALUE; + + public ArrayInitializerFormatter(final PrintStream out, final int width, final String indent, + final String[] resourceNames) { + mOut = out; + mMaxWidth = width - indent.length(); + mIndent = indent; + mResourceNames = resourceNames; + } + + public int getCurrentIndex() { + return mCurrentIndex; + } + + public void flush() { + if (mBuffer.length() == 0) { + return; + } + final int lastIndex = mCurrentIndex - 1; + if (mStartIndexOfBuffer == lastIndex) { + mOut.format("%s/* %s */ %s\n", + mIndent, mResourceNames[mStartIndexOfBuffer], mBuffer); + } else if (mStartIndexOfBuffer == lastIndex - 1) { + final String startElement = mBuffer.toString() + .substring(0, mBuffer.length() - mLastElement.length()) + .trim(); + mOut.format("%s/* %s */ %s\n" + + "%s/* %s */ %s\n", + mIndent, mResourceNames[mStartIndexOfBuffer], startElement, + mIndent, mResourceNames[lastIndex], mLastElement); + } else { + mOut.format("%s/* %s ~ */\n" + + "%s%s\n" + + "%s/* ~ %s */\n", + mIndent, mResourceNames[mStartIndexOfBuffer], + mIndent, mBuffer, + mIndent, mResourceNames[lastIndex]); + } + mBuffer.setLength(0); + mBufferedLen = 0; + } + + public void outCommentLines(final String lines) { + flush(); + mOut.print(lines); + mLastElement = null; + } + + public void outElement(final String element) { + if (!element.equals(mLastElement)) { + flush(); + mStartIndexOfBuffer = mCurrentIndex; + } + final int nextLen = mBufferedLen + " ".length() + element.length(); + if (mBufferedLen != 0 && nextLen < mMaxWidth) { + // Element can fit in the current line. + mBuffer.append(' '); + mBuffer.append(element); + mBufferedLen = nextLen; + } else { + // Element should be on the next line. + if (mBufferedLen != 0) { + mBuffer.append('\n'); + mBuffer.append(mIndent); + } + mBuffer.append(element); + mBufferedLen = element.length(); + } + mCurrentIndex++; + mLastElement = element; + } +} diff --git a/tools/make-keyboard-text/src/main/java/com/android/inputmethod/keyboard/tools/JarUtils.java b/tools/make-keyboard-text/src/main/java/com/android/inputmethod/keyboard/tools/JarUtils.java new file mode 100644 index 000000000..00356ec16 --- /dev/null +++ b/tools/make-keyboard-text/src/main/java/com/android/inputmethod/keyboard/tools/JarUtils.java @@ -0,0 +1,117 @@ +/* + * Copyright (C) 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. + */ + +package com.android.inputmethod.keyboard.tools; + +import java.io.Closeable; +import java.io.IOException; +import java.io.InputStream; +import java.io.UnsupportedEncodingException; +import java.net.URL; +import java.net.URLDecoder; +import java.util.ArrayList; +import java.util.Enumeration; +import java.util.Locale; +import java.util.jar.JarEntry; +import java.util.jar.JarFile; + +public final class JarUtils { + private JarUtils() { + // This utility class is not publicly instantiable. + } + + public static JarFile getJarFile(final Class mainClass) { + final String mainClassPath = "/" + mainClass.getName().replace('.', '/') + ".class"; + final URL resUrl = mainClass.getResource(mainClassPath); + if (!resUrl.getProtocol().equals("jar")) { + throw new RuntimeException("Should run as jar and not as " + resUrl.getProtocol()); + } + final String path = resUrl.getPath(); + if (!path.startsWith("file:")) { + throw new RuntimeException("Unknown jar path: " + path); + } + final String jarPath = path.substring("file:".length(), path.indexOf('!')); + try { + return new JarFile(URLDecoder.decode(jarPath, "UTF-8")); + } catch (UnsupportedEncodingException e) { + } catch (IOException e) { + } + return null; + } + + public static InputStream openResource(final String name) { + return JarUtils.class.getResourceAsStream("/" + name); + } + + public interface JarFilter { + public boolean accept(String dirName, String name); + } + + public static ArrayList getEntryNameListing(final JarFile jar, final JarFilter filter) { + final ArrayList result = new ArrayList<>(); + final Enumeration entries = jar.entries(); + while (entries.hasMoreElements()) { + final JarEntry entry = entries.nextElement(); + final String path = entry.getName(); + final int pos = path.lastIndexOf('/'); + final String dirName = (pos >= 0) ? path.substring(0, pos) : ""; + final String name = (pos >= 0) ? path.substring(pos + 1) : path; + if (filter.accept(dirName, name)) { + result.add(path); + } + } + return result; + } + + public static ArrayList getEntryNameListing(final JarFile jar, + final String filterName) { + return getEntryNameListing(jar, new JarFilter() { + @Override + public boolean accept(final String dirName, final String name) { + return name.equals(filterName); + } + }); + } + + // The locale is taken from string resource jar entry name (values-/) + // or {@link LocaleUtils#DEFAULT_LOCALE} for the default string resource + // directory (values/). + public static Locale getLocaleFromEntryName(final String jarEntryName) { + final String dirName = jarEntryName.substring(0, jarEntryName.lastIndexOf('/')); + final int pos = dirName.lastIndexOf('/'); + final String parentName = (pos >= 0) ? dirName.substring(pos + 1) : dirName; + final int localePos = parentName.indexOf('-'); + if (localePos < 0) { + // Default resource name. + return LocaleUtils.DEFAULT_LOCALE; + } + final String localeStr = parentName.substring(localePos + 1); + final int regionPos = localeStr.indexOf("-r"); + if (regionPos < 0) { + return LocaleUtils.constructLocaleFromString(localeStr); + } + return LocaleUtils.constructLocaleFromString(localeStr.replace("-r", "_")); + } + + public static void close(final Closeable stream) { + try { + if (stream != null) { + stream.close(); + } + } catch (IOException e) { + } + } +} diff --git a/tools/make-keyboard-text/src/main/java/com/android/inputmethod/keyboard/tools/LocaleUtils.java b/tools/make-keyboard-text/src/main/java/com/android/inputmethod/keyboard/tools/LocaleUtils.java new file mode 100644 index 000000000..c1a7ec5eb --- /dev/null +++ b/tools/make-keyboard-text/src/main/java/com/android/inputmethod/keyboard/tools/LocaleUtils.java @@ -0,0 +1,167 @@ +/* + * 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.keyboard.tools; + +import java.util.HashMap; +import java.util.Locale; + +/** + * A class to help with handling Locales in string form. + * + * This is a subset of com/android/inputmethod/latin/utils/LocaleUtils.java in order to use + * for the make-keyboard-text tool. + */ +public final class LocaleUtils { + public static final Locale DEFAULT_LOCALE = Locale.ROOT; + private static final String DEFAULT_LOCALE_CODE = "DEFAULT"; + public static final String NO_LANGUAGE_LOCALE_CODE = "zz"; + public static final String NO_LANGUAGE_LOCALE_DISPLAY_NAME = "Alphabet"; + + private LocaleUtils() { + // Intentional empty constructor for utility class. + } + + private static final HashMap sLocaleCache = new HashMap<>(); + + private static final int INDEX_LANGUAGE = 0; + private static final int INDEX_SCRIPT = 1; + private static final int INDEX_REGION = 2; + private static final int ELEMENT_LIMIT = INDEX_REGION + 1; + + /** + * Creates a locale from a string specification. + * + * Locale string is: language(_script)?(_region)? + * where: language := [a-zA-Z]{2,3} + * script := [a-zA-Z]{4} + * region := [a-zA-Z]{2,3}|[0-9]{3} + */ + public static Locale constructLocaleFromString(final String localeStr) { + if (localeStr == null) { + return null; + } + synchronized (sLocaleCache) { + if (sLocaleCache.containsKey(localeStr)) { + return sLocaleCache.get(localeStr); + } + boolean hasRegion = false; + final Locale.Builder builder = new Locale.Builder(); + final String[] localeElements = localeStr.split("_", ELEMENT_LIMIT); + if (localeElements.length > INDEX_LANGUAGE) { + final String text = localeElements[INDEX_LANGUAGE]; + if (isValidLanguage(text)) { + builder.setLanguage(text); + } else { + throw new RuntimeException("Unknown locale format: " + localeStr); + } + } + if (localeElements.length > INDEX_SCRIPT) { + final String text = localeElements[INDEX_SCRIPT]; + if (isValidScript(text)) { + builder.setScript(text); + } else if (isValidRegion(text)) { + builder.setRegion(text); + hasRegion = true; + } else { + throw new RuntimeException("Unknown locale format: " + localeStr); + } + } + if (localeElements.length > INDEX_REGION) { + final String text = localeElements[INDEX_REGION]; + if (!hasRegion && isValidRegion(text)) { + builder.setRegion(text); + } else { + throw new RuntimeException("Unknown locale format: " + localeStr); + } + } + final Locale locale = builder.build(); + sLocaleCache.put(localeStr, locale); + return locale; + } + } + + private static final int MIN_LENGTH_OF_LANGUAGE = 2; + private static final int MAX_LENGTH_OF_LANGUAGE = 2; + private static final int LENGTH_OF_SCRIPT = 4; + private static final int MIN_LENGTH_OF_REGION = 2; + private static final int MAX_LENGTH_OF_REGION = 2; + private static final int LENGTH_OF_AREA_CODE = 3; + + private static boolean isValidLanguage(final String text) { + return isAlphabetSequence(text, MIN_LENGTH_OF_LANGUAGE, MAX_LENGTH_OF_LANGUAGE); + } + + private static boolean isValidScript(final String text) { + return isAlphabetSequence(text, LENGTH_OF_SCRIPT, LENGTH_OF_SCRIPT); + } + + private static boolean isValidRegion(final String text) { + return isAlphabetSequence(text, MIN_LENGTH_OF_REGION, MAX_LENGTH_OF_REGION) + || isDigitSequence(text, LENGTH_OF_AREA_CODE, LENGTH_OF_AREA_CODE); + } + + private static boolean isAlphabetSequence(final String text, final int lower, final int upper) { + final int length = text.length(); + if (length < lower || length > upper) { + return false; + } + for (int index = 0; index < length; index++) { + if (!isAsciiAlphabet(text.charAt(index))) { + return false; + } + } + return true; + } + + private static boolean isDigitSequence(final String text, final int lower, final int upper) { + final int length = text.length(); + if (length < lower || length > upper) { + return false; + } + for (int index = 0; index < length; ++index) { + if (!isAsciiDigit(text.charAt(index))) { + return false; + } + } + return true; + } + + private static boolean isAsciiAlphabet(char c) { + return (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z'); + } + + private static boolean isAsciiDigit(char c) { + return c >= '0' && c <= '9'; + } + + public static String getLocaleCode(final Locale locale) { + if (locale == DEFAULT_LOCALE) { + return DEFAULT_LOCALE_CODE; + } + return locale.toString(); + } + + public static String getLocaleDisplayName(final Locale locale) { + if (locale == DEFAULT_LOCALE) { + return DEFAULT_LOCALE_CODE; + } + if (locale.getLanguage().equals(NO_LANGUAGE_LOCALE_CODE)) { + return NO_LANGUAGE_LOCALE_DISPLAY_NAME; + } + return locale.getDisplayName(Locale.ENGLISH); + } +} diff --git a/tools/make-keyboard-text/src/main/java/com/android/inputmethod/keyboard/tools/MakeKeyboardText.java b/tools/make-keyboard-text/src/main/java/com/android/inputmethod/keyboard/tools/MakeKeyboardText.java new file mode 100644 index 000000000..6c15ce6bf --- /dev/null +++ b/tools/make-keyboard-text/src/main/java/com/android/inputmethod/keyboard/tools/MakeKeyboardText.java @@ -0,0 +1,65 @@ +/* + * Copyright (C) 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. + */ + +package com.android.inputmethod.keyboard.tools; + +import java.util.Arrays; +import java.util.LinkedList; +import java.util.NoSuchElementException; +import java.util.jar.JarFile; + +public class MakeKeyboardText { + static class Options { + private static final String OPTION_JAVA = "-java"; + + public final String mJava; + + public static void usage(String message) { + if (message != null) { + System.err.println(message); + } + System.err.println("usage: make-keyboard-text " + OPTION_JAVA + " "); + System.exit(1); + } + + public Options(final String[] argsArray) { + final LinkedList args = new LinkedList<>(Arrays.asList(argsArray)); + String arg = null; + String java = null; + try { + while (!args.isEmpty()) { + arg = args.removeFirst(); + if (arg.equals(OPTION_JAVA)) { + java = args.removeFirst(); + } else { + usage("Unknown option: " + arg); + } + } + } catch (NoSuchElementException e) { + usage("Option " + arg + " needs argument"); + } + + mJava = java; + } + } + + public static void main(final String[] args) { + final Options options = new Options(args); + final JarFile jar = JarUtils.getJarFile(MakeKeyboardText.class); + final MoreKeysResources resources = new MoreKeysResources(jar); + resources.writeToJava(options.mJava); + } +} diff --git a/tools/make-keyboard-text/src/main/java/com/android/inputmethod/keyboard/tools/MoreKeysResources.java b/tools/make-keyboard-text/src/main/java/com/android/inputmethod/keyboard/tools/MoreKeysResources.java new file mode 100644 index 000000000..563acc57e --- /dev/null +++ b/tools/make-keyboard-text/src/main/java/com/android/inputmethod/keyboard/tools/MoreKeysResources.java @@ -0,0 +1,255 @@ +/* + * Copyright (C) 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. + */ + +package com.android.inputmethod.keyboard.tools; + +import java.io.File; +import java.io.IOException; +import java.io.InputStreamReader; +import java.io.LineNumberReader; +import java.io.PrintStream; +import java.util.ArrayList; +import java.util.Collections; +import java.util.Comparator; +import java.util.HashMap; +import java.util.Locale; +import java.util.TreeMap; +import java.util.jar.JarFile; + +public class MoreKeysResources { + private static final String TEXT_RESOURCE_NAME = "donottranslate-more-keys.xml"; + + private static final String JAVA_TEMPLATE = "KeyboardTextsTable.tmpl"; + private static final String MARK_NAMES = "@NAMES@"; + private static final String MARK_DEFAULT_TEXTS = "@DEFAULT_TEXTS@"; + private static final String MARK_TEXTS = "@TEXTS@"; + private static final String TEXTS_ARRAY_NAME_PREFIX = "TEXTS_"; + private static final String MARK_LOCALES_AND_TEXTS = "@LOCALES_AND_TEXTS@"; + private static final String EMPTY_STRING_VAR = "EMPTY"; + + private final JarFile mJar; + // String resources maps sorted by its language. The language is determined from the jar entry + // name by calling {@link JarUtils#getLocaleFromEntryName(String)}. + private final TreeMap mResourcesMap = new TreeMap<>(); + // Default string resources map. + private final StringResourceMap mDefaultResourceMap; + // Histogram of string resource names. This is used to sort {@link #mSortedResourceNames}. + private final HashMap mNameHistogram = new HashMap<>(); + // Sorted string resource names array; Descending order of histogram count. + // The string resource name is specified as an attribute "name" in string resource files. + // The string resource can be accessed by specifying name "!text/" + // via {@link KeyboardTextsSet#getText(String)}. + private final String[] mSortedResourceNames; + + public MoreKeysResources(final JarFile jar) { + mJar = jar; + final ArrayList resourceEntryNames = JarUtils.getEntryNameListing( + jar, TEXT_RESOURCE_NAME); + for (final String entryName : resourceEntryNames) { + final StringResourceMap resMap = new StringResourceMap(entryName); + mResourcesMap.put(LocaleUtils.getLocaleCode(resMap.mLocale), resMap); + } + mDefaultResourceMap = mResourcesMap.get( + LocaleUtils.getLocaleCode(LocaleUtils.DEFAULT_LOCALE)); + + // Initialize name histogram and names list. + final HashMap nameHistogram = mNameHistogram; + final ArrayList resourceNamesList = new ArrayList<>(); + for (final StringResource res : mDefaultResourceMap.getResources()) { + nameHistogram.put(res.mName, 0); // Initialize histogram value. + resourceNamesList.add(res.mName); + } + // Make name histogram. + for (final String locale : mResourcesMap.keySet()) { + final StringResourceMap resMap = mResourcesMap.get(locale); + if (resMap == mDefaultResourceMap) continue; + for (final StringResource res : resMap.getResources()) { + if (!mDefaultResourceMap.contains(res.mName)) { + throw new RuntimeException(res.mName + " in " + locale + + " doesn't have default resource"); + } + final int histogramValue = nameHistogram.get(res.mName); + nameHistogram.put(res.mName, histogramValue + 1); + } + } + // Sort names list. + Collections.sort(resourceNamesList, new Comparator() { + @Override + public int compare(final String leftName, final String rightName) { + final int leftCount = nameHistogram.get(leftName); + final int rightCount = nameHistogram.get(rightName); + // Descending order of histogram count. + if (leftCount > rightCount) return -1; + if (leftCount < rightCount) return 1; + // TODO: Add further criteria to order the same histogram value names to be able to + // minimize footprints of string resources arrays. + return 0; + } + }); + mSortedResourceNames = resourceNamesList.toArray(new String[resourceNamesList.size()]); + } + + public void writeToJava(final String outDir) { + final ArrayList list = JarUtils.getEntryNameListing(mJar, JAVA_TEMPLATE); + if (list.isEmpty()) { + throw new RuntimeException("Can't find java template " + JAVA_TEMPLATE); + } + if (list.size() > 1) { + throw new RuntimeException("Found multiple java template " + JAVA_TEMPLATE); + } + final String template = list.get(0); + final String javaPackage = template.substring(0, template.lastIndexOf('/')); + PrintStream ps = null; + LineNumberReader lnr = null; + try { + if (outDir == null) { + ps = System.out; + } else { + final File outPackage = new File(outDir, javaPackage); + final File outputFile = new File(outPackage, + JAVA_TEMPLATE.replace(".tmpl", ".java")); + outPackage.mkdirs(); + ps = new PrintStream(outputFile, "UTF-8"); + } + lnr = new LineNumberReader(new InputStreamReader(JarUtils.openResource(template))); + inflateTemplate(lnr, ps); + } catch (IOException e) { + throw new RuntimeException(e); + } finally { + JarUtils.close(lnr); + JarUtils.close(ps); + } + } + + private void inflateTemplate(final LineNumberReader in, final PrintStream out) + throws IOException { + String line; + while ((line = in.readLine()) != null) { + if (line.contains(MARK_NAMES)) { + dumpNames(out); + } else if (line.contains(MARK_DEFAULT_TEXTS)) { + dumpDefaultTexts(out); + } else if (line.contains(MARK_TEXTS)) { + dumpTexts(out); + } else if (line.contains(MARK_LOCALES_AND_TEXTS)) { + dumpLocalesMap(out); + } else { + out.println(line); + } + } + } + + private void dumpNames(final PrintStream out) { + final int namesCount = mSortedResourceNames.length; + for (int index = 0; index < namesCount; index++) { + final String name = mSortedResourceNames[index]; + final int histogramValue = mNameHistogram.get(name); + out.format(" /* %3d:%2d */ \"%s\",\n", index, histogramValue, name); + } + } + + private void dumpDefaultTexts(final PrintStream out) { + final int outputArraySize = dumpTextsInternal(out, mDefaultResourceMap); + mDefaultResourceMap.setOutputArraySize(outputArraySize); + } + + private static String getArrayNameForLocale(final Locale locale) { + return TEXTS_ARRAY_NAME_PREFIX + LocaleUtils.getLocaleCode(locale); + } + + private void dumpTexts(final PrintStream out) { + for (final StringResourceMap resMap : mResourcesMap.values()) { + final Locale locale = resMap.mLocale; + if (resMap == mDefaultResourceMap) continue; + out.format(" /* Locale %s: %s */\n", + locale, LocaleUtils.getLocaleDisplayName(locale)); + out.format(" private static final String[] " + getArrayNameForLocale(locale) + + " = {\n"); + final int outputArraySize = dumpTextsInternal(out, resMap); + resMap.setOutputArraySize(outputArraySize); + out.format(" };\n\n"); + } + } + + private void dumpLocalesMap(final PrintStream out) { + for (final StringResourceMap resMap : mResourcesMap.values()) { + final Locale locale = resMap.mLocale; + final String localeStr = LocaleUtils.getLocaleCode(locale); + final String localeToDump = (locale == LocaleUtils.DEFAULT_LOCALE) + ? String.format("\"%s\"", localeStr) + : String.format("\"%s\"%s", localeStr, " ".substring(localeStr.length())); + out.format(" %s, %-12s /* %3d/%3d %s */\n", + localeToDump, getArrayNameForLocale(locale) + ",", + resMap.getResources().size(), resMap.getOutputArraySize(), + LocaleUtils.getLocaleDisplayName(locale)); + } + } + + private int dumpTextsInternal(final PrintStream out, final StringResourceMap resMap) { + final ArrayInitializerFormatter formatter = + new ArrayInitializerFormatter(out, 100, " ", mSortedResourceNames); + int outputArraySize = 0; + boolean successiveNull = false; + final int namesCount = mSortedResourceNames.length; + for (int index = 0; index < namesCount; index++) { + final String name = mSortedResourceNames[index]; + final StringResource res = resMap.get(name); + if (res != null) { + // TODO: Check whether the resource value is equal to the default. + if (res.mComment != null) { + formatter.outCommentLines(addPrefix(" // ", res. mComment)); + } + final String escaped = escapeNonAscii(res.mValue); + if (escaped.length() == 0) { + formatter.outElement(EMPTY_STRING_VAR + ","); + } else { + formatter.outElement(String.format("\"%s\",", escaped)); + } + successiveNull = false; + outputArraySize = formatter.getCurrentIndex(); + } else { + formatter.outElement("null,"); + successiveNull = true; + } + } + if (!successiveNull) { + formatter.flush(); + } + return outputArraySize; + } + + private static String addPrefix(final String prefix, final String lines) { + final StringBuilder sb = new StringBuilder(); + for (final String line : lines.split("\n")) { + sb.append(prefix + line.trim() + "\n"); + } + return sb.toString(); + } + + private static String escapeNonAscii(final String text) { + final StringBuilder sb = new StringBuilder(); + final int length = text.length(); + for (int i = 0; i < length; i++) { + final char c = text.charAt(i); + if (c >= ' ' && c < 0x7f) { + sb.append(c); + } else { + sb.append(String.format("\\u%04X", (int)c)); + } + } + return sb.toString(); + } +} diff --git a/tools/make-keyboard-text/src/main/java/com/android/inputmethod/keyboard/tools/StringResource.java b/tools/make-keyboard-text/src/main/java/com/android/inputmethod/keyboard/tools/StringResource.java new file mode 100644 index 000000000..a49b8fe70 --- /dev/null +++ b/tools/make-keyboard-text/src/main/java/com/android/inputmethod/keyboard/tools/StringResource.java @@ -0,0 +1,29 @@ +/* + * Copyright (C) 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. + */ + +package com.android.inputmethod.keyboard.tools; + +public class StringResource { + public final String mName; + public final String mValue; + public final String mComment; + + public StringResource(final String name, final String value, final String comment) { + mName = name; + mValue = value; + mComment = comment; + } +} diff --git a/tools/make-keyboard-text/src/main/java/com/android/inputmethod/keyboard/tools/StringResourceMap.java b/tools/make-keyboard-text/src/main/java/com/android/inputmethod/keyboard/tools/StringResourceMap.java new file mode 100644 index 000000000..cf44f2cad --- /dev/null +++ b/tools/make-keyboard-text/src/main/java/com/android/inputmethod/keyboard/tools/StringResourceMap.java @@ -0,0 +1,158 @@ +/* + * Copyright (C) 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. + */ + +package com.android.inputmethod.keyboard.tools; + +import org.xml.sax.Attributes; +import org.xml.sax.SAXException; +import org.xml.sax.SAXParseException; +import org.xml.sax.ext.DefaultHandler2; + +import java.io.IOException; +import java.io.InputStream; +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashMap; +import java.util.List; +import java.util.Locale; +import java.util.Map; + +import javax.xml.parsers.ParserConfigurationException; +import javax.xml.parsers.SAXParser; +import javax.xml.parsers.SAXParserFactory; + +public class StringResourceMap { + // Locale of this string resource map. + public final Locale mLocale; + // String resource list. + private final List mResources; + // Name to string resource map. + private final Map mResourcesMap; + + // The length of String[] that is created from this {@link StringResourceMap}. The length is + // calculated in {@link MoreKeysResources#dumpTexts(OutputStream)} and recorded by + // {@link #setOutputArraySize(int)}. The recorded length is used as a part of comment by + // {@link MoreKeysResources#dumpLocaleMap(OutputStream)} via {@link #getOutputArraySize()}. + private int mOutputArraySize; + + public StringResourceMap(final String jarEntryName) { + mLocale = JarUtils.getLocaleFromEntryName(jarEntryName); + final StringResourceHandler handler = new StringResourceHandler(); + final SAXParserFactory factory = SAXParserFactory.newInstance(); + factory.setNamespaceAware(true); + final InputStream stream = JarUtils.openResource(jarEntryName); + try { + final SAXParser parser = factory.newSAXParser(); + // In order to get comment tag. + parser.setProperty("http://xml.org/sax/properties/lexical-handler", handler); + parser.parse(stream, handler); + } catch (ParserConfigurationException e) { + throw new RuntimeException(e.getMessage(), e); + } catch (SAXParseException e) { + throw new RuntimeException(e.getMessage() + " at line " + e.getLineNumber() + + ", column " + e.getColumnNumber(), e); + } catch (SAXException e) { + throw new RuntimeException(e.getMessage(), e); + } catch (IOException e) { + throw new RuntimeException(e.getMessage(), e); + } finally { + JarUtils.close(stream); + } + + mResources = Collections.unmodifiableList(handler.mResources); + final HashMap map = new HashMap<>(); + for (final StringResource res : mResources) { + map.put(res.mName, res); + } + mResourcesMap = map; + } + + public List getResources() { + return mResources; + } + + public boolean contains(final String name) { + return mResourcesMap.containsKey(name); + } + + public StringResource get(final String name) { + return mResourcesMap.get(name); + } + + public void setOutputArraySize(final int arraySize) { + mOutputArraySize = arraySize; + } + + public int getOutputArraySize() { + return mOutputArraySize; + } + + static class StringResourceHandler extends DefaultHandler2 { + private static final String TAG_RESOURCES = "resources"; + private static final String TAG_STRING = "string"; + private static final String ATTR_NAME = "name"; + + final ArrayList mResources = new ArrayList<>(); + + private String mName; + private final StringBuilder mValue = new StringBuilder(); + private final StringBuilder mComment = new StringBuilder(); + + private void init() { + mName = null; + mComment.setLength(0); + } + + @Override + public void comment(char[] ch, int start, int length) { + mComment.append(ch, start, length); + if (ch[start + length - 1] != '\n') { + mComment.append('\n'); + } + } + + @Override + public void startElement(String uri, String localName, String qName, Attributes attr) { + if (TAG_RESOURCES.equals(localName)) { + init(); + } else if (TAG_STRING.equals(localName)) { + mName = attr.getValue(ATTR_NAME); + mValue.setLength(0); + } + } + + @Override + public void characters(char[] ch, int start, int length) { + mValue.append(ch, start, length); + } + + @Override + public void endElement(String uri, String localName, String qName) throws SAXException { + if (TAG_STRING.equals(localName)) { + if (mName == null) + throw new SAXException(TAG_STRING + " doesn't have name"); + final String comment = mComment.length() > 0 ? mComment.toString() : null; + String value = mValue.toString(); + if (value.startsWith("\"") && value.endsWith("\"")) { + // Trim surroundings double quote. + value = value.substring(1, value.length() - 1); + } + mResources.add(new StringResource(mName, value, comment)); + init(); + } + } + } +} diff --git a/tools/make-keyboard-text/src/main/resources/org/dslul/openboard/inputmethod/keyboard/internal/KeyboardTextsTable.tmpl b/tools/make-keyboard-text/src/main/resources/org/dslul/openboard/inputmethod/keyboard/internal/KeyboardTextsTable.tmpl new file mode 100644 index 000000000..3e55aab90 --- /dev/null +++ b/tools/make-keyboard-text/src/main/resources/org/dslul/openboard/inputmethod/keyboard/internal/KeyboardTextsTable.tmpl @@ -0,0 +1,112 @@ +/* + * Copyright (C) 2014 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 org.dslul.openboard.inputmethod.keyboard.internal; + +import java.util.HashMap; +import java.util.Locale; + +/** + * !!!!! DO NOT EDIT THIS FILE !!!!! + * + * This file is generated by tools/make-keyboard-text. The base template file is + * tools/make-keyboard-text/src/main/resources/org/dslul/openboard/inputmethod/keyboard/ + * internal/KeyboardTextsTable.tmpl + * + * This file must be updated when any text resources in keyboard layout files have been changed. + * These text resources are referred as "!text/" in keyboard XML definitions, + * and should be defined in + * tools/make-keyboard-text/src/main/resources/values-/donottranslate-more-keys.xml + * + * To update this file, please run the following commands. + * $ gradle :tools:make-keyboard-text:makeText + * + * The updated source file will be generated to the following path (this file). + * app/src/main/java/org/dslul/openboard/inputmethod/keyboard/internal/KeyboardTextsTable.java + * + */ +public final class KeyboardTextsTable { + // Name to index map. + private static final HashMap sNameToIndexesMap = new HashMap<>(); + // Locale to texts table map. + private static final HashMap sLocaleToTextsTableMap = new HashMap<>(); + // TODO: Remove this variable after debugging. + // Texts table to locale maps. + private static final HashMap sTextsTableToLocaleMap = new HashMap<>(); + + public static String getText(final String name, final String[] textsTable) { + final Integer indexObj = sNameToIndexesMap.get(name); + if (indexObj == null) { + throw new RuntimeException("Unknown text name=" + name + " locale=" + + sTextsTableToLocaleMap.get(textsTable)); + } + final int index = indexObj; + final String text = (index < textsTable.length) ? textsTable[index] : null; + if (text != null) { + return text; + } + // Validity check. + if (index >= 0 && index < TEXTS_DEFAULT.length) { + return TEXTS_DEFAULT[index]; + } + // Throw exception for debugging purpose. + throw new RuntimeException("Illegal index=" + index + " for name=" + name + + " locale=" + sTextsTableToLocaleMap.get(textsTable)); + } + + public static String[] getTextsTable(final Locale locale) { + final String localeKey = locale.toString(); + if (sLocaleToTextsTableMap.containsKey(localeKey)) { + return sLocaleToTextsTableMap.get(localeKey); + } + final String languageKey = locale.getLanguage(); + if (sLocaleToTextsTableMap.containsKey(languageKey)) { + return sLocaleToTextsTableMap.get(languageKey); + } + return TEXTS_DEFAULT; + } + + private static final String[] NAMES = { + // /* index:histogram */ "name", + /* @NAMES@ */ + }; + + private static final String EMPTY = ""; + + /* Default texts */ + private static final String[] TEXTS_DEFAULT = { + /* @DEFAULT_TEXTS@ */ + }; + + /* @TEXTS@ */ + private static final Object[] LOCALES_AND_TEXTS = { + // "locale", TEXT_ARRAY, /* numberOfNonNullText/lengthOf_TEXT_ARRAY localeName */ + /* @LOCALES_AND_TEXTS@ */ + }; + + static { + for (int index = 0; index < NAMES.length; index++) { + sNameToIndexesMap.put(NAMES[index], index); + } + + for (int i = 0; i < LOCALES_AND_TEXTS.length; i += 2) { + final String locale = (String)LOCALES_AND_TEXTS[i]; + final String[] textsTable = (String[])LOCALES_AND_TEXTS[i + 1]; + sLocaleToTextsTableMap.put(locale, textsTable); + sTextsTableToLocaleMap.put(textsTable, locale); + } + } +} \ No newline at end of file diff --git a/tools/make-keyboard-text/src/main/resources/values-af/donottranslate-more-keys.xml b/tools/make-keyboard-text/src/main/resources/values-af/donottranslate-more-keys.xml new file mode 100644 index 000000000..45acb7e57 --- /dev/null +++ b/tools/make-keyboard-text/src/main/resources/values-af/donottranslate-more-keys.xml @@ -0,0 +1,68 @@ + + + + + + á,â,ä,à,æ,ã,å,ā + + é,è,ê,ë,ę,ė,ē + + í,ì,ï,î,į,ī,ij + + ó,ô,ö,ò,õ,œ,ø,ō + + ú,û,ü,ù,ū + + ñ,ń + + ý,ij + diff --git a/tools/make-keyboard-text/src/main/resources/values-ar/donottranslate-more-keys.xml b/tools/make-keyboard-text/src/main/resources/values-ar/donottranslate-more-keys.xml new file mode 100644 index 000000000..ab78f45c6 --- /dev/null +++ b/tools/make-keyboard-text/src/main/resources/values-ar/donottranslate-more-keys.xml @@ -0,0 +1,132 @@ + + + + + أ‌ب‌ج + + ١ + + ٢ + + ٣ + + ٤ + + ٥ + + ٦ + + ٧ + + ٨ + + ٩ + + ٠ + + ٣٢١؟ + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + + 0,٫,٬ + + ، + + ّ + !text/morekeys_arabic_diacritics + ّ + !text/morekeys_arabic_diacritics + ؟ + ؛ + + ٪ + + ?,¿ + ; + + \\%,‰ + + "،" + "؟" + "!fixedColumnOrder!4,:,!,؟,؛,-,\",\'" + + + + ★,٭ + + + !fixedColumnOrder!4,﴾|﴿,!text/keyspecs_left_parenthesis_more_keys + !fixedColumnOrder!4,﴿|﴾,!text/keyspecs_right_parenthesis_more_keys + + (|) + )|( + [|] + ]|[ + {|} + }|{ + <|> + >|< + ≤|≥ + ≥|≤ + «|» + »|« + ‹|› + ›|‹ + + + + + "!fixedColumnOrder!7, ٕ|ٕ, ٔ|ٔ, ْ|ْ, ٍ|ٍ, ٌ|ٌ, ً|ً, ّ|ّ, ٖ|ٖ, ٰ|ٰ, ٓ|ٓ, ِ|ِ, ُ|ُ, َ|َ,ـــ|ـ" + diff --git a/tools/make-keyboard-text/src/main/resources/values-az/donottranslate-more-keys.xml b/tools/make-keyboard-text/src/main/resources/values-az/donottranslate-more-keys.xml new file mode 100644 index 000000000..52fe5658c --- /dev/null +++ b/tools/make-keyboard-text/src/main/resources/values-az/donottranslate-more-keys.xml @@ -0,0 +1,70 @@ + + + + + + â,ä,á + + ə,é + + ı,î,ï,ì,í,į,ī + + ö,ô,œ,ò,ó,õ,ø,ō + + ü,û,ù,ú,ū + + ş,ß,ś,š + + ğ + + ň,ñ + + ç,ć,č + + ý + + ž + diff --git a/tools/make-keyboard-text/src/main/resources/values-be/donottranslate-more-keys.xml b/tools/make-keyboard-text/src/main/resources/values-be/donottranslate-more-keys.xml new file mode 100644 index 000000000..52ada29d9 --- /dev/null +++ b/tools/make-keyboard-text/src/main/resources/values-be/donottranslate-more-keys.xml @@ -0,0 +1,40 @@ + + + + + ў + + ы + + э + + і + + ё + + ъ + + АБВ + !text/single_9qm_lqm + !text/double_9qm_lqm + diff --git a/tools/make-keyboard-text/src/main/resources/values-bg/donottranslate-more-keys.xml b/tools/make-keyboard-text/src/main/resources/values-bg/donottranslate-more-keys.xml new file mode 100644 index 000000000..8a98b1227 --- /dev/null +++ b/tools/make-keyboard-text/src/main/resources/values-bg/donottranslate-more-keys.xml @@ -0,0 +1,28 @@ + + + + + АБВ + + !text/double_9qm_lqm + diff --git a/tools/make-keyboard-text/src/main/resources/values-bn-rBD/donottranslate-more-keys.xml b/tools/make-keyboard-text/src/main/resources/values-bn-rBD/donottranslate-more-keys.xml new file mode 100644 index 000000000..4955cd46a --- /dev/null +++ b/tools/make-keyboard-text/src/main/resources/values-bn-rBD/donottranslate-more-keys.xml @@ -0,0 +1,28 @@ + + + + + কখগ + + + diff --git a/tools/make-keyboard-text/src/main/resources/values-bn-rIN/donottranslate-more-keys.xml b/tools/make-keyboard-text/src/main/resources/values-bn-rIN/donottranslate-more-keys.xml new file mode 100644 index 000000000..1ec4249d0 --- /dev/null +++ b/tools/make-keyboard-text/src/main/resources/values-bn-rIN/donottranslate-more-keys.xml @@ -0,0 +1,28 @@ + + + + + কখগ + + + diff --git a/tools/make-keyboard-text/src/main/resources/values-ca/donottranslate-more-keys.xml b/tools/make-keyboard-text/src/main/resources/values-ca/donottranslate-more-keys.xml new file mode 100644 index 000000000..125f08f26 --- /dev/null +++ b/tools/make-keyboard-text/src/main/resources/values-ca/donottranslate-more-keys.xml @@ -0,0 +1,78 @@ + + + + + à,á,ä,â,ã,å,ą,æ,ā,ª + + è,é,ë,ê,ę,ė,ē + + í,ï,ì,î,į,ī + + ò,ó,ö,ô,õ,ø,œ,ō,º + + ú,ü,ù,û,ū + + ñ,ń + + ç,ć,č + + l·l,ł + + "!autoColumnOrder!9,\\,,?,!,·,#,),(,/,;,',@,:,-,\",+,\\%,&" + "!autoColumnOrder!8,\\,,',·,#,),(,/,;,@,:,-,\",+,\\%,&" + + ç + diff --git a/tools/make-keyboard-text/src/main/resources/values-cs/donottranslate-more-keys.xml b/tools/make-keyboard-text/src/main/resources/values-cs/donottranslate-more-keys.xml new file mode 100644 index 000000000..1a27783e9 --- /dev/null +++ b/tools/make-keyboard-text/src/main/resources/values-cs/donottranslate-more-keys.xml @@ -0,0 +1,91 @@ + + + + + á,à,â,ä,æ,ã,å,ā + + é,ě,è,ê,ë,ę,ė,ē + + í,î,ï,ì,į,ī + + ó,ö,ô,ò,õ,œ,ø,ō + + ú,ů,û,ü,ù,ū + + š,ß,ś + + ň,ñ,ń + + č,ç,ć + + ý,ÿ + + ď + + ř + + ť + + ž,ź,ż + !text/single_9qm_lqm + !text/double_9qm_lqm + !text/single_raqm_laqm + !text/double_raqm_laqm + diff --git a/tools/make-keyboard-text/src/main/resources/values-da/donottranslate-more-keys.xml b/tools/make-keyboard-text/src/main/resources/values-da/donottranslate-more-keys.xml new file mode 100644 index 000000000..98abb0586 --- /dev/null +++ b/tools/make-keyboard-text/src/main/resources/values-da/donottranslate-more-keys.xml @@ -0,0 +1,79 @@ + + + + + å,æ,á,ä,à,â,ã,ā + + é,ë + + í,ï + + ø,ö,ó,ô,ò,õ,œ,ō + + ú,ü,û,ù,ū + + ß,ś,š + + ñ,ń + + ý,ÿ + + ð + + ł + + å + + æ + + ø + + ä + + ö + !text/single_9qm_lqm + !text/double_9qm_lqm + !text/single_raqm_laqm + !text/double_raqm_laqm + diff --git a/tools/make-keyboard-text/src/main/resources/values-de/donottranslate-more-keys.xml b/tools/make-keyboard-text/src/main/resources/values-de/donottranslate-more-keys.xml new file mode 100644 index 000000000..0c6d3ad2b --- /dev/null +++ b/tools/make-keyboard-text/src/main/resources/values-de/donottranslate-more-keys.xml @@ -0,0 +1,74 @@ + + + + + ä,%,â,à,á,æ,ã,å,ā + + é,è,ê,ë,ė + + ö,%,ô,ò,ó,õ,œ,ø,ō + + ü,%,û,ù,ú,ū + + ß,ś,š + + ñ,ń + + ü + + è + + ö + + é + + ä + + à + !text/single_9qm_lqm + !text/double_9qm_lqm + !text/single_raqm_laqm + !text/double_raqm_laqm + diff --git a/tools/make-keyboard-text/src/main/resources/values-el/donottranslate-more-keys.xml b/tools/make-keyboard-text/src/main/resources/values-el/donottranslate-more-keys.xml new file mode 100644 index 000000000..77950c3b3 --- /dev/null +++ b/tools/make-keyboard-text/src/main/resources/values-el/donottranslate-more-keys.xml @@ -0,0 +1,26 @@ + + + + + ΑΒΓ + diff --git a/tools/make-keyboard-text/src/main/resources/values-en/donottranslate-more-keys.xml b/tools/make-keyboard-text/src/main/resources/values-en/donottranslate-more-keys.xml new file mode 100644 index 000000000..c22edbaae --- /dev/null +++ b/tools/make-keyboard-text/src/main/resources/values-en/donottranslate-more-keys.xml @@ -0,0 +1,63 @@ + + + + + à,á,â,ä,æ,ã,å,ā + + é,è,ê,ë,ē + + í,î,ï,ī,ì + + ó,ô,ö,ò,œ,ø,ō,õ + + ú,û,ü,ù,ū + + ß + + ñ + + ç + diff --git a/tools/make-keyboard-text/src/main/resources/values-eo/donottranslate-more-keys.xml b/tools/make-keyboard-text/src/main/resources/values-eo/donottranslate-more-keys.xml new file mode 100644 index 000000000..7ef3101f5 --- /dev/null +++ b/tools/make-keyboard-text/src/main/resources/values-eo/donottranslate-more-keys.xml @@ -0,0 +1,146 @@ + + + + + á,à,â,ä,æ,ã,å,ā,ă,ą,ª + + é,ě,è,ê,ë,ę,ė,ē + + í,î,ï,ĩ,ì,į,ī,ı,ij + + ó,ö,ô,ò,õ,œ,ø,ō,ő,º + + ú,ů,û,ü,ù,ū,ũ,ű,ų,µ + + ß,š,ś,ș,ş + + ñ,ń,ņ,ň,ʼn,ŋ + + ć,č,ç,ċ + + y,ý,ŷ,ÿ,þ + + ð,ď,đ + + ř,ŕ,ŗ + + ť,ț,ţ,ŧ + + ź,ż,ž + + ķ,ĸ + + ĺ,ļ,ľ,ŀ,ł + + ğ,ġ,ģ + + w,ŵ + + ĥ,ħ + + w,ŵ + q + x + + ŝ + + ĝ + + ŭ + + ĉ + + ĵ + diff --git a/tools/make-keyboard-text/src/main/resources/values-es/donottranslate-more-keys.xml b/tools/make-keyboard-text/src/main/resources/values-es/donottranslate-more-keys.xml new file mode 100644 index 000000000..22e537069 --- /dev/null +++ b/tools/make-keyboard-text/src/main/resources/values-es/donottranslate-more-keys.xml @@ -0,0 +1,73 @@ + + + + + á,à,ä,â,ã,å,ą,æ,ā,ª + + é,è,ë,ê,ę,ė,ē + + í,ï,ì,î,į,ī + + ó,ò,ö,ô,õ,ø,œ,ō,º + + ú,ü,ù,û,ū + + ñ,ń + + ç,ć,č + + "!autoColumnOrder!9,\\,,?,!,#,),(,/,;,¡,',@,:,-,\",+,\\%,&,¿" + diff --git a/tools/make-keyboard-text/src/main/resources/values-et/donottranslate-more-keys.xml b/tools/make-keyboard-text/src/main/resources/values-et/donottranslate-more-keys.xml new file mode 100644 index 000000000..79266e823 --- /dev/null +++ b/tools/make-keyboard-text/src/main/resources/values-et/donottranslate-more-keys.xml @@ -0,0 +1,115 @@ + + + + + ä,ā,à,á,â,ã,å,æ,ą + + ē,è,ė,é,ê,ë,ę,ě + + ī,ì,į,í,î,ï,ı + + ö,õ,ò,ó,ô,œ,ő,ø + + ü,ū,ų,ù,ú,û,ů,ű + + š,ß,ś,ş + + ņ,ñ,ń + + č,ç,ć + + ý,ÿ + + ď + + ŗ,ř,ŕ + + ţ,ť + + ž,ż,ź + + ķ + + ļ,ł,ĺ,ľ + + ģ,ğ + + ü + + ö + + ä + + õ + !text/single_9qm_lqm + !text/double_9qm_lqm + diff --git a/tools/make-keyboard-text/src/main/resources/values-eu/donottranslate-more-keys.xml b/tools/make-keyboard-text/src/main/resources/values-eu/donottranslate-more-keys.xml new file mode 100644 index 000000000..95f632a52 --- /dev/null +++ b/tools/make-keyboard-text/src/main/resources/values-eu/donottranslate-more-keys.xml @@ -0,0 +1,70 @@ + + + + + á,à,ä,â,ã,å,ą,æ,ā,ª + + é,è,ë,ê,ę,ė,ē + + í,ï,ì,î,į,ī + + ó,ò,ö,ô,õ,ø,œ,ō,º + + ú,ü,ù,û,ū + + ñ,ń + + ç,ć,č + diff --git a/tools/make-keyboard-text/src/main/resources/values-fa/donottranslate-more-keys.xml b/tools/make-keyboard-text/src/main/resources/values-fa/donottranslate-more-keys.xml new file mode 100644 index 000000000..58f455504 --- /dev/null +++ b/tools/make-keyboard-text/src/main/resources/values-fa/donottranslate-more-keys.xml @@ -0,0 +1,138 @@ + + + + + ا‌ب‌پ + + ۱ + + ۲ + + ۳ + + ۴ + + ۵ + + ۶ + + ۷ + + ۸ + + ۹ + + ۰ + + ۳۲۱؟ + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + + 0,٫,٬ + + ، + + ً + !text/morekeys_arabic_diacritics + ً + !text/morekeys_arabic_diacritics + ؟ + ؛ + + ٪ + + ?,¿ + ; + + \\%,‰ + + "،" + "؟" + "!fixedColumnOrder!4,:,!,؟,؛,-,!text/keyspec_left_double_angle_quote,!text/keyspec_right_double_angle_quote" + + + + + + ★,٭ + + + !fixedColumnOrder!4,﴾|﴿,!text/keyspecs_left_parenthesis_more_keys + !fixedColumnOrder!4,﴿|﴾,!text/keyspecs_right_parenthesis_more_keys + + !fixedColumnOrder!3,!text/keyspec_left_single_angle_quote,!text/keyspec_less_than_equal,!text/keyspec_less_than + !fixedColumnOrder!3,!text/keyspec_right_single_angle_quote,!text/keyspec_greater_than_equal,!text/keyspec_greater_than + (|) + )|( + [|] + ]|[ + {|} + }|{ + <|> + >|< + ≤|≥ + ≥|≤ + «|» + »|« + ‹|› + ›|‹ + + + + + "!fixedColumnOrder!7, ٕ|ٕ, ْ|ْ, ّ|ّ, ٌ|ٌ, ٍ|ٍ, ً|ً, ٔ|ٔ, ٖ|ٖ, ٰ|ٰ, ٓ|ٓ, ُ|ُ, ِ|ِ, َ|َ,ـــ|ـ" + diff --git a/tools/make-keyboard-text/src/main/resources/values-fi/donottranslate-more-keys.xml b/tools/make-keyboard-text/src/main/resources/values-fi/donottranslate-more-keys.xml new file mode 100644 index 000000000..b06d9e49d --- /dev/null +++ b/tools/make-keyboard-text/src/main/resources/values-fi/donottranslate-more-keys.xml @@ -0,0 +1,59 @@ + + + + + ä,å,æ,à,á,â,ã,ā + + ö,ø,ô,ò,ó,õ,œ,ō + + ü + + š,ß,ś + + ž,ź,ż + + å + + ö + + ä + + ø + + æ + diff --git a/tools/make-keyboard-text/src/main/resources/values-fr/donottranslate-more-keys.xml b/tools/make-keyboard-text/src/main/resources/values-fr/donottranslate-more-keys.xml new file mode 100644 index 000000000..dded5d251 --- /dev/null +++ b/tools/make-keyboard-text/src/main/resources/values-fr/donottranslate-more-keys.xml @@ -0,0 +1,80 @@ + + + + + à,â,%,æ,á,ä,ã,å,ā,ª + + é,è,ê,ë,%,ę,ė,ē + + î,%,ï,ì,í,į,ī + + ô,œ,%,ö,ò,ó,õ,ø,ō,º + + ù,û,%,ü,ú,ū + + ç,%,ć,č + + %,ÿ + + è + + ü + + é + + ö + + à + + ä + diff --git a/tools/make-keyboard-text/src/main/resources/values-gl/donottranslate-more-keys.xml b/tools/make-keyboard-text/src/main/resources/values-gl/donottranslate-more-keys.xml new file mode 100644 index 000000000..95f632a52 --- /dev/null +++ b/tools/make-keyboard-text/src/main/resources/values-gl/donottranslate-more-keys.xml @@ -0,0 +1,70 @@ + + + + + á,à,ä,â,ã,å,ą,æ,ā,ª + + é,è,ë,ê,ę,ė,ē + + í,ï,ì,î,į,ī + + ó,ò,ö,ô,õ,ø,œ,ō,º + + ú,ü,ù,û,ū + + ñ,ń + + ç,ć,č + diff --git a/tools/make-keyboard-text/src/main/resources/values-hi-rZZ/donottranslate-more-keys.xml b/tools/make-keyboard-text/src/main/resources/values-hi-rZZ/donottranslate-more-keys.xml new file mode 100644 index 000000000..50834e0fc --- /dev/null +++ b/tools/make-keyboard-text/src/main/resources/values-hi-rZZ/donottranslate-more-keys.xml @@ -0,0 +1,31 @@ + + + + + + Go + Send + Next + Done + Search + Prev + Pause + Wait + diff --git a/tools/make-keyboard-text/src/main/resources/values-hi/donottranslate-more-keys.xml b/tools/make-keyboard-text/src/main/resources/values-hi/donottranslate-more-keys.xml new file mode 100644 index 000000000..2a37d8ba1 --- /dev/null +++ b/tools/make-keyboard-text/src/main/resources/values-hi/donottranslate-more-keys.xml @@ -0,0 +1,65 @@ + + + + + कखग + + + + + + + + + + + + + + + + + + + + + + ?१२३ + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 0 + + + + + + "!autoColumnOrder!9,\\,,.,?,!,#,),(,/,;,',@,:,-,\",+,\\%,&" + "!autoColumnOrder!8,\\,,.,',#,),(,/,;,@,:,-,\",+,\\%,&" + diff --git a/tools/make-keyboard-text/src/main/resources/values-hr/donottranslate-more-keys.xml b/tools/make-keyboard-text/src/main/resources/values-hr/donottranslate-more-keys.xml new file mode 100644 index 000000000..73e51db4f --- /dev/null +++ b/tools/make-keyboard-text/src/main/resources/values-hr/donottranslate-more-keys.xml @@ -0,0 +1,42 @@ + + + + + š,ś,ß + + ñ,ń + + ž,ź,ż + + č,ć,ç + + đ + !text/single_9qm_rqm + !text/double_9qm_rqm + !text/single_raqm_laqm + !text/double_raqm_laqm + diff --git a/tools/make-keyboard-text/src/main/resources/values-hu/donottranslate-more-keys.xml b/tools/make-keyboard-text/src/main/resources/values-hu/donottranslate-more-keys.xml new file mode 100644 index 000000000..a394a9722 --- /dev/null +++ b/tools/make-keyboard-text/src/main/resources/values-hu/donottranslate-more-keys.xml @@ -0,0 +1,66 @@ + + + + + á,à,â,ä,æ,ã,å,ā + + é,è,ê,ë,ę,ė,ē + + í,î,ï,ì,į,ī + + ó,ö,ő,ô,ò,õ,œ,ø,ō + + ú,ü,ű,û,ù,ū + !text/single_9qm_rqm + !text/double_9qm_rqm + !text/single_raqm_laqm + !text/double_raqm_laqm + diff --git a/tools/make-keyboard-text/src/main/resources/values-hy/donottranslate-more-keys.xml b/tools/make-keyboard-text/src/main/resources/values-hy/donottranslate-more-keys.xml new file mode 100644 index 000000000..08d88e54d --- /dev/null +++ b/tools/make-keyboard-text/src/main/resources/values-hy/donottranslate-more-keys.xml @@ -0,0 +1,54 @@ + + + + + ԱԲԳ + + "!autoColumnOrder!8,\\,,՞,՜,.,՚,ՙ,?,!,՝,՛,֊,»,«,՟,;,:" + + ՞,¿ + + ՜,¡ + + + + ՝ + ՝ + + ։ + ։ + !text/morekeys_punctuation + diff --git a/tools/make-keyboard-text/src/main/resources/values-is/donottranslate-more-keys.xml b/tools/make-keyboard-text/src/main/resources/values-is/donottranslate-more-keys.xml new file mode 100644 index 000000000..ea7f86f1f --- /dev/null +++ b/tools/make-keyboard-text/src/main/resources/values-is/donottranslate-more-keys.xml @@ -0,0 +1,69 @@ + + + + + á,ä,æ,å,à,â,ã,ā + + é,ë,è,ê,ę,ė,ē + + í,ï,î,ì,į,ī + + ó,ö,ô,ò,õ,œ,ø,ō + + ú,ü,û,ù,ū + + ý,ÿ + + ð + + þ + !text/single_9qm_lqm + !text/double_9qm_lqm + diff --git a/tools/make-keyboard-text/src/main/resources/values-it/donottranslate-more-keys.xml b/tools/make-keyboard-text/src/main/resources/values-it/donottranslate-more-keys.xml new file mode 100644 index 000000000..e809f4835 --- /dev/null +++ b/tools/make-keyboard-text/src/main/resources/values-it/donottranslate-more-keys.xml @@ -0,0 +1,74 @@ + + + + + à,á,â,ä,æ,ã,å,ā,ª + + è,é,ê,ë,ę,ė,ē + + ì,í,î,ï,į,ī + + ò,ó,ô,ö,õ,œ,ø,ō,º + + ù,ú,û,ü,ū + + ü + + è + + ö + + é + + ä + + à + diff --git a/tools/make-keyboard-text/src/main/resources/values-iw/donottranslate-more-keys.xml b/tools/make-keyboard-text/src/main/resources/values-iw/donottranslate-more-keys.xml new file mode 100644 index 000000000..0decb8fa2 --- /dev/null +++ b/tools/make-keyboard-text/src/main/resources/values-iw/donottranslate-more-keys.xml @@ -0,0 +1,57 @@ + + + + + אבג + + + + ±,﬩ + + + (|) + )|( + [|] + ]|[ + {|} + }|{ + <|> + >|< + ≤|≥ + ≥|≤ + «|» + »|« + ‹|› + ›|‹ + !text/single_rqm_9qm + !text/double_rqm_9qm + + + diff --git a/tools/make-keyboard-text/src/main/resources/values-ka/donottranslate-more-keys.xml b/tools/make-keyboard-text/src/main/resources/values-ka/donottranslate-more-keys.xml new file mode 100644 index 000000000..f458c02e3 --- /dev/null +++ b/tools/make-keyboard-text/src/main/resources/values-ka/donottranslate-more-keys.xml @@ -0,0 +1,28 @@ + + + + + აბგ + !text/single_9qm_lqm + !text/double_9qm_lqm + diff --git a/tools/make-keyboard-text/src/main/resources/values-kk/donottranslate-more-keys.xml b/tools/make-keyboard-text/src/main/resources/values-kk/donottranslate-more-keys.xml new file mode 100644 index 000000000..5e18128da --- /dev/null +++ b/tools/make-keyboard-text/src/main/resources/values-kk/donottranslate-more-keys.xml @@ -0,0 +1,55 @@ + + + + + щ + + ы + + э + + и + + ү,ұ + + қ + + ё + + ң + + ғ + + і + + ә + + ө + + һ + + ъ + + АБВ + diff --git a/tools/make-keyboard-text/src/main/resources/values-km/donottranslate-more-keys.xml b/tools/make-keyboard-text/src/main/resources/values-km/donottranslate-more-keys.xml new file mode 100644 index 000000000..edd3753b7 --- /dev/null +++ b/tools/make-keyboard-text/src/main/resources/values-km/donottranslate-more-keys.xml @@ -0,0 +1,28 @@ + + + + + កខគ + + ៛,¢,£,€,¥,₱ + diff --git a/tools/make-keyboard-text/src/main/resources/values-kn/donottranslate-more-keys.xml b/tools/make-keyboard-text/src/main/resources/values-kn/donottranslate-more-keys.xml new file mode 100644 index 000000000..54b267462 --- /dev/null +++ b/tools/make-keyboard-text/src/main/resources/values-kn/donottranslate-more-keys.xml @@ -0,0 +1,28 @@ + + + + + ಅಆಇ + + + diff --git a/tools/make-keyboard-text/src/main/resources/values-ky/donottranslate-more-keys.xml b/tools/make-keyboard-text/src/main/resources/values-ky/donottranslate-more-keys.xml new file mode 100644 index 000000000..3d885bf72 --- /dev/null +++ b/tools/make-keyboard-text/src/main/resources/values-ky/donottranslate-more-keys.xml @@ -0,0 +1,44 @@ + + + + + щ + + ы + + э + + и + + ү + + ё + + ң + + ө + + ъ + + АБВ + diff --git a/tools/make-keyboard-text/src/main/resources/values-lo/donottranslate-more-keys.xml b/tools/make-keyboard-text/src/main/resources/values-lo/donottranslate-more-keys.xml new file mode 100644 index 000000000..1059930e4 --- /dev/null +++ b/tools/make-keyboard-text/src/main/resources/values-lo/donottranslate-more-keys.xml @@ -0,0 +1,28 @@ + + + + + ກຂຄ + + + diff --git a/tools/make-keyboard-text/src/main/resources/values-lt/donottranslate-more-keys.xml b/tools/make-keyboard-text/src/main/resources/values-lt/donottranslate-more-keys.xml new file mode 100644 index 000000000..8b6a1b2b6 --- /dev/null +++ b/tools/make-keyboard-text/src/main/resources/values-lt/donottranslate-more-keys.xml @@ -0,0 +1,108 @@ + + + + + ą,ä,ā,à,á,â,ã,å,æ + + ė,ę,ē,è,é,ê,ë,ě + + į,ī,ì,í,î,ï,ı + + ö,õ,ò,ó,ô,œ,ő,ø + + ū,ų,ü,ū,ù,ú,û,ů,ű + + š,ß,ś,ş + + ņ,ñ,ń + + č,ç,ć + + ý,ÿ + + ď + + ŗ,ř,ŕ + + ţ,ť + + ž,ż,ź + + ķ + + ļ,ł,ĺ,ľ + + ģ,ğ + !text/single_9qm_lqm + !text/double_9qm_lqm + diff --git a/tools/make-keyboard-text/src/main/resources/values-lv/donottranslate-more-keys.xml b/tools/make-keyboard-text/src/main/resources/values-lv/donottranslate-more-keys.xml new file mode 100644 index 000000000..83f83fc99 --- /dev/null +++ b/tools/make-keyboard-text/src/main/resources/values-lv/donottranslate-more-keys.xml @@ -0,0 +1,107 @@ + + + + + ā,à,á,â,ã,ä,å,æ,ą + + ē,ė,è,é,ê,ë,ę,ě + + ī,į,ì,í,î,ï,ı + + ò,ó,ô,õ,ö,œ,ő,ø + + ū,ų,ù,ú,û,ü,ů,ű + + š,ß,ś,ş + + ņ,ñ,ń + + č,ç,ć + + ý,ÿ + + ď + + ŗ,ř,ŕ + + ţ,ť + + ž,ż,ź + + ķ + + ļ,ł,ĺ,ľ + + ģ,ğ + !text/single_9qm_lqm + !text/double_9qm_lqm + diff --git a/tools/make-keyboard-text/src/main/resources/values-mk/donottranslate-more-keys.xml b/tools/make-keyboard-text/src/main/resources/values-mk/donottranslate-more-keys.xml new file mode 100644 index 000000000..1ab1354c8 --- /dev/null +++ b/tools/make-keyboard-text/src/main/resources/values-mk/donottranslate-more-keys.xml @@ -0,0 +1,40 @@ + + + + + ѕ + + ќ + + з + + ѓ + + ѐ + + ѝ + + АБВ + !text/single_9qm_lqm + !text/double_9qm_lqm + diff --git a/tools/make-keyboard-text/src/main/resources/values-ml/donottranslate-more-keys.xml b/tools/make-keyboard-text/src/main/resources/values-ml/donottranslate-more-keys.xml new file mode 100644 index 000000000..7a2aeed36 --- /dev/null +++ b/tools/make-keyboard-text/src/main/resources/values-ml/donottranslate-more-keys.xml @@ -0,0 +1,26 @@ + + + + + + + + diff --git a/tools/make-keyboard-text/src/main/resources/values-mn/donottranslate-more-keys.xml b/tools/make-keyboard-text/src/main/resources/values-mn/donottranslate-more-keys.xml new file mode 100644 index 000000000..3fafb397b --- /dev/null +++ b/tools/make-keyboard-text/src/main/resources/values-mn/donottranslate-more-keys.xml @@ -0,0 +1,28 @@ + + + + + АБВ + + + diff --git a/tools/make-keyboard-text/src/main/resources/values-mr/donottranslate-more-keys.xml b/tools/make-keyboard-text/src/main/resources/values-mr/donottranslate-more-keys.xml new file mode 100644 index 000000000..19db16da1 --- /dev/null +++ b/tools/make-keyboard-text/src/main/resources/values-mr/donottranslate-more-keys.xml @@ -0,0 +1,60 @@ + + + + + कखग + + + + + + + + + + + + + + + + + + + + + + ?१२३ + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 0 + + + diff --git a/tools/make-keyboard-text/src/main/resources/values-my/donottranslate-more-keys.xml b/tools/make-keyboard-text/src/main/resources/values-my/donottranslate-more-keys.xml new file mode 100644 index 000000000..f408f588a --- /dev/null +++ b/tools/make-keyboard-text/src/main/resources/values-my/donottranslate-more-keys.xml @@ -0,0 +1,35 @@ + + + + + ကခဂ + + + "\\," + + + + "!autoColumnOrder!9,၊,.,?,!,#,),(,/,;,...,',@,:,-,\",+,\\%,&" + "!autoColumnOrder!8,.,',#,),(,/,;,@,...,:,-,\",+,\\%,&" + diff --git a/tools/make-keyboard-text/src/main/resources/values-nb/donottranslate-more-keys.xml b/tools/make-keyboard-text/src/main/resources/values-nb/donottranslate-more-keys.xml new file mode 100644 index 000000000..37f9f8a1f --- /dev/null +++ b/tools/make-keyboard-text/src/main/resources/values-nb/donottranslate-more-keys.xml @@ -0,0 +1,65 @@ + + + + + å,æ,ä,à,á,â,ã,ā + + é,è,ê,ë,ę,ė,ē + + ø,ö,ô,ò,ó,õ,œ,ō + + ü,û,ù,ú,ū + + å + + ø + + æ + + ö + + ä + !text/single_9qm_rqm + !text/double_9qm_rqm + diff --git a/tools/make-keyboard-text/src/main/resources/values-ne/donottranslate-more-keys.xml b/tools/make-keyboard-text/src/main/resources/values-ne/donottranslate-more-keys.xml new file mode 100644 index 000000000..56b594f3a --- /dev/null +++ b/tools/make-keyboard-text/src/main/resources/values-ne/donottranslate-more-keys.xml @@ -0,0 +1,65 @@ + + + + + कखग + + + + + + + + + + + + + + + + + + + + + + ?१२३ + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 0 + + रु. + + + + "!autoColumnOrder!9,.,\\,,?,!,#,),(,/,;,',@,:,-,\",+,\\%,&" + "!autoColumnOrder!8,.,\\,,',#,),(,/,;,@,:,-,\",+,\\%,&" + diff --git a/tools/make-keyboard-text/src/main/resources/values-nl/donottranslate-more-keys.xml b/tools/make-keyboard-text/src/main/resources/values-nl/donottranslate-more-keys.xml new file mode 100644 index 000000000..f9a26c540 --- /dev/null +++ b/tools/make-keyboard-text/src/main/resources/values-nl/donottranslate-more-keys.xml @@ -0,0 +1,68 @@ + + + + + á,ä,â,à,æ,ã,å,ā + + é,ë,ê,è,ę,ė,ē + + í,ï,ì,î,į,ī,ij + + ó,ö,ô,ò,õ,œ,ø,ō + + ú,ü,û,ù,ū + + ñ,ń + + ij + !text/single_9qm_rqm + !text/double_9qm_rqm + diff --git a/tools/make-keyboard-text/src/main/resources/values-pl/donottranslate-more-keys.xml b/tools/make-keyboard-text/src/main/resources/values-pl/donottranslate-more-keys.xml new file mode 100644 index 000000000..8a87db41e --- /dev/null +++ b/tools/make-keyboard-text/src/main/resources/values-pl/donottranslate-more-keys.xml @@ -0,0 +1,67 @@ + + + + + ą,á,à,â,ä,æ,ã,å,ā + + ę,è,é,ê,ë,ė,ē + + ó,ö,ô,ò,õ,œ,ø,ō + + ś,ß,š + + ń,ñ + + ć,ç,č + + ż,ź,ž + + ł + !text/single_9qm_rqm + !text/double_9qm_rqm + diff --git a/tools/make-keyboard-text/src/main/resources/values-pt/donottranslate-more-keys.xml b/tools/make-keyboard-text/src/main/resources/values-pt/donottranslate-more-keys.xml new file mode 100644 index 000000000..f3f667efc --- /dev/null +++ b/tools/make-keyboard-text/src/main/resources/values-pt/donottranslate-more-keys.xml @@ -0,0 +1,65 @@ + + + + + á,ã,à,â,ä,å,æ,ª + + é,ê,è,ę,ė,ē,ë + + í,î,ì,ï,į,ī + + ó,õ,ô,ò,ö,œ,ø,ō,º + + ú,ü,ù,û,ū + + ç,č,ć + diff --git a/tools/make-keyboard-text/src/main/resources/values-rm/donottranslate-more-keys.xml b/tools/make-keyboard-text/src/main/resources/values-rm/donottranslate-more-keys.xml new file mode 100644 index 000000000..2df401eb4 --- /dev/null +++ b/tools/make-keyboard-text/src/main/resources/values-rm/donottranslate-more-keys.xml @@ -0,0 +1,29 @@ + + + + + ò,ó,ö,ô,õ,œ,ø + diff --git a/tools/make-keyboard-text/src/main/resources/values-ro/donottranslate-more-keys.xml b/tools/make-keyboard-text/src/main/resources/values-ro/donottranslate-more-keys.xml new file mode 100644 index 000000000..834e03968 --- /dev/null +++ b/tools/make-keyboard-text/src/main/resources/values-ro/donottranslate-more-keys.xml @@ -0,0 +1,47 @@ + + + + + ă,â,ã,à,á,ä,æ,å,ā + + î,ï,ì,í,į,ī + + ș,ß,ś,š + + ț + !text/single_9qm_rqm + !text/double_9qm_rqm + diff --git a/tools/make-keyboard-text/src/main/resources/values-ru/donottranslate-more-keys.xml b/tools/make-keyboard-text/src/main/resources/values-ru/donottranslate-more-keys.xml new file mode 100644 index 000000000..2093ba88b --- /dev/null +++ b/tools/make-keyboard-text/src/main/resources/values-ru/donottranslate-more-keys.xml @@ -0,0 +1,40 @@ + + + + + щ + + ы + + э + + и + + ё + + ъ + + АБВ + !text/single_9qm_lqm + !text/double_9qm_lqm + diff --git a/tools/make-keyboard-text/src/main/resources/values-si/donottranslate-more-keys.xml b/tools/make-keyboard-text/src/main/resources/values-si/donottranslate-more-keys.xml new file mode 100644 index 000000000..871d82ab0 --- /dev/null +++ b/tools/make-keyboard-text/src/main/resources/values-si/donottranslate-more-keys.xml @@ -0,0 +1,27 @@ + + + + + අ,ආ + + රු + diff --git a/tools/make-keyboard-text/src/main/resources/values-sk/donottranslate-more-keys.xml b/tools/make-keyboard-text/src/main/resources/values-sk/donottranslate-more-keys.xml new file mode 100644 index 000000000..a05b70370 --- /dev/null +++ b/tools/make-keyboard-text/src/main/resources/values-sk/donottranslate-more-keys.xml @@ -0,0 +1,110 @@ + + + + + á,ä,ā,à,â,ã,å,æ,ą + + é,ě,ē,ė,è,ê,ë,ę + + í,ī,į,ì,î,ï,ı + + ô,ó,ö,ò,õ,œ,ő,ø + + ú,ů,ü,ū,ų,ù,û,ű + + š,ß,ś,ş + + ň,ņ,ñ,ń + + č,ç,ć + + ý,ÿ + + ď + + ŕ,ř,ŗ + + ť,ţ + + ž,ż,ź + + ķ + + ľ,ĺ,ļ,ł + + ģ,ğ + !text/single_9qm_lqm + !text/double_9qm_lqm + !text/single_raqm_laqm + !text/double_raqm_laqm + diff --git a/tools/make-keyboard-text/src/main/resources/values-sl/donottranslate-more-keys.xml b/tools/make-keyboard-text/src/main/resources/values-sl/donottranslate-more-keys.xml new file mode 100644 index 000000000..d529589a0 --- /dev/null +++ b/tools/make-keyboard-text/src/main/resources/values-sl/donottranslate-more-keys.xml @@ -0,0 +1,34 @@ + + + + + š + + č,ć + + đ + + ž + !text/single_9qm_lqm + !text/double_9qm_lqm + !text/single_raqm_laqm + !text/double_raqm_laqm + diff --git a/tools/make-keyboard-text/src/main/resources/values-sr-rZZ/donottranslate-more-keys.xml b/tools/make-keyboard-text/src/main/resources/values-sr-rZZ/donottranslate-more-keys.xml new file mode 100644 index 000000000..1168126ff --- /dev/null +++ b/tools/make-keyboard-text/src/main/resources/values-sr-rZZ/donottranslate-more-keys.xml @@ -0,0 +1,42 @@ + + + + + è + + ì + + š,% + + č,ć,% + + đ,% + + ž,% + "Idi" + "Šalji" + "Sled" + "Gotov" + "Traži" + "Preth" + "Pauza" + "Čekaj" + diff --git a/tools/make-keyboard-text/src/main/resources/values-sr/donottranslate-more-keys.xml b/tools/make-keyboard-text/src/main/resources/values-sr/donottranslate-more-keys.xml new file mode 100644 index 000000000..870a71331 --- /dev/null +++ b/tools/make-keyboard-text/src/main/resources/values-sr/donottranslate-more-keys.xml @@ -0,0 +1,61 @@ + + + + + + + з + + ћ + + ѕ + + ђ + + ѐ + + ѝ + + + АБВ + !text/single_9qm_lqm + !text/double_9qm_lqm + !text/single_raqm_laqm + !text/double_raqm_laqm + diff --git a/tools/make-keyboard-text/src/main/resources/values-sv/donottranslate-more-keys.xml b/tools/make-keyboard-text/src/main/resources/values-sv/donottranslate-more-keys.xml new file mode 100644 index 000000000..832e438f3 --- /dev/null +++ b/tools/make-keyboard-text/src/main/resources/values-sv/donottranslate-more-keys.xml @@ -0,0 +1,99 @@ + + + + + ä,å,æ,á,à,â,ą,ã + + ç,ć,č + + ð,ď + + é,è,ê,ë,ę + + í,ì,î,ï + + ł + + ń,ñ,ň + + ö,ø,œ,ó,ò,ô,õ,ō + + ř + + ś,š,ş,ß + + ť,þ + + ü,ú,ù,û,ū + + ý,ÿ + + ź,ž,ż + + å + + ä + + æ + + ö + + ø,œ + !text/single_raqm_laqm + !text/double_raqm_laqm + diff --git a/tools/make-keyboard-text/src/main/resources/values-sw/donottranslate-more-keys.xml b/tools/make-keyboard-text/src/main/resources/values-sw/donottranslate-more-keys.xml new file mode 100644 index 000000000..e06ae21cd --- /dev/null +++ b/tools/make-keyboard-text/src/main/resources/values-sw/donottranslate-more-keys.xml @@ -0,0 +1,65 @@ + + + + + + à,á,â,ä,æ,ã,å,ā + + è,é,ê,ë,ē + + î,ï,í,ī,ì + + ô,ö,ò,ó,œ,ø,ō,õ + + û,ü,ù,ú,ū + + ß + + ñ + + ç + g\' + diff --git a/tools/make-keyboard-text/src/main/resources/values-ta-rIN/donottranslate-more-keys.xml b/tools/make-keyboard-text/src/main/resources/values-ta-rIN/donottranslate-more-keys.xml new file mode 100644 index 000000000..547c8e132 --- /dev/null +++ b/tools/make-keyboard-text/src/main/resources/values-ta-rIN/donottranslate-more-keys.xml @@ -0,0 +1,28 @@ + + + + + தமிழ் + + + diff --git a/tools/make-keyboard-text/src/main/resources/values-ta-rLK/donottranslate-more-keys.xml b/tools/make-keyboard-text/src/main/resources/values-ta-rLK/donottranslate-more-keys.xml new file mode 100644 index 000000000..9e900a6b1 --- /dev/null +++ b/tools/make-keyboard-text/src/main/resources/values-ta-rLK/donottranslate-more-keys.xml @@ -0,0 +1,28 @@ + + + + + தமிழ் + + රු + diff --git a/tools/make-keyboard-text/src/main/resources/values-ta-rSG/donottranslate-more-keys.xml b/tools/make-keyboard-text/src/main/resources/values-ta-rSG/donottranslate-more-keys.xml new file mode 100644 index 000000000..07e4d8beb --- /dev/null +++ b/tools/make-keyboard-text/src/main/resources/values-ta-rSG/donottranslate-more-keys.xml @@ -0,0 +1,26 @@ + + + + + தமிழ் + diff --git a/tools/make-keyboard-text/src/main/resources/values-te/donottranslate-more-keys.xml b/tools/make-keyboard-text/src/main/resources/values-te/donottranslate-more-keys.xml new file mode 100644 index 000000000..6518dea8f --- /dev/null +++ b/tools/make-keyboard-text/src/main/resources/values-te/donottranslate-more-keys.xml @@ -0,0 +1,28 @@ + + + + + అఆఇ + + + diff --git a/tools/make-keyboard-text/src/main/resources/values-th/donottranslate-more-keys.xml b/tools/make-keyboard-text/src/main/resources/values-th/donottranslate-more-keys.xml new file mode 100644 index 000000000..3329cf241 --- /dev/null +++ b/tools/make-keyboard-text/src/main/resources/values-th/donottranslate-more-keys.xml @@ -0,0 +1,28 @@ + + + + + กขค + + ฿ + diff --git a/tools/make-keyboard-text/src/main/resources/values-tl/donottranslate-more-keys.xml b/tools/make-keyboard-text/src/main/resources/values-tl/donottranslate-more-keys.xml new file mode 100644 index 000000000..cf25b6f43 --- /dev/null +++ b/tools/make-keyboard-text/src/main/resources/values-tl/donottranslate-more-keys.xml @@ -0,0 +1,70 @@ + + + + + á,à,ä,â,ã,å,ą,æ,ā,ª + + é,è,ë,ê,ę,ė,ē + + í,ï,ì,î,į,ī + + ó,ò,ö,ô,õ,ø,œ,ō,º + + ú,ü,ù,û,ū + + ñ,ń + + ç,ć,č + diff --git a/tools/make-keyboard-text/src/main/resources/values-tr/donottranslate-more-keys.xml b/tools/make-keyboard-text/src/main/resources/values-tr/donottranslate-more-keys.xml new file mode 100644 index 000000000..2398430e1 --- /dev/null +++ b/tools/make-keyboard-text/src/main/resources/values-tr/donottranslate-more-keys.xml @@ -0,0 +1,69 @@ + + + + + â,ä,á + + ə,é + + ı,î,ï,ì,í,į,ī + + ö,ô,œ,ò,ó,õ,ø,ō + + ü,û,ù,ú,ū + + ş,ß,ś,š + + ğ + + ň,ñ + + ç,ć,č + + ý + + ž + diff --git a/tools/make-keyboard-text/src/main/resources/values-uk/donottranslate-more-keys.xml b/tools/make-keyboard-text/src/main/resources/values-uk/donottranslate-more-keys.xml new file mode 100644 index 000000000..1f72d068b --- /dev/null +++ b/tools/make-keyboard-text/src/main/resources/values-uk/donottranslate-more-keys.xml @@ -0,0 +1,44 @@ + + + + + щ + + і + + є + + и + + ґ + + ї + + ъ + + + + АБВ + !text/single_9qm_lqm + !text/double_9qm_lqm + diff --git a/tools/make-keyboard-text/src/main/resources/values-uz/donottranslate-more-keys.xml b/tools/make-keyboard-text/src/main/resources/values-uz/donottranslate-more-keys.xml new file mode 100644 index 000000000..24dd091b5 --- /dev/null +++ b/tools/make-keyboard-text/src/main/resources/values-uz/donottranslate-more-keys.xml @@ -0,0 +1,70 @@ + + + + + + â,ä,á + + ə,é + + ı,î,ï,ì,í,į,ī + + ö,ô,œ,ò,ó,õ,ø,ō + + ü,û,ù,ú,ū + + ş,ß,ś,š + + ğ + + ň,ñ + + ç,ć,č + + ý + + ž + diff --git a/tools/make-keyboard-text/src/main/resources/values-vi/donottranslate-more-keys.xml b/tools/make-keyboard-text/src/main/resources/values-vi/donottranslate-more-keys.xml new file mode 100644 index 000000000..aa571700f --- /dev/null +++ b/tools/make-keyboard-text/src/main/resources/values-vi/donottranslate-more-keys.xml @@ -0,0 +1,97 @@ + + + + + à,á,ả,ã,ạ,ă,ằ,ắ,ẳ,ẵ,ặ,â,ầ,ấ,ẩ,ẫ,ậ + + è,é,ẻ,ẽ,ẹ,ê,ề,ế,ể,ễ,ệ + + ì,í,ỉ,ĩ,ị + + ò,ó,ỏ,õ,ọ,ô,ồ,ố,ổ,ỗ,ộ,ơ,ờ,ớ,ở,ỡ,ợ + + ù,ú,ủ,ũ,ụ,ư,ừ,ứ,ử,ữ,ự + + ỳ,ý,ỷ,ỹ,ỵ + + đ + + + diff --git a/tools/make-keyboard-text/src/main/resources/values-zu/donottranslate-more-keys.xml b/tools/make-keyboard-text/src/main/resources/values-zu/donottranslate-more-keys.xml new file mode 100644 index 000000000..2c5df0c81 --- /dev/null +++ b/tools/make-keyboard-text/src/main/resources/values-zu/donottranslate-more-keys.xml @@ -0,0 +1,64 @@ + + + + + + à,á,â,ä,æ,ã,å,ā + + é,è,ê,ë,ē + + í,î,ï,ī,ì + + ó,ô,ö,ò,œ,ø,ō,õ + + ú,û,ü,ù,ū + + ß + + ñ + + ç + diff --git a/tools/make-keyboard-text/src/main/resources/values-zz/donottranslate-more-keys.xml b/tools/make-keyboard-text/src/main/resources/values-zz/donottranslate-more-keys.xml new file mode 100644 index 000000000..f20c7f618 --- /dev/null +++ b/tools/make-keyboard-text/src/main/resources/values-zz/donottranslate-more-keys.xml @@ -0,0 +1,139 @@ + + + + + à,á,â,ã,ä,å,æ,ā,ă,ą,ª + + è,é,ê,ë,ē,ĕ,ė,ę,ě + + ì,í,î,ï,ĩ,ī,ĭ,į,ı,ij + + ò,ó,ô,õ,ö,ø,ō,ŏ,ő,œ,º + + ù,ú,û,ü,ũ,ū,ŭ,ů,ű,ų + + ß,ś,ŝ,ş,š,ſ + + ñ,ń,ņ,ň,ʼn,ŋ + + ç,ć,ĉ,ċ,č + + ý,ŷ,ÿ,ij + + ď,đ,ð + + ŕ,ŗ,ř + + þ,ţ,ť,ŧ + + ź,ż,ž + + ķ,ĸ + + ĺ,ļ,ľ,ŀ,ł + + ĝ,ğ,ġ,ģ + + ĥ + + ĵ + + ŵ + diff --git a/tools/make-keyboard-text/src/main/resources/values/donottranslate-more-keys.xml b/tools/make-keyboard-text/src/main/resources/values/donottranslate-more-keys.xml new file mode 100644 index 000000000..b6da7d13d --- /dev/null +++ b/tools/make-keyboard-text/src/main/resources/values/donottranslate-more-keys.xml @@ -0,0 +1,270 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + q + w + y + x + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ABC + !text/single_lqm_rqm + !text/double_lqm_rqm + !text/single_laqm_raqm + !text/double_laqm_raqm + + ¢,£,€,¥,₱ + $ + $,¢,€,£,¥,₱ + "!autoColumnOrder!8,\\,,?,!,#,!text/keyspec_right_parenthesis,!text/keyspec_left_parenthesis,/,;,',@,:,-,\",+,\\%,&" + "!autoColumnOrder!7,\\,,',#,!text/keyspec_right_parenthesis,!text/keyspec_left_parenthesis,/,;,@,:,-,\",+,\\%,&" + + ñ + + †,‡,★ + + ♪,♥,♠,♦,♣ + + ± + !fixedColumnOrder!3,!text/keyspecs_left_parenthesis_more_keys + !fixedColumnOrder!3,!text/keyspecs_right_parenthesis_more_keys + !fixedColumnOrder!3,!text/keyspec_left_single_angle_quote,!text/keyspec_less_than_equal,!text/keyspec_left_double_angle_quote + !fixedColumnOrder!3,!text/keyspec_right_single_angle_quote,!text/keyspec_greater_than_equal,!text/keyspec_right_double_angle_quote + + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 0 + + ?123 + + + + + + + + + + + + ¹,½,⅓,¼,⅛ + + ²,⅔ + + ³,¾,⅜ + + + + + + + + + + + ⁿ,∅ + + ( + ) + [ + ] + { + } + < + > + + + « + » + + + + , + , + + + + . + + !text/morekeys_punctuation + . + + !text/morekeys_tablet_punctuation + ? + ; + % + + ¡ + + ¿ + + + + !fixedColumnOrder!2,!hasLabels!,!text/keylabel_time_am,!text/keylabel_time_pm + !icon/settings_key|!code/key_settings + !icon/shortcut_key|!code/key_shortcut + !hasLabels!,!text/label_next_key|!code/key_action_next + !hasLabels!,!text/label_previous_key|!code/key_action_previous + + = \\\\ < + + ~ [ < + + 123 + + + *# + + "AM" + + "PM" + ".com" + + "!hasLabels!,.net,.org,.gov,.edu" + !text/keyspec_less_than,!text/keyspec_left_curly_bracket,!text/keyspec_left_square_bracket + !text/keyspec_greater_than,!text/keyspec_right_curly_bracket,!text/keyspec_right_square_bracket + + + + !text/keyspec_left_single_angle_quote,!text/keyspec_right_single_angle_quote + !text/keyspec_right_single_angle_quote,!text/keyspec_left_single_angle_quote + !text/keyspec_left_double_angle_quote,!text/keyspec_right_double_angle_quote + !text/keyspec_right_double_angle_quote,!text/keyspec_left_double_angle_quote + + ‚,‘,’ + ’,‚,‘ + ‘,‚,’ + ‘,’,‚ + „,“,” + ”,„,“ + “,„,” + “,”,„ + !fixedColumnOrder!5,!text/single_quotes,!text/single_angle_quotes + !fixedColumnOrder!5,!text/double_quotes,!text/double_angle_quotes + !fixedColumnOrder!6,!text/double_quotes,!text/single_quotes,!text/double_angle_quotes,!text/single_angle_quotes + !icon/emoji_action_key|!code/key_emoji + !string/label_go_key + !string/label_send_key + !string/label_next_key + !string/label_done_key + !string/label_search_key + !string/label_previous_key + !string/label_pause_key + !string/label_wait_key +