diff options
Diffstat (limited to 'tools')
113 files changed, 2858 insertions, 1645 deletions
diff --git a/tools/dicttool/Android.mk b/tools/dicttool/Android.mk index aaf31c6f9..b108a8a81 100644 --- a/tools/dicttool/Android.mk +++ b/tools/dicttool/Android.mk @@ -13,6 +13,12 @@ # See the License for the specific language governing permissions and # limitations under the License. +# HACK: Temporarily disable host tool build on Mac until the build system is ready for C++11. +LATINIME_HOST_OSNAME := $(shell uname -s) +ifeq ($(LATINIME_HOST_OSNAME), Darwin) # TODO: Remove this +$(warning dicttool_aosp is not supported on $(LATINIME_HOST_OSNAME)) +else # TODO: Remove this + LATINIME_DICTTOOL_AOSP_LOCAL_PATH := $(call my-dir) LOCAL_PATH := $(LATINIME_DICTTOOL_AOSP_LOCAL_PATH) LATINIME_HOST_NATIVE_LIBNAME := liblatinime-aosp-dicttool-host @@ -25,12 +31,41 @@ include $(CLEAR_VARS) LATINIME_LOCAL_DIR := ../.. LATINIME_BASE_SOURCE_DIRECTORY := $(LATINIME_LOCAL_DIR)/java/src/com/android/inputmethod LATINIME_ANNOTATIONS_SOURCE_DIRECTORY := $(LATINIME_BASE_SOURCE_DIRECTORY)/annotations -LATINIME_CORE_SOURCE_DIRECTORY := $(LATINIME_BASE_SOURCE_DIRECTORY)/latin -MAKEDICT_CORE_SOURCE_DIRECTORY := $(LATINIME_CORE_SOURCE_DIRECTORY)/makedict -USED_TARGETTED_UTILS := \ - $(LATINIME_CORE_SOURCE_DIRECTORY)/utils/ByteArrayDictBuffer.java \ - $(LATINIME_CORE_SOURCE_DIRECTORY)/utils/CollectionUtils.java \ - $(LATINIME_CORE_SOURCE_DIRECTORY)/utils/JniUtils.java +MAKEDICT_CORE_SOURCE_DIRECTORY := $(LATINIME_BASE_SOURCE_DIRECTORY)/latin/makedict +LATINIME_TESTS_SOURCE_DIRECTORY := $(LATINIME_LOCAL_DIR)/tests/src/com/android/inputmethod/latin + +# Dependencies for Dicttool. Most of these files are needed by BinaryDictionary.java. Note that +# a significant part of the dependencies are mocked in the compat/ directory, with empty or +# nearly-empty implementations, for parts that we don't use in Dicttool. +LATINIME_SRC_FILES_FOR_DICTTOOL := \ + event/Combiner.java \ + event/Event.java \ + latin/BinaryDictionary.java \ + latin/DicTraverseSession.java \ + latin/Dictionary.java \ + latin/InputPointers.java \ + latin/LastComposedWord.java \ + latin/PrevWordsInfo.java \ + latin/SuggestedWords.java \ + latin/WordComposer.java \ + latin/define/DebugFlags.java \ + latin/settings/NativeSuggestOptions.java \ + latin/settings/SettingsValuesForSuggestion.java \ + latin/utils/BinaryDictionaryUtils.java \ + latin/utils/CombinedFormatUtils.java \ + latin/utils/CoordinateUtils.java \ + latin/utils/FileUtils.java \ + latin/utils/JniUtils.java \ + latin/utils/LocaleUtils.java \ + latin/utils/ResizableIntArray.java \ + latin/utils/StringUtils.java + +LATINIME_TEST_SRC_FILES_FOR_DICTTOOL := \ + utils/ByteArrayDictBuffer.java + +USED_TARGETED_SRCS := \ + $(addprefix $(LATINIME_BASE_SOURCE_DIRECTORY)/, $(LATINIME_SRC_FILES_FOR_DICTTOOL)) \ + $(addprefix $(LATINIME_TESTS_SOURCE_DIRECTORY)/, $(LATINIME_TEST_SRC_FILES_FOR_DICTTOOL)) DICTTOOL_ONDEVICE_TESTS_DIRECTORY := \ $(LATINIME_LOCAL_DIR)/tests/src/com/android/inputmethod/latin/makedict/ @@ -43,12 +78,11 @@ 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 \ - $(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) + $(LOCAL_ANNOTATIONS_SRC_FILES) $(USED_TARGETED_SRCS) \ + $(LATINIME_BASE_SOURCE_DIRECTORY)/latin/Constants.java \ + $(call all-java-files-under, tests) \ + $(call all-java-files-under, $(DICTTOOL_ONDEVICE_TESTS_DIRECTORY)) LOCAL_JAVA_LIBRARIES := junit LOCAL_REQUIRED_MODULES := $(LATINIME_HOST_NATIVE_LIBNAME) @@ -58,6 +92,9 @@ LOCAL_MODULE := dicttool_aosp include $(BUILD_HOST_JAVA_LIBRARY) include $(LOCAL_PATH)/etc/Android.mk +endif # Darwin - TODO: Remove this + # Clear our private variables LATINIME_DICTTOOL_AOSP_LOCAL_PATH := LATINIME_LOCAL_DIR := +LATINIME_HOST_OSNAME := diff --git a/tools/dicttool/NativeLib.mk b/tools/dicttool/NativeLib.mk index 4443587fa..ffb32edbe 100644 --- a/tools/dicttool/NativeLib.mk +++ b/tools/dicttool/NativeLib.mk @@ -13,6 +13,10 @@ # See the License for the specific language governing permissions and # limitations under the License. +# HACK: Temporarily disable host tool build on Mac until the build system is ready for C++11. +LATINIME_HOST_OSNAME := $(shell uname -s) +ifneq ($(LATINIME_HOST_OSNAME), Darwin) # TODO: Remove this + LOCAL_PATH := $(call my-dir) include $(CLEAR_VARS) @@ -20,22 +24,24 @@ include $(CLEAR_VARS) LATINIME_DIR_RELATIVE_TO_DICTTOOL := ../.. +ifeq ($(FLAG_DBG), true) + $(warning Making debug version of native library) + LOCAL_CFLAGS += -DFLAG_DBG -funwind-tables -fno-inline +endif #FLAG_DBG + +LOCAL_CFLAGS += -DHOST_TOOL -fPIC -Wno-deprecated -Wno-unused-parameter -Wno-unused-function ifneq ($(strip $(HOST_JDK_IS_64BIT_VERSION)),) LOCAL_MULTILIB := 64 endif #HOST_JDK_IS_64BIT_VERSION -LOCAL_CFLAGS += -DHOST_TOOL -fPIC +# For C++11 +LOCAL_CFLAGS += -std=c++11 LATINIME_NATIVE_JNI_DIR := $(LATINIME_DIR_RELATIVE_TO_DICTTOOL)/native/jni LATINIME_NATIVE_SRC_DIR := $(LATINIME_DIR_RELATIVE_TO_DICTTOOL)/native/jni/src LOCAL_C_INCLUDES := $(LOCAL_PATH)/$(LATINIME_NATIVE_SRC_DIR) -# Used in jni_common.cpp to avoid registering useless methods. -LATIN_IME_JNI_SRC_FILES := \ - com_android_inputmethod_latin_makedict_Ver3DictDecoder.cpp \ - jni_common.cpp - -LATIN_IME_CORE_SRC_FILES := +include $(LOCAL_PATH)/$(LATINIME_NATIVE_JNI_DIR)/NativeFileList.mk LOCAL_SRC_FILES := \ $(addprefix $(LATINIME_NATIVE_JNI_DIR)/, $(LATIN_IME_JNI_SRC_FILES)) \ @@ -45,5 +51,9 @@ LOCAL_MODULE := $(LATINIME_HOST_NATIVE_LIBNAME) include $(BUILD_HOST_SHARED_LIBRARY) +endif # Darwin - TODO: Remove this + # Clear our private variables +include $(LOCAL_PATH)/$(LATINIME_NATIVE_JNI_DIR)/CleanupNativeFileList.mk LATINIME_DIR_RELATIVE_TO_DICTTOOL := ../.. +LATINIME_HOST_OSNAME := diff --git a/tools/dicttool/compat/android/content/Context.java b/tools/dicttool/compat/android/content/Context.java new file mode 100644 index 000000000..afe1322ac --- /dev/null +++ b/tools/dicttool/compat/android/content/Context.java @@ -0,0 +1,20 @@ +/* + * 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 android.content; + +public class Context { +} diff --git a/tools/dicttool/compat/android/content/SharedPreferences.java b/tools/dicttool/compat/android/content/SharedPreferences.java new file mode 100644 index 000000000..cfeb1532d --- /dev/null +++ b/tools/dicttool/compat/android/content/SharedPreferences.java @@ -0,0 +1,23 @@ +/* + * 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.content; + +public class SharedPreferences { + public interface OnSharedPreferenceChangeListener { + public void onSharedPreferenceChanged(SharedPreferences sharedPreferences, String key); + } +} diff --git a/tools/dicttool/compat/android/graphics/Rect.java b/tools/dicttool/compat/android/graphics/Rect.java new file mode 100644 index 000000000..c7b61d759 --- /dev/null +++ b/tools/dicttool/compat/android/graphics/Rect.java @@ -0,0 +1,20 @@ +/* + * 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.graphics; + +public class Rect { +} diff --git a/tools/dicttool/compat/android/test/AndroidTestCase.java b/tools/dicttool/compat/android/test/AndroidTestCase.java index d01b7ad7c..f765ce0fc 100644 --- a/tools/dicttool/compat/android/test/AndroidTestCase.java +++ b/tools/dicttool/compat/android/test/AndroidTestCase.java @@ -16,6 +16,8 @@ package android.test; +import com.android.inputmethod.latin.dicttool.Test; + import junit.framework.TestCase; import java.io.File; @@ -27,7 +29,11 @@ import java.io.File; */ public class AndroidTestCase extends TestCase { public File getCacheDir() { - return new File("."); + final File dir = Test.TEST_TMP_DIR; + if (!dir.isDirectory()) { + dir.mkdirs(); + } + return dir; } public AndroidTestCase getContext() { return this; diff --git a/tools/dicttool/compat/android/text/Spanned.java b/tools/dicttool/compat/android/text/Spanned.java new file mode 100644 index 000000000..451fae32e --- /dev/null +++ b/tools/dicttool/compat/android/text/Spanned.java @@ -0,0 +1,20 @@ +/* + * 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 android.text; + +public interface Spanned extends CharSequence { +} diff --git a/tools/dicttool/compat/android/text/TextUtils.java b/tools/dicttool/compat/android/text/TextUtils.java new file mode 100644 index 000000000..5a94b7d4c --- /dev/null +++ b/tools/dicttool/compat/android/text/TextUtils.java @@ -0,0 +1,107 @@ +/* + * 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.text; + +public class TextUtils { + private TextUtils() { /* cannot be instantiated */ } + + /** + * Returns true if the string is null or 0-length. + * @param str the string to be examined + * @return true if str is null or zero length + */ + public static boolean isEmpty(CharSequence str) { + if (str == null || str.length() == 0) + return true; + else + return false; + } + + /** + * Returns true if a and b are equal, including if they are both null. + * <p><i>Note: In platform versions 1.1 and earlier, this method only worked well if + * both the arguments were instances of String.</i></p> + * @param a first CharSequence to check + * @param b second CharSequence to check + * @return true if a and b are equal + */ + public static boolean equals(CharSequence a, CharSequence b) { + if (a == b) return true; + int length; + if (a != null && b != null && (length = a.length()) == b.length()) { + if (a instanceof String && b instanceof String) { + return a.equals(b); + } else { + for (int i = 0; i < length; i++) { + if (a.charAt(i) != b.charAt(i)) return false; + } + return true; + } + } + return false; + } + + /** + * Returns list of multiple {@link CharSequence} joined into a single + * {@link CharSequence} separated by localized delimiter such as ", ". + * + * @hide + */ + public static CharSequence join(Iterable<CharSequence> list) { + final CharSequence delimiter = ", "; + return join(delimiter, list); + } + + /** + * Returns a string containing the tokens joined by delimiters. + * @param tokens an array objects to be joined. Strings will be formed from + * the objects by calling object.toString(). + */ + public static String join(CharSequence delimiter, Object[] tokens) { + StringBuilder sb = new StringBuilder(); + boolean firstTime = true; + for (Object token: tokens) { + if (firstTime) { + firstTime = false; + } else { + sb.append(delimiter); + } + sb.append(token); + } + return sb.toString(); + } + + /** + * Returns a string containing the tokens joined by delimiters. + * @param tokens an array objects to be joined. Strings will be formed from + * the objects by calling object.toString(). + */ + public static String join(CharSequence delimiter, Iterable tokens) { + StringBuilder sb = new StringBuilder(); + boolean firstTime = true; + for (Object token: tokens) { + if (firstTime) { + firstTime = false; + } else { + sb.append(delimiter); + } + sb.append(token); + } + return sb.toString(); + } + +} diff --git a/tools/dicttool/compat/android/util/Log.java b/tools/dicttool/compat/android/util/Log.java index b3b6dd847..9410e74a2 100644 --- a/tools/dicttool/compat/android/util/Log.java +++ b/tools/dicttool/compat/android/util/Log.java @@ -25,13 +25,19 @@ 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 Throwable e) { - System.out.println(tag + " : " + message + " : " + e); + public static void d(final String tag, final String message, final Throwable t) { + System.out.println(tag + " : " + message + " : " + t); } public static void e(final String tag, final String message) { d(tag, message); } - public static void e(final String tag, final String message, final Throwable e) { - d(tag, message, e); + public static void e(final String tag, final String message, final Throwable t) { + d(tag, message, t); + } + public static void w(final String tag, final String message) { + d(tag, message); + } + public static void w(final String tag, final String message, final Throwable t) { + d(tag, message, t); } } diff --git a/tools/dicttool/compat/android/util/Pair.java b/tools/dicttool/compat/android/util/Pair.java new file mode 100644 index 000000000..5bf34848d --- /dev/null +++ b/tools/dicttool/compat/android/util/Pair.java @@ -0,0 +1,43 @@ +/* + * 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 android.util; + +import java.util.Arrays; + +public class Pair<T1, T2> { + public final T1 mFirst; + public final T2 mSecond; + + public Pair(final T1 first, final T2 second) { + mFirst = first; + mSecond = second; + } + + @Override + public int hashCode() { + return Arrays.hashCode(new Object[] { mFirst, mSecond }); + } + + @Override + public boolean equals(Object o) { + if (o == this) return true; + if (!(o instanceof Pair)) return false; + Pair<?, ?> p = (Pair<?, ?>)o; + return ((mFirst == null && p.mFirst == null) || mFirst.equals(p.mFirst)) + && ((mSecond == null && p.mSecond == null) || mSecond.equals(p.mSecond)); + } +} diff --git a/tools/dicttool/compat/android/util/SparseArray.java b/tools/dicttool/compat/android/util/SparseArray.java index 6c76f19f4..9efbd39c7 100644 --- a/tools/dicttool/compat/android/util/SparseArray.java +++ b/tools/dicttool/compat/android/util/SparseArray.java @@ -16,8 +16,6 @@ package android.util; -import com.android.inputmethod.latin.utils.CollectionUtils; - import java.util.ArrayList; import java.util.Collections; @@ -30,8 +28,8 @@ public class SparseArray<E> { } public SparseArray(final int initialCapacity) { - mKeys = CollectionUtils.newArrayList(initialCapacity); - mValues = CollectionUtils.newArrayList(initialCapacity); + mKeys = new ArrayList<>(initialCapacity); + mValues = new ArrayList<>(initialCapacity); } public int size() { diff --git a/tools/dicttool/compat/android/util/SparseIntArray.java b/tools/dicttool/compat/android/util/SparseIntArray.java new file mode 100644 index 000000000..e4d3dfd07 --- /dev/null +++ b/tools/dicttool/compat/android/util/SparseIntArray.java @@ -0,0 +1,57 @@ +/* + * 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; + +public class SparseIntArray { + private final SparseArray<Integer> mArray; + + public SparseIntArray() { + this(10); + } + + public SparseIntArray(final int initialCapacity) { + mArray = new SparseArray<>(initialCapacity); + } + + public int size() { + return mArray.size(); + } + + public void clear() { + mArray.clear(); + } + + public void put(final int key, final int value) { + mArray.put(key, value); + } + + public int get(final int key) { + return get(key, 0); + } + + public int get(final int key, final int valueIfKeyNotFound) { + return mArray.get(key, valueIfKeyNotFound); + } + + public int indexOfKey(final int key) { + return mArray.indexOfKey(key); + } + + public int keyAt(final int index) { + return mArray.keyAt(index); + } +} diff --git a/tools/dicttool/compat/android/view/inputmethod/CompletionInfo.java b/tools/dicttool/compat/android/view/inputmethod/CompletionInfo.java new file mode 100644 index 000000000..fbce72556 --- /dev/null +++ b/tools/dicttool/compat/android/view/inputmethod/CompletionInfo.java @@ -0,0 +1,21 @@ +/* + * 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.view.inputmethod; + +public class CompletionInfo { + public final String getText() { return ""; } +} diff --git a/tools/dicttool/compat/android/view/inputmethod/EditorInfo.java b/tools/dicttool/compat/android/view/inputmethod/EditorInfo.java new file mode 100644 index 000000000..9c7118118 --- /dev/null +++ b/tools/dicttool/compat/android/view/inputmethod/EditorInfo.java @@ -0,0 +1,20 @@ +/* + * 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.view.inputmethod; + +public class EditorInfo { +} diff --git a/tools/dicttool/compat/com/android/inputmethod/event/CombinerChain.java b/tools/dicttool/compat/com/android/inputmethod/event/CombinerChain.java new file mode 100644 index 000000000..458f22c45 --- /dev/null +++ b/tools/dicttool/compat/com/android/inputmethod/event/CombinerChain.java @@ -0,0 +1,50 @@ +/* + * 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 com.android.inputmethod.event; + +import java.util.ArrayList; + +/** + * Compatibility class that stands in for the combiner chain in LatinIME. + * + * This is not used by dicttool, it's just needed by the dependency chain. + */ +// TODO: there should not be a dependency to this in dicttool, so there +// should be a sensible way to separate them cleanly. +public class CombinerChain { + private StringBuilder mComposingWord; + public CombinerChain(final String initialText, final Combiner... combinerList) { + mComposingWord = new StringBuilder(initialText); + } + + public void processEvent(final ArrayList<Event> previousEvents, final Event newEvent) { + mComposingWord.append(newEvent.getTextToCommit()); + } + + public CharSequence getComposingWordWithCombiningFeedback() { + return mComposingWord; + } + + public void reset() { + mComposingWord.setLength(0); + } + + public static Combiner[] createCombiners(final String spec) { + // Dicttool never uses a combiner at all, so we just return a zero-sized array. + return new Combiner[0]; + } +} diff --git a/tools/dicttool/compat/com/android/inputmethod/keyboard/Key.java b/tools/dicttool/compat/com/android/inputmethod/keyboard/Key.java new file mode 100644 index 000000000..1e63bb526 --- /dev/null +++ b/tools/dicttool/compat/com/android/inputmethod/keyboard/Key.java @@ -0,0 +1,24 @@ +/* + * 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; + +public class Key { + public final int getX() { return 0; } + public final int getY() { return 0; } + public final int getWidth() { return 0; } + public final int getHeight() { return 0; } +} diff --git a/tools/dicttool/compat/com/android/inputmethod/keyboard/Keyboard.java b/tools/dicttool/compat/com/android/inputmethod/keyboard/Keyboard.java new file mode 100644 index 000000000..61b209f4d --- /dev/null +++ b/tools/dicttool/compat/com/android/inputmethod/keyboard/Keyboard.java @@ -0,0 +1,22 @@ +/* + * 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; + +public class Keyboard { + private final Key KEY = new Key(); + public final Key getKey(final int i) { return KEY; } +} diff --git a/tools/dicttool/compat/com/android/inputmethod/keyboard/ProximityInfo.java b/tools/dicttool/compat/com/android/inputmethod/keyboard/ProximityInfo.java new file mode 100644 index 000000000..561b6637c --- /dev/null +++ b/tools/dicttool/compat/com/android/inputmethod/keyboard/ProximityInfo.java @@ -0,0 +1,28 @@ +/* + * 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; + +public class ProximityInfo { + public long getNativeProximityInfo() { return 0l; } + private static native long setProximityInfoNative(String locale, + int displayWidth, int displayHeight, int gridWidth, int gridHeight, + int mostCommonKeyWidth, int mostCommonKeyHeight, int[] proximityCharsArray, + int keyCount, int[] keyXCoordinates, int[] keyYCoordinates, int[] keyWidths, + int[] keyHeights, int[] keyCharCodes, float[] sweetSpotCenterXs, + float[] sweetSpotCenterYs, float[] sweetSpotRadii); + private static native void releaseProximityInfoNative(long nativeProximityInfo); +} diff --git a/tools/dicttool/compat/com/android/inputmethod/latin/LatinIME.java b/tools/dicttool/compat/com/android/inputmethod/latin/LatinIME.java new file mode 100644 index 000000000..e7aa340fb --- /dev/null +++ b/tools/dicttool/compat/com/android/inputmethod/latin/LatinIME.java @@ -0,0 +1,20 @@ +/* + * 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; + +public class LatinIME { +} diff --git a/tools/dicttool/compat/com/android/inputmethod/latin/define/JniLibName.java b/tools/dicttool/compat/com/android/inputmethod/latin/define/JniLibName.java index c68bdaabf..d6d5e2d61 100644 --- a/tools/dicttool/compat/com/android/inputmethod/latin/define/JniLibName.java +++ b/tools/dicttool/compat/com/android/inputmethod/latin/define/JniLibName.java @@ -21,5 +21,5 @@ public final class JniLibName { // This class is not publicly instantiable. } - public static final String JNI_LIB_NAME = "latinime-dicttool-host"; + public static final String JNI_LIB_NAME = "latinime-aosp-dicttool-host"; } diff --git a/tools/dicttool/compat/com/android/inputmethod/latin/settings/AdditionalFeaturesSettingUtils.java b/tools/dicttool/compat/com/android/inputmethod/latin/settings/AdditionalFeaturesSettingUtils.java new file mode 100644 index 000000000..6a430d57d --- /dev/null +++ b/tools/dicttool/compat/com/android/inputmethod/latin/settings/AdditionalFeaturesSettingUtils.java @@ -0,0 +1,21 @@ +/* + * 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.settings; + +public class AdditionalFeaturesSettingUtils { + public static final int ADDITIONAL_FEATURES_SETTINGS_SIZE = 0; +} diff --git a/tools/dicttool/compat/com/android/inputmethod/latin/utils/LanguageModelParam.java b/tools/dicttool/compat/com/android/inputmethod/latin/utils/LanguageModelParam.java new file mode 100644 index 000000000..f4ca94a81 --- /dev/null +++ b/tools/dicttool/compat/com/android/inputmethod/latin/utils/LanguageModelParam.java @@ -0,0 +1,20 @@ +/* + * 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 com.android.inputmethod.latin.utils; + +public final class LanguageModelParam { +} diff --git a/tools/dicttool/etc/dicttool_aosp b/tools/dicttool/etc/dicttool_aosp index 65a1c3a1c..fc918f0f8 100755 --- a/tools/dicttool/etc/dicttool_aosp +++ b/tools/dicttool/etc/dicttool_aosp @@ -38,13 +38,8 @@ jarfile=dicttool_aosp.jar frameworkdir="$progdir" if [ ! -r "$frameworkdir/$jarfile" ] then - frameworkdir=`dirname "$progdir"`/tools/lib - libdir=`dirname "$progdir"`/tools/lib -fi -if [ ! -r "$frameworkdir/$jarfile" ] -then frameworkdir=`dirname "$progdir"`/framework - libdir=`dirname "$progdir"`/lib + libdir=`dirname "$progdir"`/lib64 fi if [ ! -r "$frameworkdir/$jarfile" ] then diff --git a/tools/dicttool/src/com/android/inputmethod/latin/dicttool/BinaryDictOffdeviceUtils.java b/tools/dicttool/src/com/android/inputmethod/latin/dicttool/BinaryDictOffdeviceUtils.java index e571bc21d..3ef03f4bd 100644 --- a/tools/dicttool/src/com/android/inputmethod/latin/dicttool/BinaryDictOffdeviceUtils.java +++ b/tools/dicttool/src/com/android/inputmethod/latin/dicttool/BinaryDictOffdeviceUtils.java @@ -17,20 +17,22 @@ package com.android.inputmethod.latin.dicttool; import com.android.inputmethod.latin.makedict.BinaryDictDecoderUtils; +import com.android.inputmethod.latin.makedict.BinaryDictIOUtils; import com.android.inputmethod.latin.makedict.DictDecoder; -import com.android.inputmethod.latin.makedict.FormatSpec; import com.android.inputmethod.latin.makedict.FusionDictionary; import com.android.inputmethod.latin.makedict.UnsupportedFormatException; import org.xml.sax.SAXException; -import java.io.File; import java.io.BufferedInputStream; import java.io.BufferedOutputStream; +import java.io.BufferedReader; +import java.io.File; import java.io.FileInputStream; import java.io.FileOutputStream; import java.io.IOException; import java.io.InputStream; +import java.io.InputStreamReader; import java.io.OutputStream; import java.util.ArrayList; @@ -51,14 +53,17 @@ public final class BinaryDictOffdeviceUtils { public final static String ENCRYPTION = "encrypted"; private final static int MAX_DECODE_DEPTH = 8; + private final static int COPY_BUFFER_SIZE = 8192; public static class DecoderChainSpec { - ArrayList<String> mDecoderSpec = new ArrayList<String>(); + ArrayList<String> mDecoderSpec = new ArrayList<>(); File mFile; + public DecoderChainSpec addStep(final String stepDescription) { mDecoderSpec.add(stepDescription); return this; } + public String describeChain() { final StringBuilder s = new StringBuilder("raw"); for (final String step : mDecoderSpec) { @@ -70,13 +75,10 @@ public final class BinaryDictOffdeviceUtils { } public static void copy(final InputStream input, final OutputStream output) throws IOException { - final byte[] buffer = new byte[1000]; - final BufferedInputStream in = new BufferedInputStream(input); - final BufferedOutputStream out = new BufferedOutputStream(output); - for (int readBytes = in.read(buffer); readBytes >= 0; readBytes = in.read(buffer)) + final byte[] buffer = new byte[COPY_BUFFER_SIZE]; + for (int readBytes = input.read(buffer); readBytes >= 0; readBytes = input.read(buffer)) { output.write(buffer, 0, readBytes); - in.close(); - out.close(); + } } /** @@ -131,11 +133,15 @@ public final class BinaryDictOffdeviceUtils { try { final File dst = File.createTempFile(PREFIX, SUFFIX); dst.deleteOnExit(); - final FileOutputStream dstStream = new FileOutputStream(dst); - copy(Compress.getUncompressedStream(new BufferedInputStream(new FileInputStream(src))), - new BufferedOutputStream(dstStream)); // #copy() closes the streams - return dst; - } catch (IOException e) { + try ( + final InputStream input = Compress.getUncompressedStream( + new BufferedInputStream(new FileInputStream(src))); + final OutputStream output = new BufferedOutputStream(new FileOutputStream(dst)) + ) { + copy(input, output); + return dst; + } + } catch (final IOException e) { // Could not uncompress the file: presumably the file is simply not a compressed file return null; } @@ -150,20 +156,20 @@ public final class BinaryDictOffdeviceUtils { try { final File dst = File.createTempFile(PREFIX, SUFFIX); dst.deleteOnExit(); - final FileOutputStream dstStream = new FileOutputStream(dst); - copy(Crypt.getDecryptedStream(new BufferedInputStream(new FileInputStream(src))), - dstStream); // #copy() closes the streams - return dst; - } catch (IOException e) { + try ( + final InputStream input = Crypt.getDecryptedStream( + new BufferedInputStream(new FileInputStream(src))); + final OutputStream output = new BufferedOutputStream(new FileOutputStream(dst)) + ) { + copy(input, output); + return dst; + } + } catch (final IOException e) { // Could not decrypt the file: presumably the file is simply not a crypted file return null; } } - static void crash(final String filename, final Exception e) { - throw new RuntimeException("Can't read file " + filename, e); - } - static FusionDictionary getDictionary(final String filename, final boolean report) { final File file = new File(filename); if (report) { @@ -172,44 +178,40 @@ public final class BinaryDictOffdeviceUtils { } try { if (XmlDictInputOutput.isXmlUnigramDictionary(filename)) { - if (report) System.out.println("Format : XML unigram list"); + if (report) { + System.out.println("Format : XML unigram list"); + } return XmlDictInputOutput.readDictionaryXml( new BufferedInputStream(new FileInputStream(file)), null /* shortcuts */, null /* bigrams */); - } else { - final DecoderChainSpec decodedSpec = getRawDictionaryOrNull(file); - if (null == decodedSpec) { - crash(filename, new RuntimeException( - filename + " does not seem to be a dictionary file")); - } else if (CombinedInputOutput.isCombinedDictionary( - decodedSpec.mFile.getAbsolutePath())){ - if (report) { - System.out.println("Format : Combined format"); - System.out.println("Packaging : " + decodedSpec.describeChain()); - System.out.println("Uncompressed size : " + decodedSpec.mFile.length()); - } - return CombinedInputOutput.readDictionaryCombined( - new BufferedInputStream(new FileInputStream(decodedSpec.mFile))); - } else { - final DictDecoder dictDecoder = FormatSpec.getDictDecoder(decodedSpec.mFile, - DictDecoder.USE_BYTEARRAY); - if (report) { - System.out.println("Format : Binary dictionary format"); - System.out.println("Packaging : " + decodedSpec.describeChain()); - System.out.println("Uncompressed size : " + decodedSpec.mFile.length()); - } - return dictDecoder.readDictionaryBinary(null, false /* deleteDictIfBroken */); + } + final DecoderChainSpec decodedSpec = getRawDictionaryOrNull(file); + if (null == decodedSpec) { + throw new RuntimeException("Does not seem to be a dictionary file " + filename); + } + if (CombinedInputOutput.isCombinedDictionary(decodedSpec.mFile.getAbsolutePath())) { + if (report) { + System.out.println("Format : Combined format"); + System.out.println("Packaging : " + decodedSpec.describeChain()); + System.out.println("Uncompressed size : " + decodedSpec.mFile.length()); } + try (final BufferedReader reader = new BufferedReader( + new InputStreamReader(new FileInputStream(decodedSpec.mFile), "UTF-8"))) { + return CombinedInputOutput.readDictionaryCombined(reader); + } + } + final DictDecoder dictDecoder = BinaryDictIOUtils.getDictDecoder( + decodedSpec.mFile, 0, decodedSpec.mFile.length(), + DictDecoder.USE_BYTEARRAY); + if (report) { + System.out.println("Format : Binary dictionary format"); + System.out.println("Packaging : " + decodedSpec.describeChain()); + System.out.println("Uncompressed size : " + decodedSpec.mFile.length()); } - } catch (IOException e) { - crash(filename, e); - } catch (SAXException e) { - crash(filename, e); - } catch (ParserConfigurationException e) { - crash(filename, e); - } catch (UnsupportedFormatException e) { - crash(filename, e); + return dictDecoder.readDictionaryBinary(false /* deleteDictIfBroken */); + } catch (final IOException | SAXException | ParserConfigurationException | + UnsupportedFormatException e) { + throw new RuntimeException("Can't read file " + filename, e); } - return null; } } diff --git a/tools/dicttool/src/com/android/inputmethod/latin/dicttool/CombinedInputOutput.java b/tools/dicttool/src/com/android/inputmethod/latin/dicttool/CombinedInputOutput.java index 4b6716936..23cbee81c 100644 --- a/tools/dicttool/src/com/android/inputmethod/latin/dicttool/CombinedInputOutput.java +++ b/tools/dicttool/src/com/android/inputmethod/latin/dicttool/CombinedInputOutput.java @@ -17,20 +17,18 @@ package com.android.inputmethod.latin.dicttool; import com.android.inputmethod.latin.makedict.FormatSpec; +import com.android.inputmethod.latin.makedict.FormatSpec.DictionaryOptions; import com.android.inputmethod.latin.makedict.FusionDictionary; -import com.android.inputmethod.latin.makedict.FusionDictionary.DictionaryOptions; import com.android.inputmethod.latin.makedict.FusionDictionary.PtNodeArray; -import com.android.inputmethod.latin.makedict.FusionDictionary.WeightedString; -import com.android.inputmethod.latin.makedict.Word; +import com.android.inputmethod.latin.makedict.ProbabilityInfo; +import com.android.inputmethod.latin.makedict.WeightedString; +import com.android.inputmethod.latin.makedict.WordProperty; +import com.android.inputmethod.latin.utils.CombinedFormatUtils; import java.io.BufferedReader; -import java.io.File; -import java.io.FileNotFoundException; +import java.io.BufferedWriter; import java.io.FileReader; import java.io.IOException; -import java.io.InputStream; -import java.io.InputStreamReader; -import java.io.Writer; import java.util.ArrayList; import java.util.HashMap; import java.util.TreeSet; @@ -41,18 +39,10 @@ import java.util.TreeSet; * All functions in this class are static. */ public class CombinedInputOutput { - - private static final String DICTIONARY_TAG = "dictionary"; - private static final String BIGRAM_TAG = "bigram"; - private static final String SHORTCUT_TAG = "shortcut"; - private static final String FREQUENCY_TAG = "f"; - private static final String WORD_TAG = "word"; - private static final String NOT_A_WORD_TAG = "not_a_word"; private static final String WHITELIST_TAG = "whitelist"; private static final String OPTIONS_TAG = "options"; - private static final String GERMAN_UMLAUT_PROCESSING_OPTION = "german_umlaut_processing"; - private static final String FRENCH_LIGATURE_PROCESSING_OPTION = "french_ligature_processing"; private static final String COMMENT_LINE_STARTER = "#"; + private static final int HISTORICAL_INFO_ELEMENT_COUNT = 3; /** * Basic test to find out whether the file is in the combined format or not. @@ -63,26 +53,15 @@ public class CombinedInputOutput { * @return true if the file is in the combined format, false otherwise */ public static boolean isCombinedDictionary(final String filename) { - BufferedReader reader = null; - try { - reader = new BufferedReader(new FileReader(new File(filename))); + try (final BufferedReader reader = new BufferedReader(new FileReader(filename))) { String firstLine = reader.readLine(); while (firstLine.startsWith(COMMENT_LINE_STARTER)) { firstLine = reader.readLine(); } - return firstLine.matches("^" + DICTIONARY_TAG + "=[^:]+(:[^=]+=[^:]+)*"); - } catch (FileNotFoundException e) { - return false; - } catch (IOException e) { + return firstLine.matches( + "^" + CombinedFormatUtils.DICTIONARY_TAG + "=[^:]+(:[^=]+=[^:]+)*"); + } catch (final IOException e) { return false; - } finally { - if (reader != null) { - try { - reader.close(); - } catch (IOException e) { - // do nothing - } - } } } @@ -92,18 +71,17 @@ public class CombinedInputOutput { * This is the public method that will read a combined file and return the corresponding memory * representation. * - * @param source the file to read the data from. + * @param reader the buffered reader to read the data from. * @return the in-memory representation of the dictionary. */ - public static FusionDictionary readDictionaryCombined(final InputStream source) + public static FusionDictionary readDictionaryCombined(final BufferedReader reader) throws IOException { - final BufferedReader reader = new BufferedReader(new InputStreamReader(source, "UTF-8")); String headerLine = reader.readLine(); while (headerLine.startsWith(COMMENT_LINE_STARTER)) { headerLine = reader.readLine(); } final String header[] = headerLine.split(","); - final HashMap<String, String> attributes = new HashMap<String, String>(); + final HashMap<String, String> attributes = new HashMap<>(); for (String item : header) { final String keyValue[] = item.split("="); if (2 != keyValue.length) { @@ -112,53 +90,62 @@ public class CombinedInputOutput { attributes.put(keyValue[0], keyValue[1]); } - final boolean processUmlauts = - GERMAN_UMLAUT_PROCESSING_OPTION.equals(attributes.get(OPTIONS_TAG)); - final boolean processLigatures = - FRENCH_LIGATURE_PROCESSING_OPTION.equals(attributes.get(OPTIONS_TAG)); attributes.remove(OPTIONS_TAG); - final FusionDictionary dict = new FusionDictionary(new PtNodeArray(), new DictionaryOptions( - attributes, processUmlauts, processLigatures)); + final FusionDictionary dict = + new FusionDictionary(new PtNodeArray(), new DictionaryOptions(attributes)); String line; String word = null; - int freq = 0; + ProbabilityInfo probabilityInfo = new ProbabilityInfo(0); boolean isNotAWord = false; - ArrayList<WeightedString> bigrams = new ArrayList<WeightedString>(); - ArrayList<WeightedString> shortcuts = new ArrayList<WeightedString>(); + ArrayList<WeightedString> bigrams = new ArrayList<>(); + ArrayList<WeightedString> shortcuts = new ArrayList<>(); while (null != (line = reader.readLine())) { if (line.startsWith(COMMENT_LINE_STARTER)) continue; final String args[] = line.trim().split(","); - if (args[0].matches(WORD_TAG + "=.*")) { + if (args[0].matches(CombinedFormatUtils.WORD_TAG + "=.*")) { if (null != word) { - dict.add(word, freq, shortcuts.isEmpty() ? null : shortcuts, isNotAWord); + dict.add(word, probabilityInfo, shortcuts.isEmpty() ? null : shortcuts, + isNotAWord); for (WeightedString s : bigrams) { - dict.setBigram(word, s.mWord, s.mFrequency); + dict.setBigram(word, s.mWord, s.mProbabilityInfo); } } - if (!shortcuts.isEmpty()) shortcuts = new ArrayList<WeightedString>(); - if (!bigrams.isEmpty()) bigrams = new ArrayList<WeightedString>(); + if (!shortcuts.isEmpty()) shortcuts = new ArrayList<>(); + if (!bigrams.isEmpty()) bigrams = new ArrayList<>(); isNotAWord = false; for (String param : args) { final String params[] = param.split("=", 2); if (2 != params.length) throw new RuntimeException("Wrong format : " + line); - if (WORD_TAG.equals(params[0])) { + if (CombinedFormatUtils.WORD_TAG.equals(params[0])) { word = params[1]; - } else if (FREQUENCY_TAG.equals(params[0])) { - freq = Integer.parseInt(params[1]); - } else if (NOT_A_WORD_TAG.equals(params[0])) { + } else if (CombinedFormatUtils.PROBABILITY_TAG.equals(params[0])) { + probabilityInfo = new ProbabilityInfo(Integer.parseInt(params[1]), + probabilityInfo.mTimestamp, probabilityInfo.mLevel, + probabilityInfo.mCount); + } else if (CombinedFormatUtils.HISTORICAL_INFO_TAG.equals(params[0])) { + final String[] historicalInfoParams = + params[1].split(CombinedFormatUtils.HISTORICAL_INFO_SEPARATOR); + if (historicalInfoParams.length != HISTORICAL_INFO_ELEMENT_COUNT) { + throw new RuntimeException("Wrong format (historical info) : " + line); + } + probabilityInfo = new ProbabilityInfo(probabilityInfo.mProbability, + Integer.parseInt(historicalInfoParams[0]), + Integer.parseInt(historicalInfoParams[1]), + Integer.parseInt(historicalInfoParams[2])); + } else if (CombinedFormatUtils.NOT_A_WORD_TAG.equals(params[0])) { isNotAWord = "true".equals(params[1]); } } - } else if (args[0].matches(SHORTCUT_TAG + "=.*")) { + } else if (args[0].matches(CombinedFormatUtils.SHORTCUT_TAG + "=.*")) { String shortcut = null; int shortcutFreq = 0; for (String param : args) { final String params[] = param.split("=", 2); if (2 != params.length) throw new RuntimeException("Wrong format : " + line); - if (SHORTCUT_TAG.equals(params[0])) { + if (CombinedFormatUtils.SHORTCUT_TAG.equals(params[0])) { shortcut = params[1]; - } else if (FREQUENCY_TAG.equals(params[0])) { + } else if (CombinedFormatUtils.PROBABILITY_TAG.equals(params[0])) { shortcutFreq = WHITELIST_TAG.equals(params[1]) ? FormatSpec.SHORTCUT_WHITELIST_FREQUENCY : Integer.parseInt(params[1]); @@ -169,29 +156,42 @@ public class CombinedInputOutput { } else { throw new RuntimeException("Wrong format : " + line); } - } else if (args[0].matches(BIGRAM_TAG + "=.*")) { + } else if (args[0].matches(CombinedFormatUtils.BIGRAM_TAG + "=.*")) { String secondWordOfBigram = null; - int bigramFreq = 0; + ProbabilityInfo bigramProbabilityInfo = new ProbabilityInfo(0); for (String param : args) { final String params[] = param.split("=", 2); if (2 != params.length) throw new RuntimeException("Wrong format : " + line); - if (BIGRAM_TAG.equals(params[0])) { + if (CombinedFormatUtils.BIGRAM_TAG.equals(params[0])) { secondWordOfBigram = params[1]; - } else if (FREQUENCY_TAG.equals(params[0])) { - bigramFreq = Integer.parseInt(params[1]); + } else if (CombinedFormatUtils.PROBABILITY_TAG.equals(params[0])) { + bigramProbabilityInfo = new ProbabilityInfo(Integer.parseInt(params[1]), + bigramProbabilityInfo.mTimestamp, bigramProbabilityInfo.mLevel, + bigramProbabilityInfo.mCount); + } else if (CombinedFormatUtils.HISTORICAL_INFO_TAG.equals(params[0])) { + final String[] historicalInfoParams = + params[1].split(CombinedFormatUtils.HISTORICAL_INFO_SEPARATOR); + if (historicalInfoParams.length != HISTORICAL_INFO_ELEMENT_COUNT) { + throw new RuntimeException("Wrong format (historical info) : " + line); + } + bigramProbabilityInfo = new ProbabilityInfo( + bigramProbabilityInfo.mProbability, + Integer.parseInt(historicalInfoParams[0]), + Integer.parseInt(historicalInfoParams[1]), + Integer.parseInt(historicalInfoParams[2])); } } if (null != secondWordOfBigram) { - bigrams.add(new WeightedString(secondWordOfBigram, bigramFreq)); + bigrams.add(new WeightedString(secondWordOfBigram, bigramProbabilityInfo)); } else { throw new RuntimeException("Wrong format : " + line); } } } if (null != word) { - dict.add(word, freq, shortcuts.isEmpty() ? null : shortcuts, isNotAWord); + dict.add(word, probabilityInfo, shortcuts.isEmpty() ? null : shortcuts, isNotAWord); for (WeightedString s : bigrams) { - dict.setBigram(word, s.mWord, s.mFrequency); + dict.setBigram(word, s.mWord, s.mProbabilityInfo); } } @@ -201,48 +201,19 @@ public class CombinedInputOutput { /** * Writes a dictionary to a combined file. * - * @param destination a destination stream to write to. + * @param destination a destination writer. * @param dict the dictionary to write. */ - public static void writeDictionaryCombined(Writer destination, FusionDictionary dict) - throws IOException { - final TreeSet<Word> set = new TreeSet<Word>(); - for (Word word : dict) { - set.add(word); // This for ordering by frequency, then by asciibetic order - } - final HashMap<String, String> options = dict.mOptions.mAttributes; - destination.write(DICTIONARY_TAG + "="); - if (options.containsKey(DICTIONARY_TAG)) { - destination.write(options.get(DICTIONARY_TAG)); - options.remove(DICTIONARY_TAG); + public static void writeDictionaryCombined(final BufferedWriter destination, + final FusionDictionary dict) throws IOException { + final TreeSet<WordProperty> wordPropertiesInDict = new TreeSet<>(); + for (final WordProperty wordProperty : dict) { + // This for ordering by frequency, then by asciibetic order + wordPropertiesInDict.add(wordProperty); } - if (dict.mOptions.mGermanUmlautProcessing) { - destination.write("," + OPTIONS_TAG + "=" + GERMAN_UMLAUT_PROCESSING_OPTION); - } else if (dict.mOptions.mFrenchLigatureProcessing) { - destination.write("," + OPTIONS_TAG + "=" + FRENCH_LIGATURE_PROCESSING_OPTION); - } - for (final String key : dict.mOptions.mAttributes.keySet()) { - final String value = dict.mOptions.mAttributes.get(key); - destination.write("," + key + "=" + value); - } - destination.write("\n"); - for (Word word : set) { - destination.write(" " + WORD_TAG + "=" + word.mWord + "," - + FREQUENCY_TAG + "=" + word.mFrequency - + (word.mIsNotAWord ? "," + NOT_A_WORD_TAG + "=true\n" : "\n")); - if (null != word.mShortcutTargets) { - for (WeightedString target : word.mShortcutTargets) { - destination.write(" " + SHORTCUT_TAG + "=" + target.mWord + "," - + FREQUENCY_TAG + "=" + target.mFrequency + "\n"); - } - } - if (null != word.mBigrams) { - for (WeightedString bigram : word.mBigrams) { - destination.write(" " + BIGRAM_TAG + "=" + bigram.mWord + "," - + FREQUENCY_TAG + "=" + bigram.mFrequency + "\n"); - } - } + destination.write(CombinedFormatUtils.formatAttributeMap(dict.mOptions.mAttributes)); + for (final WordProperty wordProperty : wordPropertiesInDict) { + destination.write(CombinedFormatUtils.formatWordProperty(wordProperty)); } - destination.close(); } } diff --git a/tools/dicttool/src/com/android/inputmethod/latin/dicttool/Compress.java b/tools/dicttool/src/com/android/inputmethod/latin/dicttool/Compress.java index b7f48b522..728a159a0 100644 --- a/tools/dicttool/src/com/android/inputmethod/latin/dicttool/Compress.java +++ b/tools/dicttool/src/com/android/inputmethod/latin/dicttool/Compress.java @@ -16,11 +16,6 @@ package com.android.inputmethod.latin.dicttool; -import java.io.BufferedInputStream; -import java.io.BufferedOutputStream; -import java.io.File; -import java.io.FileInputStream; -import java.io.FileOutputStream; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; @@ -32,8 +27,7 @@ public class Compress { // This container class is not publicly instantiable. } - public static OutputStream getCompressedStream(final OutputStream out) - throws java.io.IOException { + public static OutputStream getCompressedStream(final OutputStream out) throws IOException { return new GZIPOutputStream(out); } @@ -43,7 +37,6 @@ public class Compress { static public class Compressor extends Dicttool.Command { public static final String COMMAND = "compress"; - public static final String STDIN_OR_STDOUT = "-"; public Compressor() { } @@ -61,17 +54,18 @@ public class Compress { } final String inFilename = mArgs.length >= 1 ? mArgs[0] : STDIN_OR_STDOUT; final String outFilename = mArgs.length >= 2 ? mArgs[1] : STDIN_OR_STDOUT; - final InputStream input = inFilename.equals(STDIN_OR_STDOUT) ? System.in - : new BufferedInputStream(new FileInputStream(new File(inFilename))); - final OutputStream output = outFilename.equals(STDIN_OR_STDOUT) ? System.out - : new BufferedOutputStream(new FileOutputStream(new File(outFilename))); - BinaryDictOffdeviceUtils.copy(input, new GZIPOutputStream(output)); + try ( + final InputStream input = getFileInputStreamOrStdIn(inFilename); + final OutputStream compressedOutput = getCompressedStream( + getFileOutputStreamOrStdOut(outFilename)) + ) { + BinaryDictOffdeviceUtils.copy(input, compressedOutput); + } } } static public class Uncompressor extends Dicttool.Command { public static final String COMMAND = "uncompress"; - public static final String STDIN_OR_STDOUT = "-"; public Uncompressor() { } @@ -89,11 +83,13 @@ public class Compress { } final String inFilename = mArgs.length >= 1 ? mArgs[0] : STDIN_OR_STDOUT; final String outFilename = mArgs.length >= 2 ? mArgs[1] : STDIN_OR_STDOUT; - final InputStream input = inFilename.equals(STDIN_OR_STDOUT) ? System.in - : new BufferedInputStream(new FileInputStream(new File(inFilename))); - final OutputStream output = outFilename.equals(STDIN_OR_STDOUT) ? System.out - : new BufferedOutputStream(new FileOutputStream(new File(outFilename))); - BinaryDictOffdeviceUtils.copy(new GZIPInputStream(input), output); + try ( + final InputStream uncompressedInput = getUncompressedStream( + getFileInputStreamOrStdIn(inFilename)); + final OutputStream output = getFileOutputStreamOrStdOut(outFilename) + ) { + BinaryDictOffdeviceUtils.copy(uncompressedInput, output); + } } } } diff --git a/tools/dicttool/src/com/android/inputmethod/latin/dicttool/DictionaryMaker.java b/tools/dicttool/src/com/android/inputmethod/latin/dicttool/DictionaryMaker.java index 5c7e8b4f2..3d0557b5c 100644 --- a/tools/dicttool/src/com/android/inputmethod/latin/dicttool/DictionaryMaker.java +++ b/tools/dicttool/src/com/android/inputmethod/latin/dicttool/DictionaryMaker.java @@ -17,28 +17,33 @@ package com.android.inputmethod.latin.dicttool; import com.android.inputmethod.latin.makedict.BinaryDictDecoderUtils; +import com.android.inputmethod.latin.makedict.BinaryDictIOUtils; import com.android.inputmethod.latin.makedict.DictDecoder; import com.android.inputmethod.latin.makedict.DictEncoder; import com.android.inputmethod.latin.makedict.FormatSpec; import com.android.inputmethod.latin.makedict.FusionDictionary; import com.android.inputmethod.latin.makedict.MakedictLog; import com.android.inputmethod.latin.makedict.UnsupportedFormatException; -import com.android.inputmethod.latin.makedict.Ver3DictEncoder; +import com.android.inputmethod.latin.makedict.Ver2DictEncoder; import com.android.inputmethod.latin.makedict.Ver4DictEncoder; +import org.xml.sax.SAXException; + +import java.io.BufferedInputStream; +import java.io.BufferedReader; import java.io.BufferedWriter; import java.io.File; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.FileWriter; import java.io.IOException; +import java.io.InputStream; +import java.io.InputStreamReader; import java.util.Arrays; import java.util.LinkedList; import javax.xml.parsers.ParserConfigurationException; -import org.xml.sax.SAXException; - /** * Main class/method for DictionaryMaker. */ @@ -46,7 +51,6 @@ public class DictionaryMaker { static class Arguments { private static final String OPTION_VERSION_2 = "-2"; - private static final String OPTION_VERSION_3 = "-3"; private static final String OPTION_VERSION_4 = "-4"; private static final String OPTION_INPUT_SOURCE = "-s"; private static final String OPTION_INPUT_BIGRAM_XML = "-b"; @@ -138,7 +142,7 @@ public class DictionaryMaker { } public Arguments(String[] argsArray) throws IOException { - final LinkedList<String> args = new LinkedList<String>(Arrays.asList(argsArray)); + final LinkedList<String> args = new LinkedList<>(Arrays.asList(argsArray)); if (args.isEmpty()) { displayHelp(); } @@ -158,10 +162,8 @@ public class DictionaryMaker { if (arg.charAt(0) == '-') { if (OPTION_VERSION_2.equals(arg)) { // Do nothing, this is the default - } else if (OPTION_VERSION_3.equals(arg)) { - outputBinaryFormatVersion = 3; } else if (OPTION_VERSION_4.equals(arg)) { - outputBinaryFormatVersion = 4; + outputBinaryFormatVersion = FormatSpec.VERSION4; } else if (OPTION_HELP.equals(arg)) { displayHelp(); } else { @@ -267,8 +269,8 @@ public class DictionaryMaker { private static FusionDictionary readBinaryFile(final String binaryFilename) throws FileNotFoundException, IOException, UnsupportedFormatException { final File file = new File(binaryFilename); - final DictDecoder dictDecoder = FormatSpec.getDictDecoder(file); - return dictDecoder.readDictionaryBinary(null, false /* deleteDictIfBroken */); + final DictDecoder dictDecoder = BinaryDictIOUtils.getDictDecoder(file, 0, file.length()); + return dictDecoder.readDictionaryBinary(false /* deleteDictIfBroken */); } /** @@ -281,22 +283,21 @@ public class DictionaryMaker { */ private static FusionDictionary readCombinedFile(final String combinedFilename) throws FileNotFoundException, IOException { - FileInputStream inStream = null; - try { - final File file = new File(combinedFilename); - inStream = new FileInputStream(file); - return CombinedInputOutput.readDictionaryCombined(inStream); - } finally { - if (null != inStream) { - try { - inStream.close(); - } catch (IOException e) { - // do nothing - } - } + try (final BufferedReader reader = new BufferedReader(new InputStreamReader( + new FileInputStream(combinedFilename), "UTF-8")) + ) { + return CombinedInputOutput.readDictionaryCombined(reader); } } + private static BufferedInputStream getBufferedFileInputStream(final String filename) + throws FileNotFoundException { + if (filename == null) { + return null; + } + return new BufferedInputStream(new FileInputStream(filename)); + } + /** * Read a dictionary from a unigram XML file, and optionally a bigram XML file. * @@ -312,12 +313,13 @@ public class DictionaryMaker { private static FusionDictionary readXmlFile(final String unigramXmlFilename, final String shortcutXmlFilename, final String bigramXmlFilename) throws FileNotFoundException, SAXException, IOException, ParserConfigurationException { - final FileInputStream unigrams = new FileInputStream(new File(unigramXmlFilename)); - final FileInputStream shortcuts = null == shortcutXmlFilename ? null : - new FileInputStream(new File(shortcutXmlFilename)); - final FileInputStream bigrams = null == bigramXmlFilename ? null : - new FileInputStream(new File(bigramXmlFilename)); - return XmlDictInputOutput.readDictionaryXml(unigrams, shortcuts, bigrams); + try ( + final BufferedInputStream unigrams = getBufferedFileInputStream(unigramXmlFilename); + final BufferedInputStream shortcuts = getBufferedFileInputStream(shortcutXmlFilename); + final BufferedInputStream bigrams = getBufferedFileInputStream(bigramXmlFilename); + ) { + return XmlDictInputOutput.readDictionaryXml(unigrams, shortcuts, bigrams); + } } /** @@ -358,10 +360,10 @@ public class DictionaryMaker { final File outputFile = new File(outputFilename); final FormatSpec.FormatOptions formatOptions = new FormatSpec.FormatOptions(version); final DictEncoder dictEncoder; - if (version == 4) { + if (version == FormatSpec.VERSION4) { dictEncoder = new Ver4DictEncoder(outputFile); } else { - dictEncoder = new Ver3DictEncoder(outputFile); + dictEncoder = new Ver2DictEncoder(outputFile); } dictEncoder.writeDictionary(dict, formatOptions); } @@ -376,8 +378,9 @@ public class DictionaryMaker { */ private static void writeXmlDictionary(final String outputFilename, final FusionDictionary dict) throws FileNotFoundException, IOException { - XmlDictInputOutput.writeDictionaryXml(new BufferedWriter(new FileWriter(outputFilename)), - dict); + try (final BufferedWriter writer = new BufferedWriter(new FileWriter(outputFilename))) { + XmlDictInputOutput.writeDictionaryXml(writer, dict); + } } /** @@ -390,7 +393,8 @@ public class DictionaryMaker { */ private static void writeCombinedDictionary(final String outputFilename, final FusionDictionary dict) throws FileNotFoundException, IOException { - CombinedInputOutput.writeDictionaryCombined( - new BufferedWriter(new FileWriter(outputFilename)), dict); + try (final BufferedWriter writer = new BufferedWriter(new FileWriter(outputFilename))) { + CombinedInputOutput.writeDictionaryCombined(writer, dict); + } } } 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 cacee5268..e49b35084 100644 --- a/tools/dicttool/src/com/android/inputmethod/latin/dicttool/Dicttool.java +++ b/tools/dicttool/src/com/android/inputmethod/latin/dicttool/Dicttool.java @@ -16,24 +16,63 @@ package com.android.inputmethod.latin.dicttool; +import java.io.BufferedInputStream; +import java.io.BufferedOutputStream; +import java.io.File; +import java.io.FileInputStream; +import java.io.FileNotFoundException; +import java.io.FileOutputStream; +import java.io.InputStream; +import java.io.OutputStream; import java.util.Arrays; import java.util.HashMap; public class Dicttool { public static abstract class Command { + public static final String STDIN_OR_STDOUT = "-"; protected String[] mArgs; + public void setArgs(String[] args) throws IllegalArgumentException { mArgs = args; } + + protected static InputStream getFileInputStreamOrStdIn(final String inFilename) + throws FileNotFoundException { + if (STDIN_OR_STDOUT.equals(inFilename)) { + return System.in; + } + return getFileInputStream(new File(inFilename)); + } + + protected static InputStream getFileInputStream(final File inFile) + throws FileNotFoundException { + return new BufferedInputStream(new FileInputStream(inFile)); + } + + protected static OutputStream getFileOutputStreamOrStdOut(final String outFilename) + throws FileNotFoundException { + if (STDIN_OR_STDOUT.equals(outFilename)) { + return System.out; + } + return getFileOutputStream(new File(outFilename)); + } + + protected static OutputStream getFileOutputStream(final File outFile) + throws FileNotFoundException { + return new BufferedOutputStream(new FileOutputStream(outFile)); + } + abstract public String getHelp(); abstract public void run() throws Exception; } - static HashMap<String, Class<? extends Command>> sCommands = - new HashMap<String, Class<? extends Command>>(); + + static HashMap<String, Class<? extends Command>> sCommands = new HashMap<>(); + static { CommandList.populate(); } + public static void addCommand(final String commandName, final Class<? extends Command> cls) { sCommands.put(commandName, cls); } @@ -61,7 +100,7 @@ public class Dicttool { return sCommands.containsKey(commandName); } - private Command getCommand(final String[] arguments) { + private static Command getCommand(final String[] arguments) { final String commandName = arguments[0]; if (!isCommand(commandName)) { throw new RuntimeException("Unknown command : " + commandName); @@ -77,7 +116,7 @@ public class Dicttool { * @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) { + private static int execute(final String[] arguments) { final Command command = getCommand(arguments); try { command.run(); @@ -96,6 +135,6 @@ public class Dicttool { return; } // Exit with the success/error code from #execute() as status. - System.exit(new Dicttool().execute(arguments)); + System.exit(execute(arguments)); } } diff --git a/tools/dicttool/src/com/android/inputmethod/latin/dicttool/Diff.java b/tools/dicttool/src/com/android/inputmethod/latin/dicttool/Diff.java index 66fd084cd..94d1ae8bb 100644 --- a/tools/dicttool/src/com/android/inputmethod/latin/dicttool/Diff.java +++ b/tools/dicttool/src/com/android/inputmethod/latin/dicttool/Diff.java @@ -18,8 +18,8 @@ package com.android.inputmethod.latin.dicttool; import com.android.inputmethod.latin.makedict.FusionDictionary; import com.android.inputmethod.latin.makedict.FusionDictionary.PtNode; -import com.android.inputmethod.latin.makedict.FusionDictionary.WeightedString; -import com.android.inputmethod.latin.makedict.Word; +import com.android.inputmethod.latin.makedict.WeightedString; +import com.android.inputmethod.latin.makedict.WordProperty; import java.util.Arrays; import java.util.ArrayList; @@ -85,20 +85,7 @@ public class Diff extends Dicttool.Command { private static void diffHeaders(final FusionDictionary dict0, final FusionDictionary dict1) { boolean hasDifferences = false; - if (dict0.mOptions.mFrenchLigatureProcessing != dict1.mOptions.mFrenchLigatureProcessing) { - System.out.println(" French ligature processing : " - + dict0.mOptions.mFrenchLigatureProcessing + " <=> " - + dict1.mOptions.mFrenchLigatureProcessing); - hasDifferences = true; - } - else if (dict0.mOptions.mGermanUmlautProcessing != dict1.mOptions.mGermanUmlautProcessing) { - System.out.println(" German umlaut processing : " - + dict0.mOptions.mGermanUmlautProcessing + " <=> " - + dict1.mOptions.mGermanUmlautProcessing); - hasDifferences = true; - } - final HashMap<String, String> options1 = - new HashMap<String, String>(dict1.mOptions.mAttributes); + final HashMap<String, String> options1 = new HashMap<>(dict1.mOptions.mAttributes); for (final String optionKey : dict0.mOptions.mAttributes.keySet()) { if (!dict0.mOptions.mAttributes.get(optionKey).equals( dict1.mOptions.mAttributes.get(optionKey))) { @@ -120,42 +107,47 @@ public class Diff extends Dicttool.Command { private static void diffWords(final FusionDictionary dict0, final FusionDictionary dict1) { boolean hasDifferences = false; - for (final Word word0 : dict0) { - final PtNode word1 = FusionDictionary.findWordInTree(dict1.mRootNodeArray, - word0.mWord); - if (null == word1) { + for (final WordProperty word0Property : dict0) { + final PtNode word1PtNode = FusionDictionary.findWordInTree(dict1.mRootNodeArray, + word0Property.mWord); + if (null == word1PtNode) { // This word is not in dict1 - System.out.println("Deleted: " + word0.mWord + " " + word0.mFrequency); + System.out.println("Deleted: " + word0Property.mWord + " " + + word0Property.getProbability()); hasDifferences = true; } else { // We found the word. Compare frequencies, shortcuts, bigrams - if (word0.mFrequency != word1.getFrequency()) { - System.out.println("Freq changed: " + word0.mWord + " " + word0.mFrequency - + " -> " + word1.getFrequency()); + if (word0Property.getProbability() != word1PtNode.getProbability()) { + System.out.println("Probability changed: " + word0Property.mWord + " " + + word0Property.getProbability() + " -> " + + word1PtNode.getProbability()); hasDifferences = true; } - if (word0.mIsNotAWord != word1.getIsNotAWord()) { - System.out.println("Not a word: " + word0.mWord + " " + word0.mIsNotAWord - + " -> " + word1.getIsNotAWord()); + if (word0Property.mIsNotAWord != word1PtNode.getIsNotAWord()) { + System.out.println("Not a word: " + word0Property.mWord + " " + + word0Property.mIsNotAWord + " -> " + word1PtNode.getIsNotAWord()); hasDifferences = true; } - if (word0.mIsBlacklistEntry != word1.getIsBlacklistEntry()) { - System.out.println("Blacklist: " + word0.mWord + " " + word0.mIsBlacklistEntry - + " -> " + word1.getIsBlacklistEntry()); + if (word0Property.mIsBlacklistEntry != word1PtNode.getIsBlacklistEntry()) { + System.out.println("Blacklist: " + word0Property.mWord + " " + + word0Property.mIsBlacklistEntry + " -> " + + word1PtNode.getIsBlacklistEntry()); hasDifferences = true; } - hasDifferences |= hasAttributesDifferencesAndPrintThemIfAny(word0.mWord, - "Bigram", word0.mBigrams, word1.getBigrams()); - hasDifferences |= hasAttributesDifferencesAndPrintThemIfAny(word0.mWord, - "Shortcut", word0.mShortcutTargets, word1.getShortcutTargets()); + hasDifferences |= hasAttributesDifferencesAndPrintThemIfAny(word0Property.mWord, + "Bigram", word0Property.mBigrams, word1PtNode.getBigrams()); + hasDifferences |= hasAttributesDifferencesAndPrintThemIfAny(word0Property.mWord, + "Shortcut", word0Property.mShortcutTargets, + word1PtNode.getShortcutTargets()); } } - for (final Word word1 : dict1) { - final PtNode word0 = FusionDictionary.findWordInTree(dict0.mRootNodeArray, - word1.mWord); - if (null == word0) { + for (final WordProperty word1Property : dict1) { + final PtNode word0PtNode = FusionDictionary.findWordInTree(dict0.mRootNodeArray, + word1Property.mWord); + if (null == word0PtNode) { // This word is not in dict0 - System.out.println("Added: " + word1.mWord + " " + word1.mFrequency); + System.out.println("Added: " + word1Property.mWord + " " + + word1Property.getProbability()); hasDifferences = true; } } @@ -171,7 +163,7 @@ public class Diff extends Dicttool.Command { if (null == list0) return false; for (final WeightedString attribute0 : list0) { System.out.println(type + " removed: " + word + " " + attribute0.mWord + " " - + attribute0.mFrequency); + + attribute0.getProbability()); } return true; } @@ -187,8 +179,8 @@ public class Diff extends Dicttool.Command { for (final WeightedString attribute1 : list1) { if (attribute0.mWord.equals(attribute1.mWord)) { System.out.println(type + " freq changed: " + word + " " - + attribute0.mWord + " " + attribute0.mFrequency + " -> " - + attribute1.mFrequency); + + attribute0.mWord + " " + attribute0.getProbability() + " -> " + + attribute1.getProbability()); list1.remove(attribute1); foundString = true; break; @@ -197,7 +189,7 @@ public class Diff extends Dicttool.Command { if (!foundString) { // We come here if we haven't found any matching string. System.out.println(type + " removed: " + word + " " + attribute0.mWord + " " - + attribute0.mFrequency); + + attribute0.getProbability()); } } else { list1.remove(attribute0); @@ -209,7 +201,7 @@ public class Diff extends Dicttool.Command { for (final WeightedString attribute1 : list1) { hasDifferences = true; System.out.println(type + " added: " + word + " " + attribute1.mWord + " " - + attribute1.mFrequency); + + attribute1.getProbability()); } return hasDifferences; } diff --git a/tools/dicttool/src/com/android/inputmethod/latin/dicttool/Info.java b/tools/dicttool/src/com/android/inputmethod/latin/dicttool/Info.java index 350f42772..9b2567fd3 100644 --- a/tools/dicttool/src/com/android/inputmethod/latin/dicttool/Info.java +++ b/tools/dicttool/src/com/android/inputmethod/latin/dicttool/Info.java @@ -19,8 +19,8 @@ package com.android.inputmethod.latin.dicttool; import com.android.inputmethod.latin.makedict.FormatSpec; import com.android.inputmethod.latin.makedict.FusionDictionary; import com.android.inputmethod.latin.makedict.FusionDictionary.PtNode; -import com.android.inputmethod.latin.makedict.FusionDictionary.WeightedString; -import com.android.inputmethod.latin.makedict.Word; +import com.android.inputmethod.latin.makedict.WeightedString; +import com.android.inputmethod.latin.makedict.WordProperty; import java.util.Arrays; import java.util.ArrayList; @@ -43,15 +43,16 @@ public class Info extends Dicttool.Command { int bigramCount = 0; int shortcutCount = 0; int whitelistCount = 0; - for (final Word w : dict) { + for (final WordProperty wordProperty : dict) { ++wordCount; - if (null != w.mBigrams) { - bigramCount += w.mBigrams.size(); + if (null != wordProperty.mBigrams) { + bigramCount += wordProperty.mBigrams.size(); } - if (null != w.mShortcutTargets) { - shortcutCount += w.mShortcutTargets.size(); - for (WeightedString shortcutTarget : w.mShortcutTargets) { - if (FormatSpec.SHORTCUT_WHITELIST_FREQUENCY == shortcutTarget.mFrequency) { + if (null != wordProperty.mShortcutTargets) { + shortcutCount += wordProperty.mShortcutTargets.size(); + for (WeightedString shortcutTarget : wordProperty.mShortcutTargets) { + if (FormatSpec.SHORTCUT_WHITELIST_FREQUENCY + == shortcutTarget.getProbability()) { ++whitelistCount; } } @@ -71,7 +72,7 @@ public class Info extends Dicttool.Command { return; } System.out.println("Word: " + word); - System.out.println(" Freq: " + ptNode.getFrequency()); + System.out.println(" Freq: " + ptNode.getProbability()); if (ptNode.getIsNotAWord()) { System.out.println(" Is not a word"); } @@ -84,8 +85,9 @@ public class Info extends Dicttool.Command { } else { for (final WeightedString shortcutTarget : shortcutTargets) { System.out.println(" Shortcut target: " + shortcutTarget.mWord + " (" - + (FormatSpec.SHORTCUT_WHITELIST_FREQUENCY == shortcutTarget.mFrequency - ? "whitelist" : shortcutTarget.mFrequency) + ")"); + + (FormatSpec.SHORTCUT_WHITELIST_FREQUENCY + == shortcutTarget.getProbability() ? + "whitelist" : shortcutTarget.getProbability()) + ")"); } } final ArrayList<WeightedString> bigrams = ptNode.getBigrams(); @@ -93,7 +95,8 @@ public class Info extends Dicttool.Command { System.out.println(" No bigrams"); } else { for (final WeightedString bigram : bigrams) { - System.out.println(" Bigram: " + bigram.mWord + " (" + bigram.mFrequency + ")"); + System.out.println( + " Bigram: " + bigram.mWord + " (" + bigram.getProbability() + ")"); } } } 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 dff3387be..1f6798269 100644 --- a/tools/dicttool/src/com/android/inputmethod/latin/dicttool/Package.java +++ b/tools/dicttool/src/com/android/inputmethod/latin/dicttool/Package.java @@ -21,8 +21,9 @@ import java.io.BufferedOutputStream; import java.io.File; import java.io.FileInputStream; import java.io.FileNotFoundException; -import java.io.FileOutputStream; import java.io.IOException; +import java.io.InputStream; +import java.io.OutputStream; public class Package { private Package() { @@ -86,9 +87,13 @@ public class Package { } System.out.println("Packaging : " + decodedSpec.describeChain()); System.out.println("Uncompressed size : " + decodedSpec.mFile.length()); - final FileOutputStream dstStream = new FileOutputStream(new File(mArgs[1])); - BinaryDictOffdeviceUtils.copy(new BufferedInputStream( - new FileInputStream(decodedSpec.mFile)), new BufferedOutputStream(dstStream)); + try ( + final InputStream input = getFileInputStream(decodedSpec.mFile); + final OutputStream output = new BufferedOutputStream( + getFileOutputStreamOrStdOut(mArgs[1])) + ) { + BinaryDictOffdeviceUtils.copy(input, output); + } } } } diff --git a/tools/dicttool/src/com/android/inputmethod/latin/dicttool/Test.java b/tools/dicttool/src/com/android/inputmethod/latin/dicttool/Test.java index 9174238da..b6383d788 100644 --- a/tools/dicttool/src/com/android/inputmethod/latin/dicttool/Test.java +++ b/tools/dicttool/src/com/android/inputmethod/latin/dicttool/Test.java @@ -18,31 +18,43 @@ package com.android.inputmethod.latin.dicttool; import com.android.inputmethod.latin.makedict.BinaryDictDecoderEncoderTests; import com.android.inputmethod.latin.makedict.BinaryDictEncoderFlattenTreeTests; -import com.android.inputmethod.latin.makedict.BinaryDictIOUtilsTests; import com.android.inputmethod.latin.makedict.FusionDictionaryTest; +import com.android.inputmethod.latin.utils.FileUtils; +import java.io.File; +import java.io.IOException; import java.lang.reflect.Constructor; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; +import java.nio.file.Files; import java.util.ArrayList; /** * Dicttool command implementing self-tests. */ public class Test extends Dicttool.Command { + private static final String getTmpDir() { + try { + return Files.createTempDirectory("dicttool").toString(); + } catch (IOException e) { + throw new RuntimeException("Can't get temporary directory", e); + } + } + private static final String TEST_TMP_DIR_BASE = getTmpDir(); + public static final File TEST_TMP_DIR = new File(TEST_TMP_DIR_BASE); public static final String COMMAND = "test"; + private static final int DEFAULT_MAX_UNIGRAMS = 1500; private long mSeed = System.currentTimeMillis(); - private int mMaxUnigrams = BinaryDictIOUtilsTests.DEFAULT_MAX_UNIGRAMS; + private int mMaxUnigrams = DEFAULT_MAX_UNIGRAMS; private static final Class<?>[] sClassesToTest = { BinaryDictOffdeviceUtilsTests.class, FusionDictionaryTest.class, BinaryDictDecoderEncoderTests.class, BinaryDictEncoderFlattenTreeTests.class, - BinaryDictIOUtilsTests.class }; - private ArrayList<Method> mAllTestMethods = new ArrayList<Method>(); - private ArrayList<String> mUsedTestMethods = new ArrayList<String>(); + private ArrayList<Method> mAllTestMethods = new ArrayList<>(); + private ArrayList<String> mUsedTestMethods = new ArrayList<>(); public Test() { for (final Class<?> c : sClassesToTest) { @@ -57,8 +69,12 @@ public class Test extends Dicttool.Command { @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"); + final StringBuilder s = new StringBuilder( + "test [-s seed] [-m maxUnigrams] [-n] [testName...]\n" + + "If seed is not specified, the current time is used.\n" + + "If -n option is provided, do not delete temporary files in " + + TEST_TMP_DIR_BASE + "/*.\n" + + "Test list is:\n"); for (final Method m : mAllTestMethods) { s.append(" "); s.append(m.getName()); @@ -71,17 +87,26 @@ public class Test extends Dicttool.Command { public void run() throws IllegalAccessException, InstantiationException, InvocationTargetException { int i = 0; + boolean deleteTmpDir = true; 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 if ("-n".equals(arg)) { + deleteTmpDir = false; } else { mUsedTestMethods.add(arg); } } - runChosenTests(); + try { + runChosenTests(); + } finally { + if (deleteTmpDir) { + FileUtils.deleteRecursively(TEST_TMP_DIR); + } + } } private void runChosenTests() throws IllegalAccessException, InstantiationException, diff --git a/tools/dicttool/src/com/android/inputmethod/latin/dicttool/XmlDictInputOutput.java b/tools/dicttool/src/com/android/inputmethod/latin/dicttool/XmlDictInputOutput.java index 4e99bf979..bdec44761 100644 --- a/tools/dicttool/src/com/android/inputmethod/latin/dicttool/XmlDictInputOutput.java +++ b/tools/dicttool/src/com/android/inputmethod/latin/dicttool/XmlDictInputOutput.java @@ -16,19 +16,23 @@ package com.android.inputmethod.latin.dicttool; +import com.android.inputmethod.latin.makedict.FormatSpec.DictionaryOptions; import com.android.inputmethod.latin.makedict.FusionDictionary; -import com.android.inputmethod.latin.makedict.FusionDictionary.DictionaryOptions; import com.android.inputmethod.latin.makedict.FusionDictionary.PtNodeArray; -import com.android.inputmethod.latin.makedict.FusionDictionary.WeightedString; -import com.android.inputmethod.latin.makedict.Word; +import com.android.inputmethod.latin.makedict.ProbabilityInfo; +import com.android.inputmethod.latin.makedict.WeightedString; +import com.android.inputmethod.latin.makedict.WordProperty; +import org.xml.sax.Attributes; +import org.xml.sax.SAXException; +import org.xml.sax.helpers.DefaultHandler; + +import java.io.BufferedInputStream; import java.io.BufferedReader; -import java.io.File; -import java.io.FileNotFoundException; -import java.io.FileReader; +import java.io.BufferedWriter; +import java.io.FileInputStream; import java.io.IOException; -import java.io.InputStream; -import java.io.Writer; +import java.io.InputStreamReader; import java.util.ArrayList; import java.util.HashMap; import java.util.TreeSet; @@ -37,10 +41,6 @@ import javax.xml.parsers.ParserConfigurationException; import javax.xml.parsers.SAXParser; import javax.xml.parsers.SAXParserFactory; -import org.xml.sax.Attributes; -import org.xml.sax.SAXException; -import org.xml.sax.helpers.DefaultHandler; - /** * Reads and writes XML files for a FusionDictionary. * @@ -52,14 +52,10 @@ public class XmlDictInputOutput { private static final String WORD_TAG = "w"; private static final String BIGRAM_TAG = "bigram"; private static final String SHORTCUT_TAG = "shortcut"; - private static final String FREQUENCY_ATTR = "f"; + private static final String PROBABILITY_ATTR = "f"; private static final String WORD_ATTR = "word"; private static final String NOT_A_WORD_ATTR = "not_a_word"; - private static final String OPTIONS_KEY = "options"; - private static final String GERMAN_UMLAUT_PROCESSING_OPTION = "german_umlaut_processing"; - private static final String FRENCH_LIGATURE_PROCESSING_OPTION = "french_ligature_processing"; - /** * SAX handler for a unigram XML file. */ @@ -68,6 +64,7 @@ public class XmlDictInputOutput { private static final int START = 1; private static final int WORD = 2; private static final int UNKNOWN = 3; + private static final int SHORTCUT_ONLY_WORD_PROBABILITY = 1; FusionDictionary mDictionary; int mState; // the state of the parser @@ -92,7 +89,8 @@ public class XmlDictInputOutput { final FusionDictionary dict = mDictionary; for (final String shortcutOnly : mShortcutsMap.keySet()) { if (dict.hasWord(shortcutOnly)) continue; - dict.add(shortcutOnly, 1, mShortcutsMap.get(shortcutOnly), true /* isNotAWord */); + dict.add(shortcutOnly, new ProbabilityInfo(SHORTCUT_ONLY_WORD_PROBABILITY), + mShortcutsMap.get(shortcutOnly), true /* isNotAWord */); } mDictionary = null; mShortcutsMap.clear(); @@ -109,23 +107,18 @@ public class XmlDictInputOutput { mWord = ""; for (int attrIndex = 0; attrIndex < attrs.getLength(); ++attrIndex) { final String attrName = attrs.getLocalName(attrIndex); - if (FREQUENCY_ATTR.equals(attrName)) { + if (PROBABILITY_ATTR.equals(attrName)) { mFreq = Integer.parseInt(attrs.getValue(attrIndex)); } } } else if (ROOT_TAG.equals(localName)) { - final HashMap<String, String> attributes = new HashMap<String, String>(); + final HashMap<String, String> attributes = new HashMap<>(); for (int attrIndex = 0; attrIndex < attrs.getLength(); ++attrIndex) { final String attrName = attrs.getLocalName(attrIndex); attributes.put(attrName, attrs.getValue(attrIndex)); } - final String optionsString = attributes.get(OPTIONS_KEY); - final boolean processUmlauts = - GERMAN_UMLAUT_PROCESSING_OPTION.equals(optionsString); - final boolean processLigatures = - FRENCH_LIGATURE_PROCESSING_OPTION.equals(optionsString); mDictionary = new FusionDictionary(new PtNodeArray(), - new DictionaryOptions(attributes, processUmlauts, processLigatures)); + new DictionaryOptions(attributes)); } else { mState = UNKNOWN; } @@ -144,7 +137,8 @@ public class XmlDictInputOutput { @Override public void endElement(String uri, String localName, String qName) { if (WORD == mState) { - mDictionary.add(mWord, mFreq, mShortcutsMap.get(mWord), false /* isNotAWord */); + mDictionary.add(mWord, new ProbabilityInfo(mFreq), mShortcutsMap.get(mWord), + false /* isNotAWord */); mState = START; } } @@ -174,7 +168,7 @@ public class XmlDictInputOutput { DST_ATTRIBUTE = dstAttribute; DST_FREQ = dstFreq; mSrc = null; - mAssocMap = new HashMap<String, ArrayList<WeightedString>>(); + mAssocMap = new HashMap<>(); } @Override @@ -186,7 +180,7 @@ public class XmlDictInputOutput { int freq = getValueFromFreqString(attrs.getValue(uri, DST_FREQ)); WeightedString bigram = new WeightedString(dst, freq / XML_TO_MEMORY_RATIO); ArrayList<WeightedString> bigramList = mAssocMap.get(mSrc); - if (null == bigramList) bigramList = new ArrayList<WeightedString>(); + if (null == bigramList) bigramList = new ArrayList<>(); bigramList.add(bigram); mAssocMap.put(mSrc, bigramList); } @@ -246,14 +240,13 @@ public class XmlDictInputOutput { protected int getValueFromFreqString(final String freqString) { if (WHITELIST_MARKER.equals(freqString)) { return WHITELIST_FREQ_VALUE; - } else { - final int intValue = super.getValueFromFreqString(freqString); - if (intValue < MIN_FREQ || intValue > MAX_FREQ) { - throw new RuntimeException("Shortcut freq out of range. Accepted range is " - + MIN_FREQ + ".." + MAX_FREQ); - } - return intValue; } + final int intValue = super.getValueFromFreqString(freqString); + if (intValue < MIN_FREQ || intValue > MAX_FREQ) { + throw new RuntimeException("Shortcut freq out of range. Accepted range is " + + MIN_FREQ + ".." + MAX_FREQ); + } + return intValue; } // As per getAssocMap(), this never returns null. @@ -271,23 +264,12 @@ public class XmlDictInputOutput { * @return true if the file is in the unigram XML format, false otherwise */ public static boolean isXmlUnigramDictionary(final String filename) { - BufferedReader reader = null; - try { - reader = new BufferedReader(new FileReader(new File(filename))); + try (final BufferedReader reader = new BufferedReader( + new InputStreamReader(new FileInputStream(filename), "UTF-8"))) { final String firstLine = reader.readLine(); return firstLine.matches("^\\s*<wordlist .*>\\s*$"); - } catch (FileNotFoundException e) { + } catch (final IOException e) { return false; - } catch (IOException e) { - return false; - } finally { - if (reader != null) { - try { - reader.close(); - } catch (IOException e) { - // do nothing - } - } } } @@ -302,8 +284,8 @@ public class XmlDictInputOutput { * @param bigrams the file to read the bigrams from, or null. * @return the in-memory representation of the dictionary. */ - public static FusionDictionary readDictionaryXml(final InputStream unigrams, - final InputStream shortcuts, final InputStream bigrams) + public static FusionDictionary readDictionaryXml(final BufferedInputStream unigrams, + final BufferedInputStream shortcuts, final BufferedInputStream bigrams) throws SAXException, IOException, ParserConfigurationException { final SAXParserFactory factory = SAXParserFactory.newInstance(); factory.setNamespaceAware(true); @@ -325,7 +307,7 @@ public class XmlDictInputOutput { final ArrayList<WeightedString> bigramList = bigramMap.get(firstWord); for (final WeightedString bigram : bigramList) { if (!dict.hasWord(bigram.mWord)) continue; - dict.setBigram(firstWord, bigram.mWord, bigram.mFrequency); + dict.setBigram(firstWord, bigram.mWord, bigram.mProbabilityInfo); } } return dict; @@ -352,44 +334,40 @@ public class XmlDictInputOutput { * @param destination a destination stream to write to. * @param dict the dictionary to write. */ - public static void writeDictionaryXml(Writer destination, FusionDictionary dict) - throws IOException { - final TreeSet<Word> set = new TreeSet<Word>(); - for (Word word : dict) { - set.add(word); + public static void writeDictionaryXml(final BufferedWriter destination, + final FusionDictionary dict) throws IOException { + final TreeSet<WordProperty> wordPropertiesInDict = new TreeSet<>(); + for (WordProperty wordProperty : dict) { + wordPropertiesInDict.add(wordProperty); } // TODO: use an XMLSerializer if this gets big destination.write("<wordlist format=\"2\""); - final HashMap<String, String> options = dict.mOptions.mAttributes; - if (dict.mOptions.mGermanUmlautProcessing) { - destination.write(" " + OPTIONS_KEY + "=\"" + GERMAN_UMLAUT_PROCESSING_OPTION + "\""); - } else if (dict.mOptions.mFrenchLigatureProcessing) { - destination.write(" " + OPTIONS_KEY + "=\"" + FRENCH_LIGATURE_PROCESSING_OPTION + "\""); - } for (final String key : dict.mOptions.mAttributes.keySet()) { final String value = dict.mOptions.mAttributes.get(key); destination.write(" " + key + "=\"" + value + "\""); } destination.write(">\n"); destination.write("<!-- Warning: there is no code to read this format yet. -->\n"); - for (Word word : set) { - destination.write(" <" + WORD_TAG + " " + WORD_ATTR + "=\"" + word.mWord + "\" " - + FREQUENCY_ATTR + "=\"" + word.mFrequency - + (word.mIsNotAWord ? "\" " + NOT_A_WORD_ATTR + "=\"true" : "") + "\">"); - if (null != word.mShortcutTargets) { + for (WordProperty wordProperty : wordPropertiesInDict) { + destination.write(" <" + WORD_TAG + " " + WORD_ATTR + "=\"" + wordProperty.mWord + + "\" " + PROBABILITY_ATTR + "=\"" + wordProperty.getProbability() + + (wordProperty.mIsNotAWord ? "\" " + NOT_A_WORD_ATTR + "=\"true" : "") + + "\">"); + if (null != wordProperty.mShortcutTargets) { destination.write("\n"); - for (WeightedString target : word.mShortcutTargets) { - destination.write(" <" + SHORTCUT_TAG + " " + FREQUENCY_ATTR + "=\"" - + target.mFrequency + "\">" + target.mWord + "</" + SHORTCUT_TAG + for (WeightedString target : wordProperty.mShortcutTargets) { + destination.write(" <" + SHORTCUT_TAG + " " + PROBABILITY_ATTR + "=\"" + + target.getProbability() + "\">" + target.mWord + "</" + SHORTCUT_TAG + ">\n"); } destination.write(" "); } - if (null != word.mBigrams) { + if (null != wordProperty.mBigrams) { destination.write("\n"); - for (WeightedString bigram : word.mBigrams) { - destination.write(" <" + BIGRAM_TAG + " " + FREQUENCY_ATTR + "=\"" - + bigram.mFrequency + "\">" + bigram.mWord + "</" + BIGRAM_TAG + ">\n"); + for (WeightedString bigram : wordProperty.mBigrams) { + destination.write(" <" + BIGRAM_TAG + " " + PROBABILITY_ATTR + "=\"" + + bigram.getProbability() + "\">" + bigram.mWord + + "</" + BIGRAM_TAG + ">\n"); } destination.write(" "); } diff --git a/tools/dicttool/src/com/android/inputmethod/latin/makedict/MakedictLog.java b/tools/dicttool/src/com/android/inputmethod/latin/makedict/MakedictLog.java deleted file mode 100644 index 7eccff2b4..000000000 --- a/tools/dicttool/src/com/android/inputmethod/latin/makedict/MakedictLog.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * 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.latin.makedict; - -/** - * Wrapper to redirect log events to the right output medium. - */ -public class MakedictLog { - public static final boolean DBG = true; - - private static void print(String message) { - System.out.println(message); - } - - public static void d(String message) { - print(message); - } - - public static void i(String message) { - print(message); - } - - public static void w(String message) { - print(message); - } - - public static void e(String message) { - print(message); - } -} diff --git a/tools/dicttool/src/com/android/inputmethod/latin/personalization/PersonalizationHelper.java b/tools/dicttool/src/com/android/inputmethod/latin/personalization/PersonalizationHelper.java new file mode 100644 index 000000000..a4ad6b514 --- /dev/null +++ b/tools/dicttool/src/com/android/inputmethod/latin/personalization/PersonalizationHelper.java @@ -0,0 +1,22 @@ +/* + * 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 com.android.inputmethod.latin.personalization; + +public class PersonalizationHelper { + public static void currentTimeChangedForTesting(final int currentTimestamp) { + } +} diff --git a/tools/dicttool/tests/com/android/inputmethod/latin/dicttool/BinaryDictOffdeviceUtilsTests.java b/tools/dicttool/tests/com/android/inputmethod/latin/dicttool/BinaryDictOffdeviceUtilsTests.java index 1baeb7a47..0236a446d 100644 --- a/tools/dicttool/tests/com/android/inputmethod/latin/dicttool/BinaryDictOffdeviceUtilsTests.java +++ b/tools/dicttool/tests/com/android/inputmethod/latin/dicttool/BinaryDictOffdeviceUtilsTests.java @@ -16,20 +16,22 @@ package com.android.inputmethod.latin.dicttool; +import com.android.inputmethod.latin.makedict.BinaryDictIOUtils; import com.android.inputmethod.latin.makedict.DictDecoder; import com.android.inputmethod.latin.makedict.DictEncoder; -import com.android.inputmethod.latin.makedict.FormatSpec; +import com.android.inputmethod.latin.makedict.DictionaryHeader; +import com.android.inputmethod.latin.makedict.FormatSpec.DictionaryOptions; import com.android.inputmethod.latin.makedict.FormatSpec.FormatOptions; import com.android.inputmethod.latin.makedict.FusionDictionary; -import com.android.inputmethod.latin.makedict.FusionDictionary.DictionaryOptions; import com.android.inputmethod.latin.makedict.FusionDictionary.PtNodeArray; +import com.android.inputmethod.latin.makedict.ProbabilityInfo; import com.android.inputmethod.latin.makedict.UnsupportedFormatException; -import com.android.inputmethod.latin.makedict.Ver3DictEncoder; +import com.android.inputmethod.latin.makedict.Ver2DictEncoder; import junit.framework.TestCase; -import java.io.File; import java.io.BufferedOutputStream; +import java.io.File; import java.io.FileOutputStream; import java.io.IOException; import java.io.OutputStream; @@ -42,25 +44,31 @@ public class BinaryDictOffdeviceUtilsTests extends TestCase { private static final int TEST_FREQ = 37; // Some arbitrary value unlikely to happen by chance public void testGetRawDictWorks() throws IOException, UnsupportedFormatException { + final String VERSION = "1"; + final String LOCALE = "test"; + final String ID = "main:test"; + // Create a thrice-compressed dictionary file. - final FusionDictionary dict = new FusionDictionary(new PtNodeArray(), - new DictionaryOptions(new HashMap<String, String>(), - false /* germanUmlautProcessing */, false /* frenchLigatureProcessing */)); - dict.add("foo", TEST_FREQ, null, false /* isNotAWord */); - dict.add("fta", 1, null, false /* isNotAWord */); - dict.add("ftb", 1, null, false /* isNotAWord */); - dict.add("bar", 1, null, false /* isNotAWord */); - dict.add("fool", 1, null, false /* isNotAWord */); + final DictionaryOptions testOptions = new DictionaryOptions(new HashMap<String, String>()); + testOptions.mAttributes.put(DictionaryHeader.DICTIONARY_VERSION_KEY, VERSION); + testOptions.mAttributes.put(DictionaryHeader.DICTIONARY_LOCALE_KEY, LOCALE); + testOptions.mAttributes.put(DictionaryHeader.DICTIONARY_ID_KEY, ID); + final FusionDictionary dict = new FusionDictionary(new PtNodeArray(), testOptions); + dict.add("foo", new ProbabilityInfo(TEST_FREQ), null, false /* isNotAWord */); + dict.add("fta", new ProbabilityInfo(1), null, false /* isNotAWord */); + dict.add("ftb", new ProbabilityInfo(1), null, false /* isNotAWord */); + dict.add("bar", new ProbabilityInfo(1), null, false /* isNotAWord */); + dict.add("fool", new ProbabilityInfo(1), null, false /* isNotAWord */); final File dst = File.createTempFile("testGetRawDict", ".tmp"); dst.deleteOnExit(); - - final OutputStream out = Compress.getCompressedStream( + try (final OutputStream out = Compress.getCompressedStream( Compress.getCompressedStream( Compress.getCompressedStream( - new BufferedOutputStream(new FileOutputStream(dst))))); - final DictEncoder dictEncoder = new Ver3DictEncoder(out); - dictEncoder.writeDictionary(dict, new FormatOptions(2, false)); + new BufferedOutputStream(new FileOutputStream(dst)))))) { + final DictEncoder dictEncoder = new Ver2DictEncoder(out); + dictEncoder.writeDictionary(dict, new FormatOptions(2, false)); + } // Test for an actually compressed dictionary and its contents final BinaryDictOffdeviceUtils.DecoderChainSpec decodeSpec = @@ -69,12 +77,18 @@ public class BinaryDictOffdeviceUtilsTests extends TestCase { assertEquals("Wrong decode spec", BinaryDictOffdeviceUtils.COMPRESSION, step); } assertEquals("Wrong decode spec", 3, decodeSpec.mDecoderSpec.size()); - final DictDecoder dictDecoder = FormatSpec.getDictDecoder(decodeSpec.mFile); - final FusionDictionary resultDict = dictDecoder.readDictionaryBinary( - null /* dict : an optional dictionary to add words to, or null */, - false /* deleteDictIfBroken */); + final DictDecoder dictDecoder = BinaryDictIOUtils.getDictDecoder(decodeSpec.mFile, 0, + decodeSpec.mFile.length()); + final FusionDictionary resultDict = + dictDecoder.readDictionaryBinary(false /* deleteDictIfBroken */); + assertEquals("Wrong version attribute", VERSION, resultDict.mOptions.mAttributes.get( + DictionaryHeader.DICTIONARY_VERSION_KEY)); + assertEquals("Wrong locale attribute", LOCALE, resultDict.mOptions.mAttributes.get( + DictionaryHeader.DICTIONARY_LOCALE_KEY)); + assertEquals("Wrong id attribute", ID, resultDict.mOptions.mAttributes.get( + DictionaryHeader.DICTIONARY_ID_KEY)); assertEquals("Dictionary can't be read back correctly", - FusionDictionary.findWordInTree(resultDict.mRootNodeArray, "foo").getFrequency(), + FusionDictionary.findWordInTree(resultDict.mRootNodeArray, "foo").getProbability(), TEST_FREQ); } @@ -82,11 +96,11 @@ public class BinaryDictOffdeviceUtilsTests extends TestCase { // Randomly create some 4k file containing garbage final File dst = File.createTempFile("testGetRawDict", ".tmp"); dst.deleteOnExit(); - final OutputStream out = new BufferedOutputStream(new FileOutputStream(dst)); - for (int i = 0; i < 1024; ++i) { - out.write(0x12345678); + try (final OutputStream out = new BufferedOutputStream(new FileOutputStream(dst))) { + for (int i = 0; i < 1024; ++i) { + out.write(0x12345678); + } } - out.close(); // Test that a random data file actually fails assertNull("Wrongly identified data file", @@ -94,12 +108,12 @@ public class BinaryDictOffdeviceUtilsTests extends TestCase { final File gzDst = File.createTempFile("testGetRawDict", ".tmp"); gzDst.deleteOnExit(); - final OutputStream gzOut = - Compress.getCompressedStream(new BufferedOutputStream(new FileOutputStream(gzDst))); - for (int i = 0; i < 1024; ++i) { - gzOut.write(0x12345678); + try (final OutputStream gzOut = Compress.getCompressedStream( + new BufferedOutputStream(new FileOutputStream(gzDst)))) { + for (int i = 0; i < 1024; ++i) { + gzOut.write(0x12345678); + } } - gzOut.close(); // Test that a compressed random data file actually fails assertNull("Wrongly identified data file", diff --git a/tools/dicttool/tests/com/android/inputmethod/latin/makedict/BinaryDictEncoderFlattenTreeTests.java b/tools/dicttool/tests/com/android/inputmethod/latin/makedict/BinaryDictEncoderFlattenTreeTests.java index 55058238c..aa228e72c 100644 --- a/tools/dicttool/tests/com/android/inputmethod/latin/makedict/BinaryDictEncoderFlattenTreeTests.java +++ b/tools/dicttool/tests/com/android/inputmethod/latin/makedict/BinaryDictEncoderFlattenTreeTests.java @@ -16,7 +16,7 @@ package com.android.inputmethod.latin.makedict; -import com.android.inputmethod.latin.makedict.FusionDictionary.DictionaryOptions; +import com.android.inputmethod.latin.makedict.FormatSpec.DictionaryOptions; import com.android.inputmethod.latin.makedict.FusionDictionary.PtNodeArray; import junit.framework.TestCase; @@ -32,13 +32,12 @@ public class BinaryDictEncoderFlattenTreeTests extends TestCase { // that it does not contain any duplicates. public void testFlattenNodes() { final FusionDictionary dict = new FusionDictionary(new PtNodeArray(), - new DictionaryOptions(new HashMap<String, String>(), - false /* germanUmlautProcessing */, false /* frenchLigatureProcessing */)); - dict.add("foo", 1, null, false /* isNotAWord */); - dict.add("fta", 1, null, false /* isNotAWord */); - dict.add("ftb", 1, null, false /* isNotAWord */); - dict.add("bar", 1, null, false /* isNotAWord */); - dict.add("fool", 1, null, false /* isNotAWord */); + new DictionaryOptions(new HashMap<String, String>())); + dict.add("foo", new ProbabilityInfo(1), null, false /* isNotAWord */); + dict.add("fta", new ProbabilityInfo(1), null, false /* isNotAWord */); + dict.add("ftb", new ProbabilityInfo(1), null, false /* isNotAWord */); + dict.add("bar", new ProbabilityInfo(1), null, false /* isNotAWord */); + dict.add("fool", new ProbabilityInfo(1), null, false /* isNotAWord */); final ArrayList<PtNodeArray> result = BinaryDictEncoderUtils.flattenTree(dict.mRootNodeArray); assertEquals(4, result.size()); 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 659650a05..71f8ac8d4 100644 --- a/tools/dicttool/tests/com/android/inputmethod/latin/makedict/FusionDictionaryTest.java +++ b/tools/dicttool/tests/com/android/inputmethod/latin/makedict/FusionDictionaryTest.java @@ -16,11 +16,11 @@ package com.android.inputmethod.latin.makedict; +import com.android.inputmethod.latin.makedict.FormatSpec.DictionaryOptions; import com.android.inputmethod.latin.makedict.FusionDictionary; import com.android.inputmethod.latin.makedict.FusionDictionary.PtNode; -import com.android.inputmethod.latin.makedict.FusionDictionary.DictionaryOptions; import com.android.inputmethod.latin.makedict.FusionDictionary.PtNodeArray; -import com.android.inputmethod.latin.makedict.Word; +import com.android.inputmethod.latin.makedict.WordProperty; import junit.framework.TestCase; @@ -32,7 +32,7 @@ import java.util.Random; * Unit tests for FusionDictionary. */ public class FusionDictionaryTest extends TestCase { - private static final ArrayList<String> sWords = new ArrayList<String>(); + private static final ArrayList<String> sWords = new ArrayList<>(); private static final int MAX_UNIGRAMS = 1000; private void prepare(final long seed) { @@ -87,8 +87,8 @@ public class FusionDictionaryTest extends TestCase { } private void dumpDict(final FusionDictionary dict) { - for (Word w : dict) { - System.out.println("Word " + dumpWord(w.mWord)); + for (WordProperty wordProperty : dict) { + System.out.println("Word " + dumpWord(wordProperty.mWord)); } } @@ -96,13 +96,12 @@ public class FusionDictionaryTest extends TestCase { // that it does not contain any duplicates. public void testFusion() { final FusionDictionary dict = new FusionDictionary(new PtNodeArray(), - new DictionaryOptions(new HashMap<String, String>(), - false /* germanUmlautProcessing */, false /* frenchLigatureProcessing */)); + new DictionaryOptions(new HashMap<String, String>())); final long time = System.currentTimeMillis(); prepare(time); for (int i = 0; i < sWords.size(); ++i) { System.out.println("Adding in pos " + i + " : " + dumpWord(sWords.get(i))); - dict.add(sWords.get(i), 180, null, false); + dict.add(sWords.get(i), new ProbabilityInfo(180), null, false); dumpDict(dict); checkDictionary(dict, sWords, i); } diff --git a/tools/dicttool/tests/etc/test-dicttool.sh b/tools/dicttool/tests/etc/test-dicttool.sh index 5eb44fc85..f96db6816 100755 --- a/tools/dicttool/tests/etc/test-dicttool.sh +++ b/tools/dicttool/tests/etc/test-dicttool.sh @@ -18,7 +18,7 @@ echo "Usage:" 1>&2 echo " source $0" 1>&2 echo " or" 1>&2 echo " . $0" 1>&2 -exit 1 +if [[ ${BASH_SOURCE[0]} != $0 ]]; then return; else exit 1; fi fi find out -name "dicttool_aosp*" -exec rm -rf {} \; > /dev/null 2>&1 diff --git a/tools/make-keyboard-text/res/com/android/inputmethod/keyboard/internal/KeyboardTextsSet.tmpl b/tools/make-keyboard-text/res/com/android/inputmethod/keyboard/internal/KeyboardTextsSet.tmpl deleted file mode 100644 index 4cd9c236b..000000000 --- a/tools/make-keyboard-text/res/com/android/inputmethod/keyboard/internal/KeyboardTextsSet.tmpl +++ /dev/null @@ -1,132 +0,0 @@ -/* - * 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.internal; - -import android.content.Context; -import android.content.res.Resources; - -import com.android.inputmethod.annotations.UsedForTesting; -import com.android.inputmethod.latin.utils.CollectionUtils; - -import java.util.HashMap; - -/** - * !!!!! DO NOT EDIT THIS FILE !!!!! - * - * This file is generated by tools/make-keyboard-text. The base template file is - * tools/make-keyboard-text/res/com/android/inputmethod/keyboard/internal/KeyboardTextsSet.tmpl - * - * This file must be updated when any text resources in keyboard layout files have been changed. - * These text resources are referred as "!text/<resource_name>" in keyboard XML definitions, - * and should be defined in - * tools/make-keyboard-text/res/values-<locale>/donottranslate-more-keys.xml - * - * To update this file, please run the following commands. - * $ cd $ANDROID_BUILD_TOP - * $ mmm packages/inputmethods/LatinIME/tools/make-keyboard-text - * $ make-keyboard-text -java packages/inputmethods/LatinIME/java/src - * - * The updated source file will be generated to the following path (this file). - * packages/inputmethods/LatinIME/java/src/com/android/inputmethod/keyboard/internal/ - * KeyboardTextsSet.java - */ -public final class KeyboardTextsSet { - // Language to texts map. - private static final HashMap<String, String[]> sLocaleToTextsMap = CollectionUtils.newHashMap(); - private static final HashMap<String, Integer> sNameToIdsMap = CollectionUtils.newHashMap(); - - private String[] mTexts; - // Resource name to text map. - private HashMap<String, String> mResourceNameToTextsMap = CollectionUtils.newHashMap(); - - public void setLanguage(final String language) { - mTexts = sLocaleToTextsMap.get(language); - if (mTexts == null) { - mTexts = LANGUAGE_DEFAULT; - } - } - - public void loadStringResources(final Context context) { - final int referenceId = context.getApplicationInfo().labelRes; - loadStringResourcesInternal(context, RESOURCE_NAMES, referenceId); - } - - @UsedForTesting - void loadStringResourcesInternal(final Context context, final String[] resourceNames, - final int referenceId) { - final Resources res = context.getResources(); - final String packageName = res.getResourcePackageName(referenceId); - for (final String resName : resourceNames) { - final int resId = res.getIdentifier(resName, "string", packageName); - mResourceNameToTextsMap.put(resName, res.getString(resId)); - } - } - - public String getText(final String name) { - String text = mResourceNameToTextsMap.get(name); - if (text != null) { - return text; - } - final Integer id = sNameToIdsMap.get(name); - if (id == null) throw new RuntimeException("Unknown label: " + name); - text = (id < mTexts.length) ? mTexts[id] : null; - return (text == null) ? LANGUAGE_DEFAULT[id] : text; - } - - private static final String[] RESOURCE_NAMES = { - // These texts' name should be aligned with the @string/<name> in values/strings.xml. - // Labels for action. - "label_go_key", - // "label_search_key", - "label_send_key", - "label_next_key", - "label_done_key", - "label_previous_key", - // Other labels. - "label_pause_key", - "label_wait_key", - }; - - private static final String[] NAMES = { - /* @NAMES@ */ - }; - - private static final String EMPTY = ""; - - /* Default texts */ - private static final String[] LANGUAGE_DEFAULT = { - /* @DEFAULT_TEXTS@ */ - }; - - /* @TEXTS@ */ - private static final Object[] LANGUAGES_AND_TEXTS = { - /* @LANGUAGES_AND_TEXTS@ */ - }; - - static { - int id = 0; - for (final String name : NAMES) { - sNameToIdsMap.put(name, id++); - } - - for (int i = 0; i < LANGUAGES_AND_TEXTS.length; i += 2) { - final String language = (String)LANGUAGES_AND_TEXTS[i]; - final String[] texts = (String[])LANGUAGES_AND_TEXTS[i + 1]; - sLocaleToTextsMap.put(language, texts); - } - } -} diff --git a/tools/make-keyboard-text/res/src/com/android/inputmethod/keyboard/internal/KeyboardTextsTable.tmpl b/tools/make-keyboard-text/res/src/com/android/inputmethod/keyboard/internal/KeyboardTextsTable.tmpl new file mode 100644 index 000000000..6a7469ccb --- /dev/null +++ b/tools/make-keyboard-text/res/src/com/android/inputmethod/keyboard/internal/KeyboardTextsTable.tmpl @@ -0,0 +1,114 @@ +/* + * 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 com.android.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/res/src/com/android/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/<resource_name>" in keyboard XML definitions, + * and should be defined in + * tools/make-keyboard-text/res/values-<locale>/donottranslate-more-keys.xml + * + * To update this file, please run the following commands. + * $ cd $ANDROID_BUILD_TOP + * $ mmm packages/inputmethods/LatinIME/tools/make-keyboard-text + * $ make-keyboard-text -java packages/inputmethods/LatinIME/java + * + * The updated source file will be generated to the following path (this file). + * packages/inputmethods/LatinIME/java/src/com/android/inputmethod/keyboard/internal/ + * KeyboardTextsTable.java + */ +public final class KeyboardTextsTable { + // Name to index map. + private static final HashMap<String, Integer> sNameToIndexesMap = new HashMap<>(); + // Locale to texts table map. + private static final HashMap<String, String[]> sLocaleToTextsTableMap = new HashMap<>(); + // TODO: Remove this variable after debugging. + // Texts table to locale maps. + private static final HashMap<String[], String> 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; + } + // Sanity 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); + } + } +} diff --git a/tools/make-keyboard-text/res/values-af/donottranslate-more-keys.xml b/tools/make-keyboard-text/res/values-af/donottranslate-more-keys.xml index ee96f442d..45acb7e57 100644 --- a/tools/make-keyboard-text/res/values-af/donottranslate-more-keys.xml +++ b/tools/make-keyboard-text/res/values-af/donottranslate-more-keys.xml @@ -27,7 +27,7 @@ U+00E3: "ã" LATIN SMALL LETTER A WITH TILDE U+00E5: "å" LATIN SMALL LETTER A WITH RING ABOVE U+0101: "ā" LATIN SMALL LETTER A WITH MACRON --> - <string name="more_keys_for_a">á,â,ä,à,æ,ã,å,ā</string> + <string name="morekeys_a">á,â,ä,à,æ,ã,å,ā</string> <!-- U+00E9: "é" LATIN SMALL LETTER E WITH ACUTE U+00E8: "è" LATIN SMALL LETTER E WITH GRAVE U+00EA: "ê" LATIN SMALL LETTER E WITH CIRCUMFLEX @@ -35,7 +35,7 @@ U+0119: "ę" LATIN SMALL LETTER E WITH OGONEK U+0117: "ė" LATIN SMALL LETTER E WITH DOT ABOVE U+0113: "ē" LATIN SMALL LETTER E WITH MACRON --> - <string name="more_keys_for_e">é,è,ê,ë,ę,ė,ē</string> + <string name="morekeys_e">é,è,ê,ë,ę,ė,ē</string> <!-- U+00ED: "í" LATIN SMALL LETTER I WITH ACUTE U+00EC: "ì" LATIN SMALL LETTER I WITH GRAVE U+00EF: "ï" LATIN SMALL LETTER I WITH DIAERESIS @@ -43,7 +43,7 @@ U+012F: "į" LATIN SMALL LETTER I WITH OGONEK U+012B: "ī" LATIN SMALL LETTER I WITH MACRON U+0133: "ij" LATIN SMALL LIGATURE IJ --> - <string name="more_keys_for_i">í,ì,ï,î,į,ī,ij</string> + <string name="morekeys_i">í,ì,ï,î,į,ī,ij</string> <!-- U+00F3: "ó" LATIN SMALL LETTER O WITH ACUTE U+00F4: "ô" LATIN SMALL LETTER O WITH CIRCUMFLEX U+00F6: "ö" LATIN SMALL LETTER O WITH DIAERESIS @@ -52,18 +52,17 @@ U+0153: "œ" LATIN SMALL LIGATURE OE U+00F8: "ø" LATIN SMALL LETTER O WITH STROKE U+014D: "ō" LATIN SMALL LETTER O WITH MACRON --> - <string name="more_keys_for_o">ó,ô,ö,ò,õ,œ,ø,ō</string> + <string name="morekeys_o">ó,ô,ö,ò,õ,œ,ø,ō</string> <!-- U+00FA: "ú" LATIN SMALL LETTER U WITH ACUTE U+00FB: "û" LATIN SMALL LETTER U WITH CIRCUMFLEX U+00FC: "ü" LATIN SMALL LETTER U WITH DIAERESIS U+00F9: "ù" LATIN SMALL LETTER U WITH GRAVE U+016B: "ū" LATIN SMALL LETTER U WITH MACRON --> - <string name="more_keys_for_u">ú,û,ü,ù,ū</string> + <string name="morekeys_u">ú,û,ü,ù,ū</string> <!-- U+00F1: "ñ" LATIN SMALL LETTER N WITH TILDE U+0144: "ń" LATIN SMALL LETTER N WITH ACUTE --> - <string name="more_keys_for_n">ñ,ń</string> - <string name="more_keys_for_y">ý,ŷ,ÿ,ij</string> + <string name="morekeys_n">ñ,ń</string> <!-- U+00FD: "ý" LATIN SMALL LETTER Y WITH ACUTE U+0133: "ij" LATIN SMALL LIGATURE IJ --> - <string name="more_keys_for_y">ý,ij</string> + <string name="morekeys_y">ý,ij</string> </resources> diff --git a/tools/make-keyboard-text/res/values-ar/donottranslate-more-keys.xml b/tools/make-keyboard-text/res/values-ar/donottranslate-more-keys.xml index 8b86b1ba2..ab78f45c6 100644 --- a/tools/make-keyboard-text/res/values-ar/donottranslate-more-keys.xml +++ b/tools/make-keyboard-text/res/values-ar/donottranslate-more-keys.xml @@ -19,91 +19,99 @@ --> <resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> <!-- Label for "switch to alphabetic" key. - U+0623: "ا" ARABIC LETTER ALEF + U+0623: "أ" ARABIC LETTER ALEF WITH HAMZA ABOVE U+200C: ZERO WIDTH NON-JOINER U+0628: "ب" ARABIC LETTER BEH - U+062C: "پ" ARABIC LETTER PEH --> - <string name="label_to_alpha_key">أ‌ب‌ج</string> + U+062C: "ج" ARABIC LETTER JEEM --> + <string name="keylabel_to_alpha">أ‌ب‌ج</string> <!-- U+0661: "١" ARABIC-INDIC DIGIT ONE --> - <string name="keylabel_for_symbols_1">١</string> + <string name="keyspec_symbols_1">١</string> <!-- U+0662: "٢" ARABIC-INDIC DIGIT TWO --> - <string name="keylabel_for_symbols_2">٢</string> + <string name="keyspec_symbols_2">٢</string> <!-- U+0663: "٣" ARABIC-INDIC DIGIT THREE --> - <string name="keylabel_for_symbols_3">٣</string> + <string name="keyspec_symbols_3">٣</string> <!-- U+0664: "٤" ARABIC-INDIC DIGIT FOUR --> - <string name="keylabel_for_symbols_4">٤</string> + <string name="keyspec_symbols_4">٤</string> <!-- U+0665: "٥" ARABIC-INDIC DIGIT FIVE --> - <string name="keylabel_for_symbols_5">٥</string> + <string name="keyspec_symbols_5">٥</string> <!-- U+0666: "٦" ARABIC-INDIC DIGIT SIX --> - <string name="keylabel_for_symbols_6">٦</string> + <string name="keyspec_symbols_6">٦</string> <!-- U+0667: "٧" ARABIC-INDIC DIGIT SEVEN --> - <string name="keylabel_for_symbols_7">٧</string> + <string name="keyspec_symbols_7">٧</string> <!-- U+0668: "٨" ARABIC-INDIC DIGIT EIGHT --> - <string name="keylabel_for_symbols_8">٨</string> + <string name="keyspec_symbols_8">٨</string> <!-- U+0669: "٩" ARABIC-INDIC DIGIT NINE --> - <string name="keylabel_for_symbols_9">٩</string> + <string name="keyspec_symbols_9">٩</string> <!-- U+0660: "٠" ARABIC-INDIC DIGIT ZERO --> - <string name="keylabel_for_symbols_0">٠</string> + <string name="keyspec_symbols_0">٠</string> <!-- Label for "switch to symbols" key. U+061F: "؟" ARABIC QUESTION MARK --> - <string name="label_to_symbol_key">٣٢١؟</string> - <!-- Label for "switch to symbols with microphone" key. This string shouldn't include the "mic" - part because it'll be appended by the code. --> - <string name="label_to_symbol_with_microphone_key">٣٢١</string> - <string name="additional_more_keys_for_symbols_1">1</string> - <string name="additional_more_keys_for_symbols_2">2</string> - <string name="additional_more_keys_for_symbols_3">3</string> - <string name="additional_more_keys_for_symbols_4">4</string> - <string name="additional_more_keys_for_symbols_5">5</string> - <string name="additional_more_keys_for_symbols_6">6</string> - <string name="additional_more_keys_for_symbols_7">7</string> - <string name="additional_more_keys_for_symbols_8">8</string> - <string name="additional_more_keys_for_symbols_9">9</string> + <string name="keylabel_to_symbol">٣٢١؟</string> + <string name="additional_morekeys_symbols_1">1</string> + <string name="additional_morekeys_symbols_2">2</string> + <string name="additional_morekeys_symbols_3">3</string> + <string name="additional_morekeys_symbols_4">4</string> + <string name="additional_morekeys_symbols_5">5</string> + <string name="additional_morekeys_symbols_6">6</string> + <string name="additional_morekeys_symbols_7">7</string> + <string name="additional_morekeys_symbols_8">8</string> + <string name="additional_morekeys_symbols_9">9</string> <!-- U+066B: "٫" ARABIC DECIMAL SEPARATOR U+066C: "٬" ARABIC THOUSANDS SEPARATOR --> - <string name="additional_more_keys_for_symbols_0">0,٫,٬</string> + <string name="additional_morekeys_symbols_0">0,٫,٬</string> <!-- U+060C: "،" ARABIC COMMA --> - <string name="keylabel_for_comma">،</string> - <string name="more_keys_for_comma">"\\,"</string> - <string name="keylabel_for_symbols_question">؟</string> - <string name="keylabel_for_symbols_semicolon">؛</string> + <string name="keyspec_comma">،</string> + <!-- U+0651: "ّ" ARABIC SHADDA --> + <string name="keyhintlabel_period">ّ</string> + <string name="morekeys_period">!text/morekeys_arabic_diacritics</string> + <string name="keyhintlabel_tablet_period">ّ</string> + <string name="morekeys_tablet_period">!text/morekeys_arabic_diacritics</string> + <string name="keyspec_symbols_question">؟</string> + <string name="keyspec_symbols_semicolon">؛</string> <!-- U+066A: "٪" ARABIC PERCENT SIGN --> - <string name="keylabel_for_symbols_percent">٪</string> - <string name="more_keys_for_symbols_question">\?</string> - <string name="more_keys_for_symbols_semicolon">;</string> + <string name="keyspec_symbols_percent">٪</string> + <!-- U+00BF: "¿" INVERTED QUESTION MARK --> + <string name="morekeys_question">?,¿</string> + <string name="morekeys_symbols_semicolon">;</string> <!-- U+2030: "‰" PER MILLE SIGN --> - <string name="more_keys_for_symbols_percent">\\%,‰</string> - <!-- U+060C: "،" ARABIC COMMA - U+061B: "؛" ARABIC SEMICOLON - U+061F: "؟" ARABIC QUESTION MARK --> - <string name="keylabel_for_apostrophe">،</string> - <string name="keyhintlabel_for_apostrophe">؟</string> + <string name="morekeys_symbols_percent">\\%,‰</string> <!-- U+061F: "؟" ARABIC QUESTION MARK U+060C: "،" ARABIC COMMA U+061B: "؛" ARABIC SEMICOLON --> - <string name="more_keys_for_punctuation">"!fixedColumnOrder!8,\",\',#,-,:,!,،,؟,\@,&,\\%,+,؛,/,(|),)|("</string> - <string name="more_keys_for_apostrophe">"؟,؛,!,:,-,/,\',\""</string> + <string name="keyspec_tablet_comma">"،"</string> + <string name="keyhintlabel_tablet_comma">"؟"</string> + <string name="morekeys_tablet_comma">"!fixedColumnOrder!4,:,!,؟,؛,-,\",\'"</string> <!-- U+266A: "♪" EIGHTH NOTE --> - <string name="more_keys_for_bullet">♪</string> + <string name="morekeys_bullet">♪</string> <!-- U+2605: "★" BLACK STAR U+066D: "٭" ARABIC FIVE POINTED STAR --> - <string name="more_keys_for_star">★,٭</string> + <string name="morekeys_star">★,٭</string> <!-- The all letters need to be mirrored are found at http://www.unicode.org/Public/6.1.0/ucd/BidiMirroring.txt --> <!-- U+FD3E: "﴾" ORNATE LEFT PARENTHESIS U+FD3F: "﴿" ORNATE RIGHT PARENTHESIS --> - <string name="more_keys_for_left_parenthesis">!fixedColumnOrder!4,﴾|﴿,<|>,{|},[|]</string> - <string name="more_keys_for_right_parenthesis">!fixedColumnOrder!4,﴿|﴾,>|<,}|{,]|[</string> + <string name="morekeys_left_parenthesis">!fixedColumnOrder!4,﴾|﴿,!text/keyspecs_left_parenthesis_more_keys</string> + <string name="morekeys_right_parenthesis">!fixedColumnOrder!4,﴿|﴾,!text/keyspecs_right_parenthesis_more_keys</string> <!-- U+2264: "≤" LESS-THAN OR EQUAL TO U+2265: "≥" GREATER-THAN EQUAL TO U+00AB: "«" LEFT-POINTING DOUBLE ANGLE QUOTATION MARK U+00BB: "»" RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK U+2039: "‹" SINGLE LEFT-POINTING ANGLE QUOTATION MARK U+203A: "›" SINGLE RIGHT-POINTING ANGLE QUOTATION MARK --> - <string name="more_keys_for_less_than">!fixedColumnOrder!3,‹|›,≤|≥,«|»</string> - <string name="more_keys_for_greater_than">!fixedColumnOrder!3,›|‹,≥|≤,»|«</string> - <string name="single_angle_quotes">!text/single_laqm_raqm_rtl</string> - <string name="double_angle_quotes">!text/double_laqm_raqm_rtl</string> + <string name="keyspec_left_parenthesis">(|)</string> + <string name="keyspec_right_parenthesis">)|(</string> + <string name="keyspec_left_square_bracket">[|]</string> + <string name="keyspec_right_square_bracket">]|[</string> + <string name="keyspec_left_curly_bracket">{|}</string> + <string name="keyspec_right_curly_bracket">}|{</string> + <string name="keyspec_less_than"><|></string> + <string name="keyspec_greater_than">>|<</string> + <string name="keyspec_less_than_equal">≤|≥</string> + <string name="keyspec_greater_than_equal">≥|≤</string> + <string name="keyspec_left_double_angle_quote">«|»</string> + <string name="keyspec_right_double_angle_quote">»|«</string> + <string name="keyspec_left_single_angle_quote">‹|›</string> + <string name="keyspec_right_single_angle_quote">›|‹</string> <!-- U+0655: "ٕ" ARABIC HAMZA BELOW U+0654: "ٔ" ARABIC HAMZA ABOVE U+0652: "ْ" ARABIC SUKUN @@ -120,6 +128,5 @@ U+0640: "ـ" ARABIC TATWEEL --> <!-- In order to make Tatweel easily distinguishable from other punctuations, we use consecutive Tatweels only for its displayed label. --> <!-- Note: The space character is needed as a preceding letter to draw Arabic diacritics characters correctly. --> - <string name="more_keys_for_arabic_diacritics">"!fixedColumnOrder!7, ٕ|ٕ, ٔ|ٔ, ْ|ْ, ٍ|ٍ, ٌ|ٌ, ً|ً, ّ|ّ, ٖ|ٖ, ٰ|ٰ, ٓ|ٓ, ِ|ِ, ُ|ُ, َ|َ,ـــ|ـ"</string> - <string name="keyhintlabel_for_arabic_diacritics">ّ</string> + <string name="morekeys_arabic_diacritics">"!fixedColumnOrder!7, ٕ|ٕ, ٔ|ٔ, ْ|ْ, ٍ|ٍ, ٌ|ٌ, ً|ً, ّ|ّ, ٖ|ٖ, ٰ|ٰ, ٓ|ٓ, ِ|ِ, ُ|ُ, َ|َ,ـــ|ـ"</string> </resources> diff --git a/tools/make-keyboard-text/res/values-az/donottranslate-more-keys.xml b/tools/make-keyboard-text/res/values-az-rAZ/donottranslate-more-keys.xml index db1784c17..54aa570b6 100644 --- a/tools/make-keyboard-text/res/values-az/donottranslate-more-keys.xml +++ b/tools/make-keyboard-text/res/values-az-rAZ/donottranslate-more-keys.xml @@ -19,9 +19,9 @@ --> <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">â</string> + <string name="morekeys_a">â</string> <!-- U+0259: "ə" LATIN SMALL LETTER SCHWA --> - <string name="more_keys_for_e">ə</string> + <string name="morekeys_e">ə</string> <!-- U+0131: "ı" LATIN SMALL LETTER DOTLESS I U+00EE: "î" LATIN SMALL LETTER I WITH CIRCUMFLEX U+00EF: "ï" LATIN SMALL LETTER I WITH DIAERESIS @@ -29,7 +29,7 @@ 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">ı,î,ï,ì,í,į,ī</string> + <string name="morekeys_i">ı,î,ï,ì,í,į,ī</string> <!-- U+00F6: "ö" LATIN SMALL LETTER O WITH DIAERESIS U+00F4: "ô" LATIN SMALL LETTER O WITH CIRCUMFLEX U+0153: "œ" LATIN SMALL LIGATURE OE @@ -38,22 +38,22 @@ 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">ö,ô,œ,ò,ó,õ,ø,ō</string> + <string name="morekeys_o">ö,ô,œ,ò,ó,õ,ø,ō</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">ü,û,ù,ú,ū</string> + <string name="morekeys_u">ü,û,ù,ú,ū</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">ş,ß,ś,š</string> + <string name="morekeys_s">ş,ß,ś,š</string> <!-- U+011F: "ğ" LATIN SMALL LETTER G WITH BREVE --> - <string name="more_keys_for_g">ğ</string> + <string name="morekeys_g">ğ</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">ç,ć,č</string> + <string name="morekeys_c">ç,ć,č</string> </resources> diff --git a/tools/make-keyboard-text/res/values-be/donottranslate-more-keys.xml b/tools/make-keyboard-text/res/values-be-rBY/donottranslate-more-keys.xml index 4723503f1..52ada29d9 100644 --- a/tools/make-keyboard-text/res/values-be/donottranslate-more-keys.xml +++ b/tools/make-keyboard-text/res/values-be-rBY/donottranslate-more-keys.xml @@ -19,24 +19,22 @@ --> <resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> <!-- U+045E: "ў" CYRILLIC SMALL LETTER SHORT U --> - <string name="keylabel_for_east_slavic_row1_9">ў</string> - <!-- U+0451: "ё" CYRILLIC SMALL LETTER IO --> - <string name="keylabel_for_east_slavic_row1_12">ё</string> + <string name="keyspec_east_slavic_row1_9">ў</string> <!-- U+044B: "ы" CYRILLIC SMALL LETTER YERU --> - <string name="keylabel_for_east_slavic_row2_1">ы</string> + <string name="keyspec_east_slavic_row2_2">ы</string> <!-- U+044D: "э" CYRILLIC SMALL LETTER E --> - <string name="keylabel_for_east_slavic_row2_11">э</string> + <string name="keyspec_east_slavic_row2_11">э</string> <!-- U+0456: "і" CYRILLIC SMALL LETTER BYELORUSSIAN-UKRAINIAN I --> - <string name="keylabel_for_east_slavic_row3_5">і</string> + <string name="keyspec_east_slavic_row3_5">і</string> <!-- U+0451: "ё" CYRILLIC SMALL LETTER IO --> - <string name="more_keys_for_cyrillic_ie">ё</string> + <string name="morekeys_cyrillic_ie">ё</string> <!-- U+044A: "ъ" CYRILLIC SMALL LETTER HARD SIGN --> - <string name="more_keys_for_cyrillic_soft_sign">ъ</string> + <string name="morekeys_cyrillic_soft_sign">ъ</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">АБВ</string> + <string name="keylabel_to_alpha">АБВ</string> <string name="single_quotes">!text/single_9qm_lqm</string> <string name="double_quotes">!text/double_9qm_lqm</string> </resources> diff --git a/tools/make-keyboard-text/res/values-bg/donottranslate-more-keys.xml b/tools/make-keyboard-text/res/values-bg/donottranslate-more-keys.xml index 5262133de..8a98b1227 100644 --- a/tools/make-keyboard-text/res/values-bg/donottranslate-more-keys.xml +++ b/tools/make-keyboard-text/res/values-bg/donottranslate-more-keys.xml @@ -22,7 +22,7 @@ U+0410: "А" CYRILLIC CAPITAL LETTER A U+0411: "Б" CYRILLIC CAPITAL LETTER BE U+0412: "В" CYRILLIC CAPITAL LETTER VE --> - <string name="label_to_alpha_key">АБВ</string> + <string name="keylabel_to_alpha">АБВ</string> <!-- single_quotes of Bulgarian is default single_quotes_right_left. --> <string name="double_quotes">!text/double_9qm_lqm</string> </resources> diff --git a/tools/make-keyboard-text/res/values-bn-rIN/donottranslate-more-keys.xml b/tools/make-keyboard-text/res/values-bn-rIN/donottranslate-more-keys.xml new file mode 100644 index 000000000..4955cd46a --- /dev/null +++ b/tools/make-keyboard-text/res/values-bn-rIN/donottranslate-more-keys.xml @@ -0,0 +1,28 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +/* +** +** Copyright 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. +*/ +--> +<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> + <!-- Label for "switch to alphabetic" key. + U+0995: "क" BENGALI LETTER KA + U+0996: "ख" BENGALI LETTER KHA + U+0997: "ग" BENGALI LETTER GA --> + <string name="keylabel_to_alpha">কখগ</string> + <!-- U+09F3: "৳" BENGALI RUPEE SIGN --> + <string name="keyspec_currency">৳</string> +</resources> diff --git a/tools/make-keyboard-text/res/values-ca/donottranslate-more-keys.xml b/tools/make-keyboard-text/res/values-ca/donottranslate-more-keys.xml index 66393732c..125f08f26 100644 --- a/tools/make-keyboard-text/res/values-ca/donottranslate-more-keys.xml +++ b/tools/make-keyboard-text/res/values-ca/donottranslate-more-keys.xml @@ -28,7 +28,7 @@ U+00E6: "æ" LATIN SMALL LETTER AE U+0101: "ā" LATIN SMALL LETTER A WITH MACRON U+00AA: "ª" FEMININE ORDINAL INDICATOR --> - <string name="more_keys_for_a">à,á,ä,â,ã,å,ą,æ,ā,ª</string> + <string name="morekeys_a">à,á,ä,â,ã,å,ą,æ,ā,ª</string> <!-- U+00E8: "è" LATIN SMALL LETTER E WITH GRAVE U+00E9: "é" LATIN SMALL LETTER E WITH ACUTE U+00EB: "ë" LATIN SMALL LETTER E WITH DIAERESIS @@ -36,14 +36,14 @@ U+0119: "ę" LATIN SMALL LETTER E WITH OGONEK U+0117: "ė" LATIN SMALL LETTER E WITH DOT ABOVE U+0113: "ē" LATIN SMALL LETTER E WITH MACRON --> - <string name="more_keys_for_e">è,é,ë,ê,ę,ė,ē</string> + <string name="morekeys_e">è,é,ë,ê,ę,ė,ē</string> <!-- U+00ED: "í" LATIN SMALL LETTER I WITH ACUTE U+00EF: "ï" LATIN SMALL LETTER I WITH DIAERESIS U+00EC: "ì" LATIN SMALL LETTER I WITH GRAVE U+00EE: "î" LATIN SMALL LETTER I WITH CIRCUMFLEX U+012F: "į" LATIN SMALL LETTER I WITH OGONEK U+012B: "ī" LATIN SMALL LETTER I WITH MACRON --> - <string name="more_keys_for_i">í,ï,ì,î,į,ī</string> + <string name="morekeys_i">í,ï,ì,î,į,ī</string> <!-- U+00F2: "ò" LATIN SMALL LETTER O WITH GRAVE U+00F3: "ó" LATIN SMALL LETTER O WITH ACUTE U+00F6: "ö" LATIN SMALL LETTER O WITH DIAERESIS @@ -53,26 +53,26 @@ U+0153: "œ" LATIN SMALL LIGATURE OE U+014D: "ō" LATIN SMALL LETTER O WITH MACRON U+00BA: "º" MASCULINE ORDINAL INDICATOR --> - <string name="more_keys_for_o">ò,ó,ö,ô,õ,ø,œ,ō,º</string> + <string name="morekeys_o">ò,ó,ö,ô,õ,ø,œ,ō,º</string> <!-- U+00FA: "ú" LATIN SMALL LETTER U WITH ACUTE U+00FC: "ü" LATIN SMALL LETTER U WITH DIAERESIS U+00F9: "ù" LATIN SMALL LETTER U WITH GRAVE U+00FB: "û" LATIN SMALL LETTER U WITH CIRCUMFLEX U+016B: "ū" LATIN SMALL LETTER U WITH MACRON --> - <string name="more_keys_for_u">ú,ü,ù,û,ū</string> + <string name="morekeys_u">ú,ü,ù,û,ū</string> <!-- U+00F1: "ñ" LATIN SMALL LETTER N WITH TILDE U+0144: "ń" LATIN SMALL LETTER N WITH ACUTE --> - <string name="more_keys_for_n">ñ,ń</string> + <string name="morekeys_n">ñ,ń</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">ç,ć,č</string> + <string name="morekeys_c">ç,ć,č</string> <!-- U+00B7: "·" MIDDLE DOT U+0142: "ł" LATIN SMALL LETTER L WITH STROKE --> - <string name="more_keys_for_l">l·l,ł</string> + <string name="morekeys_l">l·l,ł</string> <!-- U+00B7: "·" MIDDLE DOT --> - <string name="more_keys_for_punctuation">"!fixedColumnOrder!9,;,/,(,),#,·,!,\\,,\?,&,\\%,+,\",-,:,',\@"</string> - <string name="more_keys_for_period">\?,·</string> + <string name="morekeys_punctuation">"!autoColumnOrder!9,\\,,?,!,·,#,),(,/,;,',@,:,-,\",+,\\%,&"</string> + <string name="morekeys_tablet_punctuation">"!autoColumnOrder!8,\\,,',·,#,),(,/,;,@,:,-,\",+,\\%,&"</string> <!-- U+00E7: "ç" LATIN SMALL LETTER C WITH CEDILLA --> - <string name="keylabel_for_spanish_row2_10">ç</string> + <string name="keyspec_spanish_row2_10">ç</string> </resources> diff --git a/tools/make-keyboard-text/res/values-cs/donottranslate-more-keys.xml b/tools/make-keyboard-text/res/values-cs/donottranslate-more-keys.xml index 5ce1d3bc8..1a27783e9 100644 --- a/tools/make-keyboard-text/res/values-cs/donottranslate-more-keys.xml +++ b/tools/make-keyboard-text/res/values-cs/donottranslate-more-keys.xml @@ -26,7 +26,7 @@ U+00E3: "ã" LATIN SMALL LETTER A WITH TILDE U+00E5: "å" LATIN SMALL LETTER A WITH RING ABOVE U+0101: "ā" LATIN SMALL LETTER A WITH MACRON --> - <string name="more_keys_for_a">á,à,â,ä,æ,ã,å,ā</string> + <string name="morekeys_a">á,à,â,ä,æ,ã,å,ā</string> <!-- U+00E9: "é" LATIN SMALL LETTER E WITH ACUTE U+011B: "ě" LATIN SMALL LETTER E WITH CARON U+00E8: "è" LATIN SMALL LETTER E WITH GRAVE @@ -35,14 +35,14 @@ U+0119: "ę" LATIN SMALL LETTER E WITH OGONEK U+0117: "ė" LATIN SMALL LETTER E WITH DOT ABOVE U+0113: "ē" LATIN SMALL LETTER E WITH MACRON --> - <string name="more_keys_for_e">é,ě,è,ê,ë,ę,ė,ē</string> + <string name="morekeys_e">é,ě,è,ê,ë,ę,ė,ē</string> <!-- U+00ED: "í" LATIN SMALL LETTER I WITH ACUTE U+00EE: "î" LATIN SMALL LETTER I WITH CIRCUMFLEX U+00EF: "ï" LATIN SMALL LETTER I WITH DIAERESIS U+00EC: "ì" LATIN SMALL LETTER I WITH GRAVE U+012F: "į" LATIN SMALL LETTER I WITH OGONEK U+012B: "ī" LATIN SMALL LETTER I WITH MACRON --> - <string name="more_keys_for_i">í,î,ï,ì,į,ī</string> + <string name="morekeys_i">í,î,ï,ì,į,ī</string> <!-- U+00F3: "ó" LATIN SMALL LETTER O WITH ACUTE U+00F6: "ö" LATIN SMALL LETTER O WITH DIAERESIS U+00F4: "ô" LATIN SMALL LETTER O WITH CIRCUMFLEX @@ -51,39 +51,39 @@ U+0153: "œ" LATIN SMALL LIGATURE OE U+00F8: "ø" LATIN SMALL LETTER O WITH STROKE U+014D: "ō" LATIN SMALL LETTER O WITH MACRON --> - <string name="more_keys_for_o">ó,ö,ô,ò,õ,œ,ø,ō</string> + <string name="morekeys_o">ó,ö,ô,ò,õ,œ,ø,ō</string> <!-- U+00FA: "ú" LATIN SMALL LETTER U WITH ACUTE U+016F: "ů" LATIN SMALL LETTER U WITH RING ABOVE U+00FB: "û" LATIN SMALL LETTER U WITH CIRCUMFLEX U+00FC: "ü" LATIN SMALL LETTER U WITH DIAERESIS U+00F9: "ù" LATIN SMALL LETTER U WITH GRAVE U+016B: "ū" LATIN SMALL LETTER U WITH MACRON --> - <string name="more_keys_for_u">ú,ů,û,ü,ù,ū</string> + <string name="morekeys_u">ú,ů,û,ü,ù,ū</string> <!-- U+0161: "š" LATIN SMALL LETTER S WITH CARON U+00DF: "ß" LATIN SMALL LETTER SHARP S U+015B: "ś" LATIN SMALL LETTER S WITH ACUTE --> - <string name="more_keys_for_s">š,ß,ś</string> + <string name="morekeys_s">š,ß,ś</string> <!-- U+0148: "ň" LATIN SMALL LETTER N WITH CARON U+00F1: "ñ" LATIN SMALL LETTER N WITH TILDE U+0144: "ń" LATIN SMALL LETTER N WITH ACUTE --> - <string name="more_keys_for_n">ň,ñ,ń</string> + <string name="morekeys_n">ň,ñ,ń</string> <!-- U+010D: "č" LATIN SMALL LETTER C WITH CARON U+00E7: "ç" LATIN SMALL LETTER C WITH CEDILLA U+0107: "ć" LATIN SMALL LETTER C WITH ACUTE --> - <string name="more_keys_for_c">č,ç,ć</string> + <string name="morekeys_c">č,ç,ć</string> <!-- U+00FD: "ý" LATIN SMALL LETTER Y WITH ACUTE U+00FF: "ÿ" LATIN SMALL LETTER Y WITH DIAERESIS --> - <string name="more_keys_for_y">ý,ÿ</string> + <string name="morekeys_y">ý,ÿ</string> <!-- U+010F: "ď" LATIN SMALL LETTER D WITH CARON --> - <string name="more_keys_for_d">ď</string> + <string name="morekeys_d">ď</string> <!-- U+0159: "ř" LATIN SMALL LETTER R WITH CARON --> - <string name="more_keys_for_r">ř</string> + <string name="morekeys_r">ř</string> <!-- U+0165: "ť" LATIN SMALL LETTER T WITH CARON --> - <string name="more_keys_for_t">ť</string> + <string name="morekeys_t">ť</string> <!-- U+017E: "ž" LATIN SMALL LETTER Z WITH CARON U+017A: "ź" LATIN SMALL LETTER Z WITH ACUTE U+017C: "ż" LATIN SMALL LETTER Z WITH DOT ABOVE --> - <string name="more_keys_for_z">ž,ź,ż</string> + <string name="morekeys_z">ž,ź,ż</string> <string name="single_quotes">!text/single_9qm_lqm</string> <string name="double_quotes">!text/double_9qm_lqm</string> <string name="single_angle_quotes">!text/single_raqm_laqm</string> diff --git a/tools/make-keyboard-text/res/values-da/donottranslate-more-keys.xml b/tools/make-keyboard-text/res/values-da/donottranslate-more-keys.xml index cbaf9f497..c22e26275 100644 --- a/tools/make-keyboard-text/res/values-da/donottranslate-more-keys.xml +++ b/tools/make-keyboard-text/res/values-da/donottranslate-more-keys.xml @@ -24,50 +24,50 @@ U+00E2: "â" LATIN SMALL LETTER A WITH CIRCUMFLEX U+00E3: "ã" LATIN SMALL LETTER A WITH TILDE U+0101: "ā" LATIN SMALL LETTER A WITH MACRON --> - <string name="more_keys_for_a">á,ä,à,â,ã,ā</string> + <string name="morekeys_a">á,ä,à,â,ã,ā</string> <!-- U+00E9: "é" LATIN SMALL LETTER E WITH ACUTE U+00EB: "ë" LATIN SMALL LETTER E WITH DIAERESIS --> - <string name="more_keys_for_e">é,ë</string> + <string name="morekeys_e">é,ë</string> <!-- U+00ED: "í" LATIN SMALL LETTER I WITH ACUTE U+00EF: "ï" LATIN SMALL LETTER I WITH DIAERESIS --> - <string name="more_keys_for_i">í,ï</string> + <string name="morekeys_i">í,ï</string> <!-- U+00F3: "ó" LATIN SMALL LETTER O WITH ACUTE U+00F4: "ô" LATIN SMALL LETTER O WITH CIRCUMFLEX U+00F2: "ò" LATIN SMALL LETTER O WITH GRAVE U+00F5: "õ" LATIN SMALL LETTER O WITH TILDE U+0153: "œ" LATIN SMALL LIGATURE OE U+014D: "ō" LATIN SMALL LETTER O WITH MACRON --> - <string name="more_keys_for_o">ó,ô,ò,õ,œ,ō</string> + <string name="morekeys_o">ó,ô,ò,õ,œ,ō</string> <!-- U+00FA: "ú" LATIN SMALL LETTER U WITH ACUTE 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+016B: "ū" LATIN SMALL LETTER U WITH MACRON --> - <string name="more_keys_for_u">ú,ü,û,ù,ū</string> + <string name="morekeys_u">ú,ü,û,ù,ū</string> <!-- 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">ß,ś,š</string> + <string name="morekeys_s">ß,ś,š</string> <!-- U+00F1: "ñ" LATIN SMALL LETTER N WITH TILDE U+0144: "ń" LATIN SMALL LETTER N WITH ACUTE --> - <string name="more_keys_for_n">ñ,ń</string> + <string name="morekeys_n">ñ,ń</string> <!-- U+00FD: "ý" LATIN SMALL LETTER Y WITH ACUTE U+00FF: "ÿ" LATIN SMALL LETTER Y WITH DIAERESIS --> - <string name="more_keys_for_y">ý,ÿ</string> + <string name="morekeys_y">ý,ÿ</string> <!-- U+00F0: "ð" LATIN SMALL LETTER ETH --> - <string name="more_keys_for_d">ð</string> + <string name="morekeys_d">ð</string> <!-- U+0142: "ł" LATIN SMALL LETTER L WITH STROKE --> - <string name="more_keys_for_l">ł</string> + <string name="morekeys_l">ł</string> <!-- U+00E5: "å" LATIN SMALL LETTER A WITH RING ABOVE --> - <string name="keylabel_for_nordic_row1_11">å</string> + <string name="keyspec_nordic_row1_11">å</string> <!-- U+00E6: "æ" LATIN SMALL LETTER AE --> - <string name="keylabel_for_nordic_row2_10">æ</string> + <string name="keyspec_nordic_row2_10">æ</string> <!-- U+00F8: "ø" LATIN SMALL LETTER O WITH STROKE --> - <string name="keylabel_for_nordic_row2_11">ø</string> + <string name="keyspec_nordic_row2_11">ø</string> <!-- U+00E4: "ä" LATIN SMALL LETTER A WITH DIAERESIS --> - <string name="more_keys_for_nordic_row2_10">ä</string> + <string name="morekeys_nordic_row2_10">ä</string> <!-- U+00F6: "ö" LATIN SMALL LETTER O WITH DIAERESIS --> - <string name="more_keys_for_nordic_row2_11">ö</string> + <string name="morekeys_nordic_row2_11">ö</string> <string name="single_quotes">!text/single_9qm_lqm</string> <string name="double_quotes">!text/double_9qm_lqm</string> <string name="single_angle_quotes">!text/single_raqm_laqm</string> diff --git a/tools/make-keyboard-text/res/values-de/donottranslate-more-keys.xml b/tools/make-keyboard-text/res/values-de/donottranslate-more-keys.xml index 9dc8717ec..0c6d3ad2b 100644 --- a/tools/make-keyboard-text/res/values-de/donottranslate-more-keys.xml +++ b/tools/make-keyboard-text/res/values-de/donottranslate-more-keys.xml @@ -26,13 +26,13 @@ U+00E3: "ã" LATIN SMALL LETTER A WITH TILDE U+00E5: "å" LATIN SMALL LETTER A WITH RING ABOVE U+0101: "ā" LATIN SMALL LETTER A WITH MACRON --> - <string name="more_keys_for_a">ä,â,à,á,æ,ã,å,ā</string> + <string name="morekeys_a">ä,%,â,à,á,æ,ã,å,ā</string> <!-- U+00E9: "é" LATIN SMALL LETTER E WITH ACUTE U+00E8: "è" LATIN SMALL LETTER E WITH GRAVE U+00EA: "ê" LATIN SMALL LETTER E WITH CIRCUMFLEX U+00EB: "ë" LATIN SMALL LETTER E WITH DIAERESIS U+0117: "ė" LATIN SMALL LETTER E WITH DOT ABOVE --> - <string name="more_keys_for_e">é,è,ê,ë,ė</string> + <string name="morekeys_e">é,è,ê,ë,ė</string> <!-- U+00F6: "ö" LATIN SMALL LETTER O WITH DIAERESIS U+00F4: "ô" LATIN SMALL LETTER O WITH CIRCUMFLEX U+00F2: "ò" LATIN SMALL LETTER O WITH GRAVE @@ -41,20 +41,32 @@ U+0153: "œ" LATIN SMALL LIGATURE OE U+00F8: "ø" LATIN SMALL LETTER O WITH STROKE U+014D: "ō" LATIN SMALL LETTER O WITH MACRON --> - <string name="more_keys_for_o">ö,ô,ò,ó,õ,œ,ø,ō</string> + <string name="morekeys_o">ö,%,ô,ò,ó,õ,œ,ø,ō</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">ü,û,ù,ú,ū</string> + <string name="morekeys_u">ü,%,û,ù,ú,ū</string> <!-- 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">ß,ś,š</string> + <string name="morekeys_s">ß,ś,š</string> <!-- U+00F1: "ñ" LATIN SMALL LETTER N WITH TILDE U+0144: "ń" LATIN SMALL LETTER N WITH ACUTE --> - <string name="more_keys_for_n">ñ,ń</string> + <string name="morekeys_n">ñ,ń</string> + <!-- U+00FC: "ü" LATIN SMALL LETTER U WITH DIAERESIS --> + <string name="keyspec_swiss_row1_11">ü</string> + <!-- U+00E8: "è" LATIN SMALL LETTER E WITH GRAVE --> + <string name="morekeys_swiss_row1_11">è</string> + <!-- U+00F6: "ö" LATIN SMALL LETTER O WITH DIAERESIS --> + <string name="keyspec_swiss_row2_10">ö</string> + <!-- U+00E9: "é" LATIN SMALL LETTER E WITH ACUTE --> + <string name="morekeys_swiss_row2_10">é</string> + <!-- U+00E4: "ä" LATIN SMALL LETTER A WITH DIAERESIS --> + <string name="keyspec_swiss_row2_11">ä</string> + <!-- U+00E0: "à" LATIN SMALL LETTER A WITH GRAVE --> + <string name="morekeys_swiss_row2_11">à</string> <string name="single_quotes">!text/single_9qm_lqm</string> <string name="double_quotes">!text/double_9qm_lqm</string> <string name="single_angle_quotes">!text/single_raqm_laqm</string> diff --git a/tools/make-keyboard-text/res/values-el/donottranslate-more-keys.xml b/tools/make-keyboard-text/res/values-el/donottranslate-more-keys.xml index 964dba081..77950c3b3 100644 --- a/tools/make-keyboard-text/res/values-el/donottranslate-more-keys.xml +++ b/tools/make-keyboard-text/res/values-el/donottranslate-more-keys.xml @@ -22,5 +22,5 @@ U+0391: "Α" GREEK CAPITAL LETTER ALPHA U+0392: "Β" GREEK CAPITAL LETTER BETA U+0393: "Γ" GREEK CAPITAL LETTER GAMMA --> - <string name="label_to_alpha_key">ΑΒΓ</string> + <string name="keylabel_to_alpha">ΑΒΓ</string> </resources> diff --git a/tools/make-keyboard-text/res/values-en/donottranslate-more-keys.xml b/tools/make-keyboard-text/res/values-en/donottranslate-more-keys.xml index 969a5041b..c22edbaae 100644 --- a/tools/make-keyboard-text/res/values-en/donottranslate-more-keys.xml +++ b/tools/make-keyboard-text/res/values-en/donottranslate-more-keys.xml @@ -26,38 +26,38 @@ U+00E3: "ã" LATIN SMALL LETTER A WITH TILDE U+00E5: "å" LATIN SMALL LETTER A WITH RING ABOVE U+0101: "ā" LATIN SMALL LETTER A WITH MACRON --> - <string name="more_keys_for_a">à,á,â,ä,æ,ã,å,ā</string> - <!-- U+00E8: "è" LATIN SMALL LETTER E WITH GRAVE - U+00E9: "é" LATIN SMALL LETTER E WITH ACUTE + <string name="morekeys_a">à,á,â,ä,æ,ã,å,ā</string> + <!-- U+00E9: "é" LATIN SMALL LETTER E WITH ACUTE + U+00E8: "è" LATIN SMALL LETTER E WITH GRAVE U+00EA: "ê" LATIN SMALL LETTER E WITH CIRCUMFLEX U+00EB: "ë" LATIN SMALL LETTER E WITH DIAERESIS U+0113: "ē" LATIN SMALL LETTER E WITH MACRON --> - <string name="more_keys_for_e">è,é,ê,ë,ē</string> - <!-- U+00EE: "î" LATIN SMALL LETTER I WITH CIRCUMFLEX + <string name="morekeys_e">é,è,ê,ë,ē</string> + <!-- U+00ED: "í" LATIN SMALL LETTER I WITH ACUTE + U+00EE: "î" LATIN SMALL LETTER I WITH CIRCUMFLEX U+00EF: "ï" LATIN SMALL LETTER I WITH DIAERESIS - U+00ED: "í" LATIN SMALL LETTER I WITH ACUTE U+012B: "ī" LATIN SMALL LETTER I WITH MACRON U+00EC: "ì" LATIN SMALL LETTER I WITH GRAVE --> - <string name="more_keys_for_i">î,ï,í,ī,ì</string> - <!-- U+00F4: "ô" LATIN SMALL LETTER O WITH CIRCUMFLEX + <string name="morekeys_i">í,î,ï,ī,ì</string> + <!-- U+00F3: "ó" LATIN SMALL LETTER O WITH ACUTE + U+00F4: "ô" LATIN SMALL LETTER O WITH CIRCUMFLEX U+00F6: "ö" LATIN SMALL LETTER O WITH DIAERESIS U+00F2: "ò" LATIN SMALL LETTER O WITH GRAVE - U+00F3: "ó" LATIN SMALL LETTER O WITH ACUTE U+0153: "œ" LATIN SMALL LIGATURE OE U+00F8: "ø" LATIN SMALL LETTER O WITH STROKE U+014D: "ō" LATIN SMALL LETTER O WITH MACRON U+00F5: "õ" LATIN SMALL LETTER O WITH TILDE --> - <string name="more_keys_for_o">ô,ö,ò,ó,œ,ø,ō,õ</string> - <!-- U+00FB: "û" LATIN SMALL LETTER U WITH CIRCUMFLEX + <string name="morekeys_o">ó,ô,ö,ò,œ,ø,ō,õ</string> + <!-- U+00FA: "ú" LATIN SMALL LETTER U WITH ACUTE + U+00FB: "û" LATIN SMALL LETTER U WITH CIRCUMFLEX U+00FC: "ü" LATIN SMALL LETTER U WITH DIAERESIS U+00F9: "ù" LATIN SMALL LETTER U WITH GRAVE - U+00FA: "ú" LATIN SMALL LETTER U WITH ACUTE U+016B: "ū" LATIN SMALL LETTER U WITH MACRON --> - <string name="more_keys_for_u">û,ü,ù,ú,ū</string> + <string name="morekeys_u">ú,û,ü,ù,ū</string> <!-- U+00DF: "ß" LATIN SMALL LETTER SHARP S --> - <string name="more_keys_for_s">ß</string> + <string name="morekeys_s">ß</string> <!-- U+00F1: "ñ" LATIN SMALL LETTER N WITH TILDE --> - <string name="more_keys_for_n">ñ</string> + <string name="morekeys_n">ñ</string> <!-- U+00E7: "ç" LATIN SMALL LETTER C WITH CEDILLA --> - <string name="more_keys_for_c">ç</string> + <string name="morekeys_c">ç</string> </resources> diff --git a/tools/make-keyboard-text/res/values-eo/donottranslate-more-keys.xml b/tools/make-keyboard-text/res/values-eo/donottranslate-more-keys.xml index e929869e2..7ef3101f5 100644 --- a/tools/make-keyboard-text/res/values-eo/donottranslate-more-keys.xml +++ b/tools/make-keyboard-text/res/values-eo/donottranslate-more-keys.xml @@ -29,7 +29,7 @@ U+0103: "ă" LATIN SMALL LETTER A WITH BREVE U+0105: "ą" LATIN SMALL LETTER A WITH OGONEK U+00AA: "ª" FEMININE ORDINAL INDICATOR --> - <string name="more_keys_for_a">á,à,â,ä,æ,ã,å,ā,ă,ą,ª</string> + <string name="morekeys_a">á,à,â,ä,æ,ã,å,ā,ă,ą,ª</string> <!-- U+00E9: "é" LATIN SMALL LETTER E WITH ACUTE U+011B: "ě" LATIN SMALL LETTER E WITH CARON U+00E8: "è" LATIN SMALL LETTER E WITH GRAVE @@ -38,7 +38,7 @@ U+0119: "ę" LATIN SMALL LETTER E WITH OGONEK U+0117: "ė" LATIN SMALL LETTER E WITH DOT ABOVE U+0113: "ē" LATIN SMALL LETTER E WITH MACRON --> - <string name="more_keys_for_e">é,ě,è,ê,ë,ę,ė,ē</string> + <string name="morekeys_e">é,ě,è,ê,ë,ę,ė,ē</string> <!-- U+00ED: "í" LATIN SMALL LETTER I WITH ACUTE U+00EE: "î" LATIN SMALL LETTER I WITH CIRCUMFLEX U+00EF: "ï" LATIN SMALL LETTER I WITH DIAERESIS @@ -48,7 +48,7 @@ U+012B: "ī" LATIN SMALL LETTER I WITH MACRON U+0131: "ı" LATIN SMALL LETTER DOTLESS I U+0133: "ij" LATIN SMALL LIGATURE IJ --> - <string name="more_keys_for_i">í,î,ï,ĩ,ì,į,ī,ı,ij</string> + <string name="morekeys_i">í,î,ï,ĩ,ì,į,ī,ı,ij</string> <!-- U+00F3: "ó" LATIN SMALL LETTER O WITH ACUTE U+00F6: "ö" LATIN SMALL LETTER O WITH DIAERESIS U+00F4: "ô" LATIN SMALL LETTER O WITH CIRCUMFLEX @@ -59,7 +59,7 @@ U+014D: "ō" LATIN SMALL LETTER O WITH MACRON U+0151: "ő" LATIN SMALL LETTER O WITH DOUBLE ACUTE U+00BA: "º" MASCULINE ORDINAL INDICATOR --> - <string name="more_keys_for_o">ó,ö,ô,ò,õ,œ,ø,ō,ő,º</string> + <string name="morekeys_o">ó,ö,ô,ò,õ,œ,ø,ō,ő,º</string> <!-- U+00FA: "ú" LATIN SMALL LETTER U WITH ACUTE U+016F: "ů" LATIN SMALL LETTER U WITH RING ABOVE U+00FB: "û" LATIN SMALL LETTER U WITH CIRCUMFLEX @@ -70,77 +70,77 @@ U+0171: "ű" LATIN SMALL LETTER U WITH DOUBLE ACUTE U+0173: "ų" LATIN SMALL LETTER U WITH OGONEK U+00B5: "µ" MICRO SIGN --> - <string name="more_keys_for_u">ú,ů,û,ü,ù,ū,ũ,ű,ų,µ</string> + <string name="morekeys_u">ú,ů,û,ü,ù,ū,ũ,ű,ų,µ</string> <!-- U+00DF: "ß" LATIN SMALL LETTER SHARP S U+0161: "š" LATIN SMALL LETTER S WITH CARON U+015B: "ś" LATIN SMALL LETTER S WITH ACUTE U+0219: "ș" LATIN SMALL LETTER S WITH COMMA BELOW U+015F: "ş" LATIN SMALL LETTER S WITH CEDILLA --> - <string name="more_keys_for_s">ß,š,ś,ș,ş</string> + <string name="morekeys_s">ß,š,ś,ș,ş</string> <!-- U+00F1: "ñ" LATIN SMALL LETTER N WITH TILDE U+0144: "ń" LATIN SMALL LETTER N WITH ACUTE U+0146: "ņ" LATIN SMALL LETTER N WITH CEDILLA U+0148: "ň" LATIN SMALL LETTER N WITH CARON U+0149: "ʼn" LATIN SMALL LETTER N PRECEDED BY APOSTROPHE U+014B: "ŋ" LATIN SMALL LETTER ENG --> - <string name="more_keys_for_n">ñ,ń,ņ,ň,ʼn,ŋ</string> + <string name="morekeys_n">ñ,ń,ņ,ň,ʼn,ŋ</string> <!-- U+0107: "ć" LATIN SMALL LETTER C WITH ACUTE U+010D: "č" LATIN SMALL LETTER C WITH CARON U+00E7: "ç" LATIN SMALL LETTER C WITH CEDILLA U+010B: "ċ" LATIN SMALL LETTER C WITH DOT ABOVE --> - <string name="more_keys_for_c">ć,č,ç,ċ</string> + <string name="morekeys_c">ć,č,ç,ċ</string> <!-- U+00FD: "ý" LATIN SMALL LETTER Y WITH ACUTE U+0177: "ŷ" LATIN SMALL LETTER Y WITH CIRCUMFLEX U+00FF: "ÿ" LATIN SMALL LETTER Y WITH DIAERESIS U+00FE: "þ" LATIN SMALL LETTER THORN --> - <string name="more_keys_for_y">y,ý,ŷ,ÿ,þ</string> + <string name="morekeys_y">y,ý,ŷ,ÿ,þ</string> <!-- U+00F0: "ð" LATIN SMALL LETTER ETH U+010F: "ď" LATIN SMALL LETTER D WITH CARON U+0111: "đ" LATIN SMALL LETTER D WITH STROKE --> - <string name="more_keys_for_d">ð,ď,đ</string> + <string name="morekeys_d">ð,ď,đ</string> <!-- U+0159: "ř" LATIN SMALL LETTER R WITH CARON U+0155: "ŕ" LATIN SMALL LETTER R WITH ACUTE U+0157: "ŗ" LATIN SMALL LETTER R WITH CEDILLA --> - <string name="more_keys_for_r">ř,ŕ,ŗ</string> + <string name="morekeys_r">ř,ŕ,ŗ</string> <!-- U+0165: "ť" LATIN SMALL LETTER T WITH CARON U+021B: "ț" LATIN SMALL LETTER T WITH COMMA BELOW U+0163: "ţ" LATIN SMALL LETTER T WITH CEDILLA U+0167: "ŧ" LATIN SMALL LETTER T WITH STROKE --> - <string name="more_keys_for_t">ť,ț,ţ,ŧ</string> + <string name="morekeys_t">ť,ț,ţ,ŧ</string> <!-- U+017A: "ź" LATIN SMALL LETTER Z WITH ACUTE U+017C: "ż" LATIN SMALL LETTER Z WITH DOT ABOVE U+017E: "ž" LATIN SMALL LETTER Z WITH CARON --> - <string name="more_keys_for_z">ź,ż,ž</string> + <string name="morekeys_z">ź,ż,ž</string> <!-- U+0137: "ķ" LATIN SMALL LETTER K WITH CEDILLA U+0138: "ĸ" LATIN SMALL LETTER KRA --> - <string name="more_keys_for_k">ķ,ĸ</string> + <string name="morekeys_k">ķ,ĸ</string> <!-- U+013A: "ĺ" LATIN SMALL LETTER L WITH ACUTE U+013C: "ļ" LATIN SMALL LETTER L WITH CEDILLA U+013E: "ľ" LATIN SMALL LETTER L WITH CARON U+0140: "ŀ" LATIN SMALL LETTER L WITH MIDDLE DOT U+0142: "ł" LATIN SMALL LETTER L WITH STROKE --> - <string name="more_keys_for_l">ĺ,ļ,ľ,ŀ,ł</string> + <string name="morekeys_l">ĺ,ļ,ľ,ŀ,ł</string> <!-- U+011F: "ğ" LATIN SMALL LETTER G WITH BREVE U+0121: "ġ" LATIN SMALL LETTER G WITH DOT ABOVE U+0123: "ģ" LATIN SMALL LETTER G WITH CEDILLA --> - <string name="more_keys_for_g">ğ,ġ,ģ</string> + <string name="morekeys_g">ğ,ġ,ģ</string> <!-- U+0175: "ŵ" LATIN SMALL LETTER W WITH CIRCUMFLEX --> - <string name="more_keys_for_v">w,ŵ</string> + <string name="morekeys_v">w,ŵ</string> <!-- U+0125: "ĥ" LATIN SMALL LETTER H WITH CIRCUMFLEX U+0127: "ħ" LATIN SMALL LETTER H WITH STROKE --> - <string name="more_keys_for_h">ĥ,ħ</string> + <string name="morekeys_h">ĥ,ħ</string> <!-- U+0175: "ŵ" LATIN SMALL LETTER W WITH CIRCUMFLEX --> - <string name="more_keys_for_w">w,ŵ</string> - <string name="more_keys_for_q">q</string> - <string name="more_keys_for_x">x</string> + <string name="morekeys_w">w,ŵ</string> + <string name="morekeys_q">q</string> + <string name="morekeys_x">x</string> <!-- U+015D: "ŝ" LATIN SMALL LETTER S WITH CIRCUMFLEX --> - <string name="keylabel_for_q">ŝ</string> + <string name="keyspec_q">ŝ</string> <!-- U+011D: "ĝ" LATIN SMALL LETTER G WITH CIRCUMFLEX --> - <string name="keylabel_for_w">ĝ</string> + <string name="keyspec_w">ĝ</string> <!-- U+016D: "ŭ" LATIN SMALL LETTER U WITH BREVE --> - <string name="keylabel_for_y">ŭ</string> + <string name="keyspec_y">ŭ</string> <!-- U+0109: "ĉ" LATIN SMALL LETTER C WITH CIRCUMFLEX --> - <string name="keylabel_for_x">ĉ</string> + <string name="keyspec_x">ĉ</string> <!-- U+0135: "ĵ" LATIN SMALL LETTER J WITH CIRCUMFLEX --> - <string name="keylabel_for_spanish_row2_10">ĵ</string> + <string name="keyspec_spanish_row2_10">ĵ</string> </resources> diff --git a/tools/make-keyboard-text/res/values-es/donottranslate-more-keys.xml b/tools/make-keyboard-text/res/values-es/donottranslate-more-keys.xml index 8e6b4ee06..22e537069 100644 --- a/tools/make-keyboard-text/res/values-es/donottranslate-more-keys.xml +++ b/tools/make-keyboard-text/res/values-es/donottranslate-more-keys.xml @@ -28,7 +28,7 @@ U+00E6: "æ" LATIN SMALL LETTER AE U+0101: "ā" LATIN SMALL LETTER A WITH MACRON U+00AA: "ª" FEMININE ORDINAL INDICATOR --> - <string name="more_keys_for_a">á,à,ä,â,ã,å,ą,æ,ā,ª</string> + <string name="morekeys_a">á,à,ä,â,ã,å,ą,æ,ā,ª</string> <!-- U+00E9: "é" LATIN SMALL LETTER E WITH ACUTE U+00E8: "è" LATIN SMALL LETTER E WITH GRAVE U+00EB: "ë" LATIN SMALL LETTER E WITH DIAERESIS @@ -36,14 +36,14 @@ U+0119: "ę" LATIN SMALL LETTER E WITH OGONEK U+0117: "ė" LATIN SMALL LETTER E WITH DOT ABOVE U+0113: "ē" LATIN SMALL LETTER E WITH MACRON --> - <string name="more_keys_for_e">é,è,ë,ê,ę,ė,ē</string> + <string name="morekeys_e">é,è,ë,ê,ę,ė,ē</string> <!-- U+00ED: "í" LATIN SMALL LETTER I WITH ACUTE U+00EF: "ï" LATIN SMALL LETTER I WITH DIAERESIS U+00EC: "ì" LATIN SMALL LETTER I WITH GRAVE U+00EE: "î" LATIN SMALL LETTER I WITH CIRCUMFLEX U+012F: "į" LATIN SMALL LETTER I WITH OGONEK U+012B: "ī" LATIN SMALL LETTER I WITH MACRON --> - <string name="more_keys_for_i">í,ï,ì,î,į,ī</string> + <string name="morekeys_i">í,ï,ì,î,į,ī</string> <!-- U+00F3: "ó" LATIN SMALL LETTER O WITH ACUTE U+00F2: "ò" LATIN SMALL LETTER O WITH GRAVE U+00F6: "ö" LATIN SMALL LETTER O WITH DIAERESIS @@ -53,30 +53,21 @@ U+0153: "œ" LATIN SMALL LIGATURE OE U+014D: "ō" LATIN SMALL LETTER O WITH MACRON U+00BA: "º" MASCULINE ORDINAL INDICATOR --> - <string name="more_keys_for_o">ó,ò,ö,ô,õ,ø,œ,ō,º</string> + <string name="morekeys_o">ó,ò,ö,ô,õ,ø,œ,ō,º</string> <!-- U+00FA: "ú" LATIN SMALL LETTER U WITH ACUTE U+00FC: "ü" LATIN SMALL LETTER U WITH DIAERESIS U+00F9: "ù" LATIN SMALL LETTER U WITH GRAVE U+00FB: "û" LATIN SMALL LETTER U WITH CIRCUMFLEX U+016B: "ū" LATIN SMALL LETTER U WITH MACRON --> - <string name="more_keys_for_u">ú,ü,ù,û,ū</string> + <string name="morekeys_u">ú,ü,ù,û,ū</string> <!-- U+00F1: "ñ" LATIN SMALL LETTER N WITH TILDE U+0144: "ń" LATIN SMALL LETTER N WITH ACUTE --> - <string name="more_keys_for_n">ñ,ń</string> + <string name="morekeys_n">ñ,ń</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">ç,ć,č</string> - <!-- U+00F1: "ñ" LATIN SMALL LETTER N WITH TILDE --> - <string name="keylabel_for_spanish_row2_10">ñ</string> + <string name="morekeys_c">ç,ć,č</string> <!-- U+00A1: "¡" INVERTED EXCLAMATION MARK U+00BF: "¿" INVERTED QUESTION MARK --> - <string name="more_keys_for_punctuation">"!fixedColumnOrder!4,;,!,\\,,\?,:,¡,\@,¿"</string> - <!-- U+00A1: "¡" INVERTED EXCLAMATION MARK --> - <string name="more_keys_for_tablet_comma">"!,¡"</string> - <!-- U+00BF: "¿" INVERTED QUESTION MARK --> - <string name="more_keys_for_period">"\?,¿"</string> - <string name="keylabel_for_apostrophe">\"</string> - <string name="keyhintlabel_for_apostrophe">\'</string> - <string name="more_keys_for_apostrophe">\'</string> + <string name="morekeys_punctuation">"!autoColumnOrder!9,\\,,?,!,#,),(,/,;,¡,',@,:,-,\",+,\\%,&,¿"</string> </resources> diff --git a/tools/make-keyboard-text/res/values-et/donottranslate-more-keys.xml b/tools/make-keyboard-text/res/values-et-rEE/donottranslate-more-keys.xml index d037044bd..9a8fa3c59 100644 --- a/tools/make-keyboard-text/res/values-et/donottranslate-more-keys.xml +++ b/tools/make-keyboard-text/res/values-et-rEE/donottranslate-more-keys.xml @@ -27,7 +27,7 @@ U+00E5: "å" LATIN SMALL LETTER A WITH RING ABOVE U+00E6: "æ" LATIN SMALL LETTER AE U+0105: "ą" LATIN SMALL LETTER A WITH OGONEK --> - <string name="more_keys_for_a">ä,ā,à,á,â,ã,å,æ,ą</string> + <string name="morekeys_a">ä,ā,à,á,â,ã,å,æ,ą</string> <!-- U+0113: "ē" LATIN SMALL LETTER E WITH MACRON U+00E8: "è" LATIN SMALL LETTER E WITH GRAVE U+0117: "ė" LATIN SMALL LETTER E WITH DOT ABOVE @@ -36,7 +36,7 @@ U+00EB: "ë" LATIN SMALL LETTER E WITH DIAERESIS U+0119: "ę" LATIN SMALL LETTER E WITH OGONEK U+011B: "ě" LATIN SMALL LETTER E WITH CARON --> - <string name="more_keys_for_e">ē,è,ė,é,ê,ë,ę,ě</string> + <string name="morekeys_e">ē,è,ė,é,ê,ë,ę,ě</string> <!-- U+012B: "ī" LATIN SMALL LETTER I WITH MACRON U+00EC: "ì" LATIN SMALL LETTER I WITH GRAVE U+012F: "į" LATIN SMALL LETTER I WITH OGONEK @@ -44,7 +44,7 @@ U+00EE: "î" LATIN SMALL LETTER I WITH CIRCUMFLEX U+00EF: "ï" LATIN SMALL LETTER I WITH DIAERESIS U+0131: "ı" LATIN SMALL LETTER DOTLESS I --> - <string name="more_keys_for_i">ī,ì,į,í,î,ï,ı</string> + <string name="morekeys_i">ī,ì,į,í,î,ï,ı</string> <!-- U+00F6: "ö" LATIN SMALL LETTER O WITH DIAERESIS U+00F5: "õ" LATIN SMALL LETTER O WITH TILDE U+00F2: "ò" LATIN SMALL LETTER O WITH GRAVE @@ -53,7 +53,7 @@ U+0153: "œ" LATIN SMALL LIGATURE OE U+0151: "ő" LATIN SMALL LETTER O WITH DOUBLE ACUTE U+00F8: "ø" LATIN SMALL LETTER O WITH STROKE --> - <string name="more_keys_for_o">ö,õ,ò,ó,ô,œ,ő,ø</string> + <string name="morekeys_o">ö,õ,ò,ó,ô,œ,ő,ø</string> <!-- U+00FC: "ü" LATIN SMALL LETTER U WITH DIAERESIS U+016B: "ū" LATIN SMALL LETTER U WITH MACRON U+0173: "ų" LATIN SMALL LETTER U WITH OGONEK @@ -62,55 +62,55 @@ U+00FB: "û" LATIN SMALL LETTER U WITH CIRCUMFLEX U+016F: "ů" LATIN SMALL LETTER U WITH RING ABOVE U+0171: "ű" LATIN SMALL LETTER U WITH DOUBLE ACUTE --> - <string name="more_keys_for_u">ü,ū,ų,ù,ú,û,ů,ű</string> + <string name="morekeys_u">ü,ū,ų,ù,ú,û,ů,ű</string> <!-- U+0161: "š" LATIN SMALL LETTER S WITH CARON U+00DF: "ß" LATIN SMALL LETTER SHARP S U+015B: "ś" LATIN SMALL LETTER S WITH ACUTE U+015F: "ş" LATIN SMALL LETTER S WITH CEDILLA --> - <string name="more_keys_for_s">š,ß,ś,ş</string> + <string name="morekeys_s">š,ß,ś,ş</string> <!-- U+0146: "ņ" LATIN SMALL LETTER N WITH CEDILLA U+00F1: "ñ" LATIN SMALL LETTER N WITH TILDE - U+0144: "ń" LATIN SMALL LETTER N WITH ACUTE U+0144: "ń" LATIN SMALL LETTER N WITH ACUTE --> - <string name="more_keys_for_n">ņ,ñ,ń,ń</string> + <string name="morekeys_n">ņ,ñ,ń</string> + <!-- U+010D: "č" LATIN SMALL LETTER C WITH CARON U+00E7: "ç" LATIN SMALL LETTER C WITH CEDILLA U+0107: "ć" LATIN SMALL LETTER C WITH ACUTE --> - <string name="more_keys_for_c">č,ç,ć</string> + <string name="morekeys_c">č,ç,ć</string> <!-- U+00FD: "ý" LATIN SMALL LETTER Y WITH ACUTE U+00FF: "ÿ" LATIN SMALL LETTER Y WITH DIAERESIS --> - <string name="more_keys_for_y">ý,ÿ</string> + <string name="morekeys_y">ý,ÿ</string> <!-- U+010F: "ď" LATIN SMALL LETTER D WITH CARON --> - <string name="more_keys_for_d">ď</string> + <string name="morekeys_d">ď</string> <!-- U+0157: "ŗ" LATIN SMALL LETTER R WITH CEDILLA U+0159: "ř" LATIN SMALL LETTER R WITH CARON U+0155: "ŕ" LATIN SMALL LETTER R WITH ACUTE --> - <string name="more_keys_for_r">ŗ,ř,ŕ</string> + <string name="morekeys_r">ŗ,ř,ŕ</string> <!-- U+0163: "ţ" LATIN SMALL LETTER T WITH CEDILLA U+0165: "ť" LATIN SMALL LETTER T WITH CARON --> - <string name="more_keys_for_t">ţ,ť</string> + <string name="morekeys_t">ţ,ť</string> <!-- U+017E: "ž" LATIN SMALL LETTER Z WITH CARON U+017C: "ż" LATIN SMALL LETTER Z WITH DOT ABOVE U+017A: "ź" LATIN SMALL LETTER Z WITH ACUTE --> - <string name="more_keys_for_z">ž,ż,ź</string> + <string name="morekeys_z">ž,ż,ź</string> <!-- U+0137: "ķ" LATIN SMALL LETTER K WITH CEDILLA --> - <string name="more_keys_for_k">ķ</string> + <string name="morekeys_k">ķ</string> <!-- U+013C: "ļ" LATIN SMALL LETTER L WITH CEDILLA U+0142: "ł" LATIN SMALL LETTER L WITH STROKE U+013A: "ĺ" LATIN SMALL LETTER L WITH ACUTE U+013E: "ľ" LATIN SMALL LETTER L WITH CARON --> - <string name="more_keys_for_l">ļ,ł,ĺ,ľ</string> + <string name="morekeys_l">ļ,ł,ĺ,ľ</string> <!-- U+0123: "ģ" LATIN SMALL LETTER G WITH CEDILLA U+011F: "ğ" LATIN SMALL LETTER G WITH BREVE --> - <string name="more_keys_for_g">ģ,ğ</string> + <string name="morekeys_g">ģ,ğ</string> <!-- U+00FC: "ü" LATIN SMALL LETTER U WITH DIAERESIS --> - <string name="keylabel_for_nordic_row1_11">ü</string> + <string name="keyspec_nordic_row1_11">ü</string> <!-- U+00F6: "ö" LATIN SMALL LETTER O WITH DIAERESIS --> - <string name="keylabel_for_nordic_row2_10">ö</string> + <string name="keyspec_nordic_row2_10">ö</string> <!-- U+00E4: "ä" LATIN SMALL LETTER A WITH DIAERESIS --> - <string name="keylabel_for_nordic_row2_11">ä</string> + <string name="keyspec_nordic_row2_11">ä</string> <!-- U+00F5: "õ" LATIN SMALL LETTER O WITH TILDE --> - <string name="more_keys_for_nordic_row2_10">õ</string> + <string name="morekeys_nordic_row2_10">õ</string> <string name="single_quotes">!text/single_9qm_lqm</string> <string name="double_quotes">!text/double_9qm_lqm</string> </resources> diff --git a/tools/make-keyboard-text/res/values-eu-rES/donottranslate-more-keys.xml b/tools/make-keyboard-text/res/values-eu-rES/donottranslate-more-keys.xml new file mode 100644 index 000000000..95f632a52 --- /dev/null +++ b/tools/make-keyboard-text/res/values-eu-rES/donottranslate-more-keys.xml @@ -0,0 +1,70 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +/* +** +** Copyright 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. +*/ +--> +<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> + <!-- U+00E1: "á" LATIN SMALL LETTER A WITH ACUTE + U+00E0: "à" LATIN SMALL LETTER A WITH GRAVE + U+00E4: "ä" LATIN SMALL LETTER A WITH DIAERESIS + U+00E2: "â" LATIN SMALL LETTER A WITH CIRCUMFLEX + U+00E3: "ã" LATIN SMALL LETTER A WITH TILDE + U+00E5: "å" LATIN SMALL LETTER A WITH RING ABOVE + U+0105: "ą" LATIN SMALL LETTER A WITH OGONEK + U+00E6: "æ" LATIN SMALL LETTER AE + U+0101: "ā" LATIN SMALL LETTER A WITH MACRON + U+00AA: "ª" FEMININE ORDINAL INDICATOR --> + <string name="morekeys_a">á,à,ä,â,ã,å,ą,æ,ā,ª</string> + <!-- U+00E9: "é" LATIN SMALL LETTER E WITH ACUTE + U+00E8: "è" LATIN SMALL LETTER E WITH GRAVE + U+00EB: "ë" LATIN SMALL LETTER E WITH DIAERESIS + U+00EA: "ê" LATIN SMALL LETTER E WITH CIRCUMFLEX + U+0119: "ę" LATIN SMALL LETTER E WITH OGONEK + U+0117: "ė" LATIN SMALL LETTER E WITH DOT ABOVE + U+0113: "ē" LATIN SMALL LETTER E WITH MACRON --> + <string name="morekeys_e">é,è,ë,ê,ę,ė,ē</string> + <!-- U+00ED: "í" LATIN SMALL LETTER I WITH ACUTE + U+00EF: "ï" LATIN SMALL LETTER I WITH DIAERESIS + U+00EC: "ì" LATIN SMALL LETTER I WITH GRAVE + U+00EE: "î" LATIN SMALL LETTER I WITH CIRCUMFLEX + U+012F: "į" LATIN SMALL LETTER I WITH OGONEK + U+012B: "ī" LATIN SMALL LETTER I WITH MACRON --> + <string name="morekeys_i">í,ï,ì,î,į,ī</string> + <!-- U+00F3: "ó" LATIN SMALL LETTER O WITH ACUTE + U+00F2: "ò" LATIN SMALL LETTER O WITH GRAVE + U+00F6: "ö" LATIN SMALL LETTER O WITH DIAERESIS + U+00F4: "ô" LATIN SMALL LETTER O WITH CIRCUMFLEX + U+00F5: "õ" LATIN SMALL LETTER O WITH TILDE + U+00F8: "ø" LATIN SMALL LETTER O WITH STROKE + U+0153: "œ" LATIN SMALL LIGATURE OE + U+014D: "ō" LATIN SMALL LETTER O WITH MACRON + U+00BA: "º" MASCULINE ORDINAL INDICATOR --> + <string name="morekeys_o">ó,ò,ö,ô,õ,ø,œ,ō,º</string> + <!-- U+00FA: "ú" LATIN SMALL LETTER U WITH ACUTE + U+00FC: "ü" LATIN SMALL LETTER U WITH DIAERESIS + U+00F9: "ù" LATIN SMALL LETTER U WITH GRAVE + U+00FB: "û" LATIN SMALL LETTER U WITH CIRCUMFLEX + U+016B: "ū" LATIN SMALL LETTER U WITH MACRON --> + <string name="morekeys_u">ú,ü,ù,û,ū</string> + <!-- U+00F1: "ñ" LATIN SMALL LETTER N WITH TILDE + U+0144: "ń" LATIN SMALL LETTER N WITH ACUTE --> + <string name="morekeys_n">ñ,ń</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="morekeys_c">ç,ć,č</string> +</resources> diff --git a/tools/make-keyboard-text/res/values-fa/donottranslate-more-keys.xml b/tools/make-keyboard-text/res/values-fa/donottranslate-more-keys.xml index ab4fbda44..58f455504 100644 --- a/tools/make-keyboard-text/res/values-fa/donottranslate-more-keys.xml +++ b/tools/make-keyboard-text/res/values-fa/donottranslate-more-keys.xml @@ -23,96 +23,101 @@ U+200C: ZERO WIDTH NON-JOINER U+0628: "ب" ARABIC LETTER BEH U+067E: "پ" ARABIC LETTER PEH --> - <string name="label_to_alpha_key">ا‌ب‌پ</string> + <string name="keylabel_to_alpha">ا‌ب‌پ</string> <!-- U+06F1: "۱" EXTENDED ARABIC-INDIC DIGIT ONE --> - <string name="keylabel_for_symbols_1">۱</string> + <string name="keyspec_symbols_1">۱</string> <!-- U+06F2: "۲" EXTENDED ARABIC-INDIC DIGIT TWO --> - <string name="keylabel_for_symbols_2">۲</string> + <string name="keyspec_symbols_2">۲</string> <!-- U+06F3: "۳" EXTENDED ARABIC-INDIC DIGIT THREE --> - <string name="keylabel_for_symbols_3">۳</string> + <string name="keyspec_symbols_3">۳</string> <!-- U+06F4: "۴" EXTENDED ARABIC-INDIC DIGIT FOUR --> - <string name="keylabel_for_symbols_4">۴</string> + <string name="keyspec_symbols_4">۴</string> <!-- U+06F5: "۵" EXTENDED ARABIC-INDIC DIGIT FIVE --> - <string name="keylabel_for_symbols_5">۵</string> + <string name="keyspec_symbols_5">۵</string> <!-- U+06F6: "۶" EXTENDED ARABIC-INDIC DIGIT SIX --> - <string name="keylabel_for_symbols_6">۶</string> + <string name="keyspec_symbols_6">۶</string> <!-- U+06F7: "۷" EXTENDED ARABIC-INDIC DIGIT SEVEN --> - <string name="keylabel_for_symbols_7">۷</string> + <string name="keyspec_symbols_7">۷</string> <!-- U+06F8: "۸" EXTENDED ARABIC-INDIC DIGIT EIGHT --> - <string name="keylabel_for_symbols_8">۸</string> + <string name="keyspec_symbols_8">۸</string> <!-- U+06F9: "۹" EXTENDED ARABIC-INDIC DIGIT NINE --> - <string name="keylabel_for_symbols_9">۹</string> + <string name="keyspec_symbols_9">۹</string> <!-- U+06F0: "۰" EXTENDED ARABIC-INDIC DIGIT ZERO --> - <string name="keylabel_for_symbols_0">۰</string> + <string name="keyspec_symbols_0">۰</string> <!-- Label for "switch to symbols" key. U+061F: "؟" ARABIC QUESTION MARK --> - <string name="label_to_symbol_key">۳۲۱؟</string> - <!-- Label for "switch to symbols with microphone" key. This string shouldn't include the "mic" - part because it'll be appended by the code. --> - <string name="label_to_symbol_with_microphone_key">۳۲۱</string> - <string name="additional_more_keys_for_symbols_1">1</string> - <string name="additional_more_keys_for_symbols_2">2</string> - <string name="additional_more_keys_for_symbols_3">3</string> - <string name="additional_more_keys_for_symbols_4">4</string> - <string name="additional_more_keys_for_symbols_5">5</string> - <string name="additional_more_keys_for_symbols_6">6</string> - <string name="additional_more_keys_for_symbols_7">7</string> - <string name="additional_more_keys_for_symbols_8">8</string> - <string name="additional_more_keys_for_symbols_9">9</string> + <string name="keylabel_to_symbol">۳۲۱؟</string> + <string name="additional_morekeys_symbols_1">1</string> + <string name="additional_morekeys_symbols_2">2</string> + <string name="additional_morekeys_symbols_3">3</string> + <string name="additional_morekeys_symbols_4">4</string> + <string name="additional_morekeys_symbols_5">5</string> + <string name="additional_morekeys_symbols_6">6</string> + <string name="additional_morekeys_symbols_7">7</string> + <string name="additional_morekeys_symbols_8">8</string> + <string name="additional_morekeys_symbols_9">9</string> <!-- U+066B: "٫" ARABIC DECIMAL SEPARATOR U+066C: "٬" ARABIC THOUSANDS SEPARATOR --> - <string name="additional_more_keys_for_symbols_0">0,٫,٬</string> + <string name="additional_morekeys_symbols_0">0,٫,٬</string> <!-- U+060C: "،" ARABIC COMMA --> - <string name="keylabel_for_comma">،</string> - <string name="more_keys_for_comma">"\\,"</string> - <string name="keylabel_for_symbols_question">؟</string> - <string name="keylabel_for_symbols_semicolon">؛</string> + <string name="keyspec_comma">،</string> + <!-- U+064B: "ً" ARABIC FATHATAN --> + <string name="keyhintlabel_period">ً</string> + <string name="morekeys_period">!text/morekeys_arabic_diacritics</string> + <string name="keyhintlabel_tablet_period">ً</string> + <string name="morekeys_tablet_period">!text/morekeys_arabic_diacritics</string> + <string name="keyspec_symbols_question">؟</string> + <string name="keyspec_symbols_semicolon">؛</string> <!-- U+066A: "٪" ARABIC PERCENT SIGN --> - <string name="keylabel_for_symbols_percent">٪</string> - <string name="more_keys_for_symbols_question">\?</string> - <string name="more_keys_for_symbols_semicolon">;</string> + <string name="keyspec_symbols_percent">٪</string> + <!-- U+00BF: "¿" INVERTED QUESTION MARK --> + <string name="morekeys_question">?,¿</string> + <string name="morekeys_symbols_semicolon">;</string> <!-- U+2030: "‰" PER MILLE SIGN --> - <string name="more_keys_for_symbols_percent">\\%,‰</string> + <string name="morekeys_symbols_percent">\\%,‰</string> <!-- U+060C: "،" ARABIC COMMA U+061B: "؛" ARABIC SEMICOLON U+061F: "؟" ARABIC QUESTION MARK U+00AB: "«" LEFT-POINTING DOUBLE ANGLE QUOTATION MARK U+00BB: "»" RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK --> - <string name="keylabel_for_tablet_comma">"،"</string> - <string name="keyhintlabel_for_tablet_comma">"!"</string> - <string name="more_keys_for_tablet_comma">"!,\\,"</string> - <string name="keyhintlabel_for_period">"؟"</string> - <string name="more_keys_for_period">"؟,\?"</string> - <string name="keylabel_for_apostrophe">،</string> - <string name="keyhintlabel_for_apostrophe">؟</string> - <string name="more_keys_for_apostrophe">"!fixedColumnOrder!4,:,!,؟,؛,-,/,«|»,»|«"</string> + <string name="keyspec_tablet_comma">"،"</string> + <string name="keyhintlabel_tablet_comma">"؟"</string> + <string name="morekeys_tablet_comma">"!fixedColumnOrder!4,:,!,؟,؛,-,!text/keyspec_left_double_angle_quote,!text/keyspec_right_double_angle_quote"</string> <!-- U+FDFC: "﷼" RIAL SIGN --> - <string name="keylabel_for_currency">﷼</string> - <!-- U+061F: "؟" ARABIC QUESTION MARK - U+060C: "،" ARABIC COMMA - U+061B: "؛" ARABIC SEMICOLON --> - <string name="more_keys_for_punctuation">"!fixedColumnOrder!8,\",\',#,-,:,!,،,؟,\@,&,\\%,+,؛,/,(|),)|("</string> + <string name="keyspec_currency">﷼</string> <!-- U+266A: "♪" EIGHTH NOTE --> - <string name="more_keys_for_bullet">♪</string> + <string name="morekeys_bullet">♪</string> <!-- U+2605: "★" BLACK STAR U+066D: "٭" ARABIC FIVE POINTED STAR --> - <string name="more_keys_for_star">★,٭</string> + <string name="morekeys_star">★,٭</string> <!-- The all letters need to be mirrored are found at http://www.unicode.org/Public/6.1.0/ucd/BidiMirroring.txt --> <!-- U+FD3E: "﴾" ORNATE LEFT PARENTHESIS U+FD3F: "﴿" ORNATE RIGHT PARENTHESIS --> - <string name="more_keys_for_left_parenthesis">!fixedColumnOrder!4,﴾|﴿,<|>,{|},[|]</string> - <string name="more_keys_for_right_parenthesis">!fixedColumnOrder!4,﴿|﴾,>|<,}|{,]|[</string> + <string name="morekeys_left_parenthesis">!fixedColumnOrder!4,﴾|﴿,!text/keyspecs_left_parenthesis_more_keys</string> + <string name="morekeys_right_parenthesis">!fixedColumnOrder!4,﴿|﴾,!text/keyspecs_right_parenthesis_more_keys</string> <!-- U+2264: "≤" LESS-THAN OR EQUAL TO U+2265: "≥" GREATER-THAN EQUAL TO U+00AB: "«" LEFT-POINTING DOUBLE ANGLE QUOTATION MARK U+00BB: "»" RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK U+2039: "‹" SINGLE LEFT-POINTING ANGLE QUOTATION MARK U+203A: "›" SINGLE RIGHT-POINTING ANGLE QUOTATION MARK --> - <string name="more_keys_for_less_than">!fixedColumnOrder!3,‹|›,≤|≥,<|></string> - <string name="more_keys_for_greater_than">!fixedColumnOrder!3,›|‹,≥|≤,>|<</string> - <string name="single_angle_quotes">!text/single_laqm_raqm_rtl</string> - <string name="double_angle_quotes">!text/double_laqm_raqm_rtl</string> + <string name="morekeys_less_than">!fixedColumnOrder!3,!text/keyspec_left_single_angle_quote,!text/keyspec_less_than_equal,!text/keyspec_less_than</string> + <string name="morekeys_greater_than">!fixedColumnOrder!3,!text/keyspec_right_single_angle_quote,!text/keyspec_greater_than_equal,!text/keyspec_greater_than</string> + <string name="keyspec_left_parenthesis">(|)</string> + <string name="keyspec_right_parenthesis">)|(</string> + <string name="keyspec_left_square_bracket">[|]</string> + <string name="keyspec_right_square_bracket">]|[</string> + <string name="keyspec_left_curly_bracket">{|}</string> + <string name="keyspec_right_curly_bracket">}|{</string> + <string name="keyspec_less_than"><|></string> + <string name="keyspec_greater_than">>|<</string> + <string name="keyspec_less_than_equal">≤|≥</string> + <string name="keyspec_greater_than_equal">≥|≤</string> + <string name="keyspec_left_double_angle_quote">«|»</string> + <string name="keyspec_right_double_angle_quote">»|«</string> + <string name="keyspec_left_single_angle_quote">‹|›</string> + <string name="keyspec_right_single_angle_quote">›|‹</string> <!-- U+0655: "ٕ" ARABIC HAMZA BELOW U+0652: "ْ" ARABIC SUKUN U+0651: "ّ" ARABIC SHADDA @@ -129,6 +134,5 @@ U+0640: "ـ" ARABIC TATWEEL --> <!-- In order to make Tatweel easily distinguishable from other punctuations, we use consecutive Tatweels only for its displayed label. --> <!-- Note: The space character is needed as a preceding letter to draw Arabic diacritics characters correctly. --> - <string name="more_keys_for_arabic_diacritics">"!fixedColumnOrder!7, ٕ|ٕ, ْ|ْ, ّ|ّ, ٌ|ٌ, ٍ|ٍ, ً|ً, ٔ|ٔ, ٖ|ٖ, ٰ|ٰ, ٓ|ٓ, ُ|ُ, ِ|ِ, َ|َ,ـــ|ـ"</string> - <string name="keyhintlabel_for_arabic_diacritics">ً</string> + <string name="morekeys_arabic_diacritics">"!fixedColumnOrder!7, ٕ|ٕ, ْ|ْ, ّ|ّ, ٌ|ٌ, ٍ|ٍ, ً|ً, ٔ|ٔ, ٖ|ٖ, ٰ|ٰ, ٓ|ٓ, ُ|ُ, ِ|ِ, َ|َ,ـــ|ـ"</string> </resources> diff --git a/tools/make-keyboard-text/res/values-fi/donottranslate-more-keys.xml b/tools/make-keyboard-text/res/values-fi/donottranslate-more-keys.xml index 25b785845..82b847262 100644 --- a/tools/make-keyboard-text/res/values-fi/donottranslate-more-keys.xml +++ b/tools/make-keyboard-text/res/values-fi/donottranslate-more-keys.xml @@ -24,7 +24,7 @@ U+00E2: "â" LATIN SMALL LETTER A WITH CIRCUMFLEX U+00E3: "ã" LATIN SMALL LETTER A WITH TILDE U+0101: "ā" LATIN SMALL LETTER A WITH MACRON --> - <string name="more_keys_for_a">æ,à,á,â,ã,ā</string> + <string name="morekeys_a">æ,à,á,â,ã,ā</string> <!-- U+00F8: "ø" LATIN SMALL LETTER O WITH STROKE U+00F4: "ô" LATIN SMALL LETTER O WITH CIRCUMFLEX U+00F2: "ò" LATIN SMALL LETTER O WITH GRAVE @@ -32,25 +32,25 @@ U+00F5: "õ" LATIN SMALL LETTER O WITH TILDE U+0153: "œ" LATIN SMALL LIGATURE OE U+014D: "ō" LATIN SMALL LETTER O WITH MACRON --> - <string name="more_keys_for_o">ø,ô,ò,ó,õ,œ,ō</string> + <string name="morekeys_o">ø,ô,ò,ó,õ,œ,ō</string> <!-- U+00FC: "ü" LATIN SMALL LETTER U WITH DIAERESIS --> - <string name="more_keys_for_u">ü</string> + <string name="morekeys_u">ü</string> <!-- U+0161: "š" LATIN SMALL LETTER S WITH CARON U+00DF: "ß" LATIN SMALL LETTER SHARP S U+015B: "ś" LATIN SMALL LETTER S WITH ACUTE --> - <string name="more_keys_for_s">š,ß,ś</string> + <string name="morekeys_s">š,ß,ś</string> <!-- U+017E: "ž" LATIN SMALL LETTER Z WITH CARON U+017A: "ź" LATIN SMALL LETTER Z WITH ACUTE U+017C: "ż" LATIN SMALL LETTER Z WITH DOT ABOVE --> - <string name="more_keys_for_z">ž,ź,ż</string> + <string name="morekeys_z">ž,ź,ż</string> <!-- U+00E5: "å" LATIN SMALL LETTER A WITH RING ABOVE --> - <string name="keylabel_for_nordic_row1_11">å</string> + <string name="keyspec_nordic_row1_11">å</string> <!-- U+00F6: "ö" LATIN SMALL LETTER O WITH DIAERESIS --> - <string name="keylabel_for_nordic_row2_10">ö</string> + <string name="keyspec_nordic_row2_10">ö</string> <!-- U+00E4: "ä" LATIN SMALL LETTER A WITH DIAERESIS --> - <string name="keylabel_for_nordic_row2_11">ä</string> + <string name="keyspec_nordic_row2_11">ä</string> <!-- U+00F8: "ø" LATIN SMALL LETTER O WITH STROKE --> - <string name="more_keys_for_nordic_row2_10">ø</string> + <string name="morekeys_nordic_row2_10">ø</string> <!-- U+00E6: "æ" LATIN SMALL LETTER AE --> - <string name="more_keys_for_nordic_row2_11">æ</string> + <string name="morekeys_nordic_row2_11">æ</string> </resources> diff --git a/tools/make-keyboard-text/res/values-fr/donottranslate-more-keys.xml b/tools/make-keyboard-text/res/values-fr/donottranslate-more-keys.xml index 7b11a183d..dded5d251 100644 --- a/tools/make-keyboard-text/res/values-fr/donottranslate-more-keys.xml +++ b/tools/make-keyboard-text/res/values-fr/donottranslate-more-keys.xml @@ -27,7 +27,7 @@ U+00E5: "å" LATIN SMALL LETTER A WITH RING ABOVE U+0101: "ā" LATIN SMALL LETTER A WITH MACRON U+00AA: "ª" FEMININE ORDINAL INDICATOR --> - <string name="more_keys_for_a">à,â,%,æ,á,ä,ã,å,ā,ª</string> + <string name="morekeys_a">à,â,%,æ,á,ä,ã,å,ā,ª</string> <!-- U+00E9: "é" LATIN SMALL LETTER E WITH ACUTE U+00E8: "è" LATIN SMALL LETTER E WITH GRAVE U+00EA: "ê" LATIN SMALL LETTER E WITH CIRCUMFLEX @@ -35,14 +35,14 @@ U+0119: "ę" LATIN SMALL LETTER E WITH OGONEK U+0117: "ė" LATIN SMALL LETTER E WITH DOT ABOVE U+0113: "ē" LATIN SMALL LETTER E WITH MACRON --> - <string name="more_keys_for_e">é,è,ê,ë,%,ę,ė,ē</string> + <string name="morekeys_e">é,è,ê,ë,%,ę,ė,ē</string> <!-- 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">î,%,ï,ì,í,į,ī</string> + <string name="morekeys_i">î,%,ï,ì,í,į,ī</string> <!-- U+00F4: "ô" LATIN SMALL LETTER O WITH CIRCUMFLEX U+0153: "œ" LATIN SMALL LIGATURE OE U+00F6: "ö" LATIN SMALL LETTER O WITH DIAERESIS @@ -52,17 +52,29 @@ U+00F8: "ø" LATIN SMALL LETTER O WITH STROKE U+014D: "ō" LATIN SMALL LETTER O WITH MACRON U+00BA: "º" MASCULINE ORDINAL INDICATOR --> - <string name="more_keys_for_o">ô,œ,%,ö,ò,ó,õ,ø,ō,º</string> + <string name="morekeys_o">ô,œ,%,ö,ò,ó,õ,ø,ō,º</string> <!-- U+00F9: "ù" LATIN SMALL LETTER U WITH GRAVE U+00FB: "û" LATIN SMALL LETTER U WITH CIRCUMFLEX U+00FC: "ü" LATIN SMALL LETTER U WITH DIAERESIS U+00FA: "ú" LATIN SMALL LETTER U WITH ACUTE U+016B: "ū" LATIN SMALL LETTER U WITH MACRON --> - <string name="more_keys_for_u">ù,û,%,ü,ú,ū</string> + <string name="morekeys_u">ù,û,%,ü,ú,ū</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">ç,ć,č</string> + <string name="morekeys_c">ç,%,ć,č</string> <!-- U+00FF: "ÿ" LATIN SMALL LETTER Y WITH DIAERESIS --> - <string name="more_keys_for_y">%,ÿ</string> + <string name="morekeys_y">%,ÿ</string> + <!-- U+00E8: "è" LATIN SMALL LETTER E WITH GRAVE --> + <string name="keyspec_swiss_row1_11">è</string> + <!-- U+00FC: "ü" LATIN SMALL LETTER U WITH DIAERESIS --> + <string name="morekeys_swiss_row1_11">ü</string> + <!-- U+00E9: "é" LATIN SMALL LETTER E WITH ACUTE --> + <string name="keyspec_swiss_row2_10">é</string> + <!-- U+00F6: "ö" LATIN SMALL LETTER O WITH DIAERESIS --> + <string name="morekeys_swiss_row2_10">ö</string> + <!-- U+00E0: "à" LATIN SMALL LETTER A WITH GRAVE --> + <string name="keyspec_swiss_row2_11">à</string> + <!-- U+00E4: "ä" LATIN SMALL LETTER A WITH DIAERESIS --> + <string name="morekeys_swiss_row2_11">ä</string> </resources> diff --git a/tools/make-keyboard-text/res/values-gl-rES/donottranslate-more-keys.xml b/tools/make-keyboard-text/res/values-gl-rES/donottranslate-more-keys.xml new file mode 100644 index 000000000..95f632a52 --- /dev/null +++ b/tools/make-keyboard-text/res/values-gl-rES/donottranslate-more-keys.xml @@ -0,0 +1,70 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +/* +** +** Copyright 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. +*/ +--> +<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> + <!-- U+00E1: "á" LATIN SMALL LETTER A WITH ACUTE + U+00E0: "à" LATIN SMALL LETTER A WITH GRAVE + U+00E4: "ä" LATIN SMALL LETTER A WITH DIAERESIS + U+00E2: "â" LATIN SMALL LETTER A WITH CIRCUMFLEX + U+00E3: "ã" LATIN SMALL LETTER A WITH TILDE + U+00E5: "å" LATIN SMALL LETTER A WITH RING ABOVE + U+0105: "ą" LATIN SMALL LETTER A WITH OGONEK + U+00E6: "æ" LATIN SMALL LETTER AE + U+0101: "ā" LATIN SMALL LETTER A WITH MACRON + U+00AA: "ª" FEMININE ORDINAL INDICATOR --> + <string name="morekeys_a">á,à,ä,â,ã,å,ą,æ,ā,ª</string> + <!-- U+00E9: "é" LATIN SMALL LETTER E WITH ACUTE + U+00E8: "è" LATIN SMALL LETTER E WITH GRAVE + U+00EB: "ë" LATIN SMALL LETTER E WITH DIAERESIS + U+00EA: "ê" LATIN SMALL LETTER E WITH CIRCUMFLEX + U+0119: "ę" LATIN SMALL LETTER E WITH OGONEK + U+0117: "ė" LATIN SMALL LETTER E WITH DOT ABOVE + U+0113: "ē" LATIN SMALL LETTER E WITH MACRON --> + <string name="morekeys_e">é,è,ë,ê,ę,ė,ē</string> + <!-- U+00ED: "í" LATIN SMALL LETTER I WITH ACUTE + U+00EF: "ï" LATIN SMALL LETTER I WITH DIAERESIS + U+00EC: "ì" LATIN SMALL LETTER I WITH GRAVE + U+00EE: "î" LATIN SMALL LETTER I WITH CIRCUMFLEX + U+012F: "į" LATIN SMALL LETTER I WITH OGONEK + U+012B: "ī" LATIN SMALL LETTER I WITH MACRON --> + <string name="morekeys_i">í,ï,ì,î,į,ī</string> + <!-- U+00F3: "ó" LATIN SMALL LETTER O WITH ACUTE + U+00F2: "ò" LATIN SMALL LETTER O WITH GRAVE + U+00F6: "ö" LATIN SMALL LETTER O WITH DIAERESIS + U+00F4: "ô" LATIN SMALL LETTER O WITH CIRCUMFLEX + U+00F5: "õ" LATIN SMALL LETTER O WITH TILDE + U+00F8: "ø" LATIN SMALL LETTER O WITH STROKE + U+0153: "œ" LATIN SMALL LIGATURE OE + U+014D: "ō" LATIN SMALL LETTER O WITH MACRON + U+00BA: "º" MASCULINE ORDINAL INDICATOR --> + <string name="morekeys_o">ó,ò,ö,ô,õ,ø,œ,ō,º</string> + <!-- U+00FA: "ú" LATIN SMALL LETTER U WITH ACUTE + U+00FC: "ü" LATIN SMALL LETTER U WITH DIAERESIS + U+00F9: "ù" LATIN SMALL LETTER U WITH GRAVE + U+00FB: "û" LATIN SMALL LETTER U WITH CIRCUMFLEX + U+016B: "ū" LATIN SMALL LETTER U WITH MACRON --> + <string name="morekeys_u">ú,ü,ù,û,ū</string> + <!-- U+00F1: "ñ" LATIN SMALL LETTER N WITH TILDE + U+0144: "ń" LATIN SMALL LETTER N WITH ACUTE --> + <string name="morekeys_n">ñ,ń</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="morekeys_c">ç,ć,č</string> +</resources> diff --git a/tools/make-keyboard-text/res/values-hi/donottranslate-more-keys.xml b/tools/make-keyboard-text/res/values-hi/donottranslate-more-keys.xml index b0d010f81..55723cdd1 100644 --- a/tools/make-keyboard-text/res/values-hi/donottranslate-more-keys.xml +++ b/tools/make-keyboard-text/res/values-hi/donottranslate-more-keys.xml @@ -22,42 +22,39 @@ U+0915: "क" DEVANAGARI LETTER KA U+0916: "ख" DEVANAGARI LETTER KHA U+0917: "ग" DEVANAGARI LETTER GA --> - <string name="label_to_alpha_key">कखग</string> + <string name="keylabel_to_alpha">कखग</string> <!-- U+0967: "१" DEVANAGARI DIGIT ONE --> - <string name="keylabel_for_symbols_1">१</string> + <string name="keyspec_symbols_1">१</string> <!-- U+0968: "२" DEVANAGARI DIGIT TWO --> - <string name="keylabel_for_symbols_2">२</string> + <string name="keyspec_symbols_2">२</string> <!-- U+0969: "३" DEVANAGARI DIGIT THREE --> - <string name="keylabel_for_symbols_3">३</string> + <string name="keyspec_symbols_3">३</string> <!-- U+096A: "४" DEVANAGARI DIGIT FOUR --> - <string name="keylabel_for_symbols_4">४</string> + <string name="keyspec_symbols_4">४</string> <!-- U+096B: "५" DEVANAGARI DIGIT FIVE --> - <string name="keylabel_for_symbols_5">५</string> + <string name="keyspec_symbols_5">५</string> <!-- U+096C: "६" DEVANAGARI DIGIT SIX --> - <string name="keylabel_for_symbols_6">६</string> + <string name="keyspec_symbols_6">६</string> <!-- U+096D: "७" DEVANAGARI DIGIT SEVEN --> - <string name="keylabel_for_symbols_7">७</string> + <string name="keyspec_symbols_7">७</string> <!-- U+096E: "८" DEVANAGARI DIGIT EIGHT --> - <string name="keylabel_for_symbols_8">८</string> + <string name="keyspec_symbols_8">८</string> <!-- U+096F: "९" DEVANAGARI DIGIT NINE --> - <string name="keylabel_for_symbols_9">९</string> + <string name="keyspec_symbols_9">९</string> <!-- U+0966: "०" DEVANAGARI DIGIT ZERO --> - <string name="keylabel_for_symbols_0">०</string> + <string name="keyspec_symbols_0">०</string> <!-- Label for "switch to symbols" key. --> - <string name="label_to_symbol_key">\?१२३</string> - <!-- Label for "switch to symbols with microphone" key. This string shouldn't include the "mic" - part because it'll be appended by the code. --> - <string name="label_to_symbol_with_microphone_key">१२३</string> - <string name="additional_more_keys_for_symbols_1">1</string> - <string name="additional_more_keys_for_symbols_2">2</string> - <string name="additional_more_keys_for_symbols_3">3</string> - <string name="additional_more_keys_for_symbols_4">4</string> - <string name="additional_more_keys_for_symbols_5">5</string> - <string name="additional_more_keys_for_symbols_6">6</string> - <string name="additional_more_keys_for_symbols_7">7</string> - <string name="additional_more_keys_for_symbols_8">8</string> - <string name="additional_more_keys_for_symbols_9">9</string> - <string name="additional_more_keys_for_symbols_0">0</string> + <string name="keylabel_to_symbol">?१२३</string> + <string name="additional_morekeys_symbols_1">1</string> + <string name="additional_morekeys_symbols_2">2</string> + <string name="additional_morekeys_symbols_3">3</string> + <string name="additional_morekeys_symbols_4">4</string> + <string name="additional_morekeys_symbols_5">5</string> + <string name="additional_morekeys_symbols_6">6</string> + <string name="additional_morekeys_symbols_7">7</string> + <string name="additional_morekeys_symbols_8">8</string> + <string name="additional_morekeys_symbols_9">9</string> + <string name="additional_morekeys_symbols_0">0</string> <!-- U+20B9: "₹" INDIAN RUPEE SIGN --> - <string name="keylabel_for_currency">₹</string> + <string name="keyspec_currency">₹</string> </resources> diff --git a/tools/make-keyboard-text/res/values-hr/donottranslate-more-keys.xml b/tools/make-keyboard-text/res/values-hr/donottranslate-more-keys.xml index 022bd2a87..73e51db4f 100644 --- a/tools/make-keyboard-text/res/values-hr/donottranslate-more-keys.xml +++ b/tools/make-keyboard-text/res/values-hr/donottranslate-more-keys.xml @@ -21,20 +21,20 @@ <!-- U+0161: "š" LATIN SMALL LETTER S WITH CARON U+015B: "ś" LATIN SMALL LETTER S WITH ACUTE U+00DF: "ß" LATIN SMALL LETTER SHARP S --> - <string name="more_keys_for_s">š,ś,ß</string> + <string name="morekeys_s">š,ś,ß</string> <!-- U+00F1: "ñ" LATIN SMALL LETTER N WITH TILDE U+0144: "ń" LATIN SMALL LETTER N WITH ACUTE --> - <string name="more_keys_for_n">ñ,ń</string> + <string name="morekeys_n">ñ,ń</string> <!-- U+017E: "ž" LATIN SMALL LETTER Z WITH CARON U+017A: "ź" LATIN SMALL LETTER Z WITH ACUTE U+017C: "ż" LATIN SMALL LETTER Z WITH DOT ABOVE --> - <string name="more_keys_for_z">ž,ź,ż</string> + <string name="morekeys_z">ž,ź,ż</string> <!-- U+010D: "č" LATIN SMALL LETTER C WITH CARON U+0107: "ć" LATIN SMALL LETTER C WITH ACUTE U+00E7: "ç" LATIN SMALL LETTER C WITH CEDILLA --> - <string name="more_keys_for_c">č,ć,ç</string> + <string name="morekeys_c">č,ć,ç</string> <!-- U+0111: "đ" LATIN SMALL LETTER D WITH STROKE --> - <string name="more_keys_for_d">đ</string> + <string name="morekeys_d">đ</string> <string name="single_quotes">!text/single_9qm_rqm</string> <string name="double_quotes">!text/double_9qm_rqm</string> <string name="single_angle_quotes">!text/single_raqm_laqm</string> diff --git a/tools/make-keyboard-text/res/values-hu/donottranslate-more-keys.xml b/tools/make-keyboard-text/res/values-hu/donottranslate-more-keys.xml index ce2f5d057..a394a9722 100644 --- a/tools/make-keyboard-text/res/values-hu/donottranslate-more-keys.xml +++ b/tools/make-keyboard-text/res/values-hu/donottranslate-more-keys.xml @@ -26,7 +26,7 @@ U+00E3: "ã" LATIN SMALL LETTER A WITH TILDE U+00E5: "å" LATIN SMALL LETTER A WITH RING ABOVE U+0101: "ā" LATIN SMALL LETTER A WITH MACRON --> - <string name="more_keys_for_a">á,à,â,ä,æ,ã,å,ā</string> + <string name="morekeys_a">á,à,â,ä,æ,ã,å,ā</string> <!-- U+00E9: "é" LATIN SMALL LETTER E WITH ACUTE U+00E8: "è" LATIN SMALL LETTER E WITH GRAVE U+00EA: "ê" LATIN SMALL LETTER E WITH CIRCUMFLEX @@ -34,14 +34,14 @@ U+0119: "ę" LATIN SMALL LETTER E WITH OGONEK U+0117: "ė" LATIN SMALL LETTER E WITH DOT ABOVE U+0113: "ē" LATIN SMALL LETTER E WITH MACRON --> - <string name="more_keys_for_e">é,è,ê,ë,ę,ė,ē</string> + <string name="morekeys_e">é,è,ê,ë,ę,ė,ē</string> <!-- U+00ED: "í" LATIN SMALL LETTER I WITH ACUTE U+00EE: "î" LATIN SMALL LETTER I WITH CIRCUMFLEX U+00EF: "ï" LATIN SMALL LETTER I WITH DIAERESIS U+00EC: "ì" LATIN SMALL LETTER I WITH GRAVE U+012F: "į" LATIN SMALL LETTER I WITH OGONEK U+012B: "ī" LATIN SMALL LETTER I WITH MACRON --> - <string name="more_keys_for_i">í,î,ï,ì,į,ī</string> + <string name="morekeys_i">í,î,ï,ì,į,ī</string> <!-- U+00F3: "ó" LATIN SMALL LETTER O WITH ACUTE U+00F6: "ö" LATIN SMALL LETTER O WITH DIAERESIS U+0151: "ő" LATIN SMALL LETTER O WITH DOUBLE ACUTE @@ -51,14 +51,14 @@ U+0153: "œ" LATIN SMALL LIGATURE OE U+00F8: "ø" LATIN SMALL LETTER O WITH STROKE U+014D: "ō" LATIN SMALL LETTER O WITH MACRON --> - <string name="more_keys_for_o">ó,ö,ő,ô,ò,õ,œ,ø,ō</string> + <string name="morekeys_o">ó,ö,ő,ô,ò,õ,œ,ø,ō</string> <!-- U+00FA: "ú" LATIN SMALL LETTER U WITH ACUTE U+00FC: "ü" LATIN SMALL LETTER U WITH DIAERESIS U+0171: "ű" LATIN SMALL LETTER U WITH DOUBLE ACUTE U+00FB: "û" LATIN SMALL LETTER U WITH CIRCUMFLEX U+00F9: "ù" LATIN SMALL LETTER U WITH GRAVE U+016B: "ū" LATIN SMALL LETTER U WITH MACRON --> - <string name="more_keys_for_u">ú,ü,ű,û,ù,ū</string> + <string name="morekeys_u">ú,ü,ű,û,ù,ū</string> <string name="single_quotes">!text/single_9qm_rqm</string> <string name="double_quotes">!text/double_9qm_rqm</string> <string name="single_angle_quotes">!text/single_raqm_laqm</string> diff --git a/tools/make-keyboard-text/res/values-hy-rAM/donottranslate-more-keys.xml b/tools/make-keyboard-text/res/values-hy-rAM/donottranslate-more-keys.xml new file mode 100644 index 000000000..08d88e54d --- /dev/null +++ b/tools/make-keyboard-text/res/values-hy-rAM/donottranslate-more-keys.xml @@ -0,0 +1,54 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +/* +** +** Copyright 2013, The Android Open Source Project +** +** Licensed under the Apache License, Version 2.0 (the "License"); +** you may not use this file except in compliance with the License. +** You may obtain a copy of the License at +** +** http://www.apache.org/licenses/LICENSE-2.0 +** +** Unless required by applicable law or agreed to in writing, software +** distributed under the License is distributed on an "AS IS" BASIS, +** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +** See the License for the specific language governing permissions and +** limitations under the License. +*/ +--> +<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> + <!-- Label for "switch to alphabetic" key. + U+0531: "Ա" ARMENIAN CAPITAL LETTER AYB + U+0532: "Բ" ARMENIAN CAPITAL LETTER BEN + U+0533: "Գ" ARMENIAN CAPITAL LETTER GIM --> + <string name="keylabel_to_alpha">ԱԲԳ</string> + <!-- U+055E: "՞" ARMENIAN QUESTION MARK + U+055C: "՜" ARMENIAN EXCLAMATION MARK + U+055A: "՚" ARMENIAN APOSTROPHE + U+0559: "ՙ" ARMENIAN MODIFIER LETTER LEFT HALF RING + U+055D: "՝" ARMENIAN COMMA + U+055B: "՛" ARMENIAN EMPHASIS MARK + U+058A: "֊" ARMENIAN HYPHEN + U+00BB: "»" RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK + U+00AB: "«" LEFT-POINTING DOUBLE ANGLE QUOTATION MARK + U+055F: "՟" ARMENIAN ABBREVIATION MARK --> + <string name="morekeys_punctuation">"!autoColumnOrder!8,\\,,՞,՜,.,՚,ՙ,?,!,՝,՛,֊,»,«,՟,;,:"</string> + <!-- U+055E: "՞" ARMENIAN QUESTION MARK + U+00BF: "¿" INVERTED QUESTION MARK --> + <string name="morekeys_question">՞,¿</string> + <!-- U+055C: "՜" ARMENIAN EXCLAMATION MARK + U+00A1: "¡" INVERTED EXCLAMATION MARK --> + <string name="morekeys_exclamation">՜,¡</string> + <!-- U+058F: "֏" ARMENIAN DRAM SIGN --> + <!-- TODO: Enable this when we have glyph for the following letter + <string name="keyspec_currency">֏</string> + --> + <!-- U+055D: "՝" ARMENIAN COMMA --> + <string name="keyspec_comma">՝</string> + <string name="keyspec_tablet_comma">՝</string> + <!-- U+0589: "։" ARMENIAN FULL STOP --> + <string name="keyspec_period">։</string> + <string name="keyspec_tablet_period">։</string> + <string name="morekeys_tablet_period">!text/morekeys_punctuation</string> +</resources> diff --git a/tools/make-keyboard-text/res/values-hy/donottranslate-more-keys.xml b/tools/make-keyboard-text/res/values-hy/donottranslate-more-keys.xml deleted file mode 100644 index 2f34128bd..000000000 --- a/tools/make-keyboard-text/res/values-hy/donottranslate-more-keys.xml +++ /dev/null @@ -1,40 +0,0 @@ -<?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+058A: "֊" ARMENIAN HYPHEN --> - <!-- U+055C: "՜" ARMENIAN EXCLAMATION MARK --> - <!-- U+055D: "՝" ARMENIAN COMMA --> - <!-- U+055E: "՞" ARMENIAN QUESTION MARK --> - <!-- U+0559: "ՙ" ARMENIAN MODIFIER LETTER LEFT HALF RING --> - <!-- U+055A: "՚" ARMENIAN APOSTROPHE --> - <!-- U+055B: "՛" ARMENIAN EMPHASIS MARK --> - <!-- U+055F: "՟" ARMENIAN ABBREVIATION MARK --> - <string name="more_keys_for_punctuation">"!fixedColumnOrder!8,!,?,\\,,.,֊,՜,՝,՞,:,;,\@,ՙ,՚,՛,՟"</string> - <!-- U+055E: "՞" ARMENIAN QUESTION MARK --> - <!-- U+00BF: "¿" INVERTED QUESTION MARK --> - <string name="more_keys_for_symbols_question">՞,¿</string> - <!-- U+055C: "՜" ARMENIAN EXCLAMATION MARK --> - <!-- U+00A1: "¡" INVERTED EXCLAMATION MARK --> - <string name="more_keys_for_symbols_exclamation">՜,¡</string> - <!-- U+058F: "֏" ARMENIAN DRAM SIGN --> - <!-- TODO: Enable this when we have glyph for the following letter - <string name="keylabel_for_currency">֏</string> - --> -</resources> diff --git a/tools/make-keyboard-text/res/values-is/donottranslate-more-keys.xml b/tools/make-keyboard-text/res/values-is/donottranslate-more-keys.xml index 4b4d986b8..ea7f86f1f 100644 --- a/tools/make-keyboard-text/res/values-is/donottranslate-more-keys.xml +++ b/tools/make-keyboard-text/res/values-is/donottranslate-more-keys.xml @@ -26,7 +26,7 @@ U+00E2: "â" LATIN SMALL LETTER A WITH CIRCUMFLEX U+00E3: "ã" LATIN SMALL LETTER A WITH TILDE U+0101: "ā" LATIN SMALL LETTER A WITH MACRON --> - <string name="more_keys_for_a">á,ä,æ,å,à,â,ã,ā</string> + <string name="morekeys_a">á,ä,æ,å,à,â,ã,ā</string> <!-- U+00E9: "é" LATIN SMALL LETTER E WITH ACUTE U+00EB: "ë" LATIN SMALL LETTER E WITH DIAERESIS U+00E8: "è" LATIN SMALL LETTER E WITH GRAVE @@ -34,14 +34,14 @@ U+0119: "ę" LATIN SMALL LETTER E WITH OGONEK U+0117: "ė" LATIN SMALL LETTER E WITH DOT ABOVE U+0113: "ē" LATIN SMALL LETTER E WITH MACRON --> - <string name="more_keys_for_e">é,ë,è,ê,ę,ė,ē</string> + <string name="morekeys_e">é,ë,è,ê,ę,ė,ē</string> <!-- U+00ED: "í" LATIN SMALL LETTER I WITH ACUTE U+00EF: "ï" LATIN SMALL LETTER I WITH DIAERESIS U+00EE: "î" LATIN SMALL LETTER I WITH CIRCUMFLEX U+00EC: "ì" LATIN SMALL LETTER I WITH GRAVE U+012F: "į" LATIN SMALL LETTER I WITH OGONEK U+012B: "ī" LATIN SMALL LETTER I WITH MACRON --> - <string name="more_keys_for_i">í,ï,î,ì,į,ī</string> + <string name="morekeys_i">í,ï,î,ì,į,ī</string> <!-- U+00F3: "ó" LATIN SMALL LETTER O WITH ACUTE U+00F6: "ö" LATIN SMALL LETTER O WITH DIAERESIS U+00F4: "ô" LATIN SMALL LETTER O WITH CIRCUMFLEX @@ -50,26 +50,20 @@ U+0153: "œ" LATIN SMALL LIGATURE OE U+00F8: "ø" LATIN SMALL LETTER O WITH STROKE U+014D: "ō" LATIN SMALL LETTER O WITH MACRON --> - <string name="more_keys_for_o">ó,ö,ô,ò,õ,œ,ø,ō</string> + <string name="morekeys_o">ó,ö,ô,ò,õ,œ,ø,ō</string> <!-- U+00FA: "ú" LATIN SMALL LETTER U WITH ACUTE 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+016B: "ū" LATIN SMALL LETTER U WITH MACRON --> - <string name="more_keys_for_u">ú,ü,û,ù,ū</string> + <string name="morekeys_u">ú,ü,û,ù,ū</string> <!-- U+00FD: "ý" LATIN SMALL LETTER Y WITH ACUTE U+00FF: "ÿ" LATIN SMALL LETTER Y WITH DIAERESIS --> - <string name="more_keys_for_y">ý,ÿ</string> + <string name="morekeys_y">ý,ÿ</string> <!-- U+00F0: "ð" LATIN SMALL LETTER ETH --> - <string name="more_keys_for_d">ð</string> + <string name="morekeys_d">ð</string> <!-- U+00FE: "þ" LATIN SMALL LETTER THORN --> - <string name="more_keys_for_t">þ</string> - <!-- U+00F0: "ð" LATIN SMALL LETTER ETH --> - <string name="keylabel_for_nordic_row1_11">ð</string> - <!-- U+00E6: "æ" LATIN SMALL LETTER AE --> - <string name="keylabel_for_nordic_row2_10">æ</string> - <!-- U+00FE: "þ" LATIN SMALL LETTER THORN --> - <string name="keylabel_for_nordic_row2_11">þ</string> + <string name="morekeys_t">þ</string> <string name="single_quotes">!text/single_9qm_lqm</string> <string name="double_quotes">!text/double_9qm_lqm</string> </resources> diff --git a/tools/make-keyboard-text/res/values-it/donottranslate-more-keys.xml b/tools/make-keyboard-text/res/values-it/donottranslate-more-keys.xml index 17dd03108..e809f4835 100644 --- a/tools/make-keyboard-text/res/values-it/donottranslate-more-keys.xml +++ b/tools/make-keyboard-text/res/values-it/donottranslate-more-keys.xml @@ -27,7 +27,7 @@ U+00E5: "å" LATIN SMALL LETTER A WITH RING ABOVE U+0101: "ā" LATIN SMALL LETTER A WITH MACRON U+00AA: "ª" FEMININE ORDINAL INDICATOR --> - <string name="more_keys_for_a">à,á,â,ä,æ,ã,å,ā,ª</string> + <string name="morekeys_a">à,á,â,ä,æ,ã,å,ā,ª</string> <!-- U+00E8: "è" LATIN SMALL LETTER E WITH GRAVE U+00E9: "é" LATIN SMALL LETTER E WITH ACUTE U+00EA: "ê" LATIN SMALL LETTER E WITH CIRCUMFLEX @@ -35,14 +35,14 @@ U+0119: "ę" LATIN SMALL LETTER E WITH OGONEK U+0117: "ė" LATIN SMALL LETTER E WITH DOT ABOVE U+0113: "ē" LATIN SMALL LETTER E WITH MACRON --> - <string name="more_keys_for_e">è,é,ê,ë,ę,ė,ē</string> + <string name="morekeys_e">è,é,ê,ë,ę,ė,ē</string> <!-- U+00EC: "ì" LATIN SMALL LETTER I WITH GRAVE U+00ED: "í" LATIN SMALL LETTER I WITH ACUTE U+00EE: "î" LATIN SMALL LETTER I WITH CIRCUMFLEX U+00EF: "ï" LATIN SMALL LETTER I WITH DIAERESIS U+012F: "į" LATIN SMALL LETTER I WITH OGONEK U+012B: "ī" LATIN SMALL LETTER I WITH MACRON --> - <string name="more_keys_for_i">ì,í,î,ï,į,ī</string> + <string name="morekeys_i">ì,í,î,ï,į,ī</string> <!-- U+00F2: "ò" LATIN SMALL LETTER O WITH GRAVE U+00F3: "ó" LATIN SMALL LETTER O WITH ACUTE U+00F4: "ô" LATIN SMALL LETTER O WITH CIRCUMFLEX @@ -52,11 +52,23 @@ U+00F8: "ø" LATIN SMALL LETTER O WITH STROKE U+014D: "ō" LATIN SMALL LETTER O WITH MACRON U+00BA: "º" MASCULINE ORDINAL INDICATOR --> - <string name="more_keys_for_o">ò,ó,ô,ö,õ,œ,ø,ō,º</string> + <string name="morekeys_o">ò,ó,ô,ö,õ,œ,ø,ō,º</string> <!-- U+00F9: "ù" LATIN SMALL LETTER U WITH GRAVE U+00FA: "ú" LATIN SMALL LETTER U WITH ACUTE U+00FB: "û" LATIN SMALL LETTER U WITH CIRCUMFLEX U+00FC: "ü" LATIN SMALL LETTER U WITH DIAERESIS U+016B: "ū" LATIN SMALL LETTER U WITH MACRON --> - <string name="more_keys_for_u">ù,ú,û,ü,ū</string> + <string name="morekeys_u">ù,ú,û,ü,ū</string> + <!-- U+00FC: "ü" LATIN SMALL LETTER U WITH DIAERESIS --> + <string name="keyspec_swiss_row1_11">ü</string> + <!-- U+00E8: "è" LATIN SMALL LETTER E WITH GRAVE --> + <string name="morekeys_swiss_row1_11">è</string> + <!-- U+00F6: "ö" LATIN SMALL LETTER O WITH DIAERESIS --> + <string name="keyspec_swiss_row2_10">ö</string> + <!-- U+00E9: "é" LATIN SMALL LETTER E WITH ACUTE --> + <string name="morekeys_swiss_row2_10">é</string> + <!-- U+00E4: "ä" LATIN SMALL LETTER A WITH DIAERESIS --> + <string name="keyspec_swiss_row2_11">ä</string> + <!-- U+00E0: "à" LATIN SMALL LETTER A WITH GRAVE --> + <string name="morekeys_swiss_row2_11">à</string> </resources> diff --git a/tools/make-keyboard-text/res/values-iw/donottranslate-more-keys.xml b/tools/make-keyboard-text/res/values-iw/donottranslate-more-keys.xml index 994e35ae9..0decb8fa2 100644 --- a/tools/make-keyboard-text/res/values-iw/donottranslate-more-keys.xml +++ b/tools/make-keyboard-text/res/values-iw/donottranslate-more-keys.xml @@ -22,40 +22,36 @@ U+05D0: "א" HEBREW LETTER ALEF U+05D1: "ב" HEBREW LETTER BET U+05D2: "ג" HEBREW LETTER GIMEL --> - <string name="label_to_alpha_key">אבג</string> + <string name="keylabel_to_alpha">אבג</string> <!-- U+2605: "★" BLACK STAR --> - <string name="more_keys_for_star">★</string> + <string name="morekeys_star">★</string> <!-- U+00B1: "±" PLUS-MINUS SIGN U+FB29: "﬩" HEBREW LETTER ALTERNATIVE PLUS SIGN --> - <string name="more_keys_for_plus">±,﬩</string> - <string name="more_keys_for_punctuation">"!fixedColumnOrder!8,;,/,(|),)|(,#,!,\\,,\?,&,\\%,+,\",-,:,',\@"</string> + <string name="morekeys_plus">±,﬩</string> <!-- The all letters need to be mirrored are found at http://www.unicode.org/Public/6.1.0/ucd/BidiMirroring.txt --> - <string name="more_keys_for_left_parenthesis">!fixedColumnOrder!3,<|>,{|},[|]</string> - <string name="more_keys_for_right_parenthesis">!fixedColumnOrder!3,>|<,}|{,]|[</string> <!-- U+2264: "≤" LESS-THAN OR EQUAL TO U+2265: "≥" GREATER-THAN EQUAL TO U+00AB: "«" LEFT-POINTING DOUBLE ANGLE QUOTATION MARK U+00BB: "»" RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK U+2039: "‹" SINGLE LEFT-POINTING ANGLE QUOTATION MARK U+203A: "›" SINGLE RIGHT-POINTING ANGLE QUOTATION MARK --> - <string name="more_keys_for_less_than">!fixedColumnOrder!3,‹|›,≤|≥,«|»</string> - <string name="more_keys_for_greater_than">!fixedColumnOrder!3,›|‹,≥|≤,»|«</string> - <!-- The following characters don't need BIDI mirroring. - U+2018: "‘" LEFT SINGLE QUOTATION MARK - U+2019: "’" RIGHT SINGLE QUOTATION MARK - U+201A: "‚" SINGLE LOW-9 QUOTATION MARK - U+201C: "“" LEFT DOUBLE QUOTATION MARK - U+201D: "”" RIGHT DOUBLE QUOTATION MARK - U+201E: "„" DOUBLE LOW-9 QUOTATION MARK --> - <string name="single_quotes">‘,’,‚</string> - <string name="double_quotes">“,”,„</string> - <string name="single_angle_quotes">!text/single_laqm_raqm_rtl</string> - <string name="double_angle_quotes">!text/double_laqm_raqm_rtl</string> + <string name="keyspec_left_parenthesis">(|)</string> + <string name="keyspec_right_parenthesis">)|(</string> + <string name="keyspec_left_square_bracket">[|]</string> + <string name="keyspec_right_square_bracket">]|[</string> + <string name="keyspec_left_curly_bracket">{|}</string> + <string name="keyspec_right_curly_bracket">}|{</string> + <string name="keyspec_less_than"><|></string> + <string name="keyspec_greater_than">>|<</string> + <string name="keyspec_less_than_equal">≤|≥</string> + <string name="keyspec_greater_than_equal">≥|≤</string> + <string name="keyspec_left_double_angle_quote">«|»</string> + <string name="keyspec_right_double_angle_quote">»|«</string> + <string name="keyspec_left_single_angle_quote">‹|›</string> + <string name="keyspec_right_single_angle_quote">›|‹</string> + <string name="single_quotes">!text/single_rqm_9qm</string> + <string name="double_quotes">!text/double_rqm_9qm</string> <!-- U+20AA: "₪" NEW SHEQEL SIGN --> - <string name="keylabel_for_currency">₪</string> - <string name="keyhintlabel_for_tablet_comma">!</string> - <string name="more_keys_for_tablet_comma">!</string> - <string name="keyhintlabel_for_period">\?</string> - <string name="more_keys_for_period">\?</string> + <string name="keyspec_currency">₪</string> </resources> diff --git a/tools/make-keyboard-text/res/values-ka/donottranslate-more-keys.xml b/tools/make-keyboard-text/res/values-ka-rGE/donottranslate-more-keys.xml index 8c2add44c..f458c02e3 100644 --- a/tools/make-keyboard-text/res/values-ka/donottranslate-more-keys.xml +++ b/tools/make-keyboard-text/res/values-ka-rGE/donottranslate-more-keys.xml @@ -22,7 +22,7 @@ U+10D0: "ა" GEORGIAN LETTER AN U+10D1: "ბ" GEORGIAN LETTER BAN U+10D2: "გ" GEORGIAN LETTER GAN --> - <string name="label_to_alpha_key">აბგ</string> + <string name="keylabel_to_alpha">აბგ</string> <string name="single_quotes">!text/single_9qm_lqm</string> <string name="double_quotes">!text/double_9qm_lqm</string> </resources> diff --git a/tools/make-keyboard-text/res/values-kk/donottranslate-more-keys.xml b/tools/make-keyboard-text/res/values-kk/donottranslate-more-keys.xml index 0e953ff21..5e18128da 100644 --- a/tools/make-keyboard-text/res/values-kk/donottranslate-more-keys.xml +++ b/tools/make-keyboard-text/res/values-kk/donottranslate-more-keys.xml @@ -19,39 +19,37 @@ --> <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">щ</string> - <!-- U+044A: "ъ" CYRILLIC SMALL LETTER HARD SIGN --> - <string name="keylabel_for_east_slavic_row1_12">ъ</string> + <string name="keyspec_east_slavic_row1_9">щ</string> <!-- U+044B: "ы" CYRILLIC SMALL LETTER YERU --> - <string name="keylabel_for_east_slavic_row2_1">ы</string> + <string name="keyspec_east_slavic_row2_2">ы</string> <!-- U+044D: "э" CYRILLIC SMALL LETTER E --> - <string name="keylabel_for_east_slavic_row2_11">э</string> + <string name="keyspec_east_slavic_row2_11">э</string> <!-- U+0438: "и" CYRILLIC SMALL LETTER I --> - <string name="keylabel_for_east_slavic_row3_5">и</string> + <string name="keyspec_east_slavic_row3_5">и</string> <!-- U+04AF: "ү" CYRILLIC SMALL LETTER STRAIGHT U U+04B1: "ұ" CYRILLIC SMALL LETTER STRAIGHT U WITH STROKE --> - <string name="more_keys_for_cyrillic_u">ү,ұ</string> + <string name="morekeys_cyrillic_u">ү,ұ</string> <!-- U+049B: "қ" CYRILLIC SMALL LETTER KA WITH DESCENDER --> - <string name="more_keys_for_cyrillic_ka">қ</string> + <string name="morekeys_cyrillic_ka">қ</string> <!-- U+0451: "ё" CYRILLIC SMALL LETTER IO --> - <string name="more_keys_for_cyrillic_ie">ё</string> + <string name="morekeys_cyrillic_ie">ё</string> <!-- U+04A3: "ң" CYRILLIC SMALL LETTER EN WITH DESCENDER --> - <string name="more_keys_for_cyrillic_en">ң</string> + <string name="morekeys_cyrillic_en">ң</string> <!-- U+0493: "ғ" CYRILLIC SMALL LETTER GHE WITH STROKE --> - <string name="more_keys_for_cyrillic_ghe">ғ</string> + <string name="morekeys_cyrillic_ghe">ғ</string> <!-- U+0456: "і" CYRILLIC SMALL LETTER BYELORUSSIAN-UKRAINIAN I --> - <string name="more_keys_for_east_slavic_row2_1">і</string> + <string name="morekeys_east_slavic_row2_2">і</string> <!-- U+04D9: "ә" CYRILLIC SMALL LETTER SCHWA --> - <string name="more_keys_for_cyrillic_a">ә</string> + <string name="morekeys_cyrillic_a">ә</string> <!-- U+04E9: "ө" CYRILLIC SMALL LETTER BARRED O --> - <string name="more_keys_for_cyrillic_o">ө</string> + <string name="morekeys_cyrillic_o">ө</string> <!-- U+04BB: "һ" CYRILLIC SMALL LETTER SHHA --> - <string name="more_keys_for_east_slavic_row2_11">һ</string> + <string name="morekeys_east_slavic_row2_11">һ</string> <!-- U+044A: "ъ" CYRILLIC SMALL LETTER HARD SIGN --> - <string name="more_keys_for_cyrillic_soft_sign">ъ</string> + <string name="morekeys_cyrillic_soft_sign">ъ</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">АБВ</string> + <string name="keylabel_to_alpha">АБВ</string> </resources> diff --git a/tools/make-keyboard-text/res/values-km/donottranslate-more-keys.xml b/tools/make-keyboard-text/res/values-km-rKH/donottranslate-more-keys.xml index c33831c56..edd3753b7 100644 --- a/tools/make-keyboard-text/res/values-km/donottranslate-more-keys.xml +++ b/tools/make-keyboard-text/res/values-km-rKH/donottranslate-more-keys.xml @@ -22,8 +22,7 @@ U+1780: "ក" KHMER LETTER KA U+1781: "ខ" KHMER LETTER KHA U+1782: "គ" KHMER LETTER KO --> - <string name="label_to_alpha_key">កខគ</string> + <string name="keylabel_to_alpha">កខគ</string> <!-- U+17DB: "៛" KHMER CURRENCY SYMBOL RIEL --> - <string name="more_keys_for_currency_dollar">៛,¢,£,€,¥,₱</string> - + <string name="morekeys_currency_dollar">៛,¢,£,€,¥,₱</string> </resources> diff --git a/tools/make-keyboard-text/res/values-kn-rIN/donottranslate-more-keys.xml b/tools/make-keyboard-text/res/values-kn-rIN/donottranslate-more-keys.xml new file mode 100644 index 000000000..54b267462 --- /dev/null +++ b/tools/make-keyboard-text/res/values-kn-rIN/donottranslate-more-keys.xml @@ -0,0 +1,28 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +/* +** +** Copyright 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. +*/ +--> +<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> + <!-- Label for "switch to alphabetic" key. + U+0C85: "ಅ" KANNADA LETTER A + U+0C86: "ಆ" KANNADA LETTER AA + U+0C87: "ಇ" KANNADA LETTER I --> + <string name="keylabel_to_alpha">ಅಆಇ</string> + <!-- U+20B9: "₹" INDIAN RUPEE SIGN --> + <string name="keyspec_currency">₹</string> +</resources> diff --git a/tools/make-keyboard-text/res/values-ky/donottranslate-more-keys.xml b/tools/make-keyboard-text/res/values-ky/donottranslate-more-keys.xml index 8d8c5fbf2..3d885bf72 100644 --- a/tools/make-keyboard-text/res/values-ky/donottranslate-more-keys.xml +++ b/tools/make-keyboard-text/res/values-ky/donottranslate-more-keys.xml @@ -19,28 +19,26 @@ --> <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">щ</string> - <!-- U+044A: "ъ" CYRILLIC SMALL LETTER HARD SIGN --> - <string name="keylabel_for_east_slavic_row1_12">ъ</string> + <string name="keyspec_east_slavic_row1_9">щ</string> <!-- U+044B: "ы" CYRILLIC SMALL LETTER YERU --> - <string name="keylabel_for_east_slavic_row2_1">ы</string> + <string name="keyspec_east_slavic_row2_2">ы</string> <!-- U+044D: "э" CYRILLIC SMALL LETTER E --> - <string name="keylabel_for_east_slavic_row2_11">э</string> + <string name="keyspec_east_slavic_row2_11">э</string> <!-- U+0438: "и" CYRILLIC SMALL LETTER I --> - <string name="keylabel_for_east_slavic_row3_5">и</string> + <string name="keyspec_east_slavic_row3_5">и</string> <!-- U+04AF: "ү" CYRILLIC SMALL LETTER STRAIGHT U --> - <string name="more_keys_for_cyrillic_u">ү</string> + <string name="morekeys_cyrillic_u">ү</string> <!-- U+0451: "ё" CYRILLIC SMALL LETTER IO --> - <string name="more_keys_for_cyrillic_ie">ё</string> + <string name="morekeys_cyrillic_ie">ё</string> <!-- U+04A3: "ң" CYRILLIC SMALL LETTER EN WITH DESCENDER --> - <string name="more_keys_for_cyrillic_en">ң</string> + <string name="morekeys_cyrillic_en">ң</string> <!-- U+04E9: "ө" CYRILLIC SMALL LETTER BARRED O --> - <string name="more_keys_for_cyrillic_o">ө</string> + <string name="morekeys_cyrillic_o">ө</string> <!-- U+044A: "ъ" CYRILLIC SMALL LETTER HARD SIGN --> - <string name="more_keys_for_cyrillic_soft_sign">ъ</string> + <string name="morekeys_cyrillic_soft_sign">ъ</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">АБВ</string> + <string name="keylabel_to_alpha">АБВ</string> </resources> diff --git a/tools/make-keyboard-text/res/values-lo/donottranslate-more-keys.xml b/tools/make-keyboard-text/res/values-lo-rLA/donottranslate-more-keys.xml index 1d8ffa8cf..1059930e4 100644 --- a/tools/make-keyboard-text/res/values-lo/donottranslate-more-keys.xml +++ b/tools/make-keyboard-text/res/values-lo-rLA/donottranslate-more-keys.xml @@ -22,7 +22,7 @@ U+0E81: "ກ" LAO LETTER KO U+0E82: "ຂ" LAO LETTER KHO SUNG U+0E84: "ຄ" LAO LETTER KHO TAM --> - <string name="label_to_alpha_key">ກຂຄ</string> + <string name="keylabel_to_alpha">ກຂຄ</string> <!-- U+20AD: "₭" KIP SIGN --> - <string name="keylabel_for_currency">₭</string> + <string name="keyspec_currency">₭</string> </resources> diff --git a/tools/make-keyboard-text/res/values-lt/donottranslate-more-keys.xml b/tools/make-keyboard-text/res/values-lt/donottranslate-more-keys.xml index 7e2b8a076..8b6a1b2b6 100644 --- a/tools/make-keyboard-text/res/values-lt/donottranslate-more-keys.xml +++ b/tools/make-keyboard-text/res/values-lt/donottranslate-more-keys.xml @@ -27,7 +27,7 @@ U+00E3: "ã" LATIN SMALL LETTER A WITH TILDE U+00E5: "å" LATIN SMALL LETTER A WITH RING ABOVE U+00E6: "æ" LATIN SMALL LETTER AE --> - <string name="more_keys_for_a">ą,ä,ā,à,á,â,ã,å,æ</string> + <string name="morekeys_a">ą,ä,ā,à,á,â,ã,å,æ</string> <!-- U+0117: "ė" LATIN SMALL LETTER E WITH DOT ABOVE U+0119: "ę" LATIN SMALL LETTER E WITH OGONEK U+0113: "ē" LATIN SMALL LETTER E WITH MACRON @@ -36,7 +36,7 @@ U+00EA: "ê" LATIN SMALL LETTER E WITH CIRCUMFLEX U+00EB: "ë" LATIN SMALL LETTER E WITH DIAERESIS U+011B: "ě" LATIN SMALL LETTER E WITH CARON --> - <string name="more_keys_for_e">ė,ę,ē,è,é,ê,ë,ě</string> + <string name="morekeys_e">ė,ę,ē,è,é,ê,ë,ě</string> <!-- U+012F: "į" LATIN SMALL LETTER I WITH OGONEK U+012B: "ī" LATIN SMALL LETTER I WITH MACRON U+00EC: "ì" LATIN SMALL LETTER I WITH GRAVE @@ -44,7 +44,7 @@ U+00EE: "î" LATIN SMALL LETTER I WITH CIRCUMFLEX U+00EF: "ï" LATIN SMALL LETTER I WITH DIAERESIS U+0131: "ı" LATIN SMALL LETTER DOTLESS I --> - <string name="more_keys_for_i">į,ī,ì,í,î,ï,ı</string> + <string name="morekeys_i">į,ī,ì,í,î,ï,ı</string> <!-- U+00F6: "ö" LATIN SMALL LETTER O WITH DIAERESIS U+00F5: "õ" LATIN SMALL LETTER O WITH TILDE U+00F2: "ò" LATIN SMALL LETTER O WITH GRAVE @@ -53,7 +53,7 @@ U+0153: "œ" LATIN SMALL LIGATURE OE U+0151: "ő" LATIN SMALL LETTER O WITH DOUBLE ACUTE U+00F8: "ø" LATIN SMALL LETTER O WITH STROKE --> - <string name="more_keys_for_o">ö,õ,ò,ó,ô,œ,ő,ø</string> + <string name="morekeys_o">ö,õ,ò,ó,ô,œ,ő,ø</string> <!-- U+016B: "ū" LATIN SMALL LETTER U WITH MACRON U+0173: "ų" LATIN SMALL LETTER U WITH OGONEK U+00FC: "ü" LATIN SMALL LETTER U WITH DIAERESIS @@ -63,47 +63,46 @@ U+00FB: "û" LATIN SMALL LETTER U WITH CIRCUMFLEX U+016F: "ů" LATIN SMALL LETTER U WITH RING ABOVE U+0171: "ű" LATIN SMALL LETTER U WITH DOUBLE ACUTE --> - <string name="more_keys_for_u">ū,ų,ü,ū,ù,ú,û,ů,ű</string> + <string name="morekeys_u">ū,ų,ü,ū,ù,ú,û,ů,ű</string> <!-- U+0161: "š" LATIN SMALL LETTER S WITH CARON U+00DF: "ß" LATIN SMALL LETTER SHARP S U+015B: "ś" LATIN SMALL LETTER S WITH ACUTE U+015F: "ş" LATIN SMALL LETTER S WITH CEDILLA --> - <string name="more_keys_for_s">š,ß,ś,ş</string> + <string name="morekeys_s">š,ß,ś,ş</string> <!-- U+0146: "ņ" LATIN SMALL LETTER N WITH CEDILLA U+00F1: "ñ" LATIN SMALL LETTER N WITH TILDE - U+0144: "ń" LATIN SMALL LETTER N WITH ACUTE U+0144: "ń" LATIN SMALL LETTER N WITH ACUTE --> - <string name="more_keys_for_n">ņ,ñ,ń,ń</string> + <string name="morekeys_n">ņ,ñ,ń</string> <!-- U+010D: "č" LATIN SMALL LETTER C WITH CARON U+00E7: "ç" LATIN SMALL LETTER C WITH CEDILLA U+0107: "ć" LATIN SMALL LETTER C WITH ACUTE --> - <string name="more_keys_for_c">č,ç,ć</string> + <string name="morekeys_c">č,ç,ć</string> <!-- U+00FD: "ý" LATIN SMALL LETTER Y WITH ACUTE U+00FF: "ÿ" LATIN SMALL LETTER Y WITH DIAERESIS --> - <string name="more_keys_for_y">ý,ÿ</string> + <string name="morekeys_y">ý,ÿ</string> <!-- U+010F: "ď" LATIN SMALL LETTER D WITH CARON --> - <string name="more_keys_for_d">ď</string> + <string name="morekeys_d">ď</string> <!-- U+0157: "ŗ" LATIN SMALL LETTER R WITH CEDILLA U+0159: "ř" LATIN SMALL LETTER R WITH CARON U+0155: "ŕ" LATIN SMALL LETTER R WITH ACUTE --> - <string name="more_keys_for_r">ŗ,ř,ŕ</string> + <string name="morekeys_r">ŗ,ř,ŕ</string> <!-- U+0163: "ţ" LATIN SMALL LETTER T WITH CEDILLA U+0165: "ť" LATIN SMALL LETTER T WITH CARON --> - <string name="more_keys_for_t">ţ,ť</string> + <string name="morekeys_t">ţ,ť</string> <!-- U+017E: "ž" LATIN SMALL LETTER Z WITH CARON U+017C: "ż" LATIN SMALL LETTER Z WITH DOT ABOVE U+017A: "ź" LATIN SMALL LETTER Z WITH ACUTE --> - <string name="more_keys_for_z">ž,ż,ź</string> + <string name="morekeys_z">ž,ż,ź</string> <!-- U+0137: "ķ" LATIN SMALL LETTER K WITH CEDILLA --> - <string name="more_keys_for_k">ķ</string> + <string name="morekeys_k">ķ</string> <!-- U+013C: "ļ" LATIN SMALL LETTER L WITH CEDILLA U+0142: "ł" LATIN SMALL LETTER L WITH STROKE U+013A: "ĺ" LATIN SMALL LETTER L WITH ACUTE U+013E: "ľ" LATIN SMALL LETTER L WITH CARON --> - <string name="more_keys_for_l">ļ,ł,ĺ,ľ</string> + <string name="morekeys_l">ļ,ł,ĺ,ľ</string> <!-- U+0123: "ģ" LATIN SMALL LETTER G WITH CEDILLA U+011F: "ğ" LATIN SMALL LETTER G WITH BREVE --> - <string name="more_keys_for_g">ģ,ğ</string> + <string name="morekeys_g">ģ,ğ</string> <string name="single_quotes">!text/single_9qm_lqm</string> <string name="double_quotes">!text/double_9qm_lqm</string> </resources> diff --git a/tools/make-keyboard-text/res/values-lv/donottranslate-more-keys.xml b/tools/make-keyboard-text/res/values-lv/donottranslate-more-keys.xml index c64e37bc8..83f83fc99 100644 --- a/tools/make-keyboard-text/res/values-lv/donottranslate-more-keys.xml +++ b/tools/make-keyboard-text/res/values-lv/donottranslate-more-keys.xml @@ -27,7 +27,7 @@ U+00E5: "å" LATIN SMALL LETTER A WITH RING ABOVE U+00E6: "æ" LATIN SMALL LETTER AE U+0105: "ą" LATIN SMALL LETTER A WITH OGONEK --> - <string name="more_keys_for_a">ā,à,á,â,ã,ä,å,æ,ą</string> + <string name="morekeys_a">ā,à,á,â,ã,ä,å,æ,ą</string> <!-- U+0113: "ē" LATIN SMALL LETTER E WITH MACRON U+0117: "ė" LATIN SMALL LETTER E WITH DOT ABOVE U+00E8: "è" LATIN SMALL LETTER E WITH GRAVE @@ -36,7 +36,7 @@ U+00EB: "ë" LATIN SMALL LETTER E WITH DIAERESIS U+0119: "ę" LATIN SMALL LETTER E WITH OGONEK U+011B: "ě" LATIN SMALL LETTER E WITH CARON --> - <string name="more_keys_for_e">ē,ė,è,é,ê,ë,ę,ě</string> + <string name="morekeys_e">ē,ė,è,é,ê,ë,ę,ě</string> <!-- U+012B: "ī" LATIN SMALL LETTER I WITH MACRON U+012F: "į" LATIN SMALL LETTER I WITH OGONEK U+00EC: "ì" LATIN SMALL LETTER I WITH GRAVE @@ -44,7 +44,7 @@ U+00EE: "î" LATIN SMALL LETTER I WITH CIRCUMFLEX U+00EF: "ï" LATIN SMALL LETTER I WITH DIAERESIS U+0131: "ı" LATIN SMALL LETTER DOTLESS I --> - <string name="more_keys_for_i">ī,į,ì,í,î,ï,ı</string> + <string name="morekeys_i">ī,į,ì,í,î,ï,ı</string> <!-- U+00F2: "ò" LATIN SMALL LETTER O WITH GRAVE U+00F3: "ó" LATIN SMALL LETTER O WITH ACUTE U+00F4: "ô" LATIN SMALL LETTER O WITH CIRCUMFLEX @@ -53,7 +53,7 @@ U+0153: "œ" LATIN SMALL LIGATURE OE U+0151: "ő" LATIN SMALL LETTER O WITH DOUBLE ACUTE U+00F8: "ø" LATIN SMALL LETTER O WITH STROKE --> - <string name="more_keys_for_o">ò,ó,ô,õ,ö,œ,ő,ø</string> + <string name="morekeys_o">ò,ó,ô,õ,ö,œ,ő,ø</string> <!-- U+016B: "ū" LATIN SMALL LETTER U WITH MACRON U+0173: "ų" LATIN SMALL LETTER U WITH OGONEK U+00F9: "ù" LATIN SMALL LETTER U WITH GRAVE @@ -62,47 +62,46 @@ U+00FC: "ü" LATIN SMALL LETTER U WITH DIAERESIS U+016F: "ů" LATIN SMALL LETTER U WITH RING ABOVE U+0171: "ű" LATIN SMALL LETTER U WITH DOUBLE ACUTE --> - <string name="more_keys_for_u">ū,ų,ù,ú,û,ü,ů,ű</string> + <string name="morekeys_u">ū,ų,ù,ú,û,ü,ů,ű</string> <!-- U+0161: "š" LATIN SMALL LETTER S WITH CARON U+00DF: "ß" LATIN SMALL LETTER SHARP S U+015B: "ś" LATIN SMALL LETTER S WITH ACUTE U+015F: "ş" LATIN SMALL LETTER S WITH CEDILLA --> - <string name="more_keys_for_s">š,ß,ś,ş</string> + <string name="morekeys_s">š,ß,ś,ş</string> <!-- U+0146: "ņ" LATIN SMALL LETTER N WITH CEDILLA U+00F1: "ñ" LATIN SMALL LETTER N WITH TILDE - U+0144: "ń" LATIN SMALL LETTER N WITH ACUTE U+0144: "ń" LATIN SMALL LETTER N WITH ACUTE --> - <string name="more_keys_for_n">ņ,ñ,ń,ń</string> + <string name="morekeys_n">ņ,ñ,ń</string> <!-- U+010D: "č" LATIN SMALL LETTER C WITH CARON U+00E7: "ç" LATIN SMALL LETTER C WITH CEDILLA U+0107: "ć" LATIN SMALL LETTER C WITH ACUTE --> - <string name="more_keys_for_c">č,ç,ć</string> + <string name="morekeys_c">č,ç,ć</string> <!-- U+00FD: "ý" LATIN SMALL LETTER Y WITH ACUTE U+00FF: "ÿ" LATIN SMALL LETTER Y WITH DIAERESIS --> - <string name="more_keys_for_y">ý,ÿ</string> + <string name="morekeys_y">ý,ÿ</string> <!-- U+010F: "ď" LATIN SMALL LETTER D WITH CARON --> - <string name="more_keys_for_d">ď</string> + <string name="morekeys_d">ď</string> <!-- U+0157: "ŗ" LATIN SMALL LETTER R WITH CEDILLA U+0159: "ř" LATIN SMALL LETTER R WITH CARON U+0155: "ŕ" LATIN SMALL LETTER R WITH ACUTE --> - <string name="more_keys_for_r">ŗ,ř,ŕ</string> + <string name="morekeys_r">ŗ,ř,ŕ</string> <!-- U+0163: "ţ" LATIN SMALL LETTER T WITH CEDILLA U+0165: "ť" LATIN SMALL LETTER T WITH CARON --> - <string name="more_keys_for_t">ţ,ť</string> + <string name="morekeys_t">ţ,ť</string> <!-- U+017E: "ž" LATIN SMALL LETTER Z WITH CARON U+017C: "ż" LATIN SMALL LETTER Z WITH DOT ABOVE U+017A: "ź" LATIN SMALL LETTER Z WITH ACUTE --> - <string name="more_keys_for_z">ž,ż,ź</string> + <string name="morekeys_z">ž,ż,ź</string> <!-- U+0137: "ķ" LATIN SMALL LETTER K WITH CEDILLA --> - <string name="more_keys_for_k">ķ</string> + <string name="morekeys_k">ķ</string> <!-- U+013C: "ļ" LATIN SMALL LETTER L WITH CEDILLA U+0142: "ł" LATIN SMALL LETTER L WITH STROKE U+013A: "ĺ" LATIN SMALL LETTER L WITH ACUTE U+013E: "ľ" LATIN SMALL LETTER L WITH CARON --> - <string name="more_keys_for_l">ļ,ł,ĺ,ľ</string> + <string name="morekeys_l">ļ,ł,ĺ,ľ</string> <!-- U+0123: "ģ" LATIN SMALL LETTER G WITH CEDILLA U+011F: "ğ" LATIN SMALL LETTER G WITH BREVE --> - <string name="more_keys_for_g">ģ,ğ</string> + <string name="morekeys_g">ģ,ğ</string> <string name="single_quotes">!text/single_9qm_lqm</string> <string name="double_quotes">!text/double_9qm_lqm</string> </resources> diff --git a/tools/make-keyboard-text/res/values-mk/donottranslate-more-keys.xml b/tools/make-keyboard-text/res/values-mk/donottranslate-more-keys.xml index 2db75c8f5..1ab1354c8 100644 --- a/tools/make-keyboard-text/res/values-mk/donottranslate-more-keys.xml +++ b/tools/make-keyboard-text/res/values-mk/donottranslate-more-keys.xml @@ -19,22 +19,22 @@ --> <resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> <!-- U+0455: "ѕ" CYRILLIC SMALL LETTER DZE --> - <string name="keylabel_for_south_slavic_row1_6">ѕ</string> + <string name="keyspec_south_slavic_row1_6">ѕ</string> <!-- U+045C: "ќ" CYRILLIC SMALL LETTER KJE --> - <string name="keylabel_for_south_slavic_row2_11">ќ</string> + <string name="keyspec_south_slavic_row2_11">ќ</string> <!-- U+0437: "з" CYRILLIC SMALL LETTER ZE --> - <string name="keylabel_for_south_slavic_row3_1">з</string> + <string name="keyspec_south_slavic_row3_1">з</string> <!-- U+0453: "ѓ" CYRILLIC SMALL LETTER GJE --> - <string name="keylabel_for_south_slavic_row3_8">ѓ</string> + <string name="keyspec_south_slavic_row3_8">ѓ</string> <!-- U+0450: "ѐ" CYRILLIC SMALL LETTER IE WITH GRAVE --> - <string name="more_keys_for_cyrillic_ie">ѐ</string> + <string name="morekeys_cyrillic_ie">ѐ</string> <!-- U+045D: "ѝ" CYRILLIC SMALL LETTER I WITH GRAVE --> - <string name="more_keys_for_cyrillic_i">ѝ</string> + <string name="morekeys_cyrillic_i">ѝ</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">АБВ</string> + <string name="keylabel_to_alpha">АБВ</string> <string name="single_quotes">!text/single_9qm_lqm</string> <string name="double_quotes">!text/double_9qm_lqm</string> </resources> diff --git a/tools/make-keyboard-text/res/values-ml-rIN/donottranslate-more-keys.xml b/tools/make-keyboard-text/res/values-ml-rIN/donottranslate-more-keys.xml new file mode 100644 index 000000000..7a2aeed36 --- /dev/null +++ b/tools/make-keyboard-text/res/values-ml-rIN/donottranslate-more-keys.xml @@ -0,0 +1,26 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +/* +** +** Copyright 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. +*/ +--> +<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> + <!-- Label for "switch to alphabetic" key. + U+0D05: "അ" MALAYALAM LETTER A --> + <string name="keylabel_to_alpha">അ</string> + <!-- U+20B9: "₹" INDIAN RUPEE SIGN --> + <string name="keyspec_currency">₹</string> +</resources> diff --git a/tools/make-keyboard-text/res/values-mn/donottranslate-more-keys.xml b/tools/make-keyboard-text/res/values-mn-rMN/donottranslate-more-keys.xml index a7f366685..3fafb397b 100644 --- a/tools/make-keyboard-text/res/values-mn/donottranslate-more-keys.xml +++ b/tools/make-keyboard-text/res/values-mn-rMN/donottranslate-more-keys.xml @@ -22,7 +22,7 @@ U+0410: "А" CYRILLIC CAPITAL LETTER A U+0411: "Б" CYRILLIC CAPITAL LETTER BE U+0412: "В" CYRILLIC CAPITAL LETTER VE --> - <string name="label_to_alpha_key">АБВ</string> + <string name="keylabel_to_alpha">АБВ</string> <!-- U+20AE: "₮" TUGRIK SIGN --> - <string name="keylabel_for_currency">₮</string> + <string name="keyspec_currency">₮</string> </resources> diff --git a/tools/make-keyboard-text/res/values-mr-rIN/donottranslate-more-keys.xml b/tools/make-keyboard-text/res/values-mr-rIN/donottranslate-more-keys.xml new file mode 100644 index 000000000..19db16da1 --- /dev/null +++ b/tools/make-keyboard-text/res/values-mr-rIN/donottranslate-more-keys.xml @@ -0,0 +1,60 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +/* +** +** Copyright 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. +*/ +--> +<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> + <!-- Label for "switch to alphabetic" key. + U+0915: "क" DEVANAGARI LETTER KA + U+0916: "ख" DEVANAGARI LETTER KHA + U+0917: "ग" DEVANAGARI LETTER GA --> + <string name="keylabel_to_alpha">कखग</string> + <!-- U+0967: "१" DEVANAGARI DIGIT ONE --> + <string name="keyspec_symbols_1">१</string> + <!-- U+0968: "२" DEVANAGARI DIGIT TWO --> + <string name="keyspec_symbols_2">२</string> + <!-- U+0969: "३" DEVANAGARI DIGIT THREE --> + <string name="keyspec_symbols_3">३</string> + <!-- U+096A: "४" DEVANAGARI DIGIT FOUR --> + <string name="keyspec_symbols_4">४</string> + <!-- U+096B: "५" DEVANAGARI DIGIT FIVE --> + <string name="keyspec_symbols_5">५</string> + <!-- U+096C: "६" DEVANAGARI DIGIT SIX --> + <string name="keyspec_symbols_6">६</string> + <!-- U+096D: "७" DEVANAGARI DIGIT SEVEN --> + <string name="keyspec_symbols_7">७</string> + <!-- U+096E: "८" DEVANAGARI DIGIT EIGHT --> + <string name="keyspec_symbols_8">८</string> + <!-- U+096F: "९" DEVANAGARI DIGIT NINE --> + <string name="keyspec_symbols_9">९</string> + <!-- U+0966: "०" DEVANAGARI DIGIT ZERO --> + <string name="keyspec_symbols_0">०</string> + <!-- Label for "switch to symbols" key. --> + <string name="keylabel_to_symbol">?१२३</string> + <string name="additional_morekeys_symbols_1">1</string> + <string name="additional_morekeys_symbols_2">2</string> + <string name="additional_morekeys_symbols_3">3</string> + <string name="additional_morekeys_symbols_4">4</string> + <string name="additional_morekeys_symbols_5">5</string> + <string name="additional_morekeys_symbols_6">6</string> + <string name="additional_morekeys_symbols_7">7</string> + <string name="additional_morekeys_symbols_8">8</string> + <string name="additional_morekeys_symbols_9">9</string> + <string name="additional_morekeys_symbols_0">0</string> + <!-- U+20B9: "₹" INDIAN RUPEE SIGN --> + <string name="keyspec_currency">₹</string> +</resources> diff --git a/tools/make-keyboard-text/res/values-my-rMM/donottranslate-more-keys.xml b/tools/make-keyboard-text/res/values-my-rMM/donottranslate-more-keys.xml new file mode 100644 index 000000000..f408f588a --- /dev/null +++ b/tools/make-keyboard-text/res/values-my-rMM/donottranslate-more-keys.xml @@ -0,0 +1,35 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +/* +** +** Copyright 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. +*/ +--> +<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> + <!-- Label for "switch to alphabetic" key. + U+1000: "က" MYANMAR LETTER KA + U+1001: "ခ" MYANMAR LETTER KHA + U+1002: "ဂ" MYANMAR LETTER GA --> + <string name="keylabel_to_alpha">ကခဂ</string> + <!-- U+104A: "၊" MYANMAR SIGN LITTLE SECTION + U+104B: "။" MYANMAR SIGN SECTION --> + <string name="keyspec_tablet_comma">၊</string> + <string name="morekeys_tablet_comma">"\\,"</string> + <string name="keyspec_tablet_period">။</string> + <string name="keyspec_period">။</string> + <string name="keyhintlabel_period">၊</string> + <string name="morekeys_punctuation">"!autoColumnOrder!9,၊,.,?,!,#,),(,/,;,...,',@,:,-,\",+,\\%,&"</string> + <string name="morekeys_tablet_punctuation">"!autoColumnOrder!8,.,',#,),(,/,;,@,...,:,-,\",+,\\%,&"</string> +</resources> diff --git a/tools/make-keyboard-text/res/values-nb/donottranslate-more-keys.xml b/tools/make-keyboard-text/res/values-nb/donottranslate-more-keys.xml index 2cecb5e65..c5307a98d 100644 --- a/tools/make-keyboard-text/res/values-nb/donottranslate-more-keys.xml +++ b/tools/make-keyboard-text/res/values-nb/donottranslate-more-keys.xml @@ -24,7 +24,7 @@ U+00E2: "â" LATIN SMALL LETTER A WITH CIRCUMFLEX U+00E3: "ã" LATIN SMALL LETTER A WITH TILDE U+0101: "ā" LATIN SMALL LETTER A WITH MACRON --> - <string name="more_keys_for_a">à,ä,á,â,ã,ā</string> + <string name="morekeys_a">à,ä,á,â,ã,ā</string> <!-- U+00E9: "é" LATIN SMALL LETTER E WITH ACUTE U+00E8: "è" LATIN SMALL LETTER E WITH GRAVE U+00EA: "ê" LATIN SMALL LETTER E WITH CIRCUMFLEX @@ -32,7 +32,7 @@ U+0119: "ę" LATIN SMALL LETTER E WITH OGONEK U+0117: "ė" LATIN SMALL LETTER E WITH DOT ABOVE U+0113: "ē" LATIN SMALL LETTER E WITH MACRON --> - <string name="more_keys_for_e">é,è,ê,ë,ę,ė,ē</string> + <string name="morekeys_e">é,è,ê,ë,ę,ė,ē</string> <!-- U+00F4: "ô" LATIN SMALL LETTER O WITH CIRCUMFLEX U+00F2: "ò" LATIN SMALL LETTER O WITH GRAVE U+00F3: "ó" LATIN SMALL LETTER O WITH ACUTE @@ -40,23 +40,23 @@ U+00F5: "õ" LATIN SMALL LETTER O WITH TILDE U+0153: "œ" LATIN SMALL LIGATURE OE U+014D: "ō" LATIN SMALL LETTER O WITH MACRON --> - <string name="more_keys_for_o">ô,ò,ó,ö,õ,œ,ō</string> + <string name="morekeys_o">ô,ò,ó,ö,õ,œ,ō</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">ü,û,ù,ú,ū</string> + <string name="morekeys_u">ü,û,ù,ú,ū</string> <!-- U+00E5: "å" LATIN SMALL LETTER A WITH RING ABOVE --> - <string name="keylabel_for_nordic_row1_11">å</string> + <string name="keyspec_nordic_row1_11">å</string> <!-- U+00F8: "ø" LATIN SMALL LETTER O WITH STROKE --> - <string name="keylabel_for_nordic_row2_10">ø</string> + <string name="keyspec_nordic_row2_10">ø</string> <!-- U+00E6: "æ" LATIN SMALL LETTER AE --> - <string name="keylabel_for_nordic_row2_11">æ</string> + <string name="keyspec_nordic_row2_11">æ</string> <!-- U+00F6: "ö" LATIN SMALL LETTER O WITH DIAERESIS --> - <string name="more_keys_for_nordic_row2_10">ö</string> + <string name="morekeys_nordic_row2_10">ö</string> <!-- U+00E4: "ä" LATIN SMALL LETTER A WITH DIAERESIS --> - <string name="more_keys_for_nordic_row2_11">ä</string> + <string name="morekeys_nordic_row2_11">ä</string> <string name="single_quotes">!text/single_9qm_rqm</string> <string name="double_quotes">!text/double_9qm_rqm</string> </resources> diff --git a/tools/make-keyboard-text/res/values-ne-rNP/donottranslate-more-keys.xml b/tools/make-keyboard-text/res/values-ne-rNP/donottranslate-more-keys.xml new file mode 100644 index 000000000..97c50d1b8 --- /dev/null +++ b/tools/make-keyboard-text/res/values-ne-rNP/donottranslate-more-keys.xml @@ -0,0 +1,60 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +/* +** +** Copyright 2013, The Android Open Source Project +** +** Licensed under the Apache License, Version 2.0 (the "License"); +** you may not use this file except in compliance with the License. +** You may obtain a copy of the License at +** +** http://www.apache.org/licenses/LICENSE-2.0 +** +** Unless required by applicable law or agreed to in writing, software +** distributed under the License is distributed on an "AS IS" BASIS, +** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +** See the License for the specific language governing permissions and +** limitations under the License. +*/ +--> +<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> + <!-- Label for "switch to alphabetic" key. + U+0915: "क" DEVANAGARI LETTER KA + U+0916: "ख" DEVANAGARI LETTER KHA + U+0917: "ग" DEVANAGARI LETTER GA --> + <string name="keylabel_to_alpha">कखग</string> + <!-- U+0967: "१" DEVANAGARI DIGIT ONE --> + <string name="keyspec_symbols_1">१</string> + <!-- U+0968: "२" DEVANAGARI DIGIT TWO --> + <string name="keyspec_symbols_2">२</string> + <!-- U+0969: "३" DEVANAGARI DIGIT THREE --> + <string name="keyspec_symbols_3">३</string> + <!-- U+096A: "४" DEVANAGARI DIGIT FOUR --> + <string name="keyspec_symbols_4">४</string> + <!-- U+096B: "५" DEVANAGARI DIGIT FIVE --> + <string name="keyspec_symbols_5">५</string> + <!-- U+096C: "६" DEVANAGARI DIGIT SIX --> + <string name="keyspec_symbols_6">६</string> + <!-- U+096D: "७" DEVANAGARI DIGIT SEVEN --> + <string name="keyspec_symbols_7">७</string> + <!-- U+096E: "८" DEVANAGARI DIGIT EIGHT --> + <string name="keyspec_symbols_8">८</string> + <!-- U+096F: "९" DEVANAGARI DIGIT NINE --> + <string name="keyspec_symbols_9">९</string> + <!-- U+0966: "०" DEVANAGARI DIGIT ZERO --> + <string name="keyspec_symbols_0">०</string> + <!-- Label for "switch to symbols" key. --> + <string name="keylabel_to_symbol">?१२३</string> + <string name="additional_morekeys_symbols_1">1</string> + <string name="additional_morekeys_symbols_2">2</string> + <string name="additional_morekeys_symbols_3">3</string> + <string name="additional_morekeys_symbols_4">4</string> + <string name="additional_morekeys_symbols_5">5</string> + <string name="additional_morekeys_symbols_6">6</string> + <string name="additional_morekeys_symbols_7">7</string> + <string name="additional_morekeys_symbols_8">8</string> + <string name="additional_morekeys_symbols_9">9</string> + <string name="additional_morekeys_symbols_0">0</string> + <!-- U+0930/U+0941/U+002E "रु." NEPALESE RUPEE SIGN --> + <string name="keyspec_currency">रु.</string> +</resources> diff --git a/tools/make-keyboard-text/res/values-ne/donottranslate-more-keys.xml b/tools/make-keyboard-text/res/values-ne/donottranslate-more-keys.xml deleted file mode 100644 index 9205e5309..000000000 --- a/tools/make-keyboard-text/res/values-ne/donottranslate-more-keys.xml +++ /dev/null @@ -1,63 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- -/* -** -** Copyright 2013, The Android Open Source Project -** -** Licensed under the Apache License, Version 2.0 (the "License"); -** you may not use this file except in compliance with the License. -** You may obtain a copy of the License at -** -** http://www.apache.org/licenses/LICENSE-2.0 -** -** Unless required by applicable law or agreed to in writing, software -** distributed under the License is distributed on an "AS IS" BASIS, -** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -** See the License for the specific language governing permissions and -** limitations under the License. -*/ ---> -<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> - <!-- Label for "switch to alphabetic" key. - U+0915: "क" DEVANAGARI LETTER KA - U+0916: "ख" DEVANAGARI LETTER KHA - U+0917: "ग" DEVANAGARI LETTER GA --> - <string name="label_to_alpha_key">कखग</string> - <!-- U+0967: "१" DEVANAGARI DIGIT ONE --> - <string name="keylabel_for_symbols_1">१</string> - <!-- U+0968: "२" DEVANAGARI DIGIT TWO --> - <string name="keylabel_for_symbols_2">२</string> - <!-- U+0969: "३" DEVANAGARI DIGIT THREE --> - <string name="keylabel_for_symbols_3">३</string> - <!-- U+096A: "४" DEVANAGARI DIGIT FOUR --> - <string name="keylabel_for_symbols_4">४</string> - <!-- U+096B: "५" DEVANAGARI DIGIT FIVE --> - <string name="keylabel_for_symbols_5">५</string> - <!-- U+096C: "६" DEVANAGARI DIGIT SIX --> - <string name="keylabel_for_symbols_6">६</string> - <!-- U+096D: "७" DEVANAGARI DIGIT SEVEN --> - <string name="keylabel_for_symbols_7">७</string> - <!-- U+096E: "८" DEVANAGARI DIGIT EIGHT --> - <string name="keylabel_for_symbols_8">८</string> - <!-- U+096F: "९" DEVANAGARI DIGIT NINE --> - <string name="keylabel_for_symbols_9">९</string> - <!-- U+0966: "०" DEVANAGARI DIGIT ZERO --> - <string name="keylabel_for_symbols_0">०</string> - <!-- Label for "switch to symbols" key. --> - <string name="label_to_symbol_key">\?१२३</string> - <!-- Label for "switch to symbols with microphone" key. This string shouldn't include the "mic" - part because it'll be appended by the code. --> - <string name="label_to_symbol_with_microphone_key">१२३</string> - <string name="additional_more_keys_for_symbols_1">1</string> - <string name="additional_more_keys_for_symbols_2">2</string> - <string name="additional_more_keys_for_symbols_3">3</string> - <string name="additional_more_keys_for_symbols_4">4</string> - <string name="additional_more_keys_for_symbols_5">5</string> - <string name="additional_more_keys_for_symbols_6">6</string> - <string name="additional_more_keys_for_symbols_7">7</string> - <string name="additional_more_keys_for_symbols_8">8</string> - <string name="additional_more_keys_for_symbols_9">9</string> - <string name="additional_more_keys_for_symbols_0">0</string> - <!-- U+0930/U+0941/U+002E "रु." NEPALESE RUPEE SIGN --> - <string name="keylabel_for_currency">रु.</string> -</resources> diff --git a/tools/make-keyboard-text/res/values-nl/donottranslate-more-keys.xml b/tools/make-keyboard-text/res/values-nl/donottranslate-more-keys.xml index e5d82951a..f9a26c540 100644 --- a/tools/make-keyboard-text/res/values-nl/donottranslate-more-keys.xml +++ b/tools/make-keyboard-text/res/values-nl/donottranslate-more-keys.xml @@ -26,7 +26,7 @@ U+00E3: "ã" LATIN SMALL LETTER A WITH TILDE U+00E5: "å" LATIN SMALL LETTER A WITH RING ABOVE U+0101: "ā" LATIN SMALL LETTER A WITH MACRON --> - <string name="more_keys_for_a">á,ä,â,à,æ,ã,å,ā</string> + <string name="morekeys_a">á,ä,â,à,æ,ã,å,ā</string> <!-- U+00E9: "é" LATIN SMALL LETTER E WITH ACUTE U+00EB: "ë" LATIN SMALL LETTER E WITH DIAERESIS U+00EA: "ê" LATIN SMALL LETTER E WITH CIRCUMFLEX @@ -34,7 +34,7 @@ U+0119: "ę" LATIN SMALL LETTER E WITH OGONEK U+0117: "ė" LATIN SMALL LETTER E WITH DOT ABOVE U+0113: "ē" LATIN SMALL LETTER E WITH MACRON --> - <string name="more_keys_for_e">é,ë,ê,è,ę,ė,ē</string> + <string name="morekeys_e">é,ë,ê,è,ę,ė,ē</string> <!-- U+00ED: "í" LATIN SMALL LETTER I WITH ACUTE U+00EF: "ï" LATIN SMALL LETTER I WITH DIAERESIS U+00EC: "ì" LATIN SMALL LETTER I WITH GRAVE @@ -42,7 +42,7 @@ U+012F: "į" LATIN SMALL LETTER I WITH OGONEK U+012B: "ī" LATIN SMALL LETTER I WITH MACRON U+0133: "ij" LATIN SMALL LIGATURE IJ --> - <string name="more_keys_for_i">í,ï,ì,î,į,ī,ij</string> + <string name="morekeys_i">í,ï,ì,î,į,ī,ij</string> <!-- U+00F3: "ó" LATIN SMALL LETTER O WITH ACUTE U+00F6: "ö" LATIN SMALL LETTER O WITH DIAERESIS U+00F4: "ô" LATIN SMALL LETTER O WITH CIRCUMFLEX @@ -51,18 +51,18 @@ U+0153: "œ" LATIN SMALL LIGATURE OE U+00F8: "ø" LATIN SMALL LETTER O WITH STROKE U+014D: "ō" LATIN SMALL LETTER O WITH MACRON --> - <string name="more_keys_for_o">ó,ö,ô,ò,õ,œ,ø,ō</string> + <string name="morekeys_o">ó,ö,ô,ò,õ,œ,ø,ō</string> <!-- U+00FA: "ú" LATIN SMALL LETTER U WITH ACUTE 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+016B: "ū" LATIN SMALL LETTER U WITH MACRON --> - <string name="more_keys_for_u">ú,ü,û,ù,ū</string> + <string name="morekeys_u">ú,ü,û,ù,ū</string> <!-- U+00F1: "ñ" LATIN SMALL LETTER N WITH TILDE U+0144: "ń" LATIN SMALL LETTER N WITH ACUTE --> - <string name="more_keys_for_n">ñ,ń</string> + <string name="morekeys_n">ñ,ń</string> <!-- U+0133: "ij" LATIN SMALL LIGATURE IJ --> - <string name="more_keys_for_y">ij</string> + <string name="morekeys_y">ij</string> <string name="single_quotes">!text/single_9qm_rqm</string> <string name="double_quotes">!text/double_9qm_rqm</string> </resources> diff --git a/tools/make-keyboard-text/res/values-pl/donottranslate-more-keys.xml b/tools/make-keyboard-text/res/values-pl/donottranslate-more-keys.xml index b5cf6a0fa..8a87db41e 100644 --- a/tools/make-keyboard-text/res/values-pl/donottranslate-more-keys.xml +++ b/tools/make-keyboard-text/res/values-pl/donottranslate-more-keys.xml @@ -27,7 +27,7 @@ U+00E3: "ã" LATIN SMALL LETTER A WITH TILDE U+00E5: "å" LATIN SMALL LETTER A WITH RING ABOVE U+0101: "ā" LATIN SMALL LETTER A WITH MACRON --> - <string name="more_keys_for_a">ą,á,à,â,ä,æ,ã,å,ā</string> + <string name="morekeys_a">ą,á,à,â,ä,æ,ã,å,ā</string> <!-- U+0119: "ę" LATIN SMALL LETTER E WITH OGONEK U+00E8: "è" LATIN SMALL LETTER E WITH GRAVE U+00E9: "é" LATIN SMALL LETTER E WITH ACUTE @@ -35,7 +35,7 @@ U+00EB: "ë" LATIN SMALL LETTER E WITH DIAERESIS U+0117: "ė" LATIN SMALL LETTER E WITH DOT ABOVE U+0113: "ē" LATIN SMALL LETTER E WITH MACRON --> - <string name="more_keys_for_e">ę,è,é,ê,ë,ė,ē</string> + <string name="morekeys_e">ę,è,é,ê,ë,ė,ē</string> <!-- U+00F3: "ó" LATIN SMALL LETTER O WITH ACUTE U+00F6: "ö" LATIN SMALL LETTER O WITH DIAERESIS U+00F4: "ô" LATIN SMALL LETTER O WITH CIRCUMFLEX @@ -44,24 +44,24 @@ U+0153: "œ" LATIN SMALL LIGATURE OE U+00F8: "ø" LATIN SMALL LETTER O WITH STROKE U+014D: "ō" LATIN SMALL LETTER O WITH MACRON --> - <string name="more_keys_for_o">ó,ö,ô,ò,õ,œ,ø,ō</string> + <string name="morekeys_o">ó,ö,ô,ò,õ,œ,ø,ō</string> <!-- U+015B: "ś" LATIN SMALL LETTER S WITH ACUTE U+00DF: "ß" LATIN SMALL LETTER SHARP S U+0161: "š" LATIN SMALL LETTER S WITH CARON --> - <string name="more_keys_for_s">ś,ß,š</string> + <string name="morekeys_s">ś,ß,š</string> <!-- U+0144: "ń" LATIN SMALL LETTER N WITH ACUTE U+00F1: "ñ" LATIN SMALL LETTER N WITH TILDE --> - <string name="more_keys_for_n">ń,ñ</string> + <string name="morekeys_n">ń,ñ</string> <!-- U+0107: "ć" LATIN SMALL LETTER C WITH ACUTE U+00E7: "ç" LATIN SMALL LETTER C WITH CEDILLA U+010D: "č" LATIN SMALL LETTER C WITH CARON --> - <string name="more_keys_for_c">ć,ç,č</string> + <string name="morekeys_c">ć,ç,č</string> <!-- U+017C: "ż" LATIN SMALL LETTER Z WITH DOT ABOVE U+017A: "ź" LATIN SMALL LETTER Z WITH ACUTE U+017E: "ž" LATIN SMALL LETTER Z WITH CARON --> - <string name="more_keys_for_z">ż,ź,ž</string> + <string name="morekeys_z">ż,ź,ž</string> <!-- U+0142: "ł" LATIN SMALL LETTER L WITH STROKE --> - <string name="more_keys_for_l">ł</string> + <string name="morekeys_l">ł</string> <string name="single_quotes">!text/single_9qm_rqm</string> <string name="double_quotes">!text/double_9qm_rqm</string> </resources> diff --git a/tools/make-keyboard-text/res/values-pt/donottranslate-more-keys.xml b/tools/make-keyboard-text/res/values-pt/donottranslate-more-keys.xml index 0c9065f27..f3f667efc 100644 --- a/tools/make-keyboard-text/res/values-pt/donottranslate-more-keys.xml +++ b/tools/make-keyboard-text/res/values-pt/donottranslate-more-keys.xml @@ -26,7 +26,7 @@ U+00E5: "å" LATIN SMALL LETTER A WITH RING ABOVE U+00E6: "æ" LATIN SMALL LETTER AE U+00AA: "ª" FEMININE ORDINAL INDICATOR --> - <string name="more_keys_for_a">á,ã,à,â,ä,å,æ,ª</string> + <string name="morekeys_a">á,ã,à,â,ä,å,æ,ª</string> <!-- U+00E9: "é" LATIN SMALL LETTER E WITH ACUTE U+00EA: "ê" LATIN SMALL LETTER E WITH CIRCUMFLEX U+00E8: "è" LATIN SMALL LETTER E WITH GRAVE @@ -34,14 +34,14 @@ U+0117: "ė" LATIN SMALL LETTER E WITH DOT ABOVE U+0113: "ē" LATIN SMALL LETTER E WITH MACRON U+00EB: "ë" LATIN SMALL LETTER E WITH DIAERESIS --> - <string name="more_keys_for_e">é,ê,è,ę,ė,ē,ë</string> + <string name="morekeys_e">é,ê,è,ę,ė,ē,ë</string> <!-- U+00ED: "í" LATIN SMALL LETTER I WITH ACUTE U+00EE: "î" LATIN SMALL LETTER I WITH CIRCUMFLEX U+00EC: "ì" LATIN SMALL LETTER I WITH GRAVE U+00EF: "ï" LATIN SMALL LETTER I WITH DIAERESIS U+012F: "į" LATIN SMALL LETTER I WITH OGONEK U+012B: "ī" LATIN SMALL LETTER I WITH MACRON --> - <string name="more_keys_for_i">í,î,ì,ï,į,ī</string> + <string name="morekeys_i">í,î,ì,ï,į,ī</string> <!-- U+00F3: "ó" LATIN SMALL LETTER O WITH ACUTE U+00F5: "õ" LATIN SMALL LETTER O WITH TILDE U+00F4: "ô" LATIN SMALL LETTER O WITH CIRCUMFLEX @@ -51,15 +51,15 @@ U+00F8: "ø" LATIN SMALL LETTER O WITH STROKE U+014D: "ō" LATIN SMALL LETTER O WITH MACRON U+00BA: "º" MASCULINE ORDINAL INDICATOR --> - <string name="more_keys_for_o">ó,õ,ô,ò,ö,œ,ø,ō,º</string> + <string name="morekeys_o">ó,õ,ô,ò,ö,œ,ø,ō,º</string> <!-- U+00FA: "ú" LATIN SMALL LETTER U WITH ACUTE U+00FC: "ü" LATIN SMALL LETTER U WITH DIAERESIS U+00F9: "ù" LATIN SMALL LETTER U WITH GRAVE U+00FB: "û" LATIN SMALL LETTER U WITH CIRCUMFLEX U+016B: "ū" LATIN SMALL LETTER U WITH MACRON --> - <string name="more_keys_for_u">ú,ü,ù,û,ū</string> + <string name="morekeys_u">ú,ü,ù,û,ū</string> <!-- U+00E7: "ç" LATIN SMALL LETTER C WITH CEDILLA U+010D: "č" LATIN SMALL LETTER C WITH CARON U+0107: "ć" LATIN SMALL LETTER C WITH ACUTE --> - <string name="more_keys_for_c">ç,č,ć</string> + <string name="morekeys_c">ç,č,ć</string> </resources> diff --git a/tools/make-keyboard-text/res/values-rm/donottranslate-more-keys.xml b/tools/make-keyboard-text/res/values-rm/donottranslate-more-keys.xml index aa0d7f817..2df401eb4 100644 --- a/tools/make-keyboard-text/res/values-rm/donottranslate-more-keys.xml +++ b/tools/make-keyboard-text/res/values-rm/donottranslate-more-keys.xml @@ -25,5 +25,5 @@ U+00F5: "õ" LATIN SMALL LETTER O WITH TILDE U+0153: "œ" LATIN SMALL LIGATURE OE U+00F8: "ø" LATIN SMALL LETTER O WITH STROKE --> - <string name="more_keys_for_o">ò,ó,ö,ô,õ,œ,ø</string> + <string name="morekeys_o">ò,ó,ö,ô,õ,œ,ø</string> </resources> diff --git a/tools/make-keyboard-text/res/values-ro/donottranslate-more-keys.xml b/tools/make-keyboard-text/res/values-ro/donottranslate-more-keys.xml index f399eb28e..6286c7bae 100644 --- a/tools/make-keyboard-text/res/values-ro/donottranslate-more-keys.xml +++ b/tools/make-keyboard-text/res/values-ro/donottranslate-more-keys.xml @@ -27,21 +27,21 @@ U+00E6: "æ" LATIN SMALL LETTER AE U+00E5: "å" LATIN SMALL LETTER A WITH RING ABOVE U+0101: "ā" LATIN SMALL LETTER A WITH MACRON --> - <string name="more_keys_for_a">â,ã,ă,à,á,ä,æ,å,ā</string> + <string name="morekeys_a">â,ã,ă,à,á,ä,æ,å,ā</string> <!-- 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">î,ï,ì,í,į,ī</string> + <string name="morekeys_i">î,ï,ì,í,į,ī</string> <!-- U+0219: "ș" LATIN SMALL LETTER S WITH COMMA BELOW 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">ș,ß,ś,š</string> + <string name="morekeys_s">ș,ß,ś,š</string> <!-- U+021B: "ț" LATIN SMALL LETTER T WITH COMMA BELOW --> - <string name="more_keys_for_t">ț</string> + <string name="morekeys_t">ț</string> <string name="single_quotes">!text/single_9qm_rqm</string> <string name="double_quotes">!text/double_9qm_rqm</string> </resources> diff --git a/tools/make-keyboard-text/res/values-ru/donottranslate-more-keys.xml b/tools/make-keyboard-text/res/values-ru/donottranslate-more-keys.xml index f62c90ffc..2093ba88b 100644 --- a/tools/make-keyboard-text/res/values-ru/donottranslate-more-keys.xml +++ b/tools/make-keyboard-text/res/values-ru/donottranslate-more-keys.xml @@ -19,24 +19,22 @@ --> <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">щ</string> - <!-- U+044A: "ъ" CYRILLIC SMALL LETTER HARD SIGN --> - <string name="keylabel_for_east_slavic_row1_12">ъ</string> + <string name="keyspec_east_slavic_row1_9">щ</string> <!-- U+044B: "ы" CYRILLIC SMALL LETTER YERU --> - <string name="keylabel_for_east_slavic_row2_1">ы</string> + <string name="keyspec_east_slavic_row2_2">ы</string> <!-- U+044D: "э" CYRILLIC SMALL LETTER E --> - <string name="keylabel_for_east_slavic_row2_11">э</string> + <string name="keyspec_east_slavic_row2_11">э</string> <!-- U+0438: "и" CYRILLIC SMALL LETTER I --> - <string name="keylabel_for_east_slavic_row3_5">и</string> + <string name="keyspec_east_slavic_row3_5">и</string> <!-- U+0451: "ё" CYRILLIC SMALL LETTER IO --> - <string name="more_keys_for_cyrillic_ie">ё</string> + <string name="morekeys_cyrillic_ie">ё</string> <!-- U+044A: "ъ" CYRILLIC SMALL LETTER HARD SIGN --> - <string name="more_keys_for_cyrillic_soft_sign">ъ</string> + <string name="morekeys_cyrillic_soft_sign">ъ</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">АБВ</string> + <string name="keylabel_to_alpha">АБВ</string> <string name="single_quotes">!text/single_9qm_lqm</string> <string name="double_quotes">!text/double_9qm_lqm</string> </resources> diff --git a/tools/make-keyboard-text/res/values-si-rLK/donottranslate-more-keys.xml b/tools/make-keyboard-text/res/values-si-rLK/donottranslate-more-keys.xml new file mode 100644 index 000000000..89c9195e8 --- /dev/null +++ b/tools/make-keyboard-text/res/values-si-rLK/donottranslate-more-keys.xml @@ -0,0 +1,25 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +/* +** +** Copyright 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. +*/ +--> +<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> + <!-- Label for "switch to alphabetic" key. + U+0D85: "අ" SINHALA LETTER AYANNA + U+0D86: "ආ" SINHALA LETTER AAYANNA --> + <string name="keylabel_to_alpha">අ,ආ</string> +</resources> diff --git a/tools/make-keyboard-text/res/values-sk/donottranslate-more-keys.xml b/tools/make-keyboard-text/res/values-sk/donottranslate-more-keys.xml index 2ed538e5b..a05b70370 100644 --- a/tools/make-keyboard-text/res/values-sk/donottranslate-more-keys.xml +++ b/tools/make-keyboard-text/res/values-sk/donottranslate-more-keys.xml @@ -27,7 +27,7 @@ U+00E5: "å" LATIN SMALL LETTER A WITH RING ABOVE U+00E6: "æ" LATIN SMALL LETTER AE U+0105: "ą" LATIN SMALL LETTER A WITH OGONEK --> - <string name="more_keys_for_a">á,ä,ā,à,â,ã,å,æ,ą</string> + <string name="morekeys_a">á,ä,ā,à,â,ã,å,æ,ą</string> <!-- U+00E9: "é" LATIN SMALL LETTER E WITH ACUTE U+011B: "ě" LATIN SMALL LETTER E WITH CARON U+0113: "ē" LATIN SMALL LETTER E WITH MACRON @@ -36,7 +36,7 @@ U+00EA: "ê" LATIN SMALL LETTER E WITH CIRCUMFLEX U+00EB: "ë" LATIN SMALL LETTER E WITH DIAERESIS U+0119: "ę" LATIN SMALL LETTER E WITH OGONEK --> - <string name="more_keys_for_e">é,ě,ē,ė,è,ê,ë,ę</string> + <string name="morekeys_e">é,ě,ē,ė,è,ê,ë,ę</string> <!-- U+00ED: "í" LATIN SMALL LETTER I WITH ACUTE U+012B: "ī" LATIN SMALL LETTER I WITH MACRON U+012F: "į" LATIN SMALL LETTER I WITH OGONEK @@ -44,7 +44,7 @@ U+00EE: "î" LATIN SMALL LETTER I WITH CIRCUMFLEX U+00EF: "ï" LATIN SMALL LETTER I WITH DIAERESIS U+0131: "ı" LATIN SMALL LETTER DOTLESS I --> - <string name="more_keys_for_i">í,ī,į,ì,î,ï,ı</string> + <string name="morekeys_i">í,ī,į,ì,î,ï,ı</string> <!-- U+00F4: "ô" LATIN SMALL LETTER O WITH CIRCUMFLEX U+00F3: "ó" LATIN SMALL LETTER O WITH ACUTE U+00F6: "ö" LATIN SMALL LETTER O WITH DIAERESIS @@ -53,7 +53,7 @@ U+0153: "œ" LATIN SMALL LIGATURE OE U+0151: "ő" LATIN SMALL LETTER O WITH DOUBLE ACUTE U+00F8: "ø" LATIN SMALL LETTER O WITH STROKE --> - <string name="more_keys_for_o">ô,ó,ö,ò,õ,œ,ő,ø</string> + <string name="morekeys_o">ô,ó,ö,ò,õ,œ,ő,ø</string> <!-- U+00FA: "ú" LATIN SMALL LETTER U WITH ACUTE U+016F: "ů" LATIN SMALL LETTER U WITH RING ABOVE U+00FC: "ü" LATIN SMALL LETTER U WITH DIAERESIS @@ -62,48 +62,47 @@ U+00F9: "ù" LATIN SMALL LETTER U WITH GRAVE U+00FB: "û" LATIN SMALL LETTER U WITH CIRCUMFLEX U+0171: "ű" LATIN SMALL LETTER U WITH DOUBLE ACUTE --> - <string name="more_keys_for_u">ú,ů,ü,ū,ų,ù,û,ű</string> + <string name="morekeys_u">ú,ů,ü,ū,ų,ù,û,ű</string> <!-- U+0161: "š" LATIN SMALL LETTER S WITH CARON U+00DF: "ß" LATIN SMALL LETTER SHARP S U+015B: "ś" LATIN SMALL LETTER S WITH ACUTE U+015F: "ş" LATIN SMALL LETTER S WITH CEDILLA --> - <string name="more_keys_for_s">š,ß,ś,ş</string> + <string name="morekeys_s">š,ß,ś,ş</string> <!-- U+0148: "ň" LATIN SMALL LETTER N WITH CARON U+0146: "ņ" LATIN SMALL LETTER N WITH CEDILLA U+00F1: "ñ" LATIN SMALL LETTER N WITH TILDE - U+0144: "ń" LATIN SMALL LETTER N WITH ACUTE U+0144: "ń" LATIN SMALL LETTER N WITH ACUTE --> - <string name="more_keys_for_n">ň,ņ,ñ,ń,ń</string> + <string name="morekeys_n">ň,ņ,ñ,ń</string> <!-- U+010D: "č" LATIN SMALL LETTER C WITH CARON U+00E7: "ç" LATIN SMALL LETTER C WITH CEDILLA U+0107: "ć" LATIN SMALL LETTER C WITH ACUTE --> - <string name="more_keys_for_c">č,ç,ć</string> + <string name="morekeys_c">č,ç,ć</string> <!-- U+00FD: "ý" LATIN SMALL LETTER Y WITH ACUTE U+00FF: "ÿ" LATIN SMALL LETTER Y WITH DIAERESIS --> - <string name="more_keys_for_y">ý,ÿ</string> + <string name="morekeys_y">ý,ÿ</string> <!-- U+010F: "ď" LATIN SMALL LETTER D WITH CARON --> - <string name="more_keys_for_d">ď</string> + <string name="morekeys_d">ď</string> <!-- U+0155: "ŕ" LATIN SMALL LETTER R WITH ACUTE U+0159: "ř" LATIN SMALL LETTER R WITH CARON U+0157: "ŗ" LATIN SMALL LETTER R WITH CEDILLA --> - <string name="more_keys_for_r">ŕ,ř,ŗ</string> + <string name="morekeys_r">ŕ,ř,ŗ</string> <!-- U+0165: "ť" LATIN SMALL LETTER T WITH CARON U+0163: "ţ" LATIN SMALL LETTER T WITH CEDILLA --> - <string name="more_keys_for_t">ť,ţ</string> + <string name="morekeys_t">ť,ţ</string> <!-- U+017E: "ž" LATIN SMALL LETTER Z WITH CARON U+017C: "ż" LATIN SMALL LETTER Z WITH DOT ABOVE U+017A: "ź" LATIN SMALL LETTER Z WITH ACUTE --> - <string name="more_keys_for_z">ž,ż,ź</string> + <string name="morekeys_z">ž,ż,ź</string> <!-- U+0137: "ķ" LATIN SMALL LETTER K WITH CEDILLA --> - <string name="more_keys_for_k">ķ</string> + <string name="morekeys_k">ķ</string> <!-- U+013E: "ľ" LATIN SMALL LETTER L WITH CARON U+013A: "ĺ" LATIN SMALL LETTER L WITH ACUTE U+013C: "ļ" LATIN SMALL LETTER L WITH CEDILLA U+0142: "ł" LATIN SMALL LETTER L WITH STROKE --> - <string name="more_keys_for_l">ľ,ĺ,ļ,ł</string> + <string name="morekeys_l">ľ,ĺ,ļ,ł</string> <!-- U+0123: "ģ" LATIN SMALL LETTER G WITH CEDILLA U+011F: "ğ" LATIN SMALL LETTER G WITH BREVE --> - <string name="more_keys_for_g">ģ,ğ</string> + <string name="morekeys_g">ģ,ğ</string> <string name="single_quotes">!text/single_9qm_lqm</string> <string name="double_quotes">!text/double_9qm_lqm</string> <string name="single_angle_quotes">!text/single_raqm_laqm</string> diff --git a/tools/make-keyboard-text/res/values-sl/donottranslate-more-keys.xml b/tools/make-keyboard-text/res/values-sl/donottranslate-more-keys.xml index 1e5d1d71f..d529589a0 100644 --- a/tools/make-keyboard-text/res/values-sl/donottranslate-more-keys.xml +++ b/tools/make-keyboard-text/res/values-sl/donottranslate-more-keys.xml @@ -19,14 +19,14 @@ --> <resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> <!-- U+0161: "š" LATIN SMALL LETTER S WITH CARON --> - <string name="more_keys_for_s">š</string> + <string name="morekeys_s">š</string> <!-- U+010D: "č" LATIN SMALL LETTER C WITH CARON U+0107: "ć" LATIN SMALL LETTER C WITH ACUTE --> - <string name="more_keys_for_c">č,ć</string> + <string name="morekeys_c">č,ć</string> <!-- U+0111: "đ" LATIN SMALL LETTER D WITH STROKE --> - <string name="more_keys_for_d">đ</string> + <string name="morekeys_d">đ</string> <!-- U+017E: "ž" LATIN SMALL LETTER Z WITH CARON --> - <string name="more_keys_for_z">ž</string> + <string name="morekeys_z">ž</string> <string name="single_quotes">!text/single_9qm_lqm</string> <string name="double_quotes">!text/double_9qm_lqm</string> <string name="single_angle_quotes">!text/single_raqm_laqm</string> diff --git a/tools/make-keyboard-text/res/values-sr/donottranslate-more-keys.xml b/tools/make-keyboard-text/res/values-sr/donottranslate-more-keys.xml index c00d2a665..870a71331 100644 --- a/tools/make-keyboard-text/res/values-sr/donottranslate-more-keys.xml +++ b/tools/make-keyboard-text/res/values-sr/donottranslate-more-keys.xml @@ -23,37 +23,37 @@ U+0161: "š" LATIN SMALL LETTER S WITH CARON U+00DF: "ß" LATIN SMALL LETTER SHARP S U+015B: "ś" LATIN SMALL LETTER S WITH ACUTE - <string name="more_keys_for_s">š,ß,ś</string> + <string name="morekeys_s">š,ß,ś</string> U+010D: "č" LATIN SMALL LETTER C WITH CARON U+00E7: "ç" LATIN SMALL LETTER C WITH CEDILLA U+0107: "ć" LATIN SMALL LETTER C WITH ACUTE - <string name="more_keys_for_c">č,ç,ć</string> + <string name="morekeys_c">č,ç,ć</string> U+010F: "ď" LATIN SMALL LETTER D WITH CARON - <string name="more_keys_for_d">ď</string> + <string name="morekeys_d">ď</string> U+017E: "ž" LATIN SMALL LETTER Z WITH CARON U+017A: "ź" LATIN SMALL LETTER Z WITH ACUTE U+017C: "ż" LATIN SMALL LETTER Z WITH DOT ABOVE - <string name="more_keys_for_z">ž,ź,ż</string> + <string name="morekeys_z">ž,ź,ż</string> END: More keys definitions for Serbian (Latin) --> <!-- BEGIN: More keys definitions for Serbian (Cyrillic) --> <!-- U+0437: "з" CYRILLIC SMALL LETTER ZE --> - <string name="keylabel_for_south_slavic_row1_6">з</string> + <string name="keyspec_south_slavic_row1_6">з</string> <!-- U+045B: "ћ" CYRILLIC SMALL LETTER TSHE --> - <string name="keylabel_for_south_slavic_row2_11">ћ</string> + <string name="keyspec_south_slavic_row2_11">ћ</string> <!-- U+0455: "ѕ" CYRILLIC SMALL LETTER DZE --> - <string name="keylabel_for_south_slavic_row3_1">ѕ</string> + <string name="keyspec_south_slavic_row3_1">ѕ</string> <!-- U+0452: "ђ" CYRILLIC SMALL LETTER DJE --> - <string name="keylabel_for_south_slavic_row3_8">ђ</string> + <string name="keyspec_south_slavic_row3_8">ђ</string> <!-- U+0450: "ѐ" CYRILLIC SMALL LETTER IE WITH GRAVE --> - <string name="more_keys_for_cyrillic_ie">ѐ</string> + <string name="morekeys_cyrillic_ie">ѐ</string> <!-- U+045D: "ѝ" CYRILLIC SMALL LETTER I WITH GRAVE --> - <string name="more_keys_for_cyrillic_i">ѝ</string> + <string name="morekeys_cyrillic_i">ѝ</string> <!-- END: More keys definitions for Serbian (Cyrillic) --> <!-- 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">АБВ</string> + <string name="keylabel_to_alpha">АБВ</string> <string name="single_quotes">!text/single_9qm_lqm</string> <string name="double_quotes">!text/double_9qm_lqm</string> <string name="single_angle_quotes">!text/single_raqm_laqm</string> diff --git a/tools/make-keyboard-text/res/values-sv/donottranslate-more-keys.xml b/tools/make-keyboard-text/res/values-sv/donottranslate-more-keys.xml index 2472364d0..ead514026 100644 --- a/tools/make-keyboard-text/res/values-sv/donottranslate-more-keys.xml +++ b/tools/make-keyboard-text/res/values-sv/donottranslate-more-keys.xml @@ -23,72 +23,71 @@ U+00E2: "â" LATIN SMALL LETTER A WITH CIRCUMFLEX U+0105: "ą" LATIN SMALL LETTER A WITH OGONEK U+00E3: "ã" LATIN SMALL LETTER A WITH TILDE --> - <string name="more_keys_for_a">á,à,â,ą,ã</string> + <string name="morekeys_a">á,à,â,ą,ã</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">ç,ć,č</string> + <string name="morekeys_c">ç,ć,č</string> <!-- U+00F0: "ð" LATIN SMALL LETTER ETH U+010F: "ď" LATIN SMALL LETTER D WITH CARON --> - <string name="more_keys_for_d">ð,ď</string> + <string name="morekeys_d">ð,ď</string> <!-- U+00E9: "é" LATIN SMALL LETTER E WITH ACUTE U+00E8: "è" LATIN SMALL LETTER E WITH GRAVE U+00EA: "ê" LATIN SMALL LETTER E WITH CIRCUMFLEX U+00EB: "ë" LATIN SMALL LETTER E WITH DIAERESIS U+0119: "ę" LATIN SMALL LETTER E WITH OGONEK --> - <string name="more_keys_for_e">é,è,ê,ë,ę</string> + <string name="morekeys_e">é,è,ê,ë,ę</string> <!-- U+00ED: "í" LATIN SMALL LETTER I WITH ACUTE U+00EC: "ì" LATIN SMALL LETTER I WITH GRAVE U+00EE: "î" LATIN SMALL LETTER I WITH CIRCUMFLEX U+00EF: "ï" LATIN SMALL LETTER I WITH DIAERESIS --> - <string name="more_keys_for_i">í,ì,î,ï</string> + <string name="morekeys_i">í,ì,î,ï</string> <!-- U+0142: "ł" LATIN SMALL LETTER L WITH STROKE --> - <string name="more_keys_for_l">ł</string> + <string name="morekeys_l">ł</string> <!-- U+0144: "ń" LATIN SMALL LETTER N WITH ACUTE U+00F1: "ñ" LATIN SMALL LETTER N WITH TILDE U+0148: "ň" LATIN SMALL LETTER N WITH CARON --> - <string name="more_keys_for_n">ń,ñ,ň</string> + <string name="morekeys_n">ń,ñ,ň</string> <!-- U+00F3: "ó" LATIN SMALL LETTER O WITH ACUTE U+00F2: "ò" LATIN SMALL LETTER O WITH GRAVE U+00F4: "ô" LATIN SMALL LETTER O WITH CIRCUMFLEX U+00F5: "õ" LATIN SMALL LETTER O WITH TILDE U+014D: "ō" LATIN SMALL LETTER O WITH MACRON --> - <string name="more_keys_for_o">ó,ò,ô,õ,ō</string> + <string name="morekeys_o">ó,ò,ô,õ,ō</string> <!-- U+0159: "ř" LATIN SMALL LETTER R WITH CARON --> - <string name="more_keys_for_r">ř</string> + <string name="morekeys_r">ř</string> <!-- U+015B: "ś" LATIN SMALL LETTER S WITH ACUTE U+0161: "š" LATIN SMALL LETTER S WITH CARON U+015F: "ş" LATIN SMALL LETTER S WITH CEDILLA U+00DF: "ß" LATIN SMALL LETTER SHARP S --> - <string name="more_keys_for_s">ś,š,ş,ß</string> + <string name="morekeys_s">ś,š,ş,ß</string> <!-- U+0165: "ť" LATIN SMALL LETTER T WITH CARON U+00FE: "þ" LATIN SMALL LETTER THORN --> - <string name="more_keys_for_t">ť,þ</string> + <string name="morekeys_t">ť,þ</string> <!-- U+00FC: "ü" LATIN SMALL LETTER U WITH DIAERESIS U+00FA: "ú" LATIN SMALL LETTER U WITH ACUTE U+00F9: "ù" LATIN SMALL LETTER U WITH GRAVE U+00FB: "û" LATIN SMALL LETTER U WITH CIRCUMFLEX U+016B: "ū" LATIN SMALL LETTER U WITH MACRON --> - <string name="more_keys_for_u">ü,ú,ù,û,ū</string> + <string name="morekeys_u">ü,ú,ù,û,ū</string> <!-- U+00FD: "ý" LATIN SMALL LETTER Y WITH ACUTE - U+00FF: "ÿ" LATIN SMALL LETTER Y WITH DIAERESIS - U+00FC: "ü" LATIN SMALL LETTER U WITH DIAERESIS --> - <string name="more_keys_for_y">ý,ÿ,ü</string> + U+00FF: "ÿ" LATIN SMALL LETTER Y WITH DIAERESIS --> + <string name="morekeys_y">ý,ÿ</string> <!-- U+017A: "ź" LATIN SMALL LETTER Z WITH ACUTE U+017E: "ž" LATIN SMALL LETTER Z WITH CARON U+017C: "ż" LATIN SMALL LETTER Z WITH DOT ABOVE --> - <string name="more_keys_for_z">ź,ž,ż</string> + <string name="morekeys_z">ź,ž,ż</string> <!-- U+00E5: "å" LATIN SMALL LETTER A WITH RING ABOVE --> - <string name="keylabel_for_nordic_row1_11">å</string> + <string name="keyspec_nordic_row1_11">å</string> <!-- U+00E4: "ä" LATIN SMALL LETTER A WITH DIAERESIS --> - <string name="keylabel_for_nordic_row2_11">ä</string> + <string name="keyspec_nordic_row2_11">ä</string> <!-- U+00E6: "æ" LATIN SMALL LETTER AE --> - <string name="more_keys_for_nordic_row2_11">æ</string> + <string name="morekeys_nordic_row2_11">æ</string> <!-- U+00F6: "ö" LATIN SMALL LETTER O WITH DIAERESIS --> - <string name="keylabel_for_nordic_row2_10">ö</string> + <string name="keyspec_nordic_row2_10">ö</string> <!-- U+00F8: "ø" LATIN SMALL LETTER O WITH STROKE U+0153: "œ" LATIN SMALL LIGATURE OE --> - <string name="more_keys_for_nordic_row2_10">ø,œ</string> + <string name="morekeys_nordic_row2_10">ø,œ</string> <string name="single_angle_quotes">!text/single_raqm_laqm</string> <string name="double_angle_quotes">!text/double_raqm_laqm</string> </resources> diff --git a/tools/make-keyboard-text/res/values-sw/donottranslate-more-keys.xml b/tools/make-keyboard-text/res/values-sw/donottranslate-more-keys.xml index 968a80c1c..e06ae21cd 100644 --- a/tools/make-keyboard-text/res/values-sw/donottranslate-more-keys.xml +++ b/tools/make-keyboard-text/res/values-sw/donottranslate-more-keys.xml @@ -18,7 +18,7 @@ */ --> <resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> - <!-- This is the same as English except more_keys_for_g. --> + <!-- This is the same as English except morekeys_g. --> <!-- U+00E0: "à" LATIN SMALL LETTER A WITH GRAVE U+00E1: "á" LATIN SMALL LETTER A WITH ACUTE U+00E2: "â" LATIN SMALL LETTER A WITH CIRCUMFLEX @@ -27,19 +27,19 @@ U+00E3: "ã" LATIN SMALL LETTER A WITH TILDE U+00E5: "å" LATIN SMALL LETTER A WITH RING ABOVE U+0101: "ā" LATIN SMALL LETTER A WITH MACRON --> - <string name="more_keys_for_a">à,á,â,ä,æ,ã,å,ā</string> + <string name="morekeys_a">à,á,â,ä,æ,ã,å,ā</string> <!-- U+00E8: "è" LATIN SMALL LETTER E WITH GRAVE U+00E9: "é" LATIN SMALL LETTER E WITH ACUTE U+00EA: "ê" LATIN SMALL LETTER E WITH CIRCUMFLEX U+00EB: "ë" LATIN SMALL LETTER E WITH DIAERESIS U+0113: "ē" LATIN SMALL LETTER E WITH MACRON --> - <string name="more_keys_for_e">è,é,ê,ë,ē</string> + <string name="morekeys_e">è,é,ê,ë,ē</string> <!-- U+00EE: "î" LATIN SMALL LETTER I WITH CIRCUMFLEX U+00EF: "ï" LATIN SMALL LETTER I WITH DIAERESIS U+00ED: "í" LATIN SMALL LETTER I WITH ACUTE U+012B: "ī" LATIN SMALL LETTER I WITH MACRON U+00EC: "ì" LATIN SMALL LETTER I WITH GRAVE --> - <string name="more_keys_for_i">î,ï,í,ī,ì</string> + <string name="morekeys_i">î,ï,í,ī,ì</string> <!-- U+00F4: "ô" LATIN SMALL LETTER O WITH CIRCUMFLEX U+00F6: "ö" LATIN SMALL LETTER O WITH DIAERESIS U+00F2: "ò" LATIN SMALL LETTER O WITH GRAVE @@ -48,18 +48,18 @@ U+00F8: "ø" LATIN SMALL LETTER O WITH STROKE U+014D: "ō" LATIN SMALL LETTER O WITH MACRON U+00F5: "õ" LATIN SMALL LETTER O WITH TILDE --> - <string name="more_keys_for_o">ô,ö,ò,ó,œ,ø,ō,õ</string> + <string name="morekeys_o">ô,ö,ò,ó,œ,ø,ō,õ</string> <!-- U+00FB: "û" LATIN SMALL LETTER U WITH CIRCUMFLEX U+00FC: "ü" LATIN SMALL LETTER U WITH DIAERESIS U+00F9: "ù" LATIN SMALL LETTER U WITH GRAVE U+00FA: "ú" LATIN SMALL LETTER U WITH ACUTE U+016B: "ū" LATIN SMALL LETTER U WITH MACRON --> - <string name="more_keys_for_u">û,ü,ù,ú,ū</string> + <string name="morekeys_u">û,ü,ù,ú,ū</string> <!-- U+00DF: "ß" LATIN SMALL LETTER SHARP S --> - <string name="more_keys_for_s">ß</string> + <string name="morekeys_s">ß</string> <!-- U+00F1: "ñ" LATIN SMALL LETTER N WITH TILDE --> - <string name="more_keys_for_n">ñ</string> + <string name="morekeys_n">ñ</string> <!-- U+00E7: "ç" LATIN SMALL LETTER C WITH CEDILLA --> - <string name="more_keys_for_c">ç</string> - <string name="more_keys_for_g">g\'</string> + <string name="morekeys_c">ç</string> + <string name="morekeys_g">g\'</string> </resources> diff --git a/tools/make-keyboard-text/res/values-ta-rIN/donottranslate-more-keys.xml b/tools/make-keyboard-text/res/values-ta-rIN/donottranslate-more-keys.xml new file mode 100644 index 000000000..547c8e132 --- /dev/null +++ b/tools/make-keyboard-text/res/values-ta-rIN/donottranslate-more-keys.xml @@ -0,0 +1,28 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +/* +** +** Copyright 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. +*/ +--> +<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> + <!-- Label for "switch to alphabetic" key. + U+0BA4: "த" TAMIL LETTER TA + U+0BAE/U+0BBF: "மி" TAMIL LETTER MA/TAMIL VOWEL SIGN I + U+0BB4/U+0BCD: "ழ்" TAMIL LETTER LLLA/TAMIL SIGN VIRAMA --> + <string name="keylabel_to_alpha">தமிழ்</string> + <!-- U+0BF9: "௹" TAMIL RUPEE SIGN --> + <string name="keyspec_currency">௹</string> +</resources> diff --git a/tools/make-keyboard-text/res/values-te-rIN/donottranslate-more-keys.xml b/tools/make-keyboard-text/res/values-te-rIN/donottranslate-more-keys.xml new file mode 100644 index 000000000..6518dea8f --- /dev/null +++ b/tools/make-keyboard-text/res/values-te-rIN/donottranslate-more-keys.xml @@ -0,0 +1,28 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +/* +** +** Copyright 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. +*/ +--> +<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> + <!-- Label for "switch to alphabetic" key. + U+0C05: "అ" TELUGU LETTER A + U+0C06: "ఆ" TELUGU LETTER AA + U+0C07: "ఇ" TELUGU LETTER I --> + <string name="keylabel_to_alpha">అఆఇ</string> + <!-- U+20B9: "₹" INDIAN RUPEE SIGN --> + <string name="keyspec_currency">₹</string> +</resources> diff --git a/tools/make-keyboard-text/res/values-th/donottranslate-more-keys.xml b/tools/make-keyboard-text/res/values-th/donottranslate-more-keys.xml index 070c91526..3329cf241 100644 --- a/tools/make-keyboard-text/res/values-th/donottranslate-more-keys.xml +++ b/tools/make-keyboard-text/res/values-th/donottranslate-more-keys.xml @@ -22,7 +22,7 @@ U+0E01: "ก" THAI CHARACTER KO KAI U+0E02: "ข" THAI CHARACTER KHO KHAI U+0E04: "ค" THAI CHARACTER KHO KHWAI --> - <string name="label_to_alpha_key">กขค</string> + <string name="keylabel_to_alpha">กขค</string> <!-- U+0E3F: "฿" THAI CURRENCY SYMBOL BAHT --> - <string name="keylabel_for_currency">฿</string> + <string name="keyspec_currency">฿</string> </resources> diff --git a/tools/make-keyboard-text/res/values-tl/donottranslate-more-keys.xml b/tools/make-keyboard-text/res/values-tl/donottranslate-more-keys.xml index 383d55ccf..cf25b6f43 100644 --- a/tools/make-keyboard-text/res/values-tl/donottranslate-more-keys.xml +++ b/tools/make-keyboard-text/res/values-tl/donottranslate-more-keys.xml @@ -28,7 +28,7 @@ U+00E6: "æ" LATIN SMALL LETTER AE U+0101: "ā" LATIN SMALL LETTER A WITH MACRON U+00AA: "ª" FEMININE ORDINAL INDICATOR --> - <string name="more_keys_for_a">á,à,ä,â,ã,å,ą,æ,ā,ª</string> + <string name="morekeys_a">á,à,ä,â,ã,å,ą,æ,ā,ª</string> <!-- U+00E9: "é" LATIN SMALL LETTER E WITH ACUTE U+00E8: "è" LATIN SMALL LETTER E WITH GRAVE U+00EB: "ë" LATIN SMALL LETTER E WITH DIAERESIS @@ -36,14 +36,14 @@ U+0119: "ę" LATIN SMALL LETTER E WITH OGONEK U+0117: "ė" LATIN SMALL LETTER E WITH DOT ABOVE U+0113: "ē" LATIN SMALL LETTER E WITH MACRON --> - <string name="more_keys_for_e">é,è,ë,ê,ę,ė,ē</string> + <string name="morekeys_e">é,è,ë,ê,ę,ė,ē</string> <!-- U+00ED: "í" LATIN SMALL LETTER I WITH ACUTE U+00EF: "ï" LATIN SMALL LETTER I WITH DIAERESIS U+00EC: "ì" LATIN SMALL LETTER I WITH GRAVE U+00EE: "î" LATIN SMALL LETTER I WITH CIRCUMFLEX U+012F: "į" LATIN SMALL LETTER I WITH OGONEK U+012B: "ī" LATIN SMALL LETTER I WITH MACRON --> - <string name="more_keys_for_i">í,ï,ì,î,į,ī</string> + <string name="morekeys_i">í,ï,ì,î,į,ī</string> <!-- U+00F3: "ó" LATIN SMALL LETTER O WITH ACUTE U+00F2: "ò" LATIN SMALL LETTER O WITH GRAVE U+00F6: "ö" LATIN SMALL LETTER O WITH DIAERESIS @@ -53,18 +53,18 @@ U+0153: "œ" LATIN SMALL LIGATURE OE U+014D: "ō" LATIN SMALL LETTER O WITH MACRON U+00BA: "º" MASCULINE ORDINAL INDICATOR --> - <string name="more_keys_for_o">ó,ò,ö,ô,õ,ø,œ,ō,º</string> + <string name="morekeys_o">ó,ò,ö,ô,õ,ø,œ,ō,º</string> <!-- U+00FA: "ú" LATIN SMALL LETTER U WITH ACUTE U+00FC: "ü" LATIN SMALL LETTER U WITH DIAERESIS U+00F9: "ù" LATIN SMALL LETTER U WITH GRAVE U+00FB: "û" LATIN SMALL LETTER U WITH CIRCUMFLEX U+016B: "ū" LATIN SMALL LETTER U WITH MACRON --> - <string name="more_keys_for_u">ú,ü,ù,û,ū</string> + <string name="morekeys_u">ú,ü,ù,û,ū</string> <!-- U+00F1: "ñ" LATIN SMALL LETTER N WITH TILDE U+0144: "ń" LATIN SMALL LETTER N WITH ACUTE --> - <string name="more_keys_for_n">ñ,ń</string> + <string name="morekeys_n">ñ,ń</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">ç,ć,č</string> + <string name="morekeys_c">ç,ć,č</string> </resources> diff --git a/tools/make-keyboard-text/res/values-tr/donottranslate-more-keys.xml b/tools/make-keyboard-text/res/values-tr/donottranslate-more-keys.xml index 1161811d4..db1108ff6 100644 --- a/tools/make-keyboard-text/res/values-tr/donottranslate-more-keys.xml +++ b/tools/make-keyboard-text/res/values-tr/donottranslate-more-keys.xml @@ -19,7 +19,7 @@ --> <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">â</string> + <string name="morekeys_a">â</string> <!-- U+0131: "ı" LATIN SMALL LETTER DOTLESS I U+00EE: "î" LATIN SMALL LETTER I WITH CIRCUMFLEX U+00EF: "ï" LATIN SMALL LETTER I WITH DIAERESIS @@ -27,7 +27,7 @@ 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">ı,î,ï,ì,í,į,ī</string> + <string name="morekeys_i">ı,î,ï,ì,í,į,ī</string> <!-- U+00F6: "ö" LATIN SMALL LETTER O WITH DIAERESIS U+00F4: "ô" LATIN SMALL LETTER O WITH CIRCUMFLEX U+0153: "œ" LATIN SMALL LIGATURE OE @@ -36,22 +36,22 @@ 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">ö,ô,œ,ò,ó,õ,ø,ō</string> + <string name="morekeys_o">ö,ô,œ,ò,ó,õ,ø,ō</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">ü,û,ù,ú,ū</string> + <string name="morekeys_u">ü,û,ù,ú,ū</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">ş,ß,ś,š</string> + <string name="morekeys_s">ş,ß,ś,š</string> <!-- U+011F: "ğ" LATIN SMALL LETTER G WITH BREVE --> - <string name="more_keys_for_g">ğ</string> + <string name="morekeys_g">ğ</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">ç,ć,č</string> + <string name="morekeys_c">ç,ć,č</string> </resources> diff --git a/tools/make-keyboard-text/res/values-uk/donottranslate-more-keys.xml b/tools/make-keyboard-text/res/values-uk/donottranslate-more-keys.xml index 6ee34e305..1f72d068b 100644 --- a/tools/make-keyboard-text/res/values-uk/donottranslate-more-keys.xml +++ b/tools/make-keyboard-text/res/values-uk/donottranslate-more-keys.xml @@ -19,28 +19,26 @@ --> <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">щ</string> - <!-- U+0457: "ї" CYRILLIC SMALL LETTER YI --> - <string name="keylabel_for_east_slavic_row1_12">ї</string> + <string name="keyspec_east_slavic_row1_9">щ</string> <!-- U+0456: "і" CYRILLIC SMALL LETTER BYELORUSSIAN-UKRAINIAN I --> - <string name="keylabel_for_east_slavic_row2_1">і</string> + <string name="keyspec_east_slavic_row2_2">і</string> <!-- U+0454: "є" CYRILLIC SMALL LETTER UKRAINIAN IE --> - <string name="keylabel_for_east_slavic_row2_11">є</string> + <string name="keyspec_east_slavic_row2_11">є</string> <!-- U+0438: "и" CYRILLIC SMALL LETTER I --> - <string name="keylabel_for_east_slavic_row3_5">и</string> + <string name="keyspec_east_slavic_row3_5">и</string> <!-- U+0491: "ґ" CYRILLIC SMALL LETTER GHE WITH UPTURN --> - <string name="more_keys_for_cyrillic_ghe">ґ</string> + <string name="morekeys_cyrillic_ghe">ґ</string> <!-- U+0457: "ї" CYRILLIC SMALL LETTER YI --> - <string name="more_keys_for_east_slavic_row2_1">ї</string> + <string name="morekeys_east_slavic_row2_2">ї</string> <!-- U+044A: "ъ" CYRILLIC SMALL LETTER HARD SIGN --> - <string name="more_keys_for_cyrillic_soft_sign">ъ</string> + <string name="morekeys_cyrillic_soft_sign">ъ</string> <!-- U+20B4: "₴" HRYVNIA SIGN --> - <string name="keylabel_for_currency">₴</string> + <string name="keyspec_currency">₴</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">АБВ</string> + <string name="keylabel_to_alpha">АБВ</string> <string name="single_quotes">!text/single_9qm_lqm</string> <string name="double_quotes">!text/double_9qm_lqm</string> </resources> diff --git a/tools/make-keyboard-text/res/values-vi/donottranslate-more-keys.xml b/tools/make-keyboard-text/res/values-vi/donottranslate-more-keys.xml index f01f0687a..aa571700f 100644 --- a/tools/make-keyboard-text/res/values-vi/donottranslate-more-keys.xml +++ b/tools/make-keyboard-text/res/values-vi/donottranslate-more-keys.xml @@ -35,7 +35,7 @@ U+1EA9: "ẩ" LATIN SMALL LETTER A WITH CIRCUMFLEX AND HOOK ABOVE U+1EAB: "ẫ" LATIN SMALL LETTER A WITH CIRCUMFLEX AND TILDE U+1EAD: "ậ" LATIN SMALL LETTER A WITH CIRCUMFLEX AND DOT BELOW --> - <string name="more_keys_for_a">à,á,ả,ã,ạ,ă,ằ,ắ,ẳ,ẵ,ặ,â,ầ,ấ,ẩ,ẫ,ậ</string> + <string name="morekeys_a">à,á,ả,ã,ạ,ă,ằ,ắ,ẳ,ẵ,ặ,â,ầ,ấ,ẩ,ẫ,ậ</string> <!-- U+00E8: "è" LATIN SMALL LETTER E WITH GRAVE U+00E9: "é" LATIN SMALL LETTER E WITH ACUTE U+1EBB: "ẻ" LATIN SMALL LETTER E WITH HOOK ABOVE @@ -47,13 +47,13 @@ U+1EC3: "ể" LATIN SMALL LETTER E WITH CIRCUMFLEX AND HOOK ABOVE U+1EC5: "ễ" LATIN SMALL LETTER E WITH CIRCUMFLEX AND TILDE U+1EC7: "ệ" LATIN SMALL LETTER E WITH CIRCUMFLEX AND DOT BELOW --> - <string name="more_keys_for_e">è,é,ẻ,ẽ,ẹ,ê,ề,ế,ể,ễ,ệ</string> + <string name="morekeys_e">è,é,ẻ,ẽ,ẹ,ê,ề,ế,ể,ễ,ệ</string> <!-- U+00EC: "ì" LATIN SMALL LETTER I WITH GRAVE U+00ED: "í" LATIN SMALL LETTER I WITH ACUTE U+1EC9: "ỉ" LATIN SMALL LETTER I WITH HOOK ABOVE U+0129: "ĩ" LATIN SMALL LETTER I WITH TILDE U+1ECB: "ị" LATIN SMALL LETTER I WITH DOT BELOW --> - <string name="more_keys_for_i">ì,í,ỉ,ĩ,ị</string> + <string name="morekeys_i">ì,í,ỉ,ĩ,ị</string> <!-- U+00F2: "ò" LATIN SMALL LETTER O WITH GRAVE U+00F3: "ó" LATIN SMALL LETTER O WITH ACUTE U+1ECF: "ỏ" LATIN SMALL LETTER O WITH HOOK ABOVE @@ -71,7 +71,7 @@ U+1EDF: "ở" LATIN SMALL LETTER O WITH HORN AND HOOK ABOVE U+1EE1: "ỡ" LATIN SMALL LETTER O WITH HORN AND TILDE U+1EE3: "ợ" LATIN SMALL LETTER O WITH HORN AND DOT BELOW --> - <string name="more_keys_for_o">ò,ó,ỏ,õ,ọ,ô,ồ,ố,ổ,ỗ,ộ,ơ,ờ,ớ,ở,ỡ,ợ</string> + <string name="morekeys_o">ò,ó,ỏ,õ,ọ,ô,ồ,ố,ổ,ỗ,ộ,ơ,ờ,ớ,ở,ỡ,ợ</string> <!-- U+00F9: "ù" LATIN SMALL LETTER U WITH GRAVE U+00FA: "ú" LATIN SMALL LETTER U WITH ACUTE U+1EE7: "ủ" LATIN SMALL LETTER U WITH HOOK ABOVE @@ -83,15 +83,15 @@ U+1EED: "ử" LATIN SMALL LETTER U WITH HORN AND HOOK ABOVE U+1EEF: "ữ" LATIN SMALL LETTER U WITH HORN AND TILDE U+1EF1: "ự" LATIN SMALL LETTER U WITH HORN AND DOT BELOW --> - <string name="more_keys_for_u">ù,ú,ủ,ũ,ụ,ư,ừ,ứ,ử,ữ,ự</string> + <string name="morekeys_u">ù,ú,ủ,ũ,ụ,ư,ừ,ứ,ử,ữ,ự</string> <!-- U+1EF3: "ỳ" LATIN SMALL LETTER Y WITH GRAVE U+00FD: "ý" LATIN SMALL LETTER Y WITH ACUTE U+1EF7: "ỷ" LATIN SMALL LETTER Y WITH HOOK ABOVE U+1EF9: "ỹ" LATIN SMALL LETTER Y WITH TILDE U+1EF5: "ỵ" LATIN SMALL LETTER Y WITH DOT BELOW --> - <string name="more_keys_for_y">ỳ,ý,ỷ,ỹ,ỵ</string> + <string name="morekeys_y">ỳ,ý,ỷ,ỹ,ỵ</string> <!-- U+0111: "đ" LATIN SMALL LETTER D WITH STROKE --> - <string name="more_keys_for_d">đ</string> + <string name="morekeys_d">đ</string> <!-- U+20AB: "₫" DONG SIGN --> - <string name="keylabel_for_currency">₫</string> + <string name="keyspec_currency">₫</string> </resources> diff --git a/tools/make-keyboard-text/res/values-zu/donottranslate-more-keys.xml b/tools/make-keyboard-text/res/values-zu/donottranslate-more-keys.xml index 191791530..2c5df0c81 100644 --- a/tools/make-keyboard-text/res/values-zu/donottranslate-more-keys.xml +++ b/tools/make-keyboard-text/res/values-zu/donottranslate-more-keys.xml @@ -27,38 +27,38 @@ U+00E3: "ã" LATIN SMALL LETTER A WITH TILDE U+00E5: "å" LATIN SMALL LETTER A WITH RING ABOVE U+0101: "ā" LATIN SMALL LETTER A WITH MACRON --> - <string name="more_keys_for_a">à,á,â,ä,æ,ã,å,ā</string> - <!-- U+00E8: "è" LATIN SMALL LETTER E WITH GRAVE - U+00E9: "é" LATIN SMALL LETTER E WITH ACUTE + <string name="morekeys_a">à,á,â,ä,æ,ã,å,ā</string> + <!-- U+00E9: "é" LATIN SMALL LETTER E WITH ACUTE + U+00E8: "è" LATIN SMALL LETTER E WITH GRAVE U+00EA: "ê" LATIN SMALL LETTER E WITH CIRCUMFLEX U+00EB: "ë" LATIN SMALL LETTER E WITH DIAERESIS U+0113: "ē" LATIN SMALL LETTER E WITH MACRON --> - <string name="more_keys_for_e">è,é,ê,ë,ē</string> - <!-- U+00EE: "î" LATIN SMALL LETTER I WITH CIRCUMFLEX + <string name="morekeys_e">é,è,ê,ë,ē</string> + <!-- U+00ED: "í" LATIN SMALL LETTER I WITH ACUTE + U+00EE: "î" LATIN SMALL LETTER I WITH CIRCUMFLEX U+00EF: "ï" LATIN SMALL LETTER I WITH DIAERESIS - U+00ED: "í" LATIN SMALL LETTER I WITH ACUTE U+012B: "ī" LATIN SMALL LETTER I WITH MACRON U+00EC: "ì" LATIN SMALL LETTER I WITH GRAVE --> - <string name="more_keys_for_i">î,ï,í,ī,ì</string> - <!-- U+00F4: "ô" LATIN SMALL LETTER O WITH CIRCUMFLEX + <string name="morekeys_i">í,î,ï,ī,ì</string> + <!-- U+00F3: "ó" LATIN SMALL LETTER O WITH ACUTE + U+00F4: "ô" LATIN SMALL LETTER O WITH CIRCUMFLEX U+00F6: "ö" LATIN SMALL LETTER O WITH DIAERESIS U+00F2: "ò" LATIN SMALL LETTER O WITH GRAVE - U+00F3: "ó" LATIN SMALL LETTER O WITH ACUTE U+0153: "œ" LATIN SMALL LIGATURE OE U+00F8: "ø" LATIN SMALL LETTER O WITH STROKE U+014D: "ō" LATIN SMALL LETTER O WITH MACRON U+00F5: "õ" LATIN SMALL LETTER O WITH TILDE --> - <string name="more_keys_for_o">ô,ö,ò,ó,œ,ø,ō,õ</string> - <!-- U+00FB: "û" LATIN SMALL LETTER U WITH CIRCUMFLEX + <string name="morekeys_o">ó,ô,ö,ò,œ,ø,ō,õ</string> + <!-- U+00FA: "ú" LATIN SMALL LETTER U WITH ACUTE + U+00FB: "û" LATIN SMALL LETTER U WITH CIRCUMFLEX U+00FC: "ü" LATIN SMALL LETTER U WITH DIAERESIS U+00F9: "ù" LATIN SMALL LETTER U WITH GRAVE - U+00FA: "ú" LATIN SMALL LETTER U WITH ACUTE U+016B: "ū" LATIN SMALL LETTER U WITH MACRON --> - <string name="more_keys_for_u">û,ü,ù,ú,ū</string> + <string name="morekeys_u">ú,û,ü,ù,ū</string> <!-- U+00DF: "ß" LATIN SMALL LETTER SHARP S --> - <string name="more_keys_for_s">ß</string> + <string name="morekeys_s">ß</string> <!-- U+00F1: "ñ" LATIN SMALL LETTER N WITH TILDE --> - <string name="more_keys_for_n">ñ</string> + <string name="morekeys_n">ñ</string> <!-- U+00E7: "ç" LATIN SMALL LETTER C WITH CEDILLA --> - <string name="more_keys_for_c">ç</string> + <string name="morekeys_c">ç</string> </resources> diff --git a/tools/make-keyboard-text/res/values-zz/donottranslate-more-keys.xml b/tools/make-keyboard-text/res/values-zz/donottranslate-more-keys.xml index eb984a469..f20c7f618 100644 --- a/tools/make-keyboard-text/res/values-zz/donottranslate-more-keys.xml +++ b/tools/make-keyboard-text/res/values-zz/donottranslate-more-keys.xml @@ -29,7 +29,7 @@ U+0103: "ă" LATIN SMALL LETTER A WITH BREVE U+0105: "ą" LATIN SMALL LETTER A WITH OGONEK U+00AA: "ª" FEMININE ORDINAL INDICATOR --> - <string name="more_keys_for_a">à,á,â,ã,ä,å,æ,ã,å,ā,ă,ą,ª</string> + <string name="morekeys_a">à,á,â,ã,ä,å,æ,ā,ă,ą,ª</string> <!-- U+00E8: "è" LATIN SMALL LETTER E WITH GRAVE U+00E9: "é" LATIN SMALL LETTER E WITH ACUTE U+00EA: "ê" LATIN SMALL LETTER E WITH CIRCUMFLEX @@ -39,7 +39,7 @@ U+0117: "ė" LATIN SMALL LETTER E WITH DOT ABOVE U+0119: "ę" LATIN SMALL LETTER E WITH OGONEK U+011B: "ě" LATIN SMALL LETTER E WITH CARON --> - <string name="more_keys_for_e">è,é,ê,ë,ē,ĕ,ė,ę,ě</string> + <string name="morekeys_e">è,é,ê,ë,ē,ĕ,ė,ę,ě</string> <!-- U+00EC: "ì" LATIN SMALL LETTER I WITH GRAVE U+00ED: "í" LATIN SMALL LETTER I WITH ACUTE U+00EE: "î" LATIN SMALL LETTER I WITH CIRCUMFLEX @@ -50,7 +50,7 @@ U+012F: "į" LATIN SMALL LETTER I WITH OGONEK U+0131: "ı" LATIN SMALL LETTER DOTLESS I U+0133: "ij" LATIN SMALL LIGATURE IJ --> - <string name="more_keys_for_i">ì,í,î,ï,ĩ,ī,ĭ,į,ı,ij</string> + <string name="morekeys_i">ì,í,î,ï,ĩ,ī,ĭ,į,ı,ij</string> <!-- U+00F2: "ò" LATIN SMALL LETTER O WITH GRAVE U+00F3: "ó" LATIN SMALL LETTER O WITH ACUTE U+00F4: "ô" LATIN SMALL LETTER O WITH CIRCUMFLEX @@ -62,7 +62,7 @@ U+0151: "ő" LATIN SMALL LETTER O WITH DOUBLE ACUTE U+0153: "œ" LATIN SMALL LIGATURE OE U+00BA: "º" MASCULINE ORDINAL INDICATOR --> - <string name="more_keys_for_o">ò,ó,ô,õ,ö,ø,ō,ŏ,ő,œ,º</string> + <string name="morekeys_o">ò,ó,ô,õ,ö,ø,ō,ŏ,ő,œ,º</string> <!-- U+00F9: "ù" LATIN SMALL LETTER U WITH GRAVE U+00FA: "ú" LATIN SMALL LETTER U WITH ACUTE U+00FB: "û" LATIN SMALL LETTER U WITH CIRCUMFLEX @@ -73,67 +73,67 @@ U+016F: "ů" LATIN SMALL LETTER U WITH RING ABOVE U+0171: "ű" LATIN SMALL LETTER U WITH DOUBLE ACUTE U+0173: "ų" LATIN SMALL LETTER U WITH OGONEK --> - <string name="more_keys_for_u">ù,ú,û,ü,ũ,ū,ŭ,ů,ű,ų</string> + <string name="morekeys_u">ù,ú,û,ü,ũ,ū,ŭ,ů,ű,ų</string> <!-- U+00DF: "ß" LATIN SMALL LETTER SHARP S U+015B: "ś" LATIN SMALL LETTER S WITH ACUTE U+015D: "ŝ" LATIN SMALL LETTER S WITH CIRCUMFLEX U+015F: "ş" LATIN SMALL LETTER S WITH CEDILLA U+0161: "š" LATIN SMALL LETTER S WITH CARON U+017F: "ſ" LATIN SMALL LETTER LONG S --> - <string name="more_keys_for_s">ß,ś,ŝ,ş,š,ſ</string> + <string name="morekeys_s">ß,ś,ŝ,ş,š,ſ</string> <!-- U+00F1: "ñ" LATIN SMALL LETTER N WITH TILDE U+0144: "ń" LATIN SMALL LETTER N WITH ACUTE U+0146: "ņ" LATIN SMALL LETTER N WITH CEDILLA U+0148: "ň" LATIN SMALL LETTER N WITH CARON U+0149: "ʼn" LATIN SMALL LETTER N PRECEDED BY APOSTROPHE U+014B: "ŋ" LATIN SMALL LETTER ENG --> - <string name="more_keys_for_n">ñ,ń,ņ,ň,ʼn,ŋ</string> + <string name="morekeys_n">ñ,ń,ņ,ň,ʼn,ŋ</string> <!-- U+00E7: "ç" LATIN SMALL LETTER C WITH CEDILLA U+0107: "ć" LATIN SMALL LETTER C WITH ACUTE U+0109: "ĉ" LATIN SMALL LETTER C WITH CIRCUMFLEX U+010B: "ċ" LATIN SMALL LETTER C WITH DOT ABOVE U+010D: "č" LATIN SMALL LETTER C WITH CARON --> - <string name="more_keys_for_c">ç,ć,ĉ,ċ,č</string> + <string name="morekeys_c">ç,ć,ĉ,ċ,č</string> <!-- U+00FD: "ý" LATIN SMALL LETTER Y WITH ACUTE U+0177: "ŷ" LATIN SMALL LETTER Y WITH CIRCUMFLEX U+00FF: "ÿ" LATIN SMALL LETTER Y WITH DIAERESIS U+0133: "ij" LATIN SMALL LIGATURE IJ --> - <string name="more_keys_for_y">ý,ŷ,ÿ,ij</string> + <string name="morekeys_y">ý,ŷ,ÿ,ij</string> <!-- U+010F: "ď" LATIN SMALL LETTER D WITH CARON U+0111: "đ" LATIN SMALL LETTER D WITH STROKE U+00F0: "ð" LATIN SMALL LETTER ETH --> - <string name="more_keys_for_d">ď,đ,ð</string> + <string name="morekeys_d">ď,đ,ð</string> <!-- U+0155: "ŕ" LATIN SMALL LETTER R WITH ACUTE U+0157: "ŗ" LATIN SMALL LETTER R WITH CEDILLA U+0159: "ř" LATIN SMALL LETTER R WITH CARON --> - <string name="more_keys_for_r">ŕ,ŗ,ř</string> + <string name="morekeys_r">ŕ,ŗ,ř</string> <!-- U+00FE: "þ" LATIN SMALL LETTER THORN U+0163: "ţ" LATIN SMALL LETTER T WITH CEDILLA U+0165: "ť" LATIN SMALL LETTER T WITH CARON U+0167: "ŧ" LATIN SMALL LETTER T WITH STROKE --> - <string name="more_keys_for_t">þ,ţ,ť,ŧ</string> + <string name="morekeys_t">þ,ţ,ť,ŧ</string> <!-- U+017A: "ź" LATIN SMALL LETTER Z WITH ACUTE U+017C: "ż" LATIN SMALL LETTER Z WITH DOT ABOVE U+017E: "ž" LATIN SMALL LETTER Z WITH CARON --> - <string name="more_keys_for_z">ź,ż,ž</string> + <string name="morekeys_z">ź,ż,ž</string> <!-- U+0137: "ķ" LATIN SMALL LETTER K WITH CEDILLA U+0138: "ĸ" LATIN SMALL LETTER KRA --> - <string name="more_keys_for_k">ķ,ĸ</string> + <string name="morekeys_k">ķ,ĸ</string> <!-- U+013A: "ĺ" LATIN SMALL LETTER L WITH ACUTE U+013C: "ļ" LATIN SMALL LETTER L WITH CEDILLA U+013E: "ľ" LATIN SMALL LETTER L WITH CARON U+0140: "ŀ" LATIN SMALL LETTER L WITH MIDDLE DOT U+0142: "ł" LATIN SMALL LETTER L WITH STROKE --> - <string name="more_keys_for_l">ĺ,ļ,ľ,ŀ,ł</string> + <string name="morekeys_l">ĺ,ļ,ľ,ŀ,ł</string> <!-- U+011D: "ĝ" LATIN SMALL LETTER G WITH CIRCUMFLEX U+011F: "ğ" LATIN SMALL LETTER G WITH BREVE U+0121: "ġ" LATIN SMALL LETTER G WITH DOT ABOVE U+0123: "ģ" LATIN SMALL LETTER G WITH CEDILLA --> - <string name="more_keys_for_g">ĝ,ğ,ġ,ģ</string> + <string name="morekeys_g">ĝ,ğ,ġ,ģ</string> <!-- U+0125: "ĥ" LATIN SMALL LETTER H WITH CIRCUMFLEX --> - <string name="more_keys_for_h">ĥ</string> + <string name="morekeys_h">ĥ</string> <!-- U+0135: "ĵ" LATIN SMALL LETTER J WITH CIRCUMFLEX --> - <string name="more_keys_for_j">ĵ</string> + <string name="morekeys_j">ĵ</string> <!-- U+0175: "ŵ" LATIN SMALL LETTER W WITH CIRCUMFLEX --> - <string name="more_keys_for_w">ŵ</string> + <string name="morekeys_w">ŵ</string> </resources> diff --git a/tools/make-keyboard-text/res/values/donottranslate-more-keys.xml b/tools/make-keyboard-text/res/values/donottranslate-more-keys.xml index 3c59b4bd1..4b9ca162e 100644 --- a/tools/make-keyboard-text/res/values/donottranslate-more-keys.xml +++ b/tools/make-keyboard-text/res/values/donottranslate-more-keys.xml @@ -18,53 +18,64 @@ */ --> <resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> - <string name="more_keys_for_a"></string> - <string name="more_keys_for_e"></string> - <string name="more_keys_for_i"></string> - <string name="more_keys_for_o"></string> - <string name="more_keys_for_u"></string> - <string name="more_keys_for_s"></string> - <string name="more_keys_for_n"></string> - <string name="more_keys_for_c"></string> - <string name="more_keys_for_y"></string> - <string name="more_keys_for_d"></string> - <string name="more_keys_for_r"></string> - <string name="more_keys_for_t"></string> - <string name="more_keys_for_z"></string> - <string name="more_keys_for_k"></string> - <string name="more_keys_for_l"></string> - <string name="more_keys_for_g"></string> - <string name="more_keys_for_v"></string> - <string name="more_keys_for_h"></string> - <string name="more_keys_for_j"></string> - <string name="more_keys_for_w"></string> - <string name="keylabel_for_nordic_row1_11"></string> - <string name="keylabel_for_nordic_row2_10"></string> - <string name="keylabel_for_nordic_row2_11"></string> - <string name="more_keys_for_nordic_row2_10"></string> - <string name="more_keys_for_nordic_row2_11"></string> - <string name="keylabel_for_east_slavic_row1_9"></string> - <string name="keylabel_for_east_slavic_row1_12"></string> - <string name="keylabel_for_east_slavic_row2_1"></string> - <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> - <string name="keylabel_for_south_slavic_row3_8"></string> - <string name="more_keys_for_cyrillic_ie"></string> - <string name="more_keys_for_cyrillic_i"></string> + <string name="morekeys_a"></string> + <string name="morekeys_e"></string> + <string name="morekeys_i"></string> + <string name="morekeys_o"></string> + <string name="morekeys_u"></string> + <string name="morekeys_s"></string> + <string name="morekeys_n"></string> + <string name="morekeys_c"></string> + <string name="morekeys_y"></string> + <string name="morekeys_d"></string> + <string name="morekeys_r"></string> + <string name="morekeys_t"></string> + <string name="morekeys_z"></string> + <string name="morekeys_k"></string> + <string name="morekeys_l"></string> + <string name="morekeys_g"></string> + <string name="morekeys_v"></string> + <string name="morekeys_h"></string> + <string name="morekeys_j"></string> + <string name="morekeys_w"></string> + <string name="morekeys_q"></string> + <string name="morekeys_x"></string> + <string name="keyspec_q">q</string> + <string name="keyspec_w">w</string> + <string name="keyspec_y">y</string> + <string name="keyspec_x">x</string> + <string name="keyspec_nordic_row1_11"></string> + <string name="keyspec_nordic_row2_10"></string> + <string name="keyspec_nordic_row2_11"></string> + <string name="morekeys_nordic_row2_10"></string> + <string name="morekeys_nordic_row2_11"></string> + <string name="keyspec_east_slavic_row1_9"></string> + <string name="keyspec_east_slavic_row2_2"></string> + <string name="keyspec_east_slavic_row2_11"></string> + <string name="keyspec_east_slavic_row3_5"></string> + <string name="morekeys_east_slavic_row2_2"></string> + <string name="morekeys_east_slavic_row2_11"></string> + <string name="morekeys_cyrillic_u"></string> + <string name="morekeys_cyrillic_ka"></string> + <string name="morekeys_cyrillic_en"></string> + <string name="morekeys_cyrillic_ghe"></string> + <string name="morekeys_cyrillic_a"></string> + <string name="morekeys_cyrillic_o"></string> + <string name="morekeys_cyrillic_i"></string> + <string name="morekeys_cyrillic_ie"></string> + <string name="morekeys_cyrillic_soft_sign"></string> + <string name="keyspec_south_slavic_row1_6"></string> + <string name="keyspec_south_slavic_row2_11"></string> + <string name="keyspec_south_slavic_row3_1"></string> + <string name="keyspec_south_slavic_row3_8"></string> + <string name="keyspec_swiss_row1_11"></string> + <string name="keyspec_swiss_row2_10"></string> + <string name="keyspec_swiss_row2_11"></string> + <string name="morekeys_swiss_row1_11"></string> + <string name="morekeys_swiss_row2_10"></string> + <string name="morekeys_swiss_row2_11"></string> <!-- Label for "switch to alphabetic" key. --> - <string name="label_to_alpha_key">ABC</string> + <string name="keylabel_to_alpha">ABC</string> <string name="single_quotes">!text/single_lqm_rqm</string> <string name="double_quotes">!text/double_lqm_rqm</string> <string name="single_angle_quotes">!text/single_laqm_raqm</string> @@ -74,144 +85,146 @@ U+20AC: "€" EURO SIGN U+00A5: "¥" YEN SIGN U+20B1: "₱" PESO SIGN --> - <string name="more_keys_for_currency_dollar">¢,£,€,¥,₱</string> - <string name="keylabel_for_currency">$</string> - <string name="more_keys_for_currency">$,¢,€,£,¥,₱</string> - <string name="more_keys_for_punctuation">"!fixedColumnOrder!8,;,/,(,),#,!,\\,,\?,&,\\%,+,\",-,:,',\@"</string> + <string name="morekeys_currency_dollar">¢,£,€,¥,₱</string> + <string name="keyspec_currency">$</string> + <string name="morekeys_currency">$,¢,€,£,¥,₱</string> + <string name="morekeys_punctuation">"!autoColumnOrder!8,\\,,?,!,#,!text/keyspec_right_parenthesis,!text/keyspec_left_parenthesis,/,;,',@,:,-,\",+,\\%,&"</string> + <string name="morekeys_tablet_punctuation">"!autoColumnOrder!7,\\,,',#,!text/keyspec_right_parenthesis,!text/keyspec_left_parenthesis,/,;,@,:,-,\",+,\\%,&"</string> + <!-- U+00F1: "ñ" LATIN SMALL LETTER N WITH TILDE --> + <string name="keyspec_spanish_row2_10">ñ</string> <!-- U+2020: "†" DAGGER U+2021: "‡" DOUBLE DAGGER U+2605: "★" BLACK STAR --> - <string name="more_keys_for_star">†,‡,★</string> + <string name="morekeys_star">†,‡,★</string> <!-- U+266A: "♪" EIGHTH NOTE U+2665: "♥" BLACK HEART SUIT U+2660: "♠" BLACK SPADE SUIT U+2666: "♦" BLACK DIAMOND SUIT U+2663: "♣" BLACK CLUB SUIT --> - <string name="more_keys_for_bullet">♪,♥,♠,♦,♣</string> + <string name="morekeys_bullet">♪,♥,♠,♦,♣</string> <!-- U+00B1: "±" PLUS-MINUS SIGN --> - <string name="more_keys_for_plus">±</string> - <!-- The all letters need to be mirrored are found at - http://www.unicode.org/Public/6.1.0/ucd/BidiMirroring.txt --> - <string name="more_keys_for_left_parenthesis">!fixedColumnOrder!3,<,{,[</string> - <string name="more_keys_for_right_parenthesis">!fixedColumnOrder!3,>,},]</string> - <!-- U+2039: "‹" SINGLE LEFT-POINTING ANGLE QUOTATION MARK - U+203A: "›" SINGLE RIGHT-POINTING ANGLE QUOTATION MARK - U+2264: "≤" LESS-THAN OR EQUAL TO - U+2265: "≥" GREATER-THAN EQUAL TO - U+00AB: "«" LEFT-POINTING DOUBLE ANGLE QUOTATION MARK - U+00BB: "»" RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK --> - <string name="more_keys_for_less_than">!fixedColumnOrder!3,‹,≤,«</string> - <string name="more_keys_for_greater_than">!fixedColumnOrder!3,›,≥,»</string> - <string name="more_keys_for_arabic_diacritics"></string> - <string name="keyhintlabel_for_arabic_diacritics"></string> - <string name="keylabel_for_symbols_1">1</string> - <string name="keylabel_for_symbols_2">2</string> - <string name="keylabel_for_symbols_3">3</string> - <string name="keylabel_for_symbols_4">4</string> - <string name="keylabel_for_symbols_5">5</string> - <string name="keylabel_for_symbols_6">6</string> - <string name="keylabel_for_symbols_7">7</string> - <string name="keylabel_for_symbols_8">8</string> - <string name="keylabel_for_symbols_9">9</string> - <string name="keylabel_for_symbols_0">0</string> + <string name="morekeys_plus">±</string> + <string name="morekeys_left_parenthesis">!fixedColumnOrder!3,!text/keyspecs_left_parenthesis_more_keys</string> + <string name="morekeys_right_parenthesis">!fixedColumnOrder!3,!text/keyspecs_right_parenthesis_more_keys</string> + <string name="morekeys_less_than">!fixedColumnOrder!3,!text/keyspec_left_single_angle_quote,!text/keyspec_less_than_equal,!text/keyspec_left_double_angle_quote</string> + <string name="morekeys_greater_than">!fixedColumnOrder!3,!text/keyspec_right_single_angle_quote,!text/keyspec_greater_than_equal,!text/keyspec_right_double_angle_quote</string> + <string name="morekeys_arabic_diacritics"></string> + <string name="keyspec_symbols_1">1</string> + <string name="keyspec_symbols_2">2</string> + <string name="keyspec_symbols_3">3</string> + <string name="keyspec_symbols_4">4</string> + <string name="keyspec_symbols_5">5</string> + <string name="keyspec_symbols_6">6</string> + <string name="keyspec_symbols_7">7</string> + <string name="keyspec_symbols_8">8</string> + <string name="keyspec_symbols_9">9</string> + <string name="keyspec_symbols_0">0</string> <!-- Label for "switch to symbols" key. --> - <string name="label_to_symbol_key">\?123</string> - <!-- Label for "switch to symbols with microphone" key. This string shouldn't include the "mic" - part because it'll be appended by the code. --> - <string name="label_to_symbol_with_microphone_key">123</string> - <string name="additional_more_keys_for_symbols_1"></string> - <string name="additional_more_keys_for_symbols_2"></string> - <string name="additional_more_keys_for_symbols_3"></string> - <string name="additional_more_keys_for_symbols_4"></string> - <string name="additional_more_keys_for_symbols_5"></string> - <string name="additional_more_keys_for_symbols_6"></string> - <string name="additional_more_keys_for_symbols_7"></string> - <string name="additional_more_keys_for_symbols_8"></string> - <string name="additional_more_keys_for_symbols_9"></string> - <string name="additional_more_keys_for_symbols_0"></string> + <string name="keylabel_to_symbol">?123</string> + <string name="additional_morekeys_symbols_1"></string> + <string name="additional_morekeys_symbols_2"></string> + <string name="additional_morekeys_symbols_3"></string> + <string name="additional_morekeys_symbols_4"></string> + <string name="additional_morekeys_symbols_5"></string> + <string name="additional_morekeys_symbols_6"></string> + <string name="additional_morekeys_symbols_7"></string> + <string name="additional_morekeys_symbols_8"></string> + <string name="additional_morekeys_symbols_9"></string> + <string name="additional_morekeys_symbols_0"></string> <!-- U+00B9: "¹" SUPERSCRIPT ONE U+00BD: "½" VULGAR FRACTION ONE HALF U+2153: "⅓" VULGAR FRACTION ONE THIRD U+00BC: "¼" VULGAR FRACTION ONE QUARTER U+215B: "⅛" VULGAR FRACTION ONE EIGHTH --> - <string name="more_keys_for_symbols_1">¹,½,⅓,¼,⅛</string> + <string name="morekeys_symbols_1">¹,½,⅓,¼,⅛</string> <!-- U+00B2: "²" SUPERSCRIPT TWO U+2154: "⅔" VULGAR FRACTION TWO THIRDS --> - <string name="more_keys_for_symbols_2">²,⅔</string> + <string name="morekeys_symbols_2">²,⅔</string> <!-- U+00B3: "³" SUPERSCRIPT THREE U+00BE: "¾" VULGAR FRACTION THREE QUARTERS U+215C: "⅜" VULGAR FRACTION THREE EIGHTHS --> - <string name="more_keys_for_symbols_3">³,¾,⅜</string> + <string name="morekeys_symbols_3">³,¾,⅜</string> <!-- U+2074: "⁴" SUPERSCRIPT FOUR --> - <string name="more_keys_for_symbols_4">⁴</string> + <string name="morekeys_symbols_4">⁴</string> <!-- U+215D: "⅝" VULGAR FRACTION FIVE EIGHTHS --> - <string name="more_keys_for_symbols_5">⅝</string> - <string name="more_keys_for_symbols_6"></string> + <string name="morekeys_symbols_5">⅝</string> + <string name="morekeys_symbols_6"></string> <!-- U+215E: "⅞" VULGAR FRACTION SEVEN EIGHTHS --> - <string name="more_keys_for_symbols_7">⅞</string> - <string name="more_keys_for_symbols_8"></string> - <string name="more_keys_for_symbols_9"></string> + <string name="morekeys_symbols_7">⅞</string> + <string name="morekeys_symbols_8"></string> + <string name="morekeys_symbols_9"></string> <!-- U+207F: "ⁿ" SUPERSCRIPT LATIN SMALL LETTER N U+2205: "∅" EMPTY SET --> - <string name="more_keys_for_symbols_0">ⁿ,∅</string> - <string name="keylabel_for_comma">,</string> - <string name="more_keys_for_comma"></string> - <string name="keylabel_for_symbols_question">\?</string> - <string name="keylabel_for_symbols_semicolon">;</string> - <string name="keylabel_for_symbols_percent">%</string> + <string name="morekeys_symbols_0">ⁿ,∅</string> + <!-- The all letters need to be mirrored are found at + http://www.unicode.org/Public/6.1.0/ucd/BidiMirroring.txt + U+2039: "‹" SINGLE LEFT-POINTING ANGLE QUOTATION MARK + U+203A: "›" SINGLE RIGHT-POINTING ANGLE QUOTATION MARK + U+2264: "≤" LESS-THAN OR EQUAL TO + U+2265: "≥" GREATER-THAN EQUAL TO + U+00AB: "«" LEFT-POINTING DOUBLE ANGLE QUOTATION MARK + U+00BB: "»" RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK --> + <string name="keyspec_left_parenthesis">(</string> + <string name="keyspec_right_parenthesis">)</string> + <string name="keyspec_left_square_bracket">[</string> + <string name="keyspec_right_square_bracket">]</string> + <string name="keyspec_left_curly_bracket">{</string> + <string name="keyspec_right_curly_bracket">}</string> + <string name="keyspec_less_than"><</string> + <string name="keyspec_greater_than">></string> + <string name="keyspec_less_than_equal">≤</string> + <string name="keyspec_greater_than_equal">≥</string> + <string name="keyspec_left_double_angle_quote">«</string> + <string name="keyspec_right_double_angle_quote">»</string> + <string name="keyspec_left_single_angle_quote">‹</string> + <string name="keyspec_right_single_angle_quote">›</string> + <!-- Comma key --> + <string name="keyspec_comma">,</string> + <string name="keyspec_tablet_comma">,</string> + <string name="keyhintlabel_tablet_comma"></string> + <string name="morekeys_tablet_comma"></string> + <!-- Period key --> + <string name="keyspec_period">.</string> + <string name="keyhintlabel_period"></string> + <string name="morekeys_period">!text/morekeys_punctuation</string> + <string name="keyspec_tablet_period">.</string> + <string name="keyhintlabel_tablet_period"></string> + <string name="morekeys_tablet_period">!text/morekeys_tablet_punctuation</string> + <string name="keyspec_symbols_question">?</string> + <string name="keyspec_symbols_semicolon">;</string> + <string name="keyspec_symbols_percent">%</string> <!-- U+00A1: "¡" INVERTED EXCLAMATION MARK --> - <string name="more_keys_for_symbols_exclamation">¡</string> + <string name="morekeys_exclamation">¡</string> <!-- U+00BF: "¿" INVERTED QUESTION MARK --> - <string name="more_keys_for_symbols_question">¿</string> - <string name="more_keys_for_symbols_semicolon"></string> + <string name="morekeys_question">¿</string> + <string name="morekeys_symbols_semicolon"></string> <!-- U+2030: "‰" PER MILLE SIGN --> - <string name="more_keys_for_symbols_percent">‰</string> - <string name="keylabel_for_tablet_comma">,</string> - <string name="keyhintlabel_for_tablet_comma"></string> - <string name="more_keys_for_tablet_comma"></string> - <string name="keyhintlabel_for_period"></string> - <!-- U+2026: "…" HORIZONTAL ELLIPSIS --> - <string name="more_keys_for_period">…</string> - <string name="keylabel_for_apostrophe">\'</string> - <string name="keyhintlabel_for_apostrophe">\"</string> - <string name="more_keys_for_apostrophe">\"</string> - <string name="more_keys_for_q"></string> - <string name="more_keys_for_x"></string> - <string name="keylabel_for_q">q</string> - <string name="keylabel_for_w">w</string> - <string name="keylabel_for_y">y</string> - <string name="keylabel_for_x">x</string> - <string name="keylabel_for_spanish_row2_10"></string> - <string name="more_keys_for_am_pm">!fixedColumnOrder!2,!hasLabels!,\@string/label_time_am,\@string/label_time_pm</string> - <string name="settings_as_more_key">!icon/settings_key|!code/key_settings</string> - <string name="shortcut_as_more_key">!icon/shortcut_key|!code/key_shortcut</string> - <string name="action_next_as_more_key">!hasLabels!,\@string/label_next_key|!code/key_action_next</string> - <string name="action_previous_as_more_key">!hasLabels!,\@string/label_previous_key|!code/key_action_previous</string> - <!-- Label for "switch to more symbol" modifier key. Must be short to fit on key! --> - <string name="label_to_more_symbol_key">= \\ <</string> + <string name="morekeys_symbols_percent">‰</string> + <string name="morekeys_am_pm">!fixedColumnOrder!2,!hasLabels!,!text/keylabel_time_am,!text/keylabel_time_pm</string> + <string name="keyspec_settings">!icon/settings_key|!code/key_settings</string> + <string name="keyspec_shortcut">!icon/shortcut_key|!code/key_shortcut</string> + <string name="keyspec_action_next">!hasLabels!,!text/label_next_key|!code/key_action_next</string> + <string name="keyspec_action_previous">!hasLabels!,!text/label_previous_key|!code/key_action_previous</string> + <!-- Label for "switch to more symbol" modifier key ("= \ <"). Must be short to fit on key! --> + <string name="keylabel_to_more_symbol">= \\\\ <</string> <!-- Label for "switch to more symbol" modifier key on tablets. Must be short to fit on key! --> - <string name="label_to_more_symbol_for_tablet_key">~ [ <</string> - <!-- Label for "Tab" key. Must be short to fit on key! --> - <string name="label_tab_key">Tab</string> + <string name="keylabel_tablet_to_more_symbol">~ [ <</string> <!-- Label for "switch to phone numeric" key. Must be short to fit on key! --> - <string name="label_to_phone_numeric_key">123</string> + <string name="keylabel_to_phone_numeric">123</string> <!-- Label for "switch to phone symbols" key. Must be short to fit on key! --> <!-- U+FF0A: "*" FULLWIDTH ASTERISK U+FF03: "#" FULLWIDTH NUMBER SIGN --> - <string name="label_to_phone_symbols_key">*#</string> + <string name="keylabel_to_phone_symbols">*#</string> <!-- Key label for "ante meridiem" --> - <string name="label_time_am">"AM"</string> + <string name="keylabel_time_am">"AM"</string> <!-- Key label for "post meridiem" --> - <string name="label_time_pm">"PM"</string> - <string name="keylabel_for_popular_domain">".com"</string> + <string name="keylabel_time_pm">"PM"</string> + <string name="keyspec_popular_domain">".com"</string> <!-- popular web domains for the locale - most popular, displayed on the keyboard --> - <string name="more_keys_for_popular_domain">"!hasLabels!,.net,.org,.gov,.edu"</string> - <string name="more_keys_for_smiley">"!fixedColumnOrder!5,!hasLabels!,=-O|=-O ,:-P|:-P ,;-)|;-) ,:-(|:-( ,:-)|:-) ,:-!|:-! ,:-$|:-$ ,B-)|B-) ,:O|:O ,:-*|:-* ,:-D|:-D ,:\'(|:\'( ,:-\\\\|:-\\\\ ,O:-)|O:-) ,:-[|:-[ "</string> - <!-- U+2039: "‹" SINGLE LEFT-POINTING ANGLE QUOTATION MARK - U+203A: "›" SINGLE RIGHT-POINTING ANGLE QUOTATION MARK - U+00AB: "«" LEFT-POINTING DOUBLE ANGLE QUOTATION MARK - U+00BB: "»" RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK - The following characters don't need BIDI mirroring. + <string name="morekeys_popular_domain">"!hasLabels!,.net,.org,.gov,.edu"</string> + <string name="keyspecs_left_parenthesis_more_keys">!text/keyspec_less_than,!text/keyspec_left_curly_bracket,!text/keyspec_left_square_bracket</string> + <string name="keyspecs_right_parenthesis_more_keys">!text/keyspec_greater_than,!text/keyspec_right_curly_bracket,!text/keyspec_right_square_bracket</string> + <!-- The following characters don't need BIDI mirroring. U+2018: "‘" LEFT SINGLE QUOTATION MARK U+2019: "’" RIGHT SINGLE QUOTATION MARK U+201A: "‚" SINGLE LOW-9 QUOTATION MARK @@ -221,30 +234,29 @@ <!-- Abbreviations are: laqm: LEFT-POINTING ANGLE QUOTATION MARK raqm: RIGHT-POINTING ANGLE QUOTATION MARK - rtl: Right-To-Left script order lqm: LEFT QUOTATION MARK rqm: RIGHT QUOTATION MARK 9qm: LOW-9 QUOTATION MARK --> <!-- The following each quotation mark pair consist of <opening quotation mark>, <closing quotation mark> and is named after (single|double)_<opening quotation mark>_<closing quotation mark>. --> - <string name="single_laqm_raqm">‹,›</string> - <string name="single_laqm_raqm_rtl">‹|›,›|‹</string> - <string name="single_raqm_laqm">›,‹</string> - <string name="double_laqm_raqm">«,»</string> - <string name="double_laqm_raqm_rtl">«|»,»|«</string> - <string name="double_raqm_laqm">»,«</string> + <string name="single_laqm_raqm">!text/keyspec_left_single_angle_quote,!text/keyspec_right_single_angle_quote</string> + <string name="single_raqm_laqm">!text/keyspec_right_single_angle_quote,!text/keyspec_left_single_angle_quote</string> + <string name="double_laqm_raqm">!text/keyspec_left_double_angle_quote,!text/keyspec_right_double_angle_quote</string> + <string name="double_raqm_laqm">!text/keyspec_right_double_angle_quote,!text/keyspec_left_double_angle_quote</string> <!-- The following each quotation mark triplet consists of <another quotation mark>, <opening quotation mark>, <closing quotation mark> and is named after (single|double)_<opening quotation mark>_<closing quotation mark>. --> <string name="single_lqm_rqm">‚,‘,’</string> <string name="single_9qm_lqm">’,‚,‘</string> <string name="single_9qm_rqm">‘,‚,’</string> + <string name="single_rqm_9qm">‘,’,‚</string> <string name="double_lqm_rqm">„,“,”</string> <string name="double_9qm_lqm">”,„,“</string> <string name="double_9qm_rqm">“,„,”</string> - <string name="more_keys_for_single_quote">!fixedColumnOrder!5,!text/single_quotes,!text/single_angle_quotes</string> - <string name="more_keys_for_double_quote">!fixedColumnOrder!5,!text/double_quotes,!text/double_angle_quotes</string> - <string name="more_keys_for_tablet_double_quote">!fixedColumnOrder!6,!text/double_quotes,!text/single_quotes,!text/double_angle_quotes,!text/single_angle_quotes</string> - <string name="emoji_key_as_more_key">!icon/emoji_key|!code/key_emoji</string> + <string name="double_rqm_9qm">“,”,„</string> + <string name="morekeys_single_quote">!fixedColumnOrder!5,!text/single_quotes,!text/single_angle_quotes</string> + <string name="morekeys_double_quote">!fixedColumnOrder!5,!text/double_quotes,!text/double_angle_quotes</string> + <string name="morekeys_tablet_double_quote">!fixedColumnOrder!6,!text/double_quotes,!text/single_quotes,!text/double_angle_quotes,!text/single_angle_quotes</string> + <string name="keyspec_emoji_key">!icon/emoji_key|!code/key_emoji</string> </resources> diff --git a/tools/make-keyboard-text/src/com/android/inputmethod/keyboard/tools/ArrayInitializerFormatter.java b/tools/make-keyboard-text/src/com/android/inputmethod/keyboard/tools/ArrayInitializerFormatter.java index 331003e67..48bf8010a 100644 --- a/tools/make-keyboard-text/src/com/android/inputmethod/keyboard/tools/ArrayInitializerFormatter.java +++ b/tools/make-keyboard-text/src/com/android/inputmethod/keyboard/tools/ArrayInitializerFormatter.java @@ -22,17 +22,26 @@ 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 mFixedElement; + private String mLastElement; private final StringBuilder mBuffer = new StringBuilder(); private int mBufferedLen; - private int mBufferedIndex = Integer.MIN_VALUE; + private int mStartIndexOfBuffer = Integer.MIN_VALUE; - public ArrayInitializerFormatter(PrintStream out, int width, String indent) { + 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() { @@ -40,42 +49,48 @@ public class ArrayInitializerFormatter { return; } final int lastIndex = mCurrentIndex - 1; - if (mBufferedIndex == lastIndex) { - mOut.format("%s/* %d */ %s\n", mIndent, mBufferedIndex, mBuffer); - } else if (mBufferedIndex == lastIndex - 1) { - final String[] elements = mBuffer.toString().split(" "); - mOut.format("%s/* %d */ %s\n" - + "%s/* %d */ %s\n", - mIndent, mBufferedIndex, elements[0], - mIndent, lastIndex, elements[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/* %d~ */\n" + mOut.format("%s/* %s ~ */\n" + "%s%s\n" - + "%s/* ~%d */\n", mIndent, mBufferedIndex, + + "%s/* ~ %s */\n", + mIndent, mResourceNames[mStartIndexOfBuffer], mIndent, mBuffer, - mIndent, lastIndex); + mIndent, mResourceNames[lastIndex]); } mBuffer.setLength(0); mBufferedLen = 0; } - public void outCommentLines(String lines) { + public void outCommentLines(final String lines) { flush(); mOut.print(lines); - mFixedElement = null; + mLastElement = null; } - public void outElement(String element) { - if (!element.equals(mFixedElement)) { + public void outElement(final String element) { + if (!element.equals(mLastElement)) { flush(); - mBufferedIndex = mCurrentIndex; + 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); @@ -84,6 +99,6 @@ public class ArrayInitializerFormatter { mBufferedLen = element.length(); } mCurrentIndex++; - mFixedElement = element; + mLastElement = element; } } diff --git a/tools/make-keyboard-text/src/com/android/inputmethod/keyboard/tools/JarUtils.java b/tools/make-keyboard-text/src/com/android/inputmethod/keyboard/tools/JarUtils.java index a74096e79..abb33397b 100644 --- a/tools/make-keyboard-text/src/com/android/inputmethod/keyboard/tools/JarUtils.java +++ b/tools/make-keyboard-text/src/com/android/inputmethod/keyboard/tools/JarUtils.java @@ -16,6 +16,7 @@ package com.android.inputmethod.keyboard.tools; +import java.io.Closeable; import java.io.IOException; import java.io.InputStream; import java.io.UnsupportedEncodingException; @@ -23,6 +24,7 @@ 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; @@ -58,8 +60,8 @@ public final class JarUtils { public boolean accept(String dirName, String name); } - public static ArrayList<String> getNameListing(final JarFile jar, final JarFilter filter) { - final ArrayList<String> result = new ArrayList<String>(); + public static ArrayList<String> getEntryNameListing(final JarFile jar, final JarFilter filter) { + final ArrayList<String> result = new ArrayList<>(); final Enumeration<JarEntry> entries = jar.entries(); while (entries.hasMoreElements()) { final JarEntry entry = entries.nextElement(); @@ -74,12 +76,42 @@ public final class JarUtils { return result; } - public static ArrayList<String> getNameListing(final JarFile jar, final String filterName) { - return getNameListing(jar, new JarFilter() { + public static ArrayList<String> 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-<locale>/) + // 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/com/android/inputmethod/keyboard/tools/LocaleUtils.java b/tools/make-keyboard-text/src/com/android/inputmethod/keyboard/tools/LocaleUtils.java new file mode 100644 index 000000000..c1a7ec5eb --- /dev/null +++ b/tools/make-keyboard-text/src/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<String, Locale> 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/com/android/inputmethod/keyboard/tools/MakeKeyboardText.java b/tools/make-keyboard-text/src/com/android/inputmethod/keyboard/tools/MakeKeyboardText.java index 36a03f8dc..6c15ce6bf 100644 --- a/tools/make-keyboard-text/src/com/android/inputmethod/keyboard/tools/MakeKeyboardText.java +++ b/tools/make-keyboard-text/src/com/android/inputmethod/keyboard/tools/MakeKeyboardText.java @@ -36,7 +36,7 @@ public class MakeKeyboardText { } public Options(final String[] argsArray) { - final LinkedList<String> args = new LinkedList<String>(Arrays.asList(argsArray)); + final LinkedList<String> args = new LinkedList<>(Arrays.asList(argsArray)); String arg = null; String java = null; try { 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 2643e01ec..563acc57e 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 @@ -16,78 +16,100 @@ package com.android.inputmethod.keyboard.tools; -import java.io.Closeable; import java.io.File; import java.io.IOException; -import java.io.InputStream; 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 = "KeyboardTextsSet.tmpl"; + 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 MARK_LANGUAGES_AND_TEXTS = "@LANGUAGES_AND_TEXTS@"; - private static final String DEFAUT_LANGUAGE_NAME = "DEFAULT"; - private static final String ARRAY_NAME_FOR_LANGUAGE = "LANGUAGE_%s"; + 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 static final String NO_LANGUAGE_CODE = "zz"; - private static final String NO_LANGUAGE_DISPLAY_NAME = "Alphabet"; - private final JarFile mJar; - // Language to string resources map. - private final HashMap<String, StringResourceMap> mResourcesMap = - new HashMap<String, StringResourceMap>(); - // Name to id map. - private final HashMap<String, Integer> mNameToIdMap = new HashMap<String,Integer>(); + // 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<String, StringResourceMap> 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<String, Integer> 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/<name>" + // via {@link KeyboardTextsSet#getText(String)}. + private final String[] mSortedResourceNames; public MoreKeysResources(final JarFile jar) { mJar = jar; - final ArrayList<String> resources = JarUtils.getNameListing(jar, TEXT_RESOURCE_NAME); - for (final String name : resources) { - final String dirName = name.substring(0, name.lastIndexOf('/')); - final int pos = dirName.lastIndexOf('/'); - final String parentName = (pos >= 0) ? dirName.substring(pos + 1) : dirName; - final String language = getLanguageFromResDir(parentName); - final InputStream stream = JarUtils.openResource(name); - try { - mResourcesMap.put(language, new StringResourceMap(stream)); - } finally { - close(stream); - } + final ArrayList<String> 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); } - } - - private static String getLanguageFromResDir(final String dirName) { - final int languagePos = dirName.indexOf('-'); - if (languagePos < 0) { - // Default resource. - return DEFAUT_LANGUAGE_NAME; + mDefaultResourceMap = mResourcesMap.get( + LocaleUtils.getLocaleCode(LocaleUtils.DEFAULT_LOCALE)); + + // Initialize name histogram and names list. + final HashMap<String, Integer> nameHistogram = mNameHistogram; + final ArrayList<String> resourceNamesList = new ArrayList<>(); + for (final StringResource res : mDefaultResourceMap.getResources()) { + nameHistogram.put(res.mName, 0); // Initialize histogram value. + resourceNamesList.add(res.mName); } - final String language = dirName.substring(languagePos + 1); - final int countryPos = language.indexOf("-r"); - if (countryPos < 0) { - return language; + // 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); + } } - return language.replace("-r", "_"); + // Sort names list. + Collections.sort(resourceNamesList, new Comparator<String>() { + @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<String> list = JarUtils.getNameListing(mJar, JAVA_TEMPLATE); - if (list.isEmpty()) + final ArrayList<String> list = JarUtils.getEntryNameListing(mJar, JAVA_TEMPLATE); + if (list.isEmpty()) { throw new RuntimeException("Can't find java template " + JAVA_TEMPLATE); - if (list.size() > 1) + } + 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; @@ -107,8 +129,8 @@ public class MoreKeysResources { } catch (IOException e) { throw new RuntimeException(e); } finally { - close(lnr); - close(ps); + JarUtils.close(lnr); + JarUtils.close(ps); } } @@ -122,8 +144,8 @@ public class MoreKeysResources { dumpDefaultTexts(out); } else if (line.contains(MARK_TEXTS)) { dumpTexts(out); - } else if (line.contains(MARK_LANGUAGES_AND_TEXTS)) { - dumpLanguageMap(out); + } else if (line.contains(MARK_LOCALES_AND_TEXTS)) { + dumpLocalesMap(out); } else { out.println(line); } @@ -131,70 +153,62 @@ public class MoreKeysResources { } private void dumpNames(final PrintStream out) { - final StringResourceMap defaultResMap = mResourcesMap.get(DEFAUT_LANGUAGE_NAME); - int id = 0; - for (final StringResource res : defaultResMap.getResources()) { - out.format(" /* %2d */ \"%s\",\n", id, res.mName); - mNameToIdMap.put(res.mName, id); - id++; + 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 StringResourceMap defaultResMap = mResourcesMap.get(DEFAUT_LANGUAGE_NAME); - dumpTextsInternal(out, defaultResMap, defaultResMap); + final int outputArraySize = dumpTextsInternal(out, mDefaultResourceMap); + mDefaultResourceMap.setOutputArraySize(outputArraySize); } - private void dumpTexts(final PrintStream out) { - final StringResourceMap defaultResMap = mResourcesMap.get(DEFAUT_LANGUAGE_NAME); - final ArrayList<String> allLanguages = new ArrayList<String>(); - allLanguages.addAll(mResourcesMap.keySet()); - Collections.sort(allLanguages); - for (final String language : allLanguages) { - if (language.equals(DEFAUT_LANGUAGE_NAME)) { - continue; - } - out.format(" /* Language %s: %s */\n", language, getLanguageDisplayName(language)); - out.format(" private static final String[] " + ARRAY_NAME_FOR_LANGUAGE + " = {\n", - language); - final StringResourceMap resMap = mResourcesMap.get(language); - for (final StringResource res : resMap.getResources()) { - if (!defaultResMap.contains(res.mName)) { - throw new RuntimeException(res.mName + " in " + language - + " doesn't have default resource"); - } - } - dumpTextsInternal(out, resMap, defaultResMap); - out.format(" };\n\n"); - } + private static String getArrayNameForLocale(final Locale locale) { + return TEXTS_ARRAY_NAME_PREFIX + LocaleUtils.getLocaleCode(locale); } - private void dumpLanguageMap(final PrintStream out) { - final ArrayList<String> allLanguages = new ArrayList<String>(); - allLanguages.addAll(mResourcesMap.keySet()); - Collections.sort(allLanguages); - for (final String language : allLanguages) { - out.format(" \"%s\", " + ARRAY_NAME_FOR_LANGUAGE + ", /* %s */\n", - language, language, getLanguageDisplayName(language)); + 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 static String getLanguageDisplayName(final String language) { - if (language.equals(NO_LANGUAGE_CODE)) { - return NO_LANGUAGE_DISPLAY_NAME; - } else { - return new Locale(language).getDisplayLanguage(); + 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 static void dumpTextsInternal(final PrintStream out, final StringResourceMap resMap, - final StringResourceMap defaultResMap) { + private int dumpTextsInternal(final PrintStream out, final StringResourceMap resMap) { final ArrayInitializerFormatter formatter = - new ArrayInitializerFormatter(out, 100, " "); + new ArrayInitializerFormatter(out, 100, " ", mSortedResourceNames); + int outputArraySize = 0; boolean successiveNull = false; - for (final StringResource defaultRes : defaultResMap.getResources()) { - if (resMap.contains(defaultRes.mName)) { - final StringResource res = resMap.get(defaultRes.mName); + 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)); } @@ -205,6 +219,7 @@ public class MoreKeysResources { formatter.outElement(String.format("\"%s\",", escaped)); } successiveNull = false; + outputArraySize = formatter.getCurrentIndex(); } else { formatter.outElement("null,"); successiveNull = true; @@ -213,6 +228,7 @@ public class MoreKeysResources { if (!successiveNull) { formatter.flush(); } + return outputArraySize; } private static String addPrefix(final String prefix, final String lines) { @@ -234,31 +250,6 @@ 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; - } - - private static void close(Closeable stream) { - try { - if (stream != null) { - stream.close(); - } - } catch (IOException e) { - } + return sb.toString(); } } diff --git a/tools/make-keyboard-text/src/com/android/inputmethod/keyboard/tools/StringResourceMap.java b/tools/make-keyboard-text/src/com/android/inputmethod/keyboard/tools/StringResourceMap.java index cc7ff6a9c..cf44f2cad 100644 --- a/tools/make-keyboard-text/src/com/android/inputmethod/keyboard/tools/StringResourceMap.java +++ b/tools/make-keyboard-text/src/com/android/inputmethod/keyboard/tools/StringResourceMap.java @@ -27,6 +27,7 @@ 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; @@ -34,31 +35,45 @@ 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<StringResource> mResources; // Name to string resource map. private final Map<String, StringResource> mResourcesMap; - public StringResourceMap(final InputStream is) { + // 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(is, 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()); + + ", column " + e.getColumnNumber(), e); } catch (SAXException e) { - throw new RuntimeException(e.getMessage()); + 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<String,StringResource> map = new HashMap<String,StringResource>(); + final HashMap<String, StringResource> map = new HashMap<>(); for (final StringResource res : mResources) { map.put(res.mName, res); } @@ -77,12 +92,20 @@ public class StringResourceMap { 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<StringResource> mResources = new ArrayList<StringResource>(); + final ArrayList<StringResource> mResources = new ArrayList<>(); private String mName; private final StringBuilder mValue = new StringBuilder(); |