diff options
101 files changed, 493 insertions, 647 deletions
diff --git a/java/res/values-af/strings-config-important-notice.xml b/java/res/values-af/strings-config-important-notice.xml index 7c4dea563..edd54d6f0 100644 --- a/java/res/values-af/strings-config-important-notice.xml +++ b/java/res/values-af/strings-config-important-notice.xml @@ -20,9 +20,5 @@ <resources xmlns:android="http://schemas.android.com/apk/res/android" xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> - <string-array name="important_notice_title_array"> - </string-array> - <string-array name="important_notice_contents_array"> - </string-array> <string name="use_personalized_dicts_summary" msgid="590432261305469627">"Leer uit jou kommunikasie en getikte data om voorstelle te verbeter"</string> </resources> diff --git a/java/res/values-am/strings-config-important-notice.xml b/java/res/values-am/strings-config-important-notice.xml index ad64b6aca..db537dc25 100644 --- a/java/res/values-am/strings-config-important-notice.xml +++ b/java/res/values-am/strings-config-important-notice.xml @@ -20,9 +20,5 @@ <resources xmlns:android="http://schemas.android.com/apk/res/android" xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> - <string-array name="important_notice_title_array"> - </string-array> - <string-array name="important_notice_contents_array"> - </string-array> <string name="use_personalized_dicts_summary" msgid="590432261305469627">"የአስተያየት ጥቆማዎችን ለማሻሻል ከእርስዎ ግንኙነቶች እና የተተየበ ውሂብ ይማሩ"</string> </resources> diff --git a/java/res/values-ar/strings-config-important-notice.xml b/java/res/values-ar/strings-config-important-notice.xml index 5e716c4a0..7af5f6d5c 100644 --- a/java/res/values-ar/strings-config-important-notice.xml +++ b/java/res/values-ar/strings-config-important-notice.xml @@ -20,9 +20,5 @@ <resources xmlns:android="http://schemas.android.com/apk/res/android" xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> - <string-array name="important_notice_title_array"> - </string-array> - <string-array name="important_notice_contents_array"> - </string-array> <string name="use_personalized_dicts_summary" msgid="590432261305469627">"التعلم من اتصالاتك والبيانات التي تكتبها لتحسين الاقتراحات"</string> </resources> diff --git a/java/res/values-az-rAZ/strings-config-important-notice.xml b/java/res/values-az-rAZ/strings-config-important-notice.xml index fa6f9522d..a5f1c6128 100644 --- a/java/res/values-az-rAZ/strings-config-important-notice.xml +++ b/java/res/values-az-rAZ/strings-config-important-notice.xml @@ -20,9 +20,5 @@ <resources xmlns:android="http://schemas.android.com/apk/res/android" xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> - <string-array name="important_notice_title_array"> - </string-array> - <string-array name="important_notice_contents_array"> - </string-array> <string name="use_personalized_dicts_summary" msgid="590432261305469627">"Əlaqələrdən və təkliflərin inkişafı üçün yazdığınız datadan öyrənin "</string> </resources> diff --git a/java/res/values-bg/strings-config-important-notice.xml b/java/res/values-bg/strings-config-important-notice.xml index 06f14087f..465ed85dd 100644 --- a/java/res/values-bg/strings-config-important-notice.xml +++ b/java/res/values-bg/strings-config-important-notice.xml @@ -20,9 +20,5 @@ <resources xmlns:android="http://schemas.android.com/apk/res/android" xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> - <string-array name="important_notice_title_array"> - </string-array> - <string-array name="important_notice_contents_array"> - </string-array> <string name="use_personalized_dicts_summary" msgid="590432261305469627">"Ползване на съобщ. ви и въведени от вас данни за подобр. на предлож."</string> </resources> diff --git a/java/res/values-ca/strings-config-important-notice.xml b/java/res/values-ca/strings-config-important-notice.xml index 57a7ade17..279314571 100644 --- a/java/res/values-ca/strings-config-important-notice.xml +++ b/java/res/values-ca/strings-config-important-notice.xml @@ -20,9 +20,5 @@ <resources xmlns:android="http://schemas.android.com/apk/res/android" xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> - <string-array name="important_notice_title_array"> - </string-array> - <string-array name="important_notice_contents_array"> - </string-array> <string name="use_personalized_dicts_summary" msgid="590432261305469627">"Considera comunicacions i dades introd. per millorar suggeriments"</string> </resources> diff --git a/java/res/values-cs/strings-config-important-notice.xml b/java/res/values-cs/strings-config-important-notice.xml index f69e94642..8de51cc58 100644 --- a/java/res/values-cs/strings-config-important-notice.xml +++ b/java/res/values-cs/strings-config-important-notice.xml @@ -20,9 +20,5 @@ <resources xmlns:android="http://schemas.android.com/apk/res/android" xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> - <string-array name="important_notice_title_array"> - </string-array> - <string-array name="important_notice_contents_array"> - </string-array> <string name="use_personalized_dicts_summary" msgid="590432261305469627">"Zlepšovat návrhy na základě vaší komunikace a zadaných dat"</string> </resources> diff --git a/java/res/values-da/strings-config-important-notice.xml b/java/res/values-da/strings-config-important-notice.xml index a167b3145..1c0c63e2c 100644 --- a/java/res/values-da/strings-config-important-notice.xml +++ b/java/res/values-da/strings-config-important-notice.xml @@ -20,9 +20,5 @@ <resources xmlns:android="http://schemas.android.com/apk/res/android" xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> - <string-array name="important_notice_title_array"> - </string-array> - <string-array name="important_notice_contents_array"> - </string-array> <string name="use_personalized_dicts_summary" msgid="590432261305469627">"Giv bedre forslag ud fra tidligere kommunikation og data"</string> </resources> diff --git a/java/res/values-de/strings-config-important-notice.xml b/java/res/values-de/strings-config-important-notice.xml index 6734a1ce3..a514364f9 100644 --- a/java/res/values-de/strings-config-important-notice.xml +++ b/java/res/values-de/strings-config-important-notice.xml @@ -20,9 +20,5 @@ <resources xmlns:android="http://schemas.android.com/apk/res/android" xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> - <string-array name="important_notice_title_array"> - </string-array> - <string-array name="important_notice_contents_array"> - </string-array> <string name="use_personalized_dicts_summary" msgid="590432261305469627">"Vorschläge anhand bisheriger Nachrichten und Eingaben verbessern"</string> </resources> diff --git a/java/res/values-el/strings-config-important-notice.xml b/java/res/values-el/strings-config-important-notice.xml index 3e0c45bc8..926ec9b6b 100644 --- a/java/res/values-el/strings-config-important-notice.xml +++ b/java/res/values-el/strings-config-important-notice.xml @@ -20,9 +20,5 @@ <resources xmlns:android="http://schemas.android.com/apk/res/android" xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> - <string-array name="important_notice_title_array"> - </string-array> - <string-array name="important_notice_contents_array"> - </string-array> <string name="use_personalized_dicts_summary" msgid="590432261305469627">"Χρήση επικοινωνιών/δεδομένων πληκτρολόγησης για βελτίωση προτάσεων"</string> </resources> diff --git a/java/res/values-en-rGB/strings-config-important-notice.xml b/java/res/values-en-rGB/strings-config-important-notice.xml index 5530dbefc..80ddd3e4b 100644 --- a/java/res/values-en-rGB/strings-config-important-notice.xml +++ b/java/res/values-en-rGB/strings-config-important-notice.xml @@ -20,9 +20,5 @@ <resources xmlns:android="http://schemas.android.com/apk/res/android" xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> - <string-array name="important_notice_title_array"> - </string-array> - <string-array name="important_notice_contents_array"> - </string-array> <string name="use_personalized_dicts_summary" msgid="590432261305469627">"Learn from your communications and typed data to improve suggestions"</string> </resources> diff --git a/java/res/values-en-rIN/strings-config-important-notice.xml b/java/res/values-en-rIN/strings-config-important-notice.xml index 5530dbefc..80ddd3e4b 100644 --- a/java/res/values-en-rIN/strings-config-important-notice.xml +++ b/java/res/values-en-rIN/strings-config-important-notice.xml @@ -20,9 +20,5 @@ <resources xmlns:android="http://schemas.android.com/apk/res/android" xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> - <string-array name="important_notice_title_array"> - </string-array> - <string-array name="important_notice_contents_array"> - </string-array> <string name="use_personalized_dicts_summary" msgid="590432261305469627">"Learn from your communications and typed data to improve suggestions"</string> </resources> diff --git a/java/res/values-es-rUS/strings-config-important-notice.xml b/java/res/values-es-rUS/strings-config-important-notice.xml index 4561842f0..5b895fb4a 100644 --- a/java/res/values-es-rUS/strings-config-important-notice.xml +++ b/java/res/values-es-rUS/strings-config-important-notice.xml @@ -20,9 +20,5 @@ <resources xmlns:android="http://schemas.android.com/apk/res/android" xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> - <string-array name="important_notice_title_array"> - </string-array> - <string-array name="important_notice_contents_array"> - </string-array> <string name="use_personalized_dicts_summary" msgid="590432261305469627">"Aprende de mensajes y datos ingresados para mejorar las sugerencias."</string> </resources> diff --git a/java/res/values-es/strings-config-important-notice.xml b/java/res/values-es/strings-config-important-notice.xml index 1068ea88e..6771265c5 100644 --- a/java/res/values-es/strings-config-important-notice.xml +++ b/java/res/values-es/strings-config-important-notice.xml @@ -20,9 +20,5 @@ <resources xmlns:android="http://schemas.android.com/apk/res/android" xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> - <string-array name="important_notice_title_array"> - </string-array> - <string-array name="important_notice_contents_array"> - </string-array> <string name="use_personalized_dicts_summary" msgid="590432261305469627">"Aprende de mensajes y datos escritos para mejorar sugerencias"</string> </resources> diff --git a/java/res/values-et-rEE/strings-config-important-notice.xml b/java/res/values-et-rEE/strings-config-important-notice.xml index d77b7f902..1c363d697 100644 --- a/java/res/values-et-rEE/strings-config-important-notice.xml +++ b/java/res/values-et-rEE/strings-config-important-notice.xml @@ -20,9 +20,5 @@ <resources xmlns:android="http://schemas.android.com/apk/res/android" xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> - <string-array name="important_notice_title_array"> - </string-array> - <string-array name="important_notice_contents_array"> - </string-array> <string name="use_personalized_dicts_summary" msgid="590432261305469627">"Kommunikats. ja sisestatud andmetest õppimine soovit. täiustamiseks"</string> </resources> diff --git a/java/res/values-fa/strings-config-important-notice.xml b/java/res/values-fa/strings-config-important-notice.xml index 915f3d4c6..22a50cd4a 100644 --- a/java/res/values-fa/strings-config-important-notice.xml +++ b/java/res/values-fa/strings-config-important-notice.xml @@ -20,9 +20,5 @@ <resources xmlns:android="http://schemas.android.com/apk/res/android" xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> - <string-array name="important_notice_title_array"> - </string-array> - <string-array name="important_notice_contents_array"> - </string-array> <string name="use_personalized_dicts_summary" msgid="590432261305469627">"یادگیری از ارتباطات و اطلاعات تایپ شده شما برای بهبود پیشنهادات"</string> </resources> diff --git a/java/res/values-fi/strings-config-important-notice.xml b/java/res/values-fi/strings-config-important-notice.xml index 316781bd5..ad064c0a7 100644 --- a/java/res/values-fi/strings-config-important-notice.xml +++ b/java/res/values-fi/strings-config-important-notice.xml @@ -20,9 +20,5 @@ <resources xmlns:android="http://schemas.android.com/apk/res/android" xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> - <string-array name="important_notice_title_array"> - </string-array> - <string-array name="important_notice_contents_array"> - </string-array> <string name="use_personalized_dicts_summary" msgid="590432261305469627">"Ehdotusten parannus viestinnän ja kirjoitettujen tietojen avulla"</string> </resources> diff --git a/java/res/values-fr-rCA/strings-config-important-notice.xml b/java/res/values-fr-rCA/strings-config-important-notice.xml index 506101d8d..2247ec6cc 100644 --- a/java/res/values-fr-rCA/strings-config-important-notice.xml +++ b/java/res/values-fr-rCA/strings-config-important-notice.xml @@ -20,9 +20,5 @@ <resources xmlns:android="http://schemas.android.com/apk/res/android" xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> - <string-array name="important_notice_title_array"> - </string-array> - <string-array name="important_notice_contents_array"> - </string-array> <string name="use_personalized_dicts_summary" msgid="590432261305469627">"Apprendre de vos communic. et données entrées pour amél. suggestions"</string> </resources> diff --git a/java/res/values-fr/strings-config-important-notice.xml b/java/res/values-fr/strings-config-important-notice.xml index 1672ee0f3..82bdcf5b0 100644 --- a/java/res/values-fr/strings-config-important-notice.xml +++ b/java/res/values-fr/strings-config-important-notice.xml @@ -20,9 +20,5 @@ <resources xmlns:android="http://schemas.android.com/apk/res/android" xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> - <string-array name="important_notice_title_array"> - </string-array> - <string-array name="important_notice_contents_array"> - </string-array> <string name="use_personalized_dicts_summary" msgid="590432261305469627">"Améliorer suggestions en fonction des messages et données saisies"</string> </resources> diff --git a/java/res/values-hi/strings-config-important-notice.xml b/java/res/values-hi/strings-config-important-notice.xml index ae6b4c703..3f22541eb 100644 --- a/java/res/values-hi/strings-config-important-notice.xml +++ b/java/res/values-hi/strings-config-important-notice.xml @@ -20,9 +20,5 @@ <resources xmlns:android="http://schemas.android.com/apk/res/android" xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> - <string-array name="important_notice_title_array"> - </string-array> - <string-array name="important_notice_contents_array"> - </string-array> <string name="use_personalized_dicts_summary" msgid="590432261305469627">"सुझावों में सुधार हेतु अपने संचार और लिखे गए डेटा से जानकारी पाएं"</string> </resources> diff --git a/java/res/values-hr/strings-config-important-notice.xml b/java/res/values-hr/strings-config-important-notice.xml index fff191bee..9d4b18db1 100644 --- a/java/res/values-hr/strings-config-important-notice.xml +++ b/java/res/values-hr/strings-config-important-notice.xml @@ -20,9 +20,5 @@ <resources xmlns:android="http://schemas.android.com/apk/res/android" xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> - <string-array name="important_notice_title_array"> - </string-array> - <string-array name="important_notice_contents_array"> - </string-array> <string name="use_personalized_dicts_summary" msgid="590432261305469627">"Upotrijebi poruke i upisane podatke za poboljšanje prijedloga"</string> </resources> diff --git a/java/res/values-hu/strings-config-important-notice.xml b/java/res/values-hu/strings-config-important-notice.xml index 4cb3c17ce..c023293e0 100644 --- a/java/res/values-hu/strings-config-important-notice.xml +++ b/java/res/values-hu/strings-config-important-notice.xml @@ -20,9 +20,5 @@ <resources xmlns:android="http://schemas.android.com/apk/res/android" xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> - <string-array name="important_notice_title_array"> - </string-array> - <string-array name="important_notice_contents_array"> - </string-array> <string name="use_personalized_dicts_summary" msgid="590432261305469627">"Javaslatok javítása a kommunikáció és begépelt adatok alapján"</string> </resources> diff --git a/java/res/values-hy-rAM/strings-config-important-notice.xml b/java/res/values-hy-rAM/strings-config-important-notice.xml index 2463c118f..9fac63197 100644 --- a/java/res/values-hy-rAM/strings-config-important-notice.xml +++ b/java/res/values-hy-rAM/strings-config-important-notice.xml @@ -20,9 +20,5 @@ <resources xmlns:android="http://schemas.android.com/apk/res/android" xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> - <string-array name="important_notice_title_array"> - </string-array> - <string-array name="important_notice_contents_array"> - </string-array> <string name="use_personalized_dicts_summary" msgid="590432261305469627">"Բարելավեք առաջարկները` ձեր նամակագրությունից և մուտքագրած տվյալներից"</string> </resources> diff --git a/java/res/values-in/strings-config-important-notice.xml b/java/res/values-in/strings-config-important-notice.xml index 03ca54e02..d5df91306 100644 --- a/java/res/values-in/strings-config-important-notice.xml +++ b/java/res/values-in/strings-config-important-notice.xml @@ -20,9 +20,5 @@ <resources xmlns:android="http://schemas.android.com/apk/res/android" xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> - <string-array name="important_notice_title_array"> - </string-array> - <string-array name="important_notice_contents_array"> - </string-array> <string name="use_personalized_dicts_summary" msgid="590432261305469627">"Belajar dari komunikasi & data terketik untuk meningkatkan saran"</string> </resources> diff --git a/java/res/values-it/strings-config-important-notice.xml b/java/res/values-it/strings-config-important-notice.xml index 95b2a1828..3690fac39 100644 --- a/java/res/values-it/strings-config-important-notice.xml +++ b/java/res/values-it/strings-config-important-notice.xml @@ -20,9 +20,5 @@ <resources xmlns:android="http://schemas.android.com/apk/res/android" xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> - <string-array name="important_notice_title_array"> - </string-array> - <string-array name="important_notice_contents_array"> - </string-array> <string name="use_personalized_dicts_summary" msgid="590432261305469627">"Usa comunicazioni e dati digitati per migliorare i suggerimenti"</string> </resources> diff --git a/java/res/values-iw/strings-config-important-notice.xml b/java/res/values-iw/strings-config-important-notice.xml index 0ad8031f0..34ef4cab5 100644 --- a/java/res/values-iw/strings-config-important-notice.xml +++ b/java/res/values-iw/strings-config-important-notice.xml @@ -20,9 +20,5 @@ <resources xmlns:android="http://schemas.android.com/apk/res/android" xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> - <string-array name="important_notice_title_array"> - </string-array> - <string-array name="important_notice_contents_array"> - </string-array> <string name="use_personalized_dicts_summary" msgid="590432261305469627">"למד מהתכתבויות ומנתונים שהקלדת כדי לשפר את ההצעות"</string> </resources> diff --git a/java/res/values-ja/strings-config-important-notice.xml b/java/res/values-ja/strings-config-important-notice.xml index 31b5a710f..03c1f48e9 100644 --- a/java/res/values-ja/strings-config-important-notice.xml +++ b/java/res/values-ja/strings-config-important-notice.xml @@ -20,9 +20,5 @@ <resources xmlns:android="http://schemas.android.com/apk/res/android" xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> - <string-array name="important_notice_title_array"> - </string-array> - <string-array name="important_notice_contents_array"> - </string-array> <string name="use_personalized_dicts_summary" msgid="590432261305469627">"メッセージなどのやり取りや入力したデータから入力候補を予測します"</string> </resources> diff --git a/java/res/values-ka-rGE/strings-config-important-notice.xml b/java/res/values-ka-rGE/strings-config-important-notice.xml index 02b280cb1..188ac871c 100644 --- a/java/res/values-ka-rGE/strings-config-important-notice.xml +++ b/java/res/values-ka-rGE/strings-config-important-notice.xml @@ -20,9 +20,5 @@ <resources xmlns:android="http://schemas.android.com/apk/res/android" xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> - <string-array name="important_notice_title_array"> - </string-array> - <string-array name="important_notice_contents_array"> - </string-array> <string name="use_personalized_dicts_summary" msgid="590432261305469627">"უკეთესი შეთავაზებისთვის თქვენი კომუნიკაციიდან და ტექსტიდან სწავლა"</string> </resources> diff --git a/java/res/values-km-rKH/strings-config-important-notice.xml b/java/res/values-km-rKH/strings-config-important-notice.xml index 7f58d613b..9d694db74 100644 --- a/java/res/values-km-rKH/strings-config-important-notice.xml +++ b/java/res/values-km-rKH/strings-config-important-notice.xml @@ -20,9 +20,5 @@ <resources xmlns:android="http://schemas.android.com/apk/res/android" xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> - <string-array name="important_notice_title_array"> - </string-array> - <string-array name="important_notice_contents_array"> - </string-array> <string name="use_personalized_dicts_summary" msgid="590432261305469627">"សិក្សាការភ្ជាប់របស់អ្នកនិងទិន្នន័យដែលបានបញ្ចូលដើម្បីធ្វើសំណើឲ្យល្អ"</string> </resources> diff --git a/java/res/values-ko/strings-config-important-notice.xml b/java/res/values-ko/strings-config-important-notice.xml index b8cfb375d..47936efc3 100644 --- a/java/res/values-ko/strings-config-important-notice.xml +++ b/java/res/values-ko/strings-config-important-notice.xml @@ -20,9 +20,5 @@ <resources xmlns:android="http://schemas.android.com/apk/res/android" xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> - <string-array name="important_notice_title_array"> - </string-array> - <string-array name="important_notice_contents_array"> - </string-array> <string name="use_personalized_dicts_summary" msgid="590432261305469627">"사용자의 대화 내용과 입력한 데이터를 통해 단어 추천의 정확도를 개선합니다."</string> </resources> diff --git a/java/res/values-lo-rLA/strings-config-important-notice.xml b/java/res/values-lo-rLA/strings-config-important-notice.xml index 079dd6b01..7880ad158 100644 --- a/java/res/values-lo-rLA/strings-config-important-notice.xml +++ b/java/res/values-lo-rLA/strings-config-important-notice.xml @@ -20,9 +20,5 @@ <resources xmlns:android="http://schemas.android.com/apk/res/android" xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> - <string-array name="important_notice_title_array"> - </string-array> - <string-array name="important_notice_contents_array"> - </string-array> <string name="use_personalized_dicts_summary" msgid="590432261305469627">"ຮຽນຮູ້ຈາກການສື່ສານ ແລະຂໍ້ມູນທີ່ທ່ານເຄີຍພິມເພື່ອປັບປຸງຄຳແນະນຳ"</string> </resources> diff --git a/java/res/values-lt/strings-config-important-notice.xml b/java/res/values-lt/strings-config-important-notice.xml index cb91b5be1..93c66e0e3 100644 --- a/java/res/values-lt/strings-config-important-notice.xml +++ b/java/res/values-lt/strings-config-important-notice.xml @@ -20,9 +20,5 @@ <resources xmlns:android="http://schemas.android.com/apk/res/android" xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> - <string-array name="important_notice_title_array"> - </string-array> - <string-array name="important_notice_contents_array"> - </string-array> <string name="use_personalized_dicts_summary" msgid="590432261305469627">"Mokytis iš ryšių ir įvestų duomenų, siekiant pagerinti pasiūlymus"</string> </resources> diff --git a/java/res/values-lv/strings-config-important-notice.xml b/java/res/values-lv/strings-config-important-notice.xml index 916128c5e..15dc4b3a1 100644 --- a/java/res/values-lv/strings-config-important-notice.xml +++ b/java/res/values-lv/strings-config-important-notice.xml @@ -20,9 +20,5 @@ <resources xmlns:android="http://schemas.android.com/apk/res/android" xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> - <string-array name="important_notice_title_array"> - </string-array> - <string-array name="important_notice_contents_array"> - </string-array> <string name="use_personalized_dicts_summary" msgid="590432261305469627">"Izmantojiet saziņu un ievadītos datus, lai uzlabotu ieteikumus."</string> </resources> diff --git a/java/res/values-mn-rMN/strings-config-important-notice.xml b/java/res/values-mn-rMN/strings-config-important-notice.xml index fb07acecf..386d2e789 100644 --- a/java/res/values-mn-rMN/strings-config-important-notice.xml +++ b/java/res/values-mn-rMN/strings-config-important-notice.xml @@ -20,9 +20,5 @@ <resources xmlns:android="http://schemas.android.com/apk/res/android" xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> - <string-array name="important_notice_title_array"> - </string-array> - <string-array name="important_notice_contents_array"> - </string-array> <string name="use_personalized_dicts_summary" msgid="590432261305469627">"Зөвлөмжүүдийг сайжруулахын тулд таны харилцсан, бичсэн зүйлсээс суралцана"</string> </resources> diff --git a/java/res/values-ms-rMY/strings-config-important-notice.xml b/java/res/values-ms-rMY/strings-config-important-notice.xml index f021fe6b6..705d34ec3 100644 --- a/java/res/values-ms-rMY/strings-config-important-notice.xml +++ b/java/res/values-ms-rMY/strings-config-important-notice.xml @@ -20,9 +20,5 @@ <resources xmlns:android="http://schemas.android.com/apk/res/android" xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> - <string-array name="important_notice_title_array"> - </string-array> - <string-array name="important_notice_contents_array"> - </string-array> <string name="use_personalized_dicts_summary" msgid="590432261305469627">"Perbaik cadangan berdasarkan komunikasi anda dan data yang ditaip"</string> </resources> diff --git a/java/res/values-nb/strings-config-important-notice.xml b/java/res/values-nb/strings-config-important-notice.xml index f64f41538..01a774c7e 100644 --- a/java/res/values-nb/strings-config-important-notice.xml +++ b/java/res/values-nb/strings-config-important-notice.xml @@ -20,9 +20,5 @@ <resources xmlns:android="http://schemas.android.com/apk/res/android" xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> - <string-array name="important_notice_title_array"> - </string-array> - <string-array name="important_notice_contents_array"> - </string-array> <string name="use_personalized_dicts_summary" msgid="590432261305469627">"Bruk kommunikasjonen og inndataene dine for å få bedre forslag"</string> </resources> diff --git a/java/res/values-ne-rNP/strings-config-important-notice.xml b/java/res/values-ne-rNP/strings-config-important-notice.xml index 71c016ac9..8816da773 100644 --- a/java/res/values-ne-rNP/strings-config-important-notice.xml +++ b/java/res/values-ne-rNP/strings-config-important-notice.xml @@ -20,9 +20,5 @@ <resources xmlns:android="http://schemas.android.com/apk/res/android" xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> - <string-array name="important_notice_title_array"> - </string-array> - <string-array name="important_notice_contents_array"> - </string-array> <string name="use_personalized_dicts_summary" msgid="590432261305469627">"सुझावहरू सुधार गर्न सञ्चारहरू र टाइप गरिएको डेटाबाट जान्नुहोस्"</string> </resources> diff --git a/java/res/values-nl/strings-config-important-notice.xml b/java/res/values-nl/strings-config-important-notice.xml index 096e029da..a340c99f9 100644 --- a/java/res/values-nl/strings-config-important-notice.xml +++ b/java/res/values-nl/strings-config-important-notice.xml @@ -20,9 +20,5 @@ <resources xmlns:android="http://schemas.android.com/apk/res/android" xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> - <string-array name="important_notice_title_array"> - </string-array> - <string-array name="important_notice_contents_array"> - </string-array> <string name="use_personalized_dicts_summary" msgid="590432261305469627">"Suggesties verbeteren met uw communicatie en getypte gegevens"</string> </resources> diff --git a/java/res/values-pl/strings-config-important-notice.xml b/java/res/values-pl/strings-config-important-notice.xml index 8a78ab0df..315a61bc2 100644 --- a/java/res/values-pl/strings-config-important-notice.xml +++ b/java/res/values-pl/strings-config-important-notice.xml @@ -20,9 +20,5 @@ <resources xmlns:android="http://schemas.android.com/apk/res/android" xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> - <string-array name="important_notice_title_array"> - </string-array> - <string-array name="important_notice_contents_array"> - </string-array> <string name="use_personalized_dicts_summary" msgid="590432261305469627">"Analizuj wiadomości i wpisywane dane, by ulepszać podpowiedzi"</string> </resources> diff --git a/java/res/values-pt-rPT/strings-config-important-notice.xml b/java/res/values-pt-rPT/strings-config-important-notice.xml index 7cc395917..38e2499d4 100644 --- a/java/res/values-pt-rPT/strings-config-important-notice.xml +++ b/java/res/values-pt-rPT/strings-config-important-notice.xml @@ -20,9 +20,5 @@ <resources xmlns:android="http://schemas.android.com/apk/res/android" xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> - <string-array name="important_notice_title_array"> - </string-array> - <string-array name="important_notice_contents_array"> - </string-array> <string name="use_personalized_dicts_summary" msgid="590432261305469627">"Aprender com comunicações e dados introd. para melhorar sugestões"</string> </resources> diff --git a/java/res/values-pt/strings-config-important-notice.xml b/java/res/values-pt/strings-config-important-notice.xml index 05fe4d126..86af5ff6d 100644 --- a/java/res/values-pt/strings-config-important-notice.xml +++ b/java/res/values-pt/strings-config-important-notice.xml @@ -20,9 +20,5 @@ <resources xmlns:android="http://schemas.android.com/apk/res/android" xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> - <string-array name="important_notice_title_array"> - </string-array> - <string-array name="important_notice_contents_array"> - </string-array> <string name="use_personalized_dicts_summary" msgid="590432261305469627">"Aprender com mensagens e dados digitados para melhorar sugestões"</string> </resources> diff --git a/java/res/values-ro/strings-config-important-notice.xml b/java/res/values-ro/strings-config-important-notice.xml index 2de8dde45..f481e8972 100644 --- a/java/res/values-ro/strings-config-important-notice.xml +++ b/java/res/values-ro/strings-config-important-notice.xml @@ -20,9 +20,5 @@ <resources xmlns:android="http://schemas.android.com/apk/res/android" xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> - <string-array name="important_notice_title_array"> - </string-array> - <string-array name="important_notice_contents_array"> - </string-array> <string name="use_personalized_dicts_summary" msgid="590432261305469627">"Utilizează mesajele și datele introduse pt. a îmbunătăți sugestiile"</string> </resources> diff --git a/java/res/values-ru/strings-config-important-notice.xml b/java/res/values-ru/strings-config-important-notice.xml index 33828047c..5e6999c1f 100644 --- a/java/res/values-ru/strings-config-important-notice.xml +++ b/java/res/values-ru/strings-config-important-notice.xml @@ -20,9 +20,5 @@ <resources xmlns:android="http://schemas.android.com/apk/res/android" xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> - <string-array name="important_notice_title_array"> - </string-array> - <string-array name="important_notice_contents_array"> - </string-array> <string name="use_personalized_dicts_summary" msgid="590432261305469627">"Устройство будет запоминать то, что вы вводите чаще всего"</string> </resources> diff --git a/java/res/values-sk/strings-config-important-notice.xml b/java/res/values-sk/strings-config-important-notice.xml index 4adb406c0..9b15ac992 100644 --- a/java/res/values-sk/strings-config-important-notice.xml +++ b/java/res/values-sk/strings-config-important-notice.xml @@ -20,9 +20,5 @@ <resources xmlns:android="http://schemas.android.com/apk/res/android" xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> - <string-array name="important_notice_title_array"> - </string-array> - <string-array name="important_notice_contents_array"> - </string-array> <string name="use_personalized_dicts_summary" msgid="590432261305469627">"Zlepšovať návrhy na základe komunikácie a zadaných údajov"</string> </resources> diff --git a/java/res/values-sl/strings-config-important-notice.xml b/java/res/values-sl/strings-config-important-notice.xml index 29c5351a4..d5bed6fd8 100644 --- a/java/res/values-sl/strings-config-important-notice.xml +++ b/java/res/values-sl/strings-config-important-notice.xml @@ -20,9 +20,5 @@ <resources xmlns:android="http://schemas.android.com/apk/res/android" xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> - <string-array name="important_notice_title_array"> - </string-array> - <string-array name="important_notice_contents_array"> - </string-array> <string name="use_personalized_dicts_summary" msgid="590432261305469627">"Vaša sporočila in vnesene podatke uporabi za boljše predloge"</string> </resources> diff --git a/java/res/values-sr/strings-config-important-notice.xml b/java/res/values-sr/strings-config-important-notice.xml index e226a06ee..943135cfd 100644 --- a/java/res/values-sr/strings-config-important-notice.xml +++ b/java/res/values-sr/strings-config-important-notice.xml @@ -20,9 +20,5 @@ <resources xmlns:android="http://schemas.android.com/apk/res/android" xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> - <string-array name="important_notice_title_array"> - </string-array> - <string-array name="important_notice_contents_array"> - </string-array> <string name="use_personalized_dicts_summary" msgid="590432261305469627">"Користи комуникације и унете податке ради побољшања предлога"</string> </resources> diff --git a/java/res/values-sv/strings-config-important-notice.xml b/java/res/values-sv/strings-config-important-notice.xml index d484d6766..9b9b92e46 100644 --- a/java/res/values-sv/strings-config-important-notice.xml +++ b/java/res/values-sv/strings-config-important-notice.xml @@ -20,9 +20,5 @@ <resources xmlns:android="http://schemas.android.com/apk/res/android" xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> - <string-array name="important_notice_title_array"> - </string-array> - <string-array name="important_notice_contents_array"> - </string-array> <string name="use_personalized_dicts_summary" msgid="590432261305469627">"Få bättre förslag genom att använda tidigare angiven data och annan kommunikation"</string> </resources> diff --git a/java/res/values-sw/strings-config-important-notice.xml b/java/res/values-sw/strings-config-important-notice.xml index 8a74bdd8c..7b10085b5 100644 --- a/java/res/values-sw/strings-config-important-notice.xml +++ b/java/res/values-sw/strings-config-important-notice.xml @@ -20,9 +20,5 @@ <resources xmlns:android="http://schemas.android.com/apk/res/android" xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> - <string-array name="important_notice_title_array"> - </string-array> - <string-array name="important_notice_contents_array"> - </string-array> <string name="use_personalized_dicts_summary" msgid="590432261305469627">"Jifunze kutoka kwenye mawasiliano yako na data iliyocharazwa ili kuboresha mapendekezo"</string> </resources> diff --git a/java/res/values-th/strings-config-important-notice.xml b/java/res/values-th/strings-config-important-notice.xml index e156d5f23..3f0b6034a 100644 --- a/java/res/values-th/strings-config-important-notice.xml +++ b/java/res/values-th/strings-config-important-notice.xml @@ -20,9 +20,5 @@ <resources xmlns:android="http://schemas.android.com/apk/res/android" xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> - <string-array name="important_notice_title_array"> - </string-array> - <string-array name="important_notice_contents_array"> - </string-array> <string name="use_personalized_dicts_summary" msgid="590432261305469627">"เรียนรู้จากการสื่อสารและข้อมูลที่พิมพ์ของคุณเพื่อปรับปรุงคำแนะนำ"</string> </resources> diff --git a/java/res/values-tl/strings-config-important-notice.xml b/java/res/values-tl/strings-config-important-notice.xml index 5e0c0b32a..d8dd9194a 100644 --- a/java/res/values-tl/strings-config-important-notice.xml +++ b/java/res/values-tl/strings-config-important-notice.xml @@ -20,9 +20,5 @@ <resources xmlns:android="http://schemas.android.com/apk/res/android" xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> - <string-array name="important_notice_title_array"> - </string-array> - <string-array name="important_notice_contents_array"> - </string-array> <string name="use_personalized_dicts_summary" msgid="590432261305469627">"Pahusayin ang suhestiyon batay sa iyong pag-uusap at na-type na data"</string> </resources> diff --git a/java/res/values-tr/strings-config-important-notice.xml b/java/res/values-tr/strings-config-important-notice.xml index 28e333d46..7d9f6ab12 100644 --- a/java/res/values-tr/strings-config-important-notice.xml +++ b/java/res/values-tr/strings-config-important-notice.xml @@ -20,9 +20,5 @@ <resources xmlns:android="http://schemas.android.com/apk/res/android" xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> - <string-array name="important_notice_title_array"> - </string-array> - <string-array name="important_notice_contents_array"> - </string-array> <string name="use_personalized_dicts_summary" msgid="590432261305469627">"Önerileri iyileştirmek için iletşmlrmdn. ve yazılan verilerden öğren"</string> </resources> diff --git a/java/res/values-uk/strings-config-important-notice.xml b/java/res/values-uk/strings-config-important-notice.xml index 6172b34e6..b95b72cd4 100644 --- a/java/res/values-uk/strings-config-important-notice.xml +++ b/java/res/values-uk/strings-config-important-notice.xml @@ -20,9 +20,5 @@ <resources xmlns:android="http://schemas.android.com/apk/res/android" xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> - <string-array name="important_notice_title_array"> - </string-array> - <string-array name="important_notice_contents_array"> - </string-array> <string name="use_personalized_dicts_summary" msgid="590432261305469627">"Пристрій буде запам’ятовувати, що ви пишете, надсилаєте й отримуєте"</string> </resources> diff --git a/java/res/values-vi/strings-config-important-notice.xml b/java/res/values-vi/strings-config-important-notice.xml index b753e18f4..828f0b603 100644 --- a/java/res/values-vi/strings-config-important-notice.xml +++ b/java/res/values-vi/strings-config-important-notice.xml @@ -20,9 +20,5 @@ <resources xmlns:android="http://schemas.android.com/apk/res/android" xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> - <string-array name="important_notice_title_array"> - </string-array> - <string-array name="important_notice_contents_array"> - </string-array> <string name="use_personalized_dicts_summary" msgid="590432261305469627">"Tìm hiểu từ thư từ trao đổi và dữ liệu đã nhập của bạn để cải tiến đề xuất"</string> </resources> diff --git a/java/res/values-zh-rCN/strings-config-important-notice.xml b/java/res/values-zh-rCN/strings-config-important-notice.xml index 2394e31a8..6013af78d 100644 --- a/java/res/values-zh-rCN/strings-config-important-notice.xml +++ b/java/res/values-zh-rCN/strings-config-important-notice.xml @@ -20,9 +20,5 @@ <resources xmlns:android="http://schemas.android.com/apk/res/android" xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> - <string-array name="important_notice_title_array"> - </string-array> - <string-array name="important_notice_contents_array"> - </string-array> <string name="use_personalized_dicts_summary" msgid="590432261305469627">"根据您的通信记录和以往输入的数据来完善建议"</string> </resources> diff --git a/java/res/values-zh-rHK/strings-config-important-notice.xml b/java/res/values-zh-rHK/strings-config-important-notice.xml index 3784c7667..a21b24388 100644 --- a/java/res/values-zh-rHK/strings-config-important-notice.xml +++ b/java/res/values-zh-rHK/strings-config-important-notice.xml @@ -20,9 +20,5 @@ <resources xmlns:android="http://schemas.android.com/apk/res/android" xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> - <string-array name="important_notice_title_array"> - </string-array> - <string-array name="important_notice_contents_array"> - </string-array> <string name="use_personalized_dicts_summary" msgid="590432261305469627">"根據您的通訊記錄和已輸入的資料改善建議"</string> </resources> diff --git a/java/res/values-zh-rTW/strings-config-important-notice.xml b/java/res/values-zh-rTW/strings-config-important-notice.xml index 692d61cb3..dfffa69cf 100644 --- a/java/res/values-zh-rTW/strings-config-important-notice.xml +++ b/java/res/values-zh-rTW/strings-config-important-notice.xml @@ -20,9 +20,5 @@ <resources xmlns:android="http://schemas.android.com/apk/res/android" xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> - <string-array name="important_notice_title_array"> - </string-array> - <string-array name="important_notice_contents_array"> - </string-array> <string name="use_personalized_dicts_summary" msgid="590432261305469627">"根據您的通訊紀錄和以往輸入的資料改善建議項目"</string> </resources> diff --git a/java/res/values-zu/strings-config-important-notice.xml b/java/res/values-zu/strings-config-important-notice.xml index 245b05690..0d352006c 100644 --- a/java/res/values-zu/strings-config-important-notice.xml +++ b/java/res/values-zu/strings-config-important-notice.xml @@ -20,9 +20,5 @@ <resources xmlns:android="http://schemas.android.com/apk/res/android" xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> - <string-array name="important_notice_title_array"> - </string-array> - <string-array name="important_notice_contents_array"> - </string-array> <string name="use_personalized_dicts_summary" msgid="590432261305469627">"Funda kusukela kwezokuxhumana zakho nedatha ethayiphiwe ukuze uthuthukise iziphakamiso"</string> </resources> diff --git a/java/res/values/donottranslate-config-important-notice.xml b/java/res/values/donottranslate-config-important-notice.xml new file mode 100644 index 000000000..7c6527c28 --- /dev/null +++ b/java/res/values/donottranslate-config-important-notice.xml @@ -0,0 +1,30 @@ +<?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> + <!-- The array of the text of the important notices displayed on the suggestion strip. --> + <string-array name="important_notice_title_array" translatable="false"> + <!-- empty --> + </string-array> + <!-- The array of the contents of the important notices. --> + <string-array name="important_notice_contents_array" translatable="false"> + <!-- empty --> + </string-array> +</resources> diff --git a/java/res/values/strings-config-important-notice.xml b/java/res/values/strings-config-important-notice.xml index f2229bec4..aa3cd109c 100644 --- a/java/res/values/strings-config-important-notice.xml +++ b/java/res/values/strings-config-important-notice.xml @@ -20,14 +20,6 @@ <resources> <integer name="config_important_notice_version">0</integer> - <!-- The array of the text of the important notices displayed on the suggestion strip. --> - <string-array name="important_notice_title_array"> - <!-- empty --> - </string-array> - <!-- The array of the contents of the important notices. --> - <string-array name="important_notice_contents_array"> - <!-- empty --> - </string-array> <!-- Description for option enabling the use by the keyboards of sent/received messages, e-mail and typing history to improve suggestion accuracy [CHAR LIMIT=68] --> <string name="use_personalized_dicts_summary">Learn from your communications and typed data to improve suggestions</string> </resources> diff --git a/java/src/com/android/inputmethod/keyboard/internal/KeyboardTextsTable.java b/java/src/com/android/inputmethod/keyboard/internal/KeyboardTextsTable.java index cace069c4..387ed3945 100644 --- a/java/src/com/android/inputmethod/keyboard/internal/KeyboardTextsTable.java +++ b/java/src/com/android/inputmethod/keyboard/internal/KeyboardTextsTable.java @@ -101,10 +101,10 @@ public final class KeyboardTextsTable { /* 19: 9 */ "keylabel_for_currency", /* 20: 8 */ "more_keys_for_r", /* 21: 6 */ "more_keys_for_k", - /* 22: 6 */ "keylabel_for_nordic_row1_11", - /* 23: 6 */ "keylabel_for_nordic_row2_10", - /* 24: 6 */ "keylabel_for_nordic_row2_11", - /* 25: 6 */ "more_keys_for_cyrillic_ie", + /* 22: 6 */ "more_keys_for_cyrillic_ie", + /* 23: 5 */ "keylabel_for_nordic_row1_11", + /* 24: 5 */ "keylabel_for_nordic_row2_10", + /* 25: 5 */ "keylabel_for_nordic_row2_11", /* 26: 5 */ "more_keys_for_nordic_row2_10", /* 27: 5 */ "keylabel_for_east_slavic_row1_9", /* 28: 5 */ "keylabel_for_east_slavic_row2_2", @@ -714,11 +714,13 @@ public final class KeyboardTextsTable { // U+0412: "В" CYRILLIC CAPITAL LETTER VE /* label_to_alpha_key */ "\u0410\u0411\u0412", /* more_keys_for_y ~ */ - null, null, null, null, null, null, null, null, null, null, null, null, null, null, - /* ~ keylabel_for_nordic_row2_11 */ + null, null, null, null, null, null, null, null, null, null, null, + /* ~ more_keys_for_k */ // U+0451: "ё" CYRILLIC SMALL LETTER IO /* more_keys_for_cyrillic_ie */ "\u0451", - /* more_keys_for_nordic_row2_10 */ null, + /* keylabel_for_nordic_row1_11 ~ */ + null, null, null, null, + /* ~ more_keys_for_nordic_row2_10 */ // U+045E: "ў" CYRILLIC SMALL LETTER SHORT U /* keylabel_for_east_slavic_row1_9 */ "\u045E", // U+044B: "ы" CYRILLIC SMALL LETTER YERU @@ -959,15 +961,14 @@ public final class KeyboardTextsTable { /* single_angle_quotes */ "!text/single_raqm_laqm", /* double_angle_quotes */ "!text/double_raqm_laqm", /* keylabel_for_currency ~ */ - null, null, null, - /* ~ more_keys_for_k */ + null, null, null, null, + /* ~ more_keys_for_cyrillic_ie */ // U+00E5: "å" LATIN SMALL LETTER A WITH RING ABOVE /* keylabel_for_nordic_row1_11 */ "\u00E5", // U+00E6: "æ" LATIN SMALL LETTER AE /* keylabel_for_nordic_row2_10 */ "\u00E6", // U+00F8: "ø" LATIN SMALL LETTER O WITH STROKE /* keylabel_for_nordic_row2_11 */ "\u00F8", - /* more_keys_for_cyrillic_ie */ null, // U+00E4: "ä" LATIN SMALL LETTER A WITH DIAERESIS /* more_keys_for_nordic_row2_10 */ "\u00E4", /* keylabel_for_east_slavic_row1_9 ~ */ @@ -1220,7 +1221,7 @@ public final class KeyboardTextsTable { // U+0137: "ķ" LATIN SMALL LETTER K WITH CEDILLA // U+0138: "ĸ" LATIN SMALL LETTER KRA /* more_keys_for_k */ "\u0137,\u0138", - /* keylabel_for_nordic_row1_11 ~ */ + /* more_keys_for_cyrillic_ie ~ */ null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, @@ -1382,8 +1383,7 @@ public final class KeyboardTextsTable { // 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 - /* more_keys_for_n */ "\u0146,\u00F1,\u0144,\u0144", + /* more_keys_for_n */ "\u0146,\u00F1,\u0144", /* label_to_alpha_key */ null, // U+00FD: "ý" LATIN SMALL LETTER Y WITH ACUTE // U+00FF: "ÿ" LATIN SMALL LETTER Y WITH DIAERESIS @@ -1414,13 +1414,13 @@ public final class KeyboardTextsTable { /* more_keys_for_r */ "\u0157,\u0159,\u0155", // U+0137: "ķ" LATIN SMALL LETTER K WITH CEDILLA /* more_keys_for_k */ "\u0137", + /* more_keys_for_cyrillic_ie */ null, // U+00FC: "ü" LATIN SMALL LETTER U WITH DIAERESIS /* keylabel_for_nordic_row1_11 */ "\u00FC", // U+00F6: "ö" LATIN SMALL LETTER O WITH DIAERESIS /* keylabel_for_nordic_row2_10 */ "\u00F6", // U+00E4: "ä" LATIN SMALL LETTER A WITH DIAERESIS /* keylabel_for_nordic_row2_11 */ "\u00E4", - /* more_keys_for_cyrillic_ie */ null, // U+00F5: "õ" LATIN SMALL LETTER O WITH TILDE /* more_keys_for_nordic_row2_10 */ "\u00F5", }; @@ -1605,15 +1605,14 @@ public final class KeyboardTextsTable { // U+017C: "ż" LATIN SMALL LETTER Z WITH DOT ABOVE /* more_keys_for_z */ "\u017E,\u017A,\u017C", /* more_keys_for_t ~ */ - null, null, null, null, null, null, null, null, - /* ~ more_keys_for_k */ + null, null, null, null, null, null, null, null, null, + /* ~ more_keys_for_cyrillic_ie */ // U+00E5: "å" LATIN SMALL LETTER A WITH RING ABOVE /* keylabel_for_nordic_row1_11 */ "\u00E5", // U+00F6: "ö" LATIN SMALL LETTER O WITH DIAERESIS /* keylabel_for_nordic_row2_10 */ "\u00F6", // U+00E4: "ä" LATIN SMALL LETTER A WITH DIAERESIS /* keylabel_for_nordic_row2_11 */ "\u00E4", - /* more_keys_for_cyrillic_ie */ null, // U+00F8: "ø" LATIN SMALL LETTER O WITH STROKE /* more_keys_for_nordic_row2_10 */ "\u00F8", /* keylabel_for_east_slavic_row1_9 ~ */ @@ -1943,15 +1942,6 @@ public final class KeyboardTextsTable { /* more_keys_for_z */ null, // U+00FE: "þ" LATIN SMALL LETTER THORN /* more_keys_for_t */ "\u00FE", - /* more_keys_for_l ~ */ - null, null, null, null, null, null, null, - /* ~ more_keys_for_k */ - // U+00F0: "ð" LATIN SMALL LETTER ETH - /* keylabel_for_nordic_row1_11 */ "\u00F0", - // U+00E6: "æ" LATIN SMALL LETTER AE - /* keylabel_for_nordic_row2_10 */ "\u00E6", - // U+00FE: "þ" LATIN SMALL LETTER THORN - /* keylabel_for_nordic_row2_11 */ "\u00FE", }; /* Language it: Italian */ @@ -2086,11 +2076,13 @@ public final class KeyboardTextsTable { // U+0412: "В" CYRILLIC CAPITAL LETTER VE /* label_to_alpha_key */ "\u0410\u0411\u0412", /* more_keys_for_y ~ */ - null, null, null, null, null, null, null, null, null, null, null, null, null, null, - /* ~ keylabel_for_nordic_row2_11 */ + null, null, null, null, null, null, null, null, null, null, null, + /* ~ more_keys_for_k */ // U+0451: "ё" CYRILLIC SMALL LETTER IO /* more_keys_for_cyrillic_ie */ "\u0451", - /* more_keys_for_nordic_row2_10 */ null, + /* keylabel_for_nordic_row1_11 ~ */ + null, null, null, null, + /* ~ more_keys_for_nordic_row2_10 */ // U+0449: "щ" CYRILLIC SMALL LETTER SHCHA /* keylabel_for_east_slavic_row1_9 */ "\u0449", // U+044B: "ы" CYRILLIC SMALL LETTER YERU @@ -2163,11 +2155,13 @@ public final class KeyboardTextsTable { // U+0412: "В" CYRILLIC CAPITAL LETTER VE /* label_to_alpha_key */ "\u0410\u0411\u0412", /* more_keys_for_y ~ */ - null, null, null, null, null, null, null, null, null, null, null, null, null, null, - /* ~ keylabel_for_nordic_row2_11 */ + null, null, null, null, null, null, null, null, null, null, null, + /* ~ more_keys_for_k */ // U+0451: "ё" CYRILLIC SMALL LETTER IO /* more_keys_for_cyrillic_ie */ "\u0451", - /* more_keys_for_nordic_row2_10 */ null, + /* keylabel_for_nordic_row1_11 ~ */ + null, null, null, null, + /* ~ more_keys_for_nordic_row2_10 */ // U+0449: "щ" CYRILLIC SMALL LETTER SHCHA /* keylabel_for_east_slavic_row1_9 */ "\u0449", // U+044B: "ы" CYRILLIC SMALL LETTER YERU @@ -2272,8 +2266,7 @@ public final class KeyboardTextsTable { // 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 - /* more_keys_for_n */ "\u0146,\u00F1,\u0144,\u0144", + /* more_keys_for_n */ "\u0146,\u00F1,\u0144", /* label_to_alpha_key */ null, // U+00FD: "ý" LATIN SMALL LETTER Y WITH ACUTE // U+00FF: "ÿ" LATIN SMALL LETTER Y WITH DIAERESIS @@ -2367,8 +2360,7 @@ public final class KeyboardTextsTable { // 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 - /* more_keys_for_n */ "\u0146,\u00F1,\u0144,\u0144", + /* more_keys_for_n */ "\u0146,\u00F1,\u0144", /* label_to_alpha_key */ null, // U+00FD: "ý" LATIN SMALL LETTER Y WITH ACUTE // U+00FF: "ÿ" LATIN SMALL LETTER Y WITH DIAERESIS @@ -2417,15 +2409,15 @@ public final class KeyboardTextsTable { // U+0412: "В" CYRILLIC CAPITAL LETTER VE /* label_to_alpha_key */ "\u0410\u0411\u0412", /* more_keys_for_y ~ */ - null, null, null, null, null, null, null, null, null, null, null, null, null, null, - /* ~ keylabel_for_nordic_row2_11 */ + null, null, null, null, null, null, null, null, null, null, null, + /* ~ more_keys_for_k */ // U+0450: "ѐ" CYRILLIC SMALL LETTER IE WITH GRAVE /* more_keys_for_cyrillic_ie */ "\u0450", - /* more_keys_for_nordic_row2_10 ~ */ + /* keylabel_for_nordic_row1_11 ~ */ null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, - null, null, null, null, null, null, null, null, null, null, + null, null, null, null, null, null, null, null, null, null, null, null, null, /* ~ more_keys_for_cyrillic_o */ // U+0455: "ѕ" CYRILLIC SMALL LETTER DZE /* keylabel_for_south_slavic_row1_6 */ "\u0455", @@ -2492,14 +2484,14 @@ public final class KeyboardTextsTable { /* single_quotes */ "!text/single_9qm_rqm", /* more_keys_for_c ~ */ null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, - /* ~ more_keys_for_k */ + null, + /* ~ more_keys_for_cyrillic_ie */ // U+00E5: "å" LATIN SMALL LETTER A WITH RING ABOVE /* keylabel_for_nordic_row1_11 */ "\u00E5", // U+00F8: "ø" LATIN SMALL LETTER O WITH STROKE /* keylabel_for_nordic_row2_10 */ "\u00F8", // U+00E6: "æ" LATIN SMALL LETTER AE /* keylabel_for_nordic_row2_11 */ "\u00E6", - /* more_keys_for_cyrillic_ie */ null, // U+00F6: "ö" LATIN SMALL LETTER O WITH DIAERESIS /* more_keys_for_nordic_row2_10 */ "\u00F6", /* keylabel_for_east_slavic_row1_9 ~ */ @@ -2790,11 +2782,13 @@ public final class KeyboardTextsTable { // U+0412: "В" CYRILLIC CAPITAL LETTER VE /* label_to_alpha_key */ "\u0410\u0411\u0412", /* more_keys_for_y ~ */ - null, null, null, null, null, null, null, null, null, null, null, null, null, null, - /* ~ keylabel_for_nordic_row2_11 */ + null, null, null, null, null, null, null, null, null, null, null, + /* ~ more_keys_for_k */ // U+0451: "ё" CYRILLIC SMALL LETTER IO /* more_keys_for_cyrillic_ie */ "\u0451", - /* more_keys_for_nordic_row2_10 */ null, + /* keylabel_for_nordic_row1_11 ~ */ + null, null, null, null, + /* ~ more_keys_for_nordic_row2_10 */ // U+0449: "щ" CYRILLIC SMALL LETTER SHCHA /* keylabel_for_east_slavic_row1_9 */ "\u0449", // U+044B: "ы" CYRILLIC SMALL LETTER YERU @@ -2869,8 +2863,7 @@ public final class KeyboardTextsTable { // 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 - /* more_keys_for_n */ "\u0148,\u0146,\u00F1,\u0144,\u0144", + /* more_keys_for_n */ "\u0148,\u0146,\u00F1,\u0144", /* label_to_alpha_key */ null, // U+00FD: "ý" LATIN SMALL LETTER Y WITH ACUTE // U+00FF: "ÿ" LATIN SMALL LETTER Y WITH DIAERESIS @@ -2951,15 +2944,15 @@ public final class KeyboardTextsTable { /* single_angle_quotes */ "!text/single_raqm_laqm", /* double_angle_quotes */ "!text/double_raqm_laqm", /* keylabel_for_currency ~ */ - null, null, null, null, null, null, - /* ~ keylabel_for_nordic_row2_11 */ + null, null, null, + /* ~ more_keys_for_k */ // U+0450: "ѐ" CYRILLIC SMALL LETTER IE WITH GRAVE /* more_keys_for_cyrillic_ie */ "\u0450", - /* more_keys_for_nordic_row2_10 ~ */ + /* keylabel_for_nordic_row1_11 ~ */ null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, - null, null, null, null, null, null, null, null, null, null, + null, null, null, null, null, null, null, null, null, null, null, null, null, /* ~ more_keys_for_cyrillic_o */ // TODO: Move these to sr-Latn once we can handle IETF language tag with script name specified. // BEGIN: More keys definitions for Serbian (Latin) @@ -3040,8 +3033,7 @@ public final class KeyboardTextsTable { /* label_to_alpha_key */ null, // U+00FD: "ý" LATIN SMALL LETTER Y WITH ACUTE // U+00FF: "ÿ" LATIN SMALL LETTER Y WITH DIAERESIS - // U+00FC: "ü" LATIN SMALL LETTER U WITH DIAERESIS - /* more_keys_for_y */ "\u00FD,\u00FF,\u00FC", + /* more_keys_for_y */ "\u00FD,\u00FF", // U+00F0: "ð" LATIN SMALL LETTER ETH // U+010F: "ď" LATIN SMALL LETTER D WITH CARON /* more_keys_for_d */ "\u00F0,\u010F", @@ -3061,13 +3053,13 @@ public final class KeyboardTextsTable { // U+0159: "ř" LATIN SMALL LETTER R WITH CARON /* more_keys_for_r */ "\u0159", /* more_keys_for_k */ null, + /* more_keys_for_cyrillic_ie */ null, // U+00E5: "å" LATIN SMALL LETTER A WITH RING ABOVE /* keylabel_for_nordic_row1_11 */ "\u00E5", // U+00F6: "ö" LATIN SMALL LETTER O WITH DIAERESIS /* keylabel_for_nordic_row2_10 */ "\u00F6", // U+00E4: "ä" LATIN SMALL LETTER A WITH DIAERESIS /* keylabel_for_nordic_row2_11 */ "\u00E4", - /* more_keys_for_cyrillic_ie */ null, // U+00F8: "ø" LATIN SMALL LETTER O WITH STROKE // U+0153: "œ" LATIN SMALL LIGATURE OE /* more_keys_for_nordic_row2_10 */ "\u00F8,\u0153", @@ -3443,7 +3435,7 @@ public final class KeyboardTextsTable { // U+0103: "ă" LATIN SMALL LETTER A WITH BREVE // U+0105: "ą" LATIN SMALL LETTER A WITH OGONEK // U+00AA: "ª" FEMININE ORDINAL INDICATOR - /* more_keys_for_a */ "\u00E0,\u00E1,\u00E2,\u00E3,\u00E4,\u00E5,\u00E6,\u00E3,\u00E5,\u0101,\u0103,\u0105,\u00AA", + /* more_keys_for_a */ "\u00E0,\u00E1,\u00E2,\u00E3,\u00E4,\u00E5,\u00E6,\u0101,\u0103,\u0105,\u00AA", // U+00F2: "ò" LATIN SMALL LETTER O WITH GRAVE // U+00F3: "ó" LATIN SMALL LETTER O WITH ACUTE // U+00F4: "ô" LATIN SMALL LETTER O WITH CIRCUMFLEX @@ -3550,7 +3542,7 @@ public final class KeyboardTextsTable { // U+0137: "ķ" LATIN SMALL LETTER K WITH CEDILLA // U+0138: "ĸ" LATIN SMALL LETTER KRA /* more_keys_for_k */ "\u0137,\u0138", - /* keylabel_for_nordic_row1_11 ~ */ + /* more_keys_for_cyrillic_ie ~ */ null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, @@ -3595,7 +3587,7 @@ public final class KeyboardTextsTable { "hr", LANGUAGE_hr, /* 9/ 19 Croatian */ "hu", LANGUAGE_hu, /* 9/ 19 Hungarian */ "hy", LANGUAGE_hy_AM, /* 8/122 Armenian (Armenia) */ - "is", LANGUAGE_is, /* 13/ 25 Icelandic */ + "is", LANGUAGE_is, /* 10/ 15 Icelandic */ "it", LANGUAGE_it, /* 5/ 5 Italian */ "iw", LANGUAGE_iw, /* 20/117 Hebrew */ "ka", LANGUAGE_ka_GE, /* 3/ 11 Georgian (Georgia) */ diff --git a/java/src/com/android/inputmethod/latin/BinaryDictionary.java b/java/src/com/android/inputmethod/latin/BinaryDictionary.java index f659b3f79..544fd0319 100644 --- a/java/src/com/android/inputmethod/latin/BinaryDictionary.java +++ b/java/src/com/android/inputmethod/latin/BinaryDictionary.java @@ -25,7 +25,7 @@ import com.android.inputmethod.keyboard.ProximityInfo; import com.android.inputmethod.latin.SuggestedWords.SuggestedWordInfo; import com.android.inputmethod.latin.makedict.DictionaryHeader; import com.android.inputmethod.latin.makedict.FormatSpec; -import com.android.inputmethod.latin.makedict.FusionDictionary.DictionaryOptions; +import com.android.inputmethod.latin.makedict.FormatSpec.DictionaryOptions; import com.android.inputmethod.latin.makedict.UnsupportedFormatException; import com.android.inputmethod.latin.makedict.WordProperty; import com.android.inputmethod.latin.personalization.PersonalizationHelper; diff --git a/java/src/com/android/inputmethod/latin/makedict/DictionaryHeader.java b/java/src/com/android/inputmethod/latin/makedict/DictionaryHeader.java index b32eb9195..df447fd75 100644 --- a/java/src/com/android/inputmethod/latin/makedict/DictionaryHeader.java +++ b/java/src/com/android/inputmethod/latin/makedict/DictionaryHeader.java @@ -16,8 +16,8 @@ package com.android.inputmethod.latin.makedict; +import com.android.inputmethod.latin.makedict.FormatSpec.DictionaryOptions; import com.android.inputmethod.latin.makedict.FormatSpec.FormatOptions; -import com.android.inputmethod.latin.makedict.FusionDictionary.DictionaryOptions; /** * Class representing dictionary header. diff --git a/java/src/com/android/inputmethod/latin/makedict/FormatSpec.java b/java/src/com/android/inputmethod/latin/makedict/FormatSpec.java index 484bb4b23..07217e48e 100644 --- a/java/src/com/android/inputmethod/latin/makedict/FormatSpec.java +++ b/java/src/com/android/inputmethod/latin/makedict/FormatSpec.java @@ -21,6 +21,8 @@ import com.android.inputmethod.latin.Constants; import com.android.inputmethod.latin.makedict.DictDecoder.DictionaryBufferFactory; import java.io.File; +import java.util.Date; +import java.util.HashMap; /** * Dictionary File Format Specification. @@ -323,6 +325,45 @@ public final class FormatSpec { } /** + * Options global to the dictionary. + */ + public static final class DictionaryOptions { + public final HashMap<String, String> mAttributes; + public DictionaryOptions(final HashMap<String, String> attributes) { + mAttributes = attributes; + } + @Override + public String toString() { // Convenience method + return toString(0, false); + } + public String toString(final int indentCount, final boolean plumbing) { + final StringBuilder indent = new StringBuilder(); + if (plumbing) { + indent.append("H:"); + } else { + for (int i = 0; i < indentCount; ++i) { + indent.append(" "); + } + } + final StringBuilder s = new StringBuilder(); + for (final String optionKey : mAttributes.keySet()) { + s.append(indent); + s.append(optionKey); + s.append(" = "); + if ("date".equals(optionKey) && !plumbing) { + // Date needs a number of milliseconds, but the dictionary contains seconds + s.append(new Date( + 1000 * Long.parseLong(mAttributes.get(optionKey))).toString()); + } else { + s.append(mAttributes.get(optionKey)); + } + s.append("\n"); + } + return s.toString(); + } + } + + /** * Returns new dictionary decoder. * * @param dictFile the dictionary file. diff --git a/java/src/com/android/inputmethod/latin/makedict/FusionDictionary.java b/java/src/com/android/inputmethod/latin/makedict/FusionDictionary.java index e2be907ff..f60b3af4f 100644 --- a/java/src/com/android/inputmethod/latin/makedict/FusionDictionary.java +++ b/java/src/com/android/inputmethod/latin/makedict/FusionDictionary.java @@ -18,12 +18,11 @@ package com.android.inputmethod.latin.makedict; import com.android.inputmethod.annotations.UsedForTesting; import com.android.inputmethod.latin.Constants; +import com.android.inputmethod.latin.makedict.FormatSpec.DictionaryOptions; import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; -import java.util.Date; -import java.util.HashMap; import java.util.Iterator; import java.util.LinkedList; @@ -280,45 +279,6 @@ public final class FusionDictionary implements Iterable<WordProperty> { } } - /** - * Options global to the dictionary. - */ - public static final class DictionaryOptions { - public final HashMap<String, String> mAttributes; - public DictionaryOptions(final HashMap<String, String> attributes) { - mAttributes = attributes; - } - @Override - public String toString() { // Convenience method - return toString(0, false); - } - public String toString(final int indentCount, final boolean plumbing) { - final StringBuilder indent = new StringBuilder(); - if (plumbing) { - indent.append("H:"); - } else { - for (int i = 0; i < indentCount; ++i) { - indent.append(" "); - } - } - final StringBuilder s = new StringBuilder(); - for (final String optionKey : mAttributes.keySet()) { - s.append(indent); - s.append(optionKey); - s.append(" = "); - if ("date".equals(optionKey) && !plumbing) { - // Date needs a number of milliseconds, but the dictionary contains seconds - s.append(new Date( - 1000 * Long.parseLong(mAttributes.get(optionKey))).toString()); - } else { - s.append(mAttributes.get(optionKey)); - } - s.append("\n"); - } - return s.toString(); - } - } - public final DictionaryOptions mOptions; public final PtNodeArray mRootNodeArray; diff --git a/native/jni/src/suggest/core/dicnode/dic_node.h b/native/jni/src/suggest/core/dicnode/dic_node.h index b812f8ff4..65dad5677 100644 --- a/native/jni/src/suggest/core/dicnode/dic_node.h +++ b/native/jni/src/suggest/core/dicnode/dic_node.h @@ -36,7 +36,7 @@ #define DUMP_WORD_AND_SCORE(header) \ do { char charBuf[50]; char prevWordCharBuf[50]; \ INTS_TO_CHARS(getOutputWordBuf(), getNodeCodePointCount(), charBuf, NELEMS(charBuf)); \ - INTS_TO_CHARS(mDicNodeState.mDicNodeStatePrevWord.mPrevWord, \ + INTS_TO_CHARS(mDicNodeState.mDicNodeStatePrevWord.getPrevWordBuf(), \ mDicNodeState.mDicNodeStatePrevWord.getPrevWordLength(), prevWordCharBuf, \ NELEMS(prevWordCharBuf)); \ AKLOGI("#%8s, %5f, %5f, %5f, %5f, %s, %s, %d, %5f,", header, \ @@ -97,7 +97,7 @@ class DicNode { DicNode(const DicNode &dicNode); DicNode &operator=(const DicNode &dicNode); - virtual ~DicNode() {} + ~DicNode() {} // Init for copy void initByCopy(const DicNode *const dicNode) { @@ -130,22 +130,9 @@ class DicNode { NOT_A_PROBABILITY /* probability */, false /* isTerminal */, true /* hasChildren */, false /* isBlacklistedOrNotAWord */, 0 /* depth */, 0 /* terminalDepth */); - // TODO: Move to dicNodeState? - mDicNodeState.mDicNodeStateOutput.init(); // reset for next word - mDicNodeState.mDicNodeStateInput.init( - &dicNode->mDicNodeState.mDicNodeStateInput, true /* resetTerminalDiffCost */); - mDicNodeState.mDicNodeStateScoring.init( - &dicNode->mDicNodeState.mDicNodeStateScoring); - mDicNodeState.mDicNodeStatePrevWord.init( - dicNode->mDicNodeState.mDicNodeStatePrevWord.getPrevWordCount() + 1, - dicNode->mDicNodeProperties.getProbability(), + mDicNodeState.initAsRootWithPreviousWord(&dicNode->mDicNodeState, dicNode->mDicNodeProperties.getPtNodePos(), - dicNode->mDicNodeState.mDicNodeStatePrevWord.mPrevWord, - dicNode->mDicNodeState.mDicNodeStatePrevWord.getPrevWordLength(), - dicNode->getOutputWordBuf(), - dicNode->mDicNodeProperties.getDepth(), - dicNode->mDicNodeState.mDicNodeStatePrevWord.getSecondWordFirstInputIndex(), - mDicNodeState.mDicNodeStateInput.getInputIndex(0) /* lastInputIndex */); + dicNode->mDicNodeProperties.getDepth()); PROF_NODE_COPY(&dicNode->mProfiler, mProfiler); } @@ -231,7 +218,7 @@ class DicNode { } bool isFirstCharUppercase() const { - const int c = getOutputWordBuf()[0]; + const int c = mDicNodeState.mDicNodeStateOutput.getCodePointAt(0); return CharUtils::isAsciiUpper(c); } @@ -326,7 +313,7 @@ class DicNode { void outputResult(int *dest) const { const uint16_t prevWordLength = mDicNodeState.mDicNodeStatePrevWord.getPrevWordLength(); const uint16_t currentDepth = getNodeCodePointCount(); - DicNodeUtils::appendTwoWords(mDicNodeState.mDicNodeStatePrevWord.mPrevWord, + DicNodeUtils::appendTwoWords(mDicNodeState.mDicNodeStatePrevWord.getPrevWordBuf(), prevWordLength, getOutputWordBuf(), currentDepth, dest); DUMP_WORD_AND_SCORE("OUTPUT"); } @@ -337,7 +324,7 @@ class DicNode { // are concatenated together in mPrevWord - which contains a space at the end. int getTotalNodeSpaceCount() const { if (isFirstWord()) return 0; - return CharUtils::getSpaceCount(mDicNodeState.mDicNodeStatePrevWord.mPrevWord, + return CharUtils::getSpaceCount(mDicNodeState.mDicNodeStatePrevWord.getPrevWordBuf(), mDicNodeState.mDicNodeStatePrevWord.getPrevWordLength()); } @@ -389,7 +376,7 @@ class DicNode { } AK_FORCE_INLINE const int *getOutputWordBuf() const { - return mDicNodeState.mDicNodeStateOutput.mCodePointsBuf; + return mDicNodeState.mDicNodeStateOutput.getCodePointBuf(); } int getPrevCodePointG(int pointerId) const { diff --git a/native/jni/src/suggest/core/dicnode/dic_node_utils.cpp b/native/jni/src/suggest/core/dicnode/dic_node_utils.cpp index a6ea68c29..48752f2cd 100644 --- a/native/jni/src/suggest/core/dicnode/dic_node_utils.cpp +++ b/native/jni/src/suggest/core/dicnode/dic_node_utils.cpp @@ -16,7 +16,6 @@ #include "suggest/core/dicnode/dic_node_utils.h" -#include <algorithm> #include <cstring> #include "suggest/core/dicnode/dic_node.h" diff --git a/native/jni/src/suggest/core/dicnode/dic_node_vector.h b/native/jni/src/suggest/core/dicnode/dic_node_vector.h index 9364e7751..cb28e57d8 100644 --- a/native/jni/src/suggest/core/dicnode/dic_node_vector.h +++ b/native/jni/src/suggest/core/dicnode/dic_node_vector.h @@ -32,10 +32,10 @@ class DicNodeVector { #else static const int DEFAULT_NODES_SIZE_FOR_OPTIMIZATION = 60; #endif - AK_FORCE_INLINE DicNodeVector() : mDicNodes(0), mLock(false), mEmptyNode() {} + AK_FORCE_INLINE DicNodeVector() : mDicNodes(), mLock(false) {} // Specify the capacity of the vector - AK_FORCE_INLINE DicNodeVector(const int size) : mDicNodes(0), mLock(false), mEmptyNode() { + AK_FORCE_INLINE DicNodeVector(const int size) : mDicNodes(), mLock(false) { mDicNodes.reserve(size); } @@ -52,13 +52,9 @@ class DicNodeVector { return static_cast<int>(mDicNodes.size()); } - bool exceeds(const size_t limit) const { - return mDicNodes.size() >= limit; - } - void pushPassingChild(DicNode *dicNode) { ASSERT(!mLock); - mDicNodes.push_back(mEmptyNode); + mDicNodes.emplace_back(); mDicNodes.back().initAsPassingChild(dicNode); } @@ -67,7 +63,7 @@ class DicNodeVector { const bool hasChildren, const bool isBlacklistedOrNotAWord, const uint16_t mergedNodeCodePointCount, const int *const mergedNodeCodePoints) { ASSERT(!mLock); - mDicNodes.push_back(mEmptyNode); + mDicNodes.emplace_back(); mDicNodes.back().initAsChild(dicNode, ptNodePos, childrenPtNodeArrayPos, probability, isTerminal, hasChildren, isBlacklistedOrNotAWord, mergedNodeCodePointCount, mergedNodeCodePoints); @@ -80,14 +76,13 @@ class DicNodeVector { DicNode *front() { ASSERT(1 <= static_cast<int>(mDicNodes.size())); - return &mDicNodes[0]; + return &mDicNodes.front(); } private: DISALLOW_COPY_AND_ASSIGN(DicNodeVector); std::vector<DicNode> mDicNodes; bool mLock; - DicNode mEmptyNode; }; } // namespace latinime #endif // LATINIME_DIC_NODE_VECTOR_H diff --git a/native/jni/src/suggest/core/dicnode/internal/dic_node_properties.h b/native/jni/src/suggest/core/dicnode/internal/dic_node_properties.h index c41a7243a..ab02e6192 100644 --- a/native/jni/src/suggest/core/dicnode/internal/dic_node_properties.h +++ b/native/jni/src/suggest/core/dicnode/internal/dic_node_properties.h @@ -33,7 +33,7 @@ class DicNodeProperties { mIsTerminal(false), mHasChildrenPtNodes(false), mIsBlacklistedOrNotAWord(false), mDepth(0), mLeavingDepth(0) {} - virtual ~DicNodeProperties() {} + ~DicNodeProperties() {} // Should be called only once per DicNode is initialized. void init(const int pos, const int childrenPos, const int nodeCodePoint, const int probability, diff --git a/native/jni/src/suggest/core/dicnode/internal/dic_node_state.h b/native/jni/src/suggest/core/dicnode/internal/dic_node_state.h index b0fddb724..a41667567 100644 --- a/native/jni/src/suggest/core/dicnode/internal/dic_node_state.h +++ b/native/jni/src/suggest/core/dicnode/internal/dic_node_state.h @@ -37,7 +37,18 @@ class DicNodeState { mDicNodeStateScoring() { } - virtual ~DicNodeState() {} + ~DicNodeState() {} + + DicNodeState &operator=(const DicNodeState& src) { + init(&src); + return *this; + } + + DicNodeState(const DicNodeState& src) + : mDicNodeStateInput(), mDicNodeStateOutput(), mDicNodeStatePrevWord(), + mDicNodeStateScoring() { + init(&src); + } // Init with prevWordPos void init(const int prevWordPos) { @@ -47,6 +58,24 @@ class DicNodeState { mDicNodeStateScoring.init(); } + // Init with previous word. + void initAsRootWithPreviousWord(const DicNodeState *prevWordDicNodeState, + const int prevWordPos, const int prevWordCodePointCount) { + mDicNodeStateOutput.init(); // reset for next word + mDicNodeStateInput.init( + &prevWordDicNodeState->mDicNodeStateInput, true /* resetTerminalDiffCost */); + mDicNodeStateScoring.init(&prevWordDicNodeState->mDicNodeStateScoring); + mDicNodeStatePrevWord.init( + prevWordDicNodeState->mDicNodeStatePrevWord.getPrevWordCount() + 1, + prevWordPos, + prevWordDicNodeState->mDicNodeStatePrevWord.getPrevWordBuf(), + prevWordDicNodeState->mDicNodeStatePrevWord.getPrevWordLength(), + prevWordDicNodeState->mDicNodeStateOutput.getCodePointBuf(), + prevWordCodePointCount, + prevWordDicNodeState->mDicNodeStatePrevWord.getSecondWordFirstInputIndex(), + prevWordDicNodeState->mDicNodeStateInput.getInputIndex(0) /* lastInputIndex */); + } + // Init by copy AK_FORCE_INLINE void init(const DicNodeState *const src) { mDicNodeStateInput.init(&src->mDicNodeStateInput); @@ -62,11 +91,6 @@ class DicNodeState { mDicNodeStateOutput.addMergedNodeCodePoints( mergedNodeCodePointCount, mergedNodeCodePoints); } - - private: - // Caution!!! - // Use a default copy constructor and an assign operator because shallow copies are ok - // for this class }; } // namespace latinime #endif // LATINIME_DIC_NODE_STATE_H diff --git a/native/jni/src/suggest/core/dicnode/internal/dic_node_state_input.h b/native/jni/src/suggest/core/dicnode/internal/dic_node_state_input.h index bbd9435b5..3d788114f 100644 --- a/native/jni/src/suggest/core/dicnode/internal/dic_node_state_input.h +++ b/native/jni/src/suggest/core/dicnode/internal/dic_node_state_input.h @@ -25,7 +25,7 @@ namespace latinime { class DicNodeStateInput { public: DicNodeStateInput() {} - virtual ~DicNodeStateInput() {} + ~DicNodeStateInput() {} // TODO: Merge into DicNodeStatePrevWord::truncate void truncate(const int commitPoint) { @@ -89,9 +89,8 @@ class DicNodeStateInput { } private: - // Caution!!! - // Use a default copy constructor and an assign operator because shallow copies are ok - // for this class + DISALLOW_COPY_AND_ASSIGN(DicNodeStateInput); + int mInputIndex[MAX_POINTER_COUNT_G]; int mPrevCodePoint[MAX_POINTER_COUNT_G]; float mTerminalDiffCost[MAX_POINTER_COUNT_G]; diff --git a/native/jni/src/suggest/core/dicnode/internal/dic_node_state_output.h b/native/jni/src/suggest/core/dicnode/internal/dic_node_state_output.h index abafc0edf..bdb182c1d 100644 --- a/native/jni/src/suggest/core/dicnode/internal/dic_node_state_output.h +++ b/native/jni/src/suggest/core/dicnode/internal/dic_node_state_output.h @@ -27,11 +27,9 @@ namespace latinime { class DicNodeStateOutput { public: - DicNodeStateOutput() : mOutputtedCodePointCount(0) { - init(); - } + DicNodeStateOutput() : mOutputtedCodePointCount(0) {} - virtual ~DicNodeStateOutput() {} + ~DicNodeStateOutput() {} void init() { mOutputtedCodePointCount = 0; @@ -63,19 +61,19 @@ class DicNodeStateOutput { } } - // TODO: Remove int getCodePointAt(const int index) const { return mCodePointsBuf[index]; } - // TODO: Move to private - int mCodePointsBuf[MAX_WORD_LENGTH]; + const int *getCodePointBuf() const { + return mCodePointsBuf; + } private: - // Caution!!! - // Use a default copy constructor and an assign operator because shallow copies are ok - // for this class + DISALLOW_COPY_AND_ASSIGN(DicNodeStateOutput); + uint16_t mOutputtedCodePointCount; + int mCodePointsBuf[MAX_WORD_LENGTH]; }; } // namespace latinime #endif // LATINIME_DIC_NODE_STATE_OUTPUT_H diff --git a/native/jni/src/suggest/core/dicnode/internal/dic_node_state_prevword.h b/native/jni/src/suggest/core/dicnode/internal/dic_node_state_prevword.h index 7868f7853..f2b1ce8f7 100644 --- a/native/jni/src/suggest/core/dicnode/internal/dic_node_state_prevword.h +++ b/native/jni/src/suggest/core/dicnode/internal/dic_node_state_prevword.h @@ -30,29 +30,18 @@ namespace latinime { class DicNodeStatePrevWord { public: AK_FORCE_INLINE DicNodeStatePrevWord() - : mPrevWordCount(0), mPrevWordLength(0), mPrevWordStart(0), mPrevWordProbability(0), - mPrevWordPtNodePos(NOT_A_DICT_POS), mSecondWordFirstInputIndex(NOT_AN_INDEX) { - memset(mPrevWord, 0, sizeof(mPrevWord)); - } + : mPrevWordCount(0), mPrevWordLength(0), mPrevWordStart(0), + mPrevWordPtNodePos(NOT_A_DICT_POS), mSecondWordFirstInputIndex(NOT_AN_INDEX) {} - virtual ~DicNodeStatePrevWord() {} - - void init() { - mPrevWordLength = 0; - mPrevWordCount = 0; - mPrevWordStart = 0; - mPrevWordProbability = -1; - mPrevWordPtNodePos = NOT_A_DICT_POS; - mSecondWordFirstInputIndex = NOT_AN_INDEX; - } + ~DicNodeStatePrevWord() {} void init(const int prevWordNodePos) { mPrevWordLength = 0; mPrevWordCount = 0; mPrevWordStart = 0; - mPrevWordProbability = -1; mPrevWordPtNodePos = prevWordNodePos; mSecondWordFirstInputIndex = NOT_AN_INDEX; + mPrevWord[0] = 0; } // Init by copy @@ -60,18 +49,15 @@ class DicNodeStatePrevWord { mPrevWordLength = prevWord->mPrevWordLength; mPrevWordCount = prevWord->mPrevWordCount; mPrevWordStart = prevWord->mPrevWordStart; - mPrevWordProbability = prevWord->mPrevWordProbability; mPrevWordPtNodePos = prevWord->mPrevWordPtNodePos; mSecondWordFirstInputIndex = prevWord->mSecondWordFirstInputIndex; memmove(mPrevWord, prevWord->mPrevWord, prevWord->mPrevWordLength * sizeof(mPrevWord[0])); } - void init(const int16_t prevWordCount, const int16_t prevWordProbability, - const int prevWordNodePos, const int *const src0, const int16_t length0, - const int *const src1, const int16_t length1, + void init(const int16_t prevWordCount, const int prevWordNodePos, const int *const src0, + const int16_t length0, const int *const src1, const int16_t length1, const int prevWordSecondWordFirstInputIndex, const int lastInputIndex) { mPrevWordCount = std::min(prevWordCount, static_cast<int16_t>(MAX_RESULTS)); - mPrevWordProbability = prevWordProbability; mPrevWordPtNodePos = prevWordNodePos; int twoWordsLen = DicNodeUtils::appendTwoWords(src0, length0, src1, length1, mPrevWord); @@ -137,19 +123,19 @@ class DicNodeStatePrevWord { return true; } - // TODO: Move to private - int mPrevWord[MAX_WORD_LENGTH]; + const int *getPrevWordBuf() const { + return mPrevWord; + } private: - // Caution!!! - // Use a default copy constructor and an assign operator because shallow copies are ok - // for this class + DISALLOW_COPY_AND_ASSIGN(DicNodeStatePrevWord); + int16_t mPrevWordCount; int16_t mPrevWordLength; int16_t mPrevWordStart; - int16_t mPrevWordProbability; int mPrevWordPtNodePos; int mSecondWordFirstInputIndex; + int mPrevWord[MAX_WORD_LENGTH]; }; } // namespace latinime #endif // LATINIME_DIC_NODE_STATE_PREVWORD_H diff --git a/native/jni/src/suggest/core/dicnode/internal/dic_node_state_scoring.h b/native/jni/src/suggest/core/dicnode/internal/dic_node_state_scoring.h index 18b7d736a..458eac81b 100644 --- a/native/jni/src/suggest/core/dicnode/internal/dic_node_state_scoring.h +++ b/native/jni/src/suggest/core/dicnode/internal/dic_node_state_scoring.h @@ -37,7 +37,7 @@ class DicNodeStateScoring { mNormalizedCompoundDistanceAfterFirstWord(MAX_VALUE_FOR_WEIGHTING) { } - virtual ~DicNodeStateScoring() {} + ~DicNodeStateScoring() {} void init() { mEditCorrectionCount = 0; @@ -175,9 +175,8 @@ class DicNodeStateScoring { } private: - // Caution!!! - // Use a default copy constructor and an assign operator because shallow copies are ok - // for this class + DISALLOW_COPY_AND_ASSIGN(DicNodeStateScoring); + DoubleLetterLevel mDoubleLetterLevel; DigraphUtils::DigraphCodePointIndex mDigraphIndex; diff --git a/native/jni/src/suggest/core/suggest.cpp b/native/jni/src/suggest/core/suggest.cpp index c3b670337..f60a210d4 100644 --- a/native/jni/src/suggest/core/suggest.cpp +++ b/native/jni/src/suggest/core/suggest.cpp @@ -248,17 +248,16 @@ void Suggest::processTerminalDicNode( if (dicNode->shouldBeFilteredBySafetyNetForBigram()) { return; } + if (!dicNode->hasMatchedOrProximityCodePoints()) { + return; + } // Create a non-cached node here. - DicNode terminalDicNode; - DicNodeUtils::initByCopy(dicNode, &terminalDicNode); + DicNode terminalDicNode(*dicNode); if (TRAVERSAL->needsToTraverseAllUserInput() && dicNode->getInputIndex(0) < traverseSession->getInputSize()) { Weighting::addCostAndForwardInputIndex(WEIGHTING, CT_TERMINAL_INSERTION, traverseSession, 0, &terminalDicNode, traverseSession->getMultiBigramMap()); } - if (!dicNode->hasMatchedOrProximityCodePoints()) { - return; - } Weighting::addCostAndForwardInputIndex(WEIGHTING, CT_TERMINAL, traverseSession, 0, &terminalDicNode, traverseSession->getMultiBigramMap()); traverseSession->getDicTraverseCache()->copyPushTerminal(&terminalDicNode); @@ -375,6 +374,7 @@ void Suggest::processDicNodeAsTransposition(DicTraverseSession *traverseSession, DicNode *dicNode) const { const int16_t pointIndex = dicNode->getInputIndex(0); DicNodeVector childDicNodes1; + DicNodeVector childDicNodes2; DicNodeUtils::getAllChildDicNodes(dicNode, traverseSession->getDictionaryStructurePolicy(), &childDicNodes1); const int childSize1 = childDicNodes1.getSizeAndLock(); @@ -386,7 +386,7 @@ void Suggest::processDicNodeAsTransposition(DicTraverseSession *traverseSession, continue; } if (childDicNodes1[i]->hasChildren()) { - DicNodeVector childDicNodes2; + childDicNodes2.clear(); DicNodeUtils::getAllChildDicNodes(childDicNodes1[i], traverseSession->getDictionaryStructurePolicy(), &childDicNodes2); const int childSize2 = childDicNodes2.getSizeAndLock(); diff --git a/native/jni/src/suggest/policyimpl/dictionary/structure/v2/patricia_trie_policy.cpp b/native/jni/src/suggest/policyimpl/dictionary/structure/v2/patricia_trie_policy.cpp index 84a6ccf33..4e795f82c 100644 --- a/native/jni/src/suggest/policyimpl/dictionary/structure/v2/patricia_trie_policy.cpp +++ b/native/jni/src/suggest/policyimpl/dictionary/structure/v2/patricia_trie_policy.cpp @@ -349,13 +349,14 @@ const WordProperty PatriciaTriePolicy::getWordProperty(const int *const codePoin // Skip the entry if the entry has been deleted. This never happens for ver2 dicts. if (bigramsIt.getBigramPos() != NOT_A_DICT_POS) { int word1Probability = NOT_A_PROBABILITY; - int word1CodePointCount = getCodePointsAndProbabilityAndReturnCodePointCount( + const int word1CodePointCount = getCodePointsAndProbabilityAndReturnCodePointCount( bigramsIt.getBigramPos(), MAX_WORD_LENGTH, bigramWord1CodePoints, &word1Probability); - std::vector<int> word1(bigramWord1CodePoints, + const std::vector<int> word1(bigramWord1CodePoints, bigramWord1CodePoints + word1CodePointCount); - bigrams.push_back(WordProperty::BigramProperty(&word1, bigramsIt.getProbability(), - NOT_A_TIMESTAMP /* timestamp */, 0 /* level */, 0 /* count */)); + const int probability = getProbability(word1Probability, bigramsIt.getProbability()); + bigrams.emplace_back(&word1, probability, + NOT_A_TIMESTAMP /* timestamp */, 0 /* level */, 0 /* count */); } } // Fetch shortcut information. @@ -371,12 +372,11 @@ const WordProperty PatriciaTriePolicy::getWordProperty(const int *const codePoin hasNext = ShortcutListReadingUtils::hasNext(shortcutFlags); const int shortcutTargetLength = ShortcutListReadingUtils::readShortcutTarget( mDictRoot, MAX_WORD_LENGTH, shortcutTargetCodePoints, &shortcutPos); - std::vector<int> shortcutTarget(shortcutTargetCodePoints, + const std::vector<int> shortcutTarget(shortcutTargetCodePoints, shortcutTargetCodePoints + shortcutTargetLength); const int shortcutProbability = ShortcutListReadingUtils::getProbabilityFromFlags(shortcutFlags); - shortcuts.push_back( - WordProperty::ShortcutProperty(&shortcutTarget, shortcutProbability)); + shortcuts.emplace_back(&shortcutTarget, shortcutProbability); } } return WordProperty(&codePointVector, ptNodeParams.isNotAWord(), diff --git a/native/jni/src/suggest/policyimpl/dictionary/structure/v4/ver4_patricia_trie_policy.cpp b/native/jni/src/suggest/policyimpl/dictionary/structure/v4/ver4_patricia_trie_policy.cpp index 1a38a27ff..107ddab2c 100644 --- a/native/jni/src/suggest/policyimpl/dictionary/structure/v4/ver4_patricia_trie_policy.cpp +++ b/native/jni/src/suggest/policyimpl/dictionary/structure/v4/ver4_patricia_trie_policy.cpp @@ -382,16 +382,16 @@ const WordProperty Ver4PatriciaTriePolicy::getWordProperty(const int *const code const int codePointCount = getCodePointsAndProbabilityAndReturnCodePointCount( word1TerminalPtNodePos, MAX_WORD_LENGTH, bigramWord1CodePoints, &word1Probability); - std::vector<int> word1(bigramWord1CodePoints, + const std::vector<int> word1(bigramWord1CodePoints, bigramWord1CodePoints + codePointCount); const HistoricalInfo *const historicalInfo = bigramEntry.getHistoricalInfo(); const int probability = bigramEntry.hasHistoricalInfo() ? ForgettingCurveUtils::decodeProbability( bigramEntry.getHistoricalInfo(), mHeaderPolicy) : - bigramEntry.getProbability(); - bigrams.push_back(WordProperty::BigramProperty(&word1, probability, + getProbability(word1Probability, bigramEntry.getProbability()); + bigrams.emplace_back(&word1, probability, historicalInfo->getTimeStamp(), historicalInfo->getLevel(), - historicalInfo->getCount())); + historicalInfo->getCount()); } } // Fetch shortcut information. @@ -407,8 +407,8 @@ const WordProperty Ver4PatriciaTriePolicy::getWordProperty(const int *const code int shortcutProbability = NOT_A_PROBABILITY; shortcutDictContent->getShortcutEntryAndAdvancePosition(MAX_WORD_LENGTH, shortcutTarget, &shortcutTargetLength, &shortcutProbability, &hasNext, &shortcutPos); - std::vector<int> target(shortcutTarget, shortcutTarget + shortcutTargetLength); - shortcuts.push_back(WordProperty::ShortcutProperty(&target, shortcutProbability)); + const std::vector<int> target(shortcutTarget, shortcutTarget + shortcutTargetLength); + shortcuts.emplace_back(&target, shortcutProbability); } } return WordProperty(&codePointVector, ptNodeParams.isNotAWord(), diff --git a/native/jni/src/suggest/policyimpl/typing/typing_traversal.h b/native/jni/src/suggest/policyimpl/typing/typing_traversal.h index 3db00ad3a..7c86b7dc9 100644 --- a/native/jni/src/suggest/policyimpl/typing/typing_traversal.h +++ b/native/jni/src/suggest/policyimpl/typing/typing_traversal.h @@ -162,9 +162,8 @@ class TypingTraversal : public Traversal { if (probability < ScoringParams::THRESHOLD_NEXT_WORD_PROBABILITY) { return false; } - const int c = dicNode->getOutputWordBuf()[0]; const bool shortCappedWord = dicNode->getNodeCodePointCount() - < ScoringParams::THRESHOLD_SHORT_WORD_LENGTH && CharUtils::isAsciiUpper(c); + < ScoringParams::THRESHOLD_SHORT_WORD_LENGTH && dicNode->isFirstCharUppercase(); return !shortCappedWord || probability >= ScoringParams::THRESHOLD_NEXT_WORD_PROBABILITY_FOR_CAPPED; } diff --git a/tests/src/com/android/inputmethod/keyboard/layout/AlphabetShifted.java b/tests/src/com/android/inputmethod/keyboard/layout/AlphabetShifted.java index be3ed12de..b81061ab8 100644 --- a/tests/src/com/android/inputmethod/keyboard/layout/AlphabetShifted.java +++ b/tests/src/com/android/inputmethod/keyboard/layout/AlphabetShifted.java @@ -28,13 +28,12 @@ import java.util.Locale; * The generic upper case alphabet keyboard layout. */ public final class AlphabetShifted extends LayoutBase { - public static ExpectedKey[][] getAlphabet(final ExpectedKey[][] lowerCaseKeyboard, + public static ExpectedKey[][] getDefaultLayout(final ExpectedKey[][] lowerCaseKeyboard, final Locale locale) { - final ExpectedKey[][] upperCaseKeyboard = ExpectedKeyboardBuilder.toUpperCase( - lowerCaseKeyboard, locale); - return new ExpectedKeyboardBuilder(upperCaseKeyboard) - .replaceKeyOfAll(SHIFT_KEY, SHIFTED_SHIFT_KEY) - .build(); + final ExpectedKeyboardBuilder builder = new ExpectedKeyboardBuilder(lowerCaseKeyboard); + builder.toUpperCase(locale); + builder.replaceKeysOfAll(SHIFT_KEY, SHIFTED_SHIFT_KEY); + return builder.build(); } // Icon id. diff --git a/tests/src/com/android/inputmethod/keyboard/layout/Qwerty.java b/tests/src/com/android/inputmethod/keyboard/layout/Qwerty.java index f7179b739..e07237512 100644 --- a/tests/src/com/android/inputmethod/keyboard/layout/Qwerty.java +++ b/tests/src/com/android/inputmethod/keyboard/layout/Qwerty.java @@ -24,8 +24,8 @@ import com.android.inputmethod.keyboard.layout.expected.LayoutBase; * The QWERTY alphabet keyboard. */ public final class Qwerty extends LayoutBase { - public static ExpectedKey[][] getAlphabet(final boolean isPhone) { - return toCommonAlphabet(ALPHABET_COMMON, isPhone); + public static ExpectedKey[][] getLayout(final boolean isPhone) { + return getDefaultAlphabetLayout(ALPHABET_COMMON, isPhone); } private static final ExpectedKey[][] ALPHABET_COMMON = new ExpectedKeyboardBuilder(10, 9, 7, 3) diff --git a/tests/src/com/android/inputmethod/keyboard/layout/Symbols.java b/tests/src/com/android/inputmethod/keyboard/layout/Symbols.java index 03d7f07e9..6fcfa0520 100644 --- a/tests/src/com/android/inputmethod/keyboard/layout/Symbols.java +++ b/tests/src/com/android/inputmethod/keyboard/layout/Symbols.java @@ -25,15 +25,87 @@ import com.android.inputmethod.latin.Constants; * The symbols keyboard layout. */ public final class Symbols extends LayoutBase { - public static ExpectedKey[][] getSymbols(final boolean isPhone) { + public static ExpectedKey[][] getLayout(final boolean isPhone) { return isPhone ? toPhoneSymbol(SYMBOLS_COMMON) : toTabletSymbols(SYMBOLS_COMMON); } + public static ExpectedKey[][] getDefaultLayout(final boolean isPhone) { + final ExpectedKeyboardBuilder builder = new ExpectedKeyboardBuilder(getLayout(isPhone)); + builder.replaceKeyOfLabel(CURRENCY, Symbols.CURRENCY_DOLLAR); + builder.replaceKeyOfLabel(DOUBLE_QUOTE, + key("\"", join(Symbols.DOUBLE_QUOTES_9LR, Symbols.DOUBLE_ANGLE_QUOTES_LR))); + builder.replaceKeyOfLabel(SINGLE_QUOTE, + key("'", join(Symbols.SINGLE_QUOTES_9LR, Symbols.SINGLE_ANGLE_QUOTES_LR))); + return builder.build(); + } + // Functional keys. public static final ExpectedKey ALPHABET_KEY = key("ABC", Constants.CODE_SWITCH_ALPHA_SYMBOL); public static final ExpectedKey SYMBOLS_SHIFT_KEY = key("= \\ <", Constants.CODE_SHIFT); public static final ExpectedKey TABLET_SYMBOLS_SHIFT_KEY = key("~ [ <", Constants.CODE_SHIFT); + // Variations of the "currency" key on the 2nd row. + public static final String CURRENCY = "currency"; + // U+00A2: "¢" CENT SIGN + // U+00A3: "£" POUND SIGN + // U+00A5: "¥" YEN SIGN + // U+20AC: "€" EURO SIGN + // U+20B1: "₱" PESO SIGN + public static final ExpectedKey DOLLAR_SIGN = key("$"); + public static final ExpectedKey CENT_SIGN = key("\u00A2"); + public static final ExpectedKey POUND_SIGN = key("\u00A3"); + public static final ExpectedKey YEN_SIGN = key("\u00A5"); + public static final ExpectedKey EURO_SIGN = key("\u20AC"); + public static final ExpectedKey PESO_SIGN = key("\u20B1"); + public static final ExpectedKey CURRENCY_DOLLAR = key("$", + CENT_SIGN, POUND_SIGN, EURO_SIGN, YEN_SIGN, PESO_SIGN); + public static final ExpectedKey CURRENCY_EURO = key("\u20AC", + CENT_SIGN, POUND_SIGN, DOLLAR_SIGN, YEN_SIGN, PESO_SIGN); + + // Variations of the "double quote" key's "more keys" on the 3rd row. + public static final String DOUBLE_QUOTE = "double_quote"; + // U+201C: "“" LEFT DOUBLE QUOTATION MARK + // U+201D: "”" RIGHT DOUBLE QUOTATION MARK + // U+201E: "„" DOUBLE LOW-9 QUOTATION MARK + static final ExpectedKey DQUOTE_LEFT = key("\u201C"); + static final ExpectedKey DQUOTE_RIGHT = key("\u201D"); + static final ExpectedKey DQUOTE_LOW9 = key("\u201E"); + public static ExpectedKey[] DOUBLE_QUOTES_9LR = { DQUOTE_LOW9, DQUOTE_LEFT, DQUOTE_RIGHT }; + public static ExpectedKey[] DOUBLE_QUOTES_R9L = { DQUOTE_RIGHT, DQUOTE_LOW9, DQUOTE_LEFT }; + public static ExpectedKey[] DOUBLE_QUOTES_L9R = { DQUOTE_LEFT, DQUOTE_LOW9, DQUOTE_RIGHT }; + public static ExpectedKey[] DOUBLE_QUOTES_LR9 = { DQUOTE_LEFT, DQUOTE_RIGHT, DQUOTE_LOW9 }; + // U+00AB: "«" LEFT-POINTING DOUBLE ANGLE QUOTATION MARK + // U+00BB: "»" RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK + private static final ExpectedKey DAQUOTE_LEFT = key("\u00AB"); + private static final ExpectedKey DAQUOTE_RIGHT = key("\u00BB"); + private static final ExpectedKey DAQUOTE_LEFT_RTL = key("\u00AB", "\u00BB"); + private static final ExpectedKey DAQUOTE_RIGHT_RTL = key("\u00BB", "\u00AB"); + public static ExpectedKey[] DOUBLE_ANGLE_QUOTES_LR = { DAQUOTE_LEFT, DAQUOTE_RIGHT }; + public static ExpectedKey[] DOUBLE_ANGLE_QUOTES_RL = { DAQUOTE_RIGHT, DAQUOTE_LEFT }; + public static ExpectedKey[] DOUBLE_ANGLE_QUOTES_RTL = { DAQUOTE_LEFT_RTL, DAQUOTE_RIGHT_RTL }; + + // Variations of the "single quote" key's "more keys" on the 3rd row. + public static final String SINGLE_QUOTE = "single_quote"; + // U+2018: "‘" LEFT SINGLE QUOTATION MARK + // U+2019: "’" RIGHT SINGLE QUOTATION MARK + // U+201A: "‚" SINGLE LOW-9 QUOTATION MARK + static final ExpectedKey SQUOTE_LEFT = key("\u2018"); + static final ExpectedKey SQUOTE_RIGHT = key("\u2019"); + static final ExpectedKey SQUOTE_LOW9 = key("\u201A"); + public static ExpectedKey[] SINGLE_QUOTES_9LR = { SQUOTE_LOW9, SQUOTE_LEFT, SQUOTE_RIGHT }; + public static ExpectedKey[] SINGLE_QUOTES_R9L = { SQUOTE_RIGHT, SQUOTE_LOW9, SQUOTE_LEFT }; + public static ExpectedKey[] SINGLE_QUOTES_L9R = { SQUOTE_LEFT, SQUOTE_LOW9, SQUOTE_RIGHT }; + public static ExpectedKey[] SINGLE_QUOTES_LR9 = { SQUOTE_LEFT, SQUOTE_RIGHT, SQUOTE_LOW9 }; + // U+2039: "‹" SINGLE LEFT-POINTING ANGLE QUOTATION MARK + // U+203A: "›" SINGLE RIGHT-POINTING ANGLE QUOTATION MARK + private static final ExpectedKey SAQUOTE_LEFT = key("\u2039"); + private static final ExpectedKey SAQUOTE_RIGHT = key("\u203A"); + private static final ExpectedKey SAQUOTE_LEFT_RTL = key("\u2039", "\u203A"); + private static final ExpectedKey SAQUOTE_RIGHT_RTL = key("\u203A", "\u2039"); + public static ExpectedKey[] SINGLE_ANGLE_QUOTES_LR = { SAQUOTE_LEFT, SAQUOTE_RIGHT }; + public static ExpectedKey[] SINGLE_ANGLE_QUOTES_RL = { SAQUOTE_RIGHT, SAQUOTE_LEFT }; + public static ExpectedKey[] SINGLE_ANGLE_QUOTES_RTL = { SAQUOTE_LEFT_RTL, SAQUOTE_RIGHT_RTL }; + // Common symbols keyboard layout. public static final ExpectedKey[][] SYMBOLS_COMMON = new ExpectedKeyboardBuilder(10, 9, 7, 5) .setLabelsOfRow(1, "1", "2", "3", "4", "5", "6", "7", "8", "9", "0") @@ -59,13 +131,7 @@ public final class Symbols extends LayoutBase { // U+207F: "ⁿ" SUPERSCRIPT LATIN SMALL LETTER N // U+2205: "∅" EMPTY SET .setMoreKeysOf("0", "\u207F", "\u2205") - .setLabelsOfRow(2, "@", "#", "$", "%", "&", "-", "+", "(", ")") - // U+00A2: "¢" CENT SIGN - // U+00A3: "£" POUND SIGN - // U+20AC: "€" EURO SIGN - // U+00A5: "¥" YEN SIGN - // U+20B1: "₱" PESO SIGN - .setMoreKeysOf("$", "\u00A2", "\u00A3", "\u20AC", "\u00A5", "\u20B1") + .setLabelsOfRow(2, "@", "#", CURRENCY, "%", "&", "-", "+", "(", ")") // U+2030: "‰" PER MILLE SIGN .setMoreKeysOf("%", "\u2030") // U+2013: "–" EN DASH @@ -76,23 +142,11 @@ public final class Symbols extends LayoutBase { .setMoreKeysOf("+", "\u00B1") .setMoreKeysOf("(", "<", "{", "[") .setMoreKeysOf(")", ">", "}", "]") - .setLabelsOfRow(3, "*", "\"", "'", ":", ";", "!", "?") + .setLabelsOfRow(3, "*", DOUBLE_QUOTE, SINGLE_QUOTE, ":", ";", "!", "?") // U+2020: "†" DAGGER // U+2021: "‡" DOUBLE DAGGER // U+2605: "★" BLACK STAR .setMoreKeysOf("*", "\u2020", "\u2021", "\u2605") - // U+201E: "„" DOUBLE LOW-9 QUOTATION MARK - // U+201C: "“" LEFT DOUBLE QUOTATION MARK - // U+201D: "”" RIGHT DOUBLE QUOTATION MARK - // U+00AB: "«" LEFT-POINTING DOUBLE ANGLE QUOTATION MARK - // U+00BB: "»" RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK - .setMoreKeysOf("\"", "\u201E", "\u201C", "\u201D", "\u00AB", "\u00BB") - // U+201A: "‚" SINGLE LOW-9 QUOTATION MARK - // U+2018: "‘" LEFT SINGLE QUOTATION MARK - // U+2019: "’" RIGHT SINGLE QUOTATION MARK - // U+2039: "‹" SINGLE LEFT-POINTING ANGLE QUOTATION MARK - // U+203A: "›" SINGLE RIGHT-POINTING ANGLE QUOTATION MARK - .setMoreKeysOf("'", "\u201A", "\u2018", "\u2019", "\u2039", "\u203A") // U+00A1: "¡" INVERTED EXCLAMATION MARK .setMoreKeysOf("!", "\u00A1") // U+00BF: "¿" INVERTED QUESTION MARK @@ -123,65 +177,4 @@ public final class Symbols extends LayoutBase { .addKeysOnTheRightOfRow(4, EMOJI_KEY) .build(); } - - // Helper method to add currency symbols for Euro. - public static ExpectedKeyboardBuilder euro(final ExpectedKeyboardBuilder builder) { - return builder - // U+20AC: "€" EURO SIGN - // U+00A2: "¢" CENT SIGN - // U+00A3: "£" POUND SIGN - // U+00A5: "¥" YEN SIGN - // U+20B1: "₱" PESO SIGN - .replaceKeyOfLabel("$", key("\u20AC", - moreKey("\u00A2"), moreKey("\u00A3"), moreKey("$"), - moreKey("\u00A5"), moreKey("\u20B1"))); - } - - // Helper method to add single quotes "more keys". - // "9LLR" means "9-low/Left quotation marks, Left/Right-pointing angle quotation marks". - public static ExpectedKeyboardBuilder singleQuotes9LLR(final ExpectedKeyboardBuilder builder) { - return builder - // U+2019: "’" RIGHT SINGLE QUOTATION MARK - // U+201A: "‚" SINGLE LOW-9 QUOTATION MARK - // U+2018: "‘" LEFT SINGLE QUOTATION MARK - // U+2039: "‹" SINGLE LEFT-POINTING ANGLE QUOTATION MARK - // U+203A: "›" SINGLE RIGHT-POINTING ANGLE QUOTATION MARK - .setMoreKeysOf("'", "\u2019", "\u201A", "\u2018", "\u2039", "\u203A"); - } - - // Helper method to add single quotes "more keys". - // "9LLR" means "9-low/Left quotation marks, Right/Left-pointing angle quotation marks". - public static ExpectedKeyboardBuilder singleQuotes9LRL(final ExpectedKeyboardBuilder builder) { - return builder - // U+2019: "’" RIGHT SINGLE QUOTATION MARK - // U+201A: "‚" SINGLE LOW-9 QUOTATION MARK - // U+2018: "‘" LEFT SINGLE QUOTATION MARK - // U+203A: "›" SINGLE RIGHT-POINTING ANGLE QUOTATION MARK - // U+2039: "‹" SINGLE LEFT-POINTING ANGLE QUOTATION MARK - .setMoreKeysOf("'", "\u2019", "\u201A", "\u2018", "\u203A", "\u2039"); - } - - // Helper method to add double quotes "more keys". - // "9LLR" means "9-low/Left quotation marks, Left/Right-pointing angle quotation marks". - public static ExpectedKeyboardBuilder doubleQuotes9LLR(final ExpectedKeyboardBuilder builder) { - return builder - // U+201D: "”" RIGHT DOUBLE QUOTATION MARK - // U+201E: "„" DOUBLE LOW-9 QUOTATION MARK - // U+201C: "“" LEFT DOUBLE QUOTATION MARK - // U+00AB: "«" LEFT-POINTING DOUBLE ANGLE QUOTATION MARK - // U+00BB: "»" RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK - .setMoreKeysOf("\"", "\u201D", "\u201E", "\u201C", "\u00AB", "\u00BB"); - } - - // Helper method to add double quotes "more keys". - // "9LLR" means "9-low/Left quotation marks, Right/Left-pointing angle quotation marks". - public static ExpectedKeyboardBuilder doubleQuotes9LRL(final ExpectedKeyboardBuilder builder) { - return builder - // U+201D: "”" RIGHT DOUBLE QUOTATION MARK - // U+201E: "„" DOUBLE LOW-9 QUOTATION MARK - // U+201C: "“" LEFT DOUBLE QUOTATION MARK - // U+00BB: "»" RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK - // U+00AB: "«" LEFT-POINTING DOUBLE ANGLE QUOTATION MARK - .setMoreKeysOf("\"", "\u201D", "\u201E", "\u201C", "\u00BB", "\u00AB"); - } } diff --git a/tests/src/com/android/inputmethod/keyboard/layout/SymbolsShifted.java b/tests/src/com/android/inputmethod/keyboard/layout/SymbolsShifted.java index 368f9db46..4d9ae4348 100644 --- a/tests/src/com/android/inputmethod/keyboard/layout/SymbolsShifted.java +++ b/tests/src/com/android/inputmethod/keyboard/layout/SymbolsShifted.java @@ -25,17 +25,33 @@ import com.android.inputmethod.latin.Constants; * The symbols shifted keyboard layout. */ public final class SymbolsShifted extends LayoutBase { - public static ExpectedKey[][] getSymbolsShifted(final boolean isPhone) { + public static ExpectedKey[][] getLayout(final boolean isPhone) { return isPhone ? toPhoneSymbolsShifted(SYMBOLS_SHIFTED_COMMON) : toTabletSymbolsShifted(SYMBOLS_SHIFTED_COMMON); } + public static ExpectedKey[][] getDefaultLayout(final boolean isPhone) { + final ExpectedKeyboardBuilder builder = new ExpectedKeyboardBuilder(getLayout(isPhone)); + builder.replaceKeyOfLabel(OTHER_CURRENCIES, SymbolsShifted.CURRENCIES_OTHER_THAN_DOLLAR); + return builder.build(); + } + // Functional key. public static final ExpectedKey BACK_TO_SYMBOLS_KEY = key("?123", Constants.CODE_SHIFT); + // Variations of the "other currencies" keys on the 2rd row. + public static final String OTHER_CURRENCIES = "other_currencies"; + public static final ExpectedKey[] CURRENCIES_OTHER_THAN_DOLLAR = { + Symbols.POUND_SIGN, Symbols.CENT_SIGN, Symbols.EURO_SIGN, Symbols.YEN_SIGN + }; + public static final ExpectedKey[] CURRENCIES_OTHER_THAN_EURO = { + Symbols.POUND_SIGN, Symbols.YEN_SIGN, key(Symbols.DOLLAR_SIGN, Symbols.CENT_SIGN), + Symbols.CENT_SIGN + }; + // Common symbols shifted keyboard layout. public static final ExpectedKey[][] SYMBOLS_SHIFTED_COMMON = - new ExpectedKeyboardBuilder(10, 9, 7, 5) + new ExpectedKeyboardBuilder(10, 1 /* other_currencies */ + 5, 7, 5) // U+0060: "`" GRAVE ACCENT // U+2022: "•" BULLET // U+221A: "√" SQUARE ROOT @@ -60,14 +76,8 @@ public final class SymbolsShifted extends LayoutBase { // U+00B6: "¶" PILCROW SIGN // U+00A7: "§" SECTION SIGN .setMoreKeysOf("\u00B6", "\u00A7") - // U+00A3: "£" POUND SIGN - // U+00A2: "¢" CENT SIGN - // U+20AC: "€" EURO SIGN - // U+00A5: "¥" YEN SIGN // U+00B0: "°" DEGREE SIGN - .setLabelsOfRow(2, - "\u00A3", "\u00A2", "\u20AC", "\u00A5", "^", - "\u00B0", "=", "{", "}") + .setLabelsOfRow(2, OTHER_CURRENCIES, "^", "\u00B0", "=", "{", "}") // U+2191: "↑" UPWARDS ARROW // U+2193: "↓" DOWNWARDS ARROW // U+2190: "←" LEFTWARDS ARROW @@ -125,18 +135,4 @@ public final class SymbolsShifted extends LayoutBase { .addKeysOnTheRightOfRow(4, EMOJI_KEY) .build(); } - - // Helper method to add currency symbols for Euro. - public static ExpectedKeyboardBuilder euro(final ExpectedKeyboardBuilder builder) { - return builder - // U+00A5: "¥" YEN SIGN - // U+00A2: "¢" CENT SIGN - .replaceKeyOfLabel("\u00A5", key("\u00A2")) - // U+20AC: "€" EURO SIGN - // U+00A2: "¢" CENT SIGN - .replaceKeyOfLabel("\u20AC", key("$", moreKey("\u00A2"))) - // U+00A2: "¢" CENT SIGN - // U+00A5: "¥" YEN SIGN - .replaceKeyOfLabel("\u00A2", key("\u00A5")); - } } diff --git a/tests/src/com/android/inputmethod/keyboard/layout/expected/AbstractKeyboardBuilder.java b/tests/src/com/android/inputmethod/keyboard/layout/expected/AbstractKeyboardBuilder.java index 45449b762..682ac20a1 100644 --- a/tests/src/com/android/inputmethod/keyboard/layout/expected/AbstractKeyboardBuilder.java +++ b/tests/src/com/android/inputmethod/keyboard/layout/expected/AbstractKeyboardBuilder.java @@ -73,6 +73,14 @@ abstract class AbstractKeyboardBuilder<E> { } /** + * Return the number of rows. + * @return the number of rows being constructed. + */ + int getRowCount() { + return mRows.length; + } + + /** * Get the current contents of the specified row. * @param row the row number to get the contents. * @return the array of elements at row number <code>row</code>. diff --git a/tests/src/com/android/inputmethod/keyboard/layout/expected/ActualKeyboardBuilder.java b/tests/src/com/android/inputmethod/keyboard/layout/expected/ActualKeyboardBuilder.java index b918d47f8..577f43e17 100644 --- a/tests/src/com/android/inputmethod/keyboard/layout/expected/ActualKeyboardBuilder.java +++ b/tests/src/com/android/inputmethod/keyboard/layout/expected/ActualKeyboardBuilder.java @@ -24,7 +24,6 @@ import com.android.inputmethod.latin.utils.CollectionUtils; import com.android.inputmethod.latin.utils.StringUtils; import java.util.ArrayList; -import java.util.Arrays; import java.util.Collections; import java.util.Comparator; @@ -44,15 +43,27 @@ public final class ActualKeyboardBuilder extends AbstractKeyboardBuilder<Key> { } }; + private static ArrayList<Key> filterOutSpacerAndSortKeys(final Key[] keys) { + final ArrayList<Key> filteredKeys = CollectionUtils.newArrayList(); + for (final Key key : keys) { + if (key.isSpacer()) { + continue; + } + filteredKeys.add(key); + } + Collections.sort(filteredKeys, ROW_COLUMN_COMPARATOR); + return filteredKeys; + } + /** * Create the keyboard that consists of the array of rows of the actual keyboard's keys. * @param keys the array of keys of the actual keyboard. * @return the actual keyboard grouped with rows. */ public static Key[][] buildKeyboard(final Key[] keys) { - // Sort keys from top-left to bottom-right order to prepare to create rows. - final ArrayList<Key> sortedKeys = CollectionUtils.newArrayList(Arrays.asList(keys)); - Collections.sort(sortedKeys, ROW_COLUMN_COMPARATOR); + // Filter out spacer and sort keys from top-left to bottom-right order to prepare to + // create rows. + final ArrayList<Key> sortedKeys = filterOutSpacerAndSortKeys(keys); // Grouping keys into rows. final ArrayList<ArrayList<Key>> rows = CollectionUtils.newArrayList(); diff --git a/tests/src/com/android/inputmethod/keyboard/layout/expected/ExpectedKeyboardBuilder.java b/tests/src/com/android/inputmethod/keyboard/layout/expected/ExpectedKeyboardBuilder.java index 61288f048..57f842b74 100644 --- a/tests/src/com/android/inputmethod/keyboard/layout/expected/ExpectedKeyboardBuilder.java +++ b/tests/src/com/android/inputmethod/keyboard/layout/expected/ExpectedKeyboardBuilder.java @@ -52,32 +52,56 @@ public final class ExpectedKeyboardBuilder extends AbstractKeyboardBuilder<Expec } // A replacement job to be performed. - interface ReplaceJob { - // Returns a {@link ExpectedKey} object to replace. - ExpectedKey replace(final ExpectedKey oldKey); + private interface ReplaceJob { + // Returns a {@link ExpectedKey} objects to replace. + ExpectedKey[] replacingKeys(final ExpectedKey oldKey); // Return true if replacing should be stopped at first occurrence. boolean stopAtFirstOccurrence(); } + private static ExpectedKey[] replaceKeyAt(final ExpectedKey[] keys, final int columnIndex, + final ExpectedKey[] replacingKeys) { + // Optimization for replacing a key with another key. + if (replacingKeys.length == 1) { + keys[columnIndex] = replacingKeys[0]; + return keys; + } + final int newLength = keys.length - 1 + replacingKeys.length; + // Remove the key at columnIndex. + final ExpectedKey[] newKeys = Arrays.copyOf(keys, newLength); + System.arraycopy(keys, columnIndex + 1, newKeys, columnIndex + replacingKeys.length, + keys.length - 1 - columnIndex); + // Insert replacing keys at columnIndex. + System.arraycopy(replacingKeys, 0, newKeys, columnIndex, replacingKeys.length); + return newKeys; + + } + // Replace key(s) that has the specified visual. private void replaceKeyOf(final ExpectedKeyVisual visual, final ReplaceJob job) { int replacedCount = 0; - final ExpectedKey[][] rows = build(); - for (int rowIndex = 0; rowIndex < rows.length; rowIndex++) { - final ExpectedKey[] keys = rows[rowIndex]; - for (int columnIndex = 0; columnIndex < keys.length; columnIndex++) { - if (keys[columnIndex].getVisual().equalsTo(visual)) { - keys[columnIndex] = job.replace(keys[columnIndex]); - replacedCount++; - if (job.stopAtFirstOccurrence()) { - return; - } + final int rowCount = getRowCount(); + for (int row = 1; row <= rowCount; row++) { + ExpectedKey[] keys = getRowAt(row); + for (int columnIndex = 0; columnIndex < keys.length; /* nothing */) { + final ExpectedKey currentKey = keys[columnIndex]; + if (!currentKey.getVisual().equalsTo(visual)) { + columnIndex++; + continue; + } + final ExpectedKey[] replacingKeys = job.replacingKeys(currentKey); + keys = replaceKeyAt(keys, columnIndex, replacingKeys); + columnIndex += replacingKeys.length; + setRowAt(row, keys); + replacedCount++; + if (job.stopAtFirstOccurrence()) { + return; } } } if (replacedCount == 0) { throw new RuntimeException( - "Can't find key that has visual: " + visual + " in\n" + toString(rows)); + "Can't find key that has visual: " + visual + " in\n" + this); } } @@ -137,8 +161,10 @@ public final class ExpectedKeyboardBuilder extends AbstractKeyboardBuilder<Expec private void setMoreKeysOf(final ExpectedKeyVisual visual, final ExpectedKey[] moreKeys) { replaceKeyOf(visual, new ReplaceJob() { @Override - public ExpectedKey replace(final ExpectedKey oldKey) { - return ExpectedKey.newInstance(oldKey.getVisual(), oldKey.getOutput(), moreKeys); + public ExpectedKey[] replacingKeys(final ExpectedKey oldKey) { + return new ExpectedKey[] { + ExpectedKey.newInstance(oldKey.getVisual(), oldKey.getOutput(), moreKeys) + }; } @Override public boolean stopAtFirstOccurrence() { @@ -194,17 +220,18 @@ public final class ExpectedKeyboardBuilder extends AbstractKeyboardBuilder<Expec } /** - * Replace the most top-left key that has the specified label with the new key. - * @param label the label of the key to set <code>newKey</code>. - * @param newKey the key to be set. + * Replace the most top-left key that has the specified label with the new keys. + * @param label the label of the key to set <code>newKeys</code>. + * @param newKeys the keys to be set. * @return this builder. */ - public ExpectedKeyboardBuilder replaceKeyOfLabel(final String label, final ExpectedKey newKey) { + public ExpectedKeyboardBuilder replaceKeyOfLabel(final String label, + final ExpectedKey ... newKeys) { final ExpectedKeyVisual visual = ExpectedKeyVisual.newInstance(label); replaceKeyOf(visual, new ReplaceJob() { @Override - public ExpectedKey replace(final ExpectedKey oldKey) { - return newKey; + public ExpectedKey[] replacingKeys(final ExpectedKey oldKey) { + return newKeys; } @Override public boolean stopAtFirstOccurrence() { @@ -215,17 +242,17 @@ public final class ExpectedKeyboardBuilder extends AbstractKeyboardBuilder<Expec } /** - * Replace the all specified keys with the new key. - * @param key the key to be replaced by <code>newKey</code>. - * @param newKey the key to be set. + * Replace the all specified keys with the new keys. + * @param key the key to be replaced by <code>newKeys</code>. + * @param newKeys the keys to be set. * @return this builder. */ - public ExpectedKeyboardBuilder replaceKeyOfAll(final ExpectedKey key, - final ExpectedKey newKey) { + public ExpectedKeyboardBuilder replaceKeysOfAll(final ExpectedKey key, + final ExpectedKey ... newKeys) { replaceKeyOf(key.getVisual(), new ReplaceJob() { @Override - public ExpectedKey replace(final ExpectedKey oldKey) { - return newKey; + public ExpectedKey[] replacingKeys(final ExpectedKey oldKey) { + return newKeys; } @Override public boolean stopAtFirstOccurrence() { @@ -236,22 +263,26 @@ public final class ExpectedKeyboardBuilder extends AbstractKeyboardBuilder<Expec } /** - * Returns new keyboard instance that has upper case keys of the specified keyboard. - * @param rows the lower case keyboard. + * Convert all keys of this keyboard builder to upper case keys. * @param locale the locale used to convert cases. - * @return the upper case keyboard. + * @return this builder */ - public static ExpectedKey[][] toUpperCase(final ExpectedKey[][] rows, final Locale locale) { - final ExpectedKey[][] upperCaseRows = new ExpectedKey[rows.length][]; - for (int rowIndex = 0; rowIndex < rows.length; rowIndex++) { - final ExpectedKey[] lowerCaseKeys = rows[rowIndex]; + public ExpectedKeyboardBuilder toUpperCase(final Locale locale) { + final int rowCount = getRowCount(); + for (int row = 1; row <= rowCount; row++) { + final ExpectedKey[] lowerCaseKeys = getRowAt(row); final ExpectedKey[] upperCaseKeys = new ExpectedKey[lowerCaseKeys.length]; for (int columnIndex = 0; columnIndex < lowerCaseKeys.length; columnIndex++) { upperCaseKeys[columnIndex] = lowerCaseKeys[columnIndex].toUpperCase(locale); } - upperCaseRows[rowIndex] = upperCaseKeys; + setRowAt(row, upperCaseKeys); } - return upperCaseRows; + return this; + } + + @Override + public String toString() { + return toString(build()); } /** diff --git a/tests/src/com/android/inputmethod/keyboard/layout/expected/LayoutBase.java b/tests/src/com/android/inputmethod/keyboard/layout/expected/LayoutBase.java index 1aeb8c0cd..813a51f74 100644 --- a/tests/src/com/android/inputmethod/keyboard/layout/expected/LayoutBase.java +++ b/tests/src/com/android/inputmethod/keyboard/layout/expected/LayoutBase.java @@ -18,6 +18,10 @@ package com.android.inputmethod.keyboard.layout.expected; import com.android.inputmethod.keyboard.internal.KeyboardIconsSet; import com.android.inputmethod.latin.Constants; +import com.android.inputmethod.latin.utils.CollectionUtils; + +import java.util.ArrayList; +import java.util.Arrays; /** * Base class to create an expected keyboard for unit test. @@ -71,6 +75,24 @@ public class LayoutBase { return ExpectedKey.newInstance(label, code); } + // Helper method to create {@link ExpectedKey} array by joining {@link ExpectedKey}, + // {@link ExpectedKey} array, and {@link String}. + public static ExpectedKey[] join(final Object ... keys) { + final ArrayList<ExpectedKey> list = CollectionUtils.newArrayList(); + for (final Object key : keys) { + if (key instanceof ExpectedKey) { + list.add((ExpectedKey)key); + } else if (key instanceof ExpectedKey[]) { + list.addAll(Arrays.asList((ExpectedKey[])key)); + } else if (key instanceof String) { + list.add(key((String)key)); + } else { + throw new RuntimeException("Unknown expected key type: " + key); + } + } + return list.toArray(new ExpectedKey[list.size()]); + } + // Icon ids. private static final int ICON_SHIFT = KeyboardIconsSet.getIconId("shift_key"); private static final int ICON_DELETE = KeyboardIconsSet.getIconId("delete_key"); @@ -99,9 +121,10 @@ public class LayoutBase { "&", "%", "+", "\"", "-", ":", "@" }; + // Helper method to create alphabet layout for phone by adding special function keys except + // shift key. private static ExpectedKeyboardBuilder toPhoneAlphabet(final ExpectedKeyboardBuilder builder) { return builder - .addKeysOnTheLeftOfRow(3, key(SHIFT_KEY, CAPSLOCK_MORE_KEY)) .addKeysOnTheRightOfRow(3, DELETE_KEY) .setLabelsOfRow(4, ",", " ", ".") .setMoreKeysOf(",", SETTINGS_KEY) @@ -112,8 +135,7 @@ public class LayoutBase { // Helper method to create alphabet layout for tablet by adding special function keys except // shift key. - public static ExpectedKeyboardBuilder toTabletAlphabetWithoutShiftKeys( - final ExpectedKeyboardBuilder builder) { + private static ExpectedKeyboardBuilder toTabletAlphabet(final ExpectedKeyboardBuilder builder) { return builder // U+00BF: "¿" INVERTED QUESTION MARK // U+00A1: "¡" INVERTED EXCLAMATION MARK @@ -128,13 +150,25 @@ public class LayoutBase { } // Helper method to create alphabet layout by adding special function keys. - public static ExpectedKey[][] toCommonAlphabet(final ExpectedKey[][] common, + public static ExpectedKey[][] getAlphabetLayoutWithoutShiftKeys(final ExpectedKey[][] common, final boolean isPhone) { final ExpectedKeyboardBuilder builder = new ExpectedKeyboardBuilder(common); if (isPhone) { toPhoneAlphabet(builder); } else { - toTabletAlphabetWithoutShiftKeys(builder); + toTabletAlphabet(builder).build(); + } + return builder.build(); + } + + // Helper method to create alphabet layout by adding special function keys. + public static ExpectedKey[][] getDefaultAlphabetLayout(final ExpectedKey[][] common, + final boolean isPhone) { + final ExpectedKeyboardBuilder builder = new ExpectedKeyboardBuilder( + getAlphabetLayoutWithoutShiftKeys(common, isPhone)); + if (isPhone) { + builder.addKeysOnTheLeftOfRow(3, key(SHIFT_KEY, CAPSLOCK_MORE_KEY)); + } else { builder.addKeysOnTheLeftOfRow(3, key(SHIFT_KEY, CAPSLOCK_MORE_KEY)) .addKeysOnTheRightOfRow(3, key(SHIFT_KEY, CAPSLOCK_MORE_KEY)); } diff --git a/tests/src/com/android/inputmethod/keyboard/layout/tests/LayoutTestsBase.java b/tests/src/com/android/inputmethod/keyboard/layout/tests/LayoutTestsBase.java index 427e7de49..5c51d088b 100644 --- a/tests/src/com/android/inputmethod/keyboard/layout/tests/LayoutTestsBase.java +++ b/tests/src/com/android/inputmethod/keyboard/layout/tests/LayoutTestsBase.java @@ -68,6 +68,11 @@ abstract class LayoutTestsBase extends KeyboardLayoutSetTestsBase { return LayoutBase.key(label, outputText, moreKeys); } + // Helper method to create {@link ExpectedKey} object that has new "more keys". + static ExpectedKey key(final ExpectedKey key, final ExpectedKey ... moreKeys) { + return LayoutBase.key(key, moreKeys); + } + // Helper method to create {@link ExpectedKey} object for "more key" that has the label. static ExpectedKey moreKey(final String label) { return LayoutBase.moreKey(label); @@ -79,6 +84,12 @@ abstract class LayoutTestsBase extends KeyboardLayoutSetTestsBase { return LayoutBase.moreKey(label, outputText); } + // Helper method to create {@link ExpectedKey} array by joining {@link ExpectedKey}, + // {@link ExpectedKey} array, and {@link String}. + static ExpectedKey[] join(final Object ... keys) { + return LayoutBase.join(keys); + } + // Locale for testing subtype. abstract Locale getTestLocale(); @@ -86,73 +97,73 @@ abstract class LayoutTestsBase extends KeyboardLayoutSetTestsBase { abstract String getTestKeyboardLayout(); // Alphabet keyboard for testing subtype. - abstract ExpectedKey[][] getAlphabet(final boolean isPhone); + abstract ExpectedKey[][] getAlphabetLayout(final boolean isPhone); // Alphabet automatic shifted keyboard for testing subtype. - ExpectedKey[][] getAlphabetAutomaticShifted(final boolean isPhone) { - return AlphabetShifted.getAlphabet(getAlphabet(isPhone), getTestLocale()); + ExpectedKey[][] getAlphabetAutomaticShiftedLayout(final boolean isPhone) { + return AlphabetShifted.getDefaultLayout(getAlphabetLayout(isPhone), getTestLocale()); } // Alphabet manual shifted keyboard for testing subtype. - ExpectedKey[][] getAlphabetManualShifted(final boolean isPhone) { - return AlphabetShifted.getAlphabet(getAlphabet(isPhone), getTestLocale()); + ExpectedKey[][] getAlphabetManualShiftedLayout(final boolean isPhone) { + return AlphabetShifted.getDefaultLayout(getAlphabetLayout(isPhone), getTestLocale()); } // Alphabet shift locked keyboard for testing subtype. - ExpectedKey[][] getAlphabetShiftLocked(final boolean isPhone) { - return AlphabetShifted.getAlphabet(getAlphabet(isPhone), getTestLocale()); + ExpectedKey[][] getAlphabetShiftLockedLayout(final boolean isPhone) { + return AlphabetShifted.getDefaultLayout(getAlphabetLayout(isPhone), getTestLocale()); } // Alphabet shift lock shifted keyboard for testing subtype. - ExpectedKey[][] getAlphabetShiftLockShifted(final boolean isPhone) { - return AlphabetShifted.getAlphabet(getAlphabet(isPhone), getTestLocale()); + ExpectedKey[][] getAlphabetShiftLockShiftedLayout(final boolean isPhone) { + return AlphabetShifted.getDefaultLayout(getAlphabetLayout(isPhone), getTestLocale()); } // Symbols keyboard for testing subtype. - ExpectedKey[][] getSymbols(final boolean isPhone) { - return Symbols.getSymbols(isPhone); + ExpectedKey[][] getSymbolsLayout(final boolean isPhone) { + return Symbols.getDefaultLayout(isPhone); } // Symbols shifted keyboard for testing subtype. - ExpectedKey[][] getSymbolsShifted(final boolean isPhone) { - return SymbolsShifted.getSymbolsShifted(isPhone); + ExpectedKey[][] getSymbolsShiftedLayout(final boolean isPhone) { + return SymbolsShifted.getDefaultLayout(isPhone); } // TODO: Add phone, phone symbols, number, number password layout tests. public final void testAlphabet() { final int elementId = KeyboardId.ELEMENT_ALPHABET; - doKeyboardTests(elementId, getAlphabet(isPhone())); + doKeyboardTests(elementId, getAlphabetLayout(isPhone())); } public final void testAlphabetAutomaticShifted() { final int elementId = KeyboardId.ELEMENT_ALPHABET_AUTOMATIC_SHIFTED; - doKeyboardTests(elementId, getAlphabetAutomaticShifted(isPhone())); + doKeyboardTests(elementId, getAlphabetAutomaticShiftedLayout(isPhone())); } public final void testAlphabetManualShifted() { final int elementId = KeyboardId.ELEMENT_ALPHABET_MANUAL_SHIFTED; - doKeyboardTests(elementId, getAlphabetManualShifted(isPhone())); + doKeyboardTests(elementId, getAlphabetManualShiftedLayout(isPhone())); } public final void testAlphabetShiftLocked() { final int elementId = KeyboardId.ELEMENT_ALPHABET_SHIFT_LOCKED; - doKeyboardTests(elementId, getAlphabetShiftLocked(isPhone())); + doKeyboardTests(elementId, getAlphabetShiftLockedLayout(isPhone())); } public final void testAlphabetShiftLockShifted() { final int elementId = KeyboardId.ELEMENT_ALPHABET_SHIFT_LOCK_SHIFTED; - doKeyboardTests(elementId, getAlphabetShiftLockShifted(isPhone())); + doKeyboardTests(elementId, getAlphabetShiftLockShiftedLayout(isPhone())); } public final void testSymbols() { final int elementId = KeyboardId.ELEMENT_SYMBOLS; - doKeyboardTests(elementId, getSymbols(isPhone())); + doKeyboardTests(elementId, getSymbolsLayout(isPhone())); } public final void testSymbolsShifted() { final int elementId = KeyboardId.ELEMENT_SYMBOLS_SHIFTED; - doKeyboardTests(elementId, getSymbolsShifted(isPhone())); + doKeyboardTests(elementId, getSymbolsShiftedLayout(isPhone())); } // Comparing expected keyboard and actual keyboard. diff --git a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsEnglishUS.java b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsEnglishUS.java index 0792a5789..e160ae84f 100644 --- a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsEnglishUS.java +++ b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsEnglishUS.java @@ -40,8 +40,8 @@ public final class TestsEnglishUS extends LayoutTestsBase { } @Override - ExpectedKey[][] getAlphabet(final boolean isPhone) { - final ExpectedKey[][] keyboard = Qwerty.getAlphabet(isPhone); + ExpectedKey[][] getAlphabetLayout(final boolean isPhone) { + final ExpectedKey[][] keyboard = Qwerty.getLayout(isPhone); final ExpectedKeyboardBuilder builder = new ExpectedKeyboardBuilder(keyboard); setAccentedLetters(builder); return builder.build(); diff --git a/tests/src/com/android/inputmethod/latin/FusionDictionaryTests.java b/tests/src/com/android/inputmethod/latin/FusionDictionaryTests.java index cf528d010..09309bcc0 100644 --- a/tests/src/com/android/inputmethod/latin/FusionDictionaryTests.java +++ b/tests/src/com/android/inputmethod/latin/FusionDictionaryTests.java @@ -19,6 +19,7 @@ package com.android.inputmethod.latin; import android.test.AndroidTestCase; import android.test.suitebuilder.annotation.SmallTest; +import com.android.inputmethod.latin.makedict.FormatSpec.DictionaryOptions; import com.android.inputmethod.latin.makedict.FusionDictionary; import com.android.inputmethod.latin.makedict.ProbabilityInfo; import com.android.inputmethod.latin.makedict.FusionDictionary.PtNodeArray; @@ -32,7 +33,7 @@ import java.util.HashMap; public class FusionDictionaryTests extends AndroidTestCase { public void testFindWordInTree() { FusionDictionary dict = new FusionDictionary(new PtNodeArray(), - new FusionDictionary.DictionaryOptions(new HashMap<String,String>())); + new DictionaryOptions(new HashMap<String,String>())); dict.add("abc", new ProbabilityInfo(10), null, false /* isNotAWord */); assertNull(FusionDictionary.findWordInTree(dict.mRootNodeArray, "aaa")); diff --git a/tests/src/com/android/inputmethod/latin/makedict/BinaryDictUtils.java b/tests/src/com/android/inputmethod/latin/makedict/BinaryDictUtils.java index 79f3e0dc9..5a3eba801 100644 --- a/tests/src/com/android/inputmethod/latin/makedict/BinaryDictUtils.java +++ b/tests/src/com/android/inputmethod/latin/makedict/BinaryDictUtils.java @@ -16,8 +16,8 @@ package com.android.inputmethod.latin.makedict; +import com.android.inputmethod.latin.makedict.FormatSpec.DictionaryOptions; import com.android.inputmethod.latin.makedict.FormatSpec.FormatOptions; -import com.android.inputmethod.latin.makedict.FusionDictionary.DictionaryOptions; import java.io.File; import java.util.HashMap; 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 2c60fc781..391328fda 100644 --- a/tools/dicttool/src/com/android/inputmethod/latin/dicttool/CombinedInputOutput.java +++ b/tools/dicttool/src/com/android/inputmethod/latin/dicttool/CombinedInputOutput.java @@ -17,8 +17,8 @@ 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.ProbabilityInfo; import com.android.inputmethod.latin.makedict.WeightedString; 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 b5d52390d..17e77dca1 100644 --- a/tools/dicttool/src/com/android/inputmethod/latin/dicttool/XmlDictInputOutput.java +++ b/tools/dicttool/src/com/android/inputmethod/latin/dicttool/XmlDictInputOutput.java @@ -16,8 +16,8 @@ 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.ProbabilityInfo; import com.android.inputmethod.latin.makedict.WeightedString; 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 faf00b4a5..a3095da8a 100644 --- a/tools/dicttool/tests/com/android/inputmethod/latin/dicttool/BinaryDictOffdeviceUtilsTests.java +++ b/tools/dicttool/tests/com/android/inputmethod/latin/dicttool/BinaryDictOffdeviceUtilsTests.java @@ -20,9 +20,9 @@ import com.android.inputmethod.latin.makedict.DictDecoder; import com.android.inputmethod.latin.makedict.DictEncoder; import com.android.inputmethod.latin.makedict.DictionaryHeader; import com.android.inputmethod.latin.makedict.FormatSpec; +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; 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 283abcdd1..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; 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 d0d47da96..6e81c3f3a 100644 --- a/tools/dicttool/tests/com/android/inputmethod/latin/makedict/FusionDictionaryTest.java +++ b/tools/dicttool/tests/com/android/inputmethod/latin/makedict/FusionDictionaryTest.java @@ -16,9 +16,9 @@ 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.WordProperty; diff --git a/tools/make-keyboard-text/res/values-et-rEE/donottranslate-more-keys.xml b/tools/make-keyboard-text/res/values-et-rEE/donottranslate-more-keys.xml index d037044bd..e9bd9faf7 100644 --- a/tools/make-keyboard-text/res/values-et-rEE/donottranslate-more-keys.xml +++ b/tools/make-keyboard-text/res/values-et-rEE/donottranslate-more-keys.xml @@ -70,9 +70,8 @@ <string name="more_keys_for_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="more_keys_for_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 --> 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..2886d015e 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 @@ -64,12 +64,6 @@ <string name="more_keys_for_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="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-lt/donottranslate-more-keys.xml b/tools/make-keyboard-text/res/values-lt/donottranslate-more-keys.xml index 7e2b8a076..c1c596059 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 @@ -71,9 +71,8 @@ <string name="more_keys_for_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="more_keys_for_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 --> 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..c27458b7c 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 @@ -70,9 +70,8 @@ <string name="more_keys_for_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="more_keys_for_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 --> 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..cf2238f67 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 @@ -71,9 +71,8 @@ <!-- 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="more_keys_for_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 --> 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..0da027258 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 @@ -71,9 +71,8 @@ U+016B: "ū" LATIN SMALL LETTER U WITH MACRON --> <string name="more_keys_for_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="more_keys_for_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 --> 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..ad69019a3 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="more_keys_for_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 |