diff --git a/java/res/values-en/whitelist.xml b/java/res/values-en/whitelist.xml new file mode 100644 index 0000000000000000000000000000000000000000..9395f4c888ca595646aa4c2352d39aa558659b96 --- /dev/null +++ b/java/res/values-en/whitelist.xml @@ -0,0 +1,38 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +/* +** +** Copyright 2011, 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"> + <!-- + An entry of the whitelist word should be: + 1. (int)frequency + 2. (String)before + 3. (String)after + --> + <string-array name="wordlist_whitelist" translatable="false"> + + <item>255</item> + <item>ill</item> + <item>I\'ll</item> + + <item>255</item> + <item>thisd</item> + <item>this\'d</item> + + </string-array> +</resources> diff --git a/java/res/values/whitelist.xml b/java/res/values/whitelist.xml index ced52e70e050a44325bec835e20a1b696f1d427a..d4ecbfaa4be640c55e926e014c2b29db439049a8 100644 --- a/java/res/values/whitelist.xml +++ b/java/res/values/whitelist.xml @@ -25,14 +25,5 @@ 3. (String)after --> <string-array name="wordlist_whitelist"> - - <item>255</item> - <item>ill</item> - <item>I\'ll</item> - - <item>255</item> - <item>thisd</item> - <item>this\'d</item> - </string-array> </resources> diff --git a/java/src/com/android/inputmethod/latin/WhitelistDictionary.java b/java/src/com/android/inputmethod/latin/WhitelistDictionary.java index 2389d4e3c30c97a523718c32e934454a049f7dc7..4377373d2d3f7e7b23d622a32f1d364cfb6ea4da 100644 --- a/java/src/com/android/inputmethod/latin/WhitelistDictionary.java +++ b/java/src/com/android/inputmethod/latin/WhitelistDictionary.java @@ -39,6 +39,7 @@ public class WhitelistDictionary extends Dictionary { public static WhitelistDictionary init(Context context) { synchronized (sInstance) { if (context != null) { + // Wordlist is initialized by the proper language in Suggestion.java#init sInstance.initWordlist( context.getResources().getStringArray(R.array.wordlist_whitelist)); } else {