diff options
38 files changed, 748 insertions, 467 deletions
diff --git a/common/src/com/android/inputmethod/latin/common/StringUtils.java b/common/src/com/android/inputmethod/latin/common/StringUtils.java index be7260308..572f0cd9b 100644 --- a/common/src/com/android/inputmethod/latin/common/StringUtils.java +++ b/common/src/com/android/inputmethod/latin/common/StringUtils.java @@ -201,22 +201,22 @@ public final class StringUtils { public static String capitalizeFirstCodePoint(@Nonnull final String s, @Nonnull final Locale locale) { if (s.length() <= 1) { - return s.toUpperCase(locale); + return s.toUpperCase(getLocaleUsedForToTitleCase(locale)); } // Please refer to the comment below in // {@link #capitalizeFirstAndDowncaseRest(String,Locale)} as this has the same shortcomings final int cutoff = s.offsetByCodePoints(0, 1); - return s.substring(0, cutoff).toUpperCase(locale) + s.substring(cutoff); + return s.substring(0, cutoff).toUpperCase(getLocaleUsedForToTitleCase(locale)) + + s.substring(cutoff); } @Nonnull public static String capitalizeFirstAndDowncaseRest(@Nonnull final String s, @Nonnull final Locale locale) { if (s.length() <= 1) { - return s.toUpperCase(locale); + return s.toUpperCase(getLocaleUsedForToTitleCase(locale)); } // TODO: fix the bugs below - // - This does not work for Greek, because it returns upper case instead of title case. // - It does not work for Serbian, because it fails to account for the "lj" character, // which should be "Lj" in title case and "LJ" in upper case. // - It does not work for Dutch, because it fails to account for the "ij" digraph when it's @@ -224,7 +224,8 @@ public final class StringUtils { // be capitalized as "IJ" as if they were a single letter in most words (not all). If the // unicode char for the ligature is used however, it works. final int cutoff = s.offsetByCodePoints(0, 1); - return s.substring(0, cutoff).toUpperCase(locale) + s.substring(cutoff).toLowerCase(locale); + return s.substring(0, cutoff).toUpperCase(getLocaleUsedForToTitleCase(locale)) + + s.substring(cutoff).toLowerCase(locale); } @Nonnull @@ -584,25 +585,35 @@ public final class StringUtils { return bytes; } - @Nullable - public static String toUpperCaseOfStringForLocale(@Nullable final String text, - final boolean needsToUpperCase, @Nonnull final Locale locale) { - if (text == null || !needsToUpperCase) { - return text; + private static final String LANGUAGE_GREEK = "el"; + + @Nonnull + private static Locale getLocaleUsedForToTitleCase(@Nonnull final Locale locale) { + // In Greek locale {@link String#toUpperCase(Locale)} eliminates accents from its result. + // In order to get accented upper case letter, {@link Locale#ROOT} should be used. + if (LANGUAGE_GREEK.equals(locale.getLanguage())) { + return Locale.ROOT; } - return text.toUpperCase(locale); + return locale; } - public static int toUpperCaseOfCodeForLocale(final int code, final boolean needsToUpperCase, + @Nullable + public static String toTitleCaseOfKeyLabel(@Nullable final String label, @Nonnull final Locale locale) { - if (!Constants.isLetterCode(code) || !needsToUpperCase) { + if (label == null) { + return label; + } + return label.toUpperCase(getLocaleUsedForToTitleCase(locale)); + } + + public static int toTitleCaseOfKeyCode(final int code, @Nonnull final Locale locale) { + if (!Constants.isLetterCode(code)) { return code; } - final String text = newSingleCodePointString(code); - final String casedText = toUpperCaseOfStringForLocale( - text, needsToUpperCase, locale); - return codePointCount(casedText) == 1 - ? casedText.codePointAt(0) : Constants.CODE_UNSPECIFIED; + final String label = newSingleCodePointString(code); + final String titleCaseLabel = toTitleCaseOfKeyLabel(label, locale); + return codePointCount(titleCaseLabel) == 1 + ? titleCaseLabel.codePointAt(0) : Constants.CODE_UNSPECIFIED; } public static int getTrailingSingleQuotesCount(@Nonnull final CharSequence charSequence) { diff --git a/java/res/values-bn-rBD/strings.xml b/java/res/values-bn-rBD/strings.xml index 8d77be4ea..f47e27135 100644 --- a/java/res/values-bn-rBD/strings.xml +++ b/java/res/values-bn-rBD/strings.xml @@ -94,12 +94,12 @@ <string name="subtype_en_GB" msgid="88170601942311355">"ইংরেজি (UK)"</string> <string name="subtype_en_US" msgid="6160452336634534239">"ইংরেজি (US)"</string> <string name="subtype_es_US" msgid="5583145191430180200">"স্প্যানিশ (US)"</string> - <string name="subtype_hi_ZZ" msgid="8860448146262798623">"হিংলিশ"</string> + <string name="subtype_hi_ZZ" msgid="8860448146262798623">"Hinglish"</string> <string name="subtype_sr_ZZ" msgid="9059219552986034343">"সার্বিয়ান (ল্যাটিন)"</string> <string name="subtype_with_layout_en_GB" msgid="1931018968641592304">"ইংরেজি (UK) (<xliff:g id="KEYBOARD_LAYOUT">%s</xliff:g>)"</string> <string name="subtype_with_layout_en_US" msgid="8809311287529805422">"ইংরেজি (US) (<xliff:g id="KEYBOARD_LAYOUT">%s</xliff:g>)"</string> <string name="subtype_with_layout_es_US" msgid="510930471167541338">"স্প্যানিশ (US) (<xliff:g id="KEYBOARD_LAYOUT">%s</xliff:g>)"</string> - <string name="subtype_with_layout_hi_ZZ" msgid="6827402953860547044">"হিংলিশ (<xliff:g id="KEYBOARD_LAYOUT">%s</xliff:g>)"</string> + <string name="subtype_with_layout_hi_ZZ" msgid="6827402953860547044">"Hinglish (<xliff:g id="KEYBOARD_LAYOUT">%s</xliff:g>)"</string> <string name="subtype_with_layout_sr_ZZ" msgid="2859024772719772407">"সার্বিয়ান (<xliff:g id="KEYBOARD_LAYOUT">%s</xliff:g>)"</string> <string name="subtype_generic_traditional" msgid="8584594350973800586">"<xliff:g id="LANGUAGE_NAME">%s</xliff:g> (ঐতিহ্যবাহি)"</string> <string name="subtype_generic_compact" msgid="3353673321203202922">"<xliff:g id="LANGUAGE_NAME">%s</xliff:g> (কম্প্যাক্ট)"</string> diff --git a/java/res/values-hi/strings.xml b/java/res/values-hi/strings.xml index a4f2dd39d..239b56f8e 100644 --- a/java/res/values-hi/strings.xml +++ b/java/res/values-hi/strings.xml @@ -94,12 +94,12 @@ <string name="subtype_en_GB" msgid="88170601942311355">"अंग्रेज़ी (यूके)"</string> <string name="subtype_en_US" msgid="6160452336634534239">"अंग्रेज़ी (यूएस)"</string> <string name="subtype_es_US" msgid="5583145191430180200">"स्पेनिश (यूएस)"</string> - <string name="subtype_hi_ZZ" msgid="8860448146262798623">"हिंग्लिश"</string> + <string name="subtype_hi_ZZ" msgid="8860448146262798623">"Hinglish"</string> <string name="subtype_sr_ZZ" msgid="9059219552986034343">"सर्बियाई (लैटिन)"</string> <string name="subtype_with_layout_en_GB" msgid="1931018968641592304">"अंग्रेज़ी (यूके) (<xliff:g id="KEYBOARD_LAYOUT">%s</xliff:g>)"</string> <string name="subtype_with_layout_en_US" msgid="8809311287529805422">"अंग्रेज़ी (यूएस) (<xliff:g id="KEYBOARD_LAYOUT">%s</xliff:g>)"</string> <string name="subtype_with_layout_es_US" msgid="510930471167541338">"स्पेनिश (यूएस) (<xliff:g id="KEYBOARD_LAYOUT">%s</xliff:g>)"</string> - <string name="subtype_with_layout_hi_ZZ" msgid="6827402953860547044">"हिंग्लिश (<xliff:g id="KEYBOARD_LAYOUT">%s</xliff:g>)"</string> + <string name="subtype_with_layout_hi_ZZ" msgid="6827402953860547044">"Hinglish (<xliff:g id="KEYBOARD_LAYOUT">%s</xliff:g>)"</string> <string name="subtype_with_layout_sr_ZZ" msgid="2859024772719772407">"सर्बियाई (<xliff:g id="KEYBOARD_LAYOUT">%s</xliff:g>)"</string> <string name="subtype_generic_traditional" msgid="8584594350973800586">"<xliff:g id="LANGUAGE_NAME">%s</xliff:g> (पारंपरिक)"</string> <string name="subtype_generic_compact" msgid="3353673321203202922">"<xliff:g id="LANGUAGE_NAME">%s</xliff:g> (संक्षिप्त)"</string> diff --git a/java/res/values-km-rKH/strings-emoji-descriptions.xml b/java/res/values-km-rKH/strings-emoji-descriptions.xml index e9b8780a5..aca04fc4d 100644 --- a/java/res/values-km-rKH/strings-emoji-descriptions.xml +++ b/java/res/values-km-rKH/strings-emoji-descriptions.xml @@ -25,16 +25,16 @@ <resources xmlns:android="http://schemas.android.com/apk/res/android" xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> - <string name="spoken_emoji_00A9" msgid="2859822817116803638">"សញ្ញារក្សាសិទ្ធ"</string> + <string name="spoken_emoji_00A9" msgid="2859822817116803638">"សញ្ញារក្សាសិទ្ធ"</string> <string name="spoken_emoji_00AE" msgid="7708335454134589027">"សញ្ញាចុះបញ្ជី"</string> <string name="spoken_emoji_203C" msgid="153340916701508663">"សញ្ញាឧទានពីរ"</string> - <string name="spoken_emoji_2049" msgid="4877256448299555371">"សញ្ញាឧទានសញ្ញាសួរ"</string> + <string name="spoken_emoji_2049" msgid="4877256448299555371">"សញ្ញាឧទានសញ្ញាសួរ"</string> <string name="spoken_emoji_2122" msgid="9188440722954720429">"សញ្ញានិក្ខិត្តសញ្ញា"</string> <string name="spoken_emoji_2139" msgid="9114342638917304327">"ប្រភពព័ត៌មាន"</string> <string name="spoken_emoji_2194" msgid="8055202727034946680">"ព្រួញឆ្វេងស្ដាំ"</string> <string name="spoken_emoji_2195" msgid="8028122253301087407">"ព្រួញឡើងលើចុះក្រោម"</string> <string name="spoken_emoji_2196" msgid="4019164898967854363">"ព្រួញទិសពាយព្យ"</string> - <string name="spoken_emoji_2197" msgid="4255723717709017801">"ព្រួញទិសឥសាន្តឦសាន្ត"</string> + <string name="spoken_emoji_2197" msgid="4255723717709017801">"ព្រួញទិសឥសាន្តឦសាន្ត"</string> <string name="spoken_emoji_2198" msgid="1452063451313622090">"ព្រួញទិសអាគ្នេយ៍"</string> <string name="spoken_emoji_2199" msgid="6942722693368807849">"ព្រួញទិសនិរតី"</string> <string name="spoken_emoji_21A9" msgid="5204750172335111188">"ព្រួញទៅឆ្វេងមានទំពក់"</string> @@ -45,7 +45,7 @@ <string name="spoken_emoji_23EA" msgid="2251396938087774944">"ត្រីកោណខ្មៅពីរចង្អុលទៅឆ្វេង"</string> <string name="spoken_emoji_23EB" msgid="3746885195641491865">"ត្រីកោណខ្មៅពីរចង្អុលឡើងលើ"</string> <string name="spoken_emoji_23EC" msgid="7852372752901163416">"ត្រីកោណខ្មៅពីរចង្អុលចុះក្រោម"</string> - <string name="spoken_emoji_23F0" msgid="8474219588750627870">"នាឡិការោទ៍"</string> + <string name="spoken_emoji_23F0" msgid="8474219588750627870">"នាឡិការោទ៍"</string> <string name="spoken_emoji_23F3" msgid="166900119581024371">"កែវពិសោធន៍មានខ្សាច់ហូរ"</string> <string name="spoken_emoji_24C2" msgid="3948348737566038470">"អក្សរអឹមធំក្នុងរង្វង់"</string> <string name="spoken_emoji_25AA" msgid="7865181015100227349">"ការ៉េតូចពណ៌ខ្មៅ"</string> @@ -195,7 +195,7 @@ <string name="spoken_emoji_1F312" msgid="4458575672576125401">"ព្រះចន្ទមួយចំណិតស្ដាំ"</string> <string name="spoken_emoji_1F313" msgid="7599181787989497294">"ព្រះចន្ទពាក់កណ្ដាល"</string> <string name="spoken_emoji_1F314" msgid="4898293184964365413">"ព្រះចន្ទមួយចំណិតឆ្វេង"</string> - <string name="spoken_emoji_1F315" msgid="3218117051779496309">"ព្រះចន្ទពេញវង់"</string> + <string name="spoken_emoji_1F315" msgid="3218117051779496309">"ព្រះចន្ទពេញវង់"</string> <string name="spoken_emoji_1F316" msgid="2061317145777689569">"ព្រះចន្ទភ្លឺមួយចំហៀង"</string> <string name="spoken_emoji_1F317" msgid="2721090687319539049">"ព្រះចន្ទភ្លឺពាក់កណ្ដាល"</string> <string name="spoken_emoji_1F318" msgid="3814091755648887570">"ព្រះចន្ទភ្លឺមួយចំណិតឆ្វេង"</string> @@ -262,7 +262,7 @@ <string name="spoken_emoji_1F365" msgid="4963815540953316307">"នំត្រីរាងមូល"</string> <string name="spoken_emoji_1F366" msgid="7862401745277049404">"ការ៉េមបំពង់"</string> <string name="spoken_emoji_1F367" msgid="7447972978281980414">"ការ៉េមកែវ"</string> - <string name="spoken_emoji_1F368" msgid="7790003146142724913">"ការ៉េម"</string> + <string name="spoken_emoji_1F368" msgid="7790003146142724913">"ការ៉េម"</string> <string name="spoken_emoji_1F369" msgid="7383712944084857350">"ដូណាត់"</string> <string name="spoken_emoji_1F36A" msgid="2726271795913042295">"ខូគី"</string> <string name="spoken_emoji_1F36B" msgid="6342163604299875931">"សូកូឡា"</string> @@ -280,7 +280,7 @@ <string name="spoken_emoji_1F377" msgid="1762398562314172075">"កែវស្រា"</string> <string name="spoken_emoji_1F378" msgid="5528234560590117516">"កែវស្រាក្រឡុក"</string> <string name="spoken_emoji_1F379" msgid="790581290787943325">"ភេសជ្ជៈត្រូពិក"</string> - <string name="spoken_emoji_1F37A" msgid="391966822450619516">"កែវស្រាបៀ"</string> + <string name="spoken_emoji_1F37A" msgid="391966822450619516">"កែវស្រាបៀ"</string> <string name="spoken_emoji_1F37B" msgid="9015043286465670662">"ជល់កែវស្រាបៀ"</string> <string name="spoken_emoji_1F37C" msgid="2532113819464508894">"ដបទឹកដោះគោ"</string> <string name="spoken_emoji_1F380" msgid="3487363857092458827">"ខ្សែបូ"</string> @@ -313,7 +313,7 @@ <string name="spoken_emoji_1F3A7" msgid="837856608794094105">"កាស"</string> <string name="spoken_emoji_1F3A8" msgid="2332260356509244587">"ក្ដារលាយពណ៌វិចិត្រករ"</string> <string name="spoken_emoji_1F3A9" msgid="9045869366525115256">"មួកសម្ដែងសិល្បៈ"</string> - <string name="spoken_emoji_1F3AA" msgid="5728760354237132">"តង់សៀក"</string> + <string name="spoken_emoji_1F3AA" msgid="5728760354237132">"តង់សៀក"</string> <string name="spoken_emoji_1F3AB" msgid="1657997517193216284">"សំបុត្រ"</string> <string name="spoken_emoji_1F3AC" msgid="4317366554314492152">"បន្ទះកណ្ដឹង"</string> <string name="spoken_emoji_1F3AD" msgid="607157286336130470">"សម្ដែងសិល្បៈ"</string> @@ -334,10 +334,10 @@ <string name="spoken_emoji_1F3BC" msgid="1608424748821446230">"និមិត្តសញ្ញាតន្ត្រី"</string> <string name="spoken_emoji_1F3BD" msgid="5490786111375627777">"អាវកីឡាមានខ្សែឆៀង"</string> <string name="spoken_emoji_1F3BE" msgid="1851613105691627931">"រ៉ាកែត និងបាល់"</string> - <string name="spoken_emoji_1F3BF" msgid="6862405997423247921">"ជិះស្គី និងក្ដារស្គី"</string> + <string name="spoken_emoji_1F3BF" msgid="6862405997423247921">"ជិះស្គី និងក្ដារស្គី"</string> <string name="spoken_emoji_1F3C0" msgid="7421420756115104085">"បាល់បោះ និងវណ្ណមូល"</string> <string name="spoken_emoji_1F3C1" msgid="6926537251677319922">"ទង់ជាតិប្រណាំងម៉ូតូ"</string> - <string name="spoken_emoji_1F3C2" msgid="5708596929237987082">"អ្នកជិះក្ដាររំអិលលើព្រិល"</string> + <string name="spoken_emoji_1F3C2" msgid="5708596929237987082">"អ្នកជិះក្ដាររំអិលលើព្រិល"</string> <string name="spoken_emoji_1F3C3" msgid="5850982999510115824">"អ្នករត់"</string> <string name="spoken_emoji_1F3C4" msgid="8468355585994639838">"អ្នកជិះទូករអិលលើទឹក"</string> <string name="spoken_emoji_1F3C6" msgid="9094474706847545409">"ពានរង្វាន់"</string> @@ -354,7 +354,7 @@ <string name="spoken_emoji_1F3E6" msgid="342132788513806214">"ធនាគារ"</string> <string name="spoken_emoji_1F3E7" msgid="6322352038284944265">"ម៉ាស៊ីនអេធីអឹម"</string> <string name="spoken_emoji_1F3E8" msgid="5864918444350599907">"សណ្ឋាគារ"</string> - <string name="spoken_emoji_1F3E9" msgid="7830416185375326938">"សណ្ឋាគារក្ដីស្រឡាញ់"</string> + <string name="spoken_emoji_1F3E9" msgid="7830416185375326938">"សណ្ឋាគារក្ដីស្រឡាញ់"</string> <string name="spoken_emoji_1F3EA" msgid="5081084413084360479">"ហាងទំនិញ ២៤ម៉ោង"</string> <string name="spoken_emoji_1F3EB" msgid="7010966528205150525">"សាលារៀន"</string> <string name="spoken_emoji_1F3EC" msgid="4845978861878295154">"ហាងទំនិញធំៗ"</string> @@ -439,12 +439,12 @@ <string name="spoken_emoji_1F44D" msgid="6182553970602667815">"មេដៃឡើងលើ"</string> <string name="spoken_emoji_1F44E" msgid="8030851867365111809">"មេដៃចុះក្រោម"</string> <string name="spoken_emoji_1F44F" msgid="5148753662268213389">"ទះដៃ"</string> - <string name="spoken_emoji_1F450" msgid="1012021072085157054">"លាដៃ"</string> + <string name="spoken_emoji_1F450" msgid="1012021072085157054">"លាដៃ"</string> <string name="spoken_emoji_1F451" msgid="8257466714629051320">"មកុដ"</string> <string name="spoken_emoji_1F452" msgid="4567394011149905466">"មួកស្ត្រី"</string> <string name="spoken_emoji_1F453" msgid="5978410551173163010">"វ៉ែនតា"</string> - <string name="spoken_emoji_1F454" msgid="348469036193323252">"ក្រវ៉ាត់ករ"</string> - <string name="spoken_emoji_1F455" msgid="5665118831861433578">"អាវយឺត"</string> + <string name="spoken_emoji_1F454" msgid="348469036193323252">"ក្រវ៉ាត់ករ"</string> + <string name="spoken_emoji_1F455" msgid="5665118831861433578">"អាវយឺត"</string> <string name="spoken_emoji_1F456" msgid="1890991330923356408">"ខោខោវប៊យ"</string> <string name="spoken_emoji_1F457" msgid="3904310482655702620">"សំលៀកបំពាក់"</string> <string name="spoken_emoji_1F458" msgid="5704243858031107692">"គីម៉ូណូ"</string> @@ -463,8 +463,8 @@ <string name="spoken_emoji_1F465" msgid="4461307702499679879">"គណនី"</string> <string name="spoken_emoji_1F466" msgid="1938873085514108889">"ក្មេងប្រុស"</string> <string name="spoken_emoji_1F467" msgid="8237080594860144998">"ក្មេងស្រី"</string> - <string name="spoken_emoji_1F468" msgid="6081300722526675382">"បុរស"</string> - <string name="spoken_emoji_1F469" msgid="1090140923076108158">"ស្ត្រី"</string> + <string name="spoken_emoji_1F468" msgid="6081300722526675382">"បុរស"</string> + <string name="spoken_emoji_1F469" msgid="1090140923076108158">"ស្ត្រី"</string> <string name="spoken_emoji_1F46A" msgid="5063570981942606595">"គ្រួសារ"</string> <string name="spoken_emoji_1F46B" msgid="6795882374287327952">"បុរស និងស្ត្រីកាន់ដៃគ្នា"</string> <string name="spoken_emoji_1F46C" msgid="6844464165783964495">"បុរសពីរនាក់កាន់ដៃគ្នា"</string> @@ -490,16 +490,16 @@ <string name="spoken_emoji_1F480" msgid="3696253485164878739">"លលាដ៍ក្បាល"</string> <string name="spoken_emoji_1F481" msgid="320408708521966893">"អ្នកផ្ដល់ព័ត៌មាន"</string> <string name="spoken_emoji_1F482" msgid="3424354860245608949">"អ្នកយាម"</string> - <string name="spoken_emoji_1F483" msgid="3221113594843849083">"អ្នករាំ"</string> + <string name="spoken_emoji_1F483" msgid="3221113594843849083">"អ្នករាំ"</string> <string name="spoken_emoji_1F484" msgid="7348014979080444885">"ក្រេមលាបបបូរមាត់"</string> <string name="spoken_emoji_1F485" msgid="6133507975565116339">"ថ្នាំលាបក្រចក"</string> <string name="spoken_emoji_1F486" msgid="9085459968247394155">"ម៉ាស្សាមុខ"</string> <string name="spoken_emoji_1F487" msgid="1479113637259592150">"កាត់សក់"</string> <string name="spoken_emoji_1F488" msgid="6922559285234100252">"ស្លាកសញ្ញាកាត់សក់"</string> <string name="spoken_emoji_1F489" msgid="8114863680950147305">"ស៊ីរ៉ាំង"</string> - <string name="spoken_emoji_1F48A" msgid="8526843630145963032">"ថ្នាំគ្រាប់"</string> + <string name="spoken_emoji_1F48A" msgid="8526843630145963032">"ថ្នាំគ្រាប់"</string> <string name="spoken_emoji_1F48B" msgid="2538528967897640292">"ស្នាមថើប"</string> - <string name="spoken_emoji_1F48C" msgid="1681173271652890232">"លិខិតស្នេហា"</string> + <string name="spoken_emoji_1F48C" msgid="1681173271652890232">"លិខិតស្នេហា"</string> <string name="spoken_emoji_1F48D" msgid="8259886164999042373">"រោទ៍"</string> <string name="spoken_emoji_1F48E" msgid="8777981696011111101">"ត្បូងថ្ម"</string> <string name="spoken_emoji_1F48F" msgid="741593675183677907">"ថើប"</string> @@ -525,7 +525,7 @@ <string name="spoken_emoji_1F4A3" msgid="6378351742957821735">"គ្រាប់បែក"</string> <string name="spoken_emoji_1F4A4" msgid="7217736258870346625">"និមិត្តសញ្ញាដេក"</string> <string name="spoken_emoji_1F4A5" msgid="5401995723541239858">"និមិត្តសញ្ញាប៉ះទង្គិចគ្នា"</string> - <string name="spoken_emoji_1F4A6" msgid="3837802182716483848">"និមិត្តសញ្ញាស្រក់ញើស"</string> + <string name="spoken_emoji_1F4A6" msgid="3837802182716483848">"និមិត្តសញ្ញាស្រក់ញើស"</string> <string name="spoken_emoji_1F4A7" msgid="5718438987757885141">"ដំណក់ទឹក"</string> <string name="spoken_emoji_1F4A8" msgid="4472108229720006377">"និមិត្តសញ្ញាដកឃ្លា"</string> <string name="spoken_emoji_1F4A9" msgid="1240958472788430032">"គំនរធូលី"</string> @@ -539,7 +539,7 @@ <string name="spoken_emoji_1F4B1" msgid="8339494003418572905">"ប្ដូររូបិយប័ណ្ណ"</string> <string name="spoken_emoji_1F4B2" msgid="3179159430187243132">"សញ្ញាដុល្លារ"</string> <string name="spoken_emoji_1F4B3" msgid="5375412518221759596">"កាតឥណទាន"</string> - <string name="spoken_emoji_1F4B4" msgid="1068592463669453204">"ក្រដាសប្រាក់ធនាគារមានសញ្ញាយ៉េន"</string> + <string name="spoken_emoji_1F4B4" msgid="1068592463669453204">"ក្រដាសប្រាក់ធនាគារមានសញ្ញាយ៉េន"</string> <string name="spoken_emoji_1F4B5" msgid="1426708699891832564">"លុយដុល្លារ"</string> <string name="spoken_emoji_1F4B6" msgid="8289249930736444837">"ក្រដាសប្រាក់ធនាគារមានសញ្ញាអឺរ៉ូ"</string> <string name="spoken_emoji_1F4B7" msgid="5245100496860739429">"ក្រដាសប្រាក់ធនាគារមានសញ្ញាផោន"</string> @@ -547,7 +547,7 @@ <string name="spoken_emoji_1F4B9" msgid="647509393536679903">"ក្រាហ្វិកនិន្នាការឡើងមានសញ្ញាយ៉េន"</string> <string name="spoken_emoji_1F4BA" msgid="1269737854891046321">"កៅអី"</string> <string name="spoken_emoji_1F4BB" msgid="6252883563347816451">"កុំព្យូទ័រផ្ទាល់ខ្លួន"</string> - <string name="spoken_emoji_1F4BC" msgid="6182597732218446206">"វ៉ាលី"</string> + <string name="spoken_emoji_1F4BC" msgid="6182597732218446206">"វ៉ាលី"</string> <string name="spoken_emoji_1F4BD" msgid="5820961044768829176">"ឌីសតូច"</string> <string name="spoken_emoji_1F4BE" msgid="4754542485835379808">"ថាសទន់"</string> <string name="spoken_emoji_1F4BF" msgid="2237481756984721795">"ថាស"</string> @@ -557,7 +557,7 @@ <string name="spoken_emoji_1F4C3" msgid="3727274466173970142">"ទំព័រកោង"</string> <string name="spoken_emoji_1F4C4" msgid="4382570710795501612">"ទំព័របញ្ឈរ"</string> <string name="spoken_emoji_1F4C5" msgid="8693944622627762487">"ប្រតិទិន"</string> - <string name="spoken_emoji_1F4C6" msgid="8469908708708424640">"ហែកប្រតិទិន"</string> + <string name="spoken_emoji_1F4C6" msgid="8469908708708424640">"ហែកប្រតិទិន"</string> <string name="spoken_emoji_1F4C7" msgid="2665313547987324495">"កាតរៀបតាមអក្សរ"</string> <string name="spoken_emoji_1F4C8" msgid="8007686702282833600">"ក្រាហ្វិកមាននិន្នាការឡើង"</string> <string name="spoken_emoji_1F4C9" msgid="2271951411192893684">"ក្រាហ្វិកមាននិន្នាការចុះ"</string> @@ -573,11 +573,11 @@ <string name="spoken_emoji_1F4D3" msgid="5873386492793610808">"សៀវភៅ"</string> <string name="spoken_emoji_1F4D4" msgid="4754469936418776360">"សៀវភៅមានក្របពណ៌"</string> <string name="spoken_emoji_1F4D5" msgid="4642713351802778905">"សៀវភៅបិទ"</string> - <string name="spoken_emoji_1F4D6" msgid="6987347918381807186">"សៀវភៅបើក"</string> + <string name="spoken_emoji_1F4D6" msgid="6987347918381807186">"សៀវភៅបើក"</string> <string name="spoken_emoji_1F4D7" msgid="7813394163241379223">"សៀវភៅពណ៌បៃតង"</string> <string name="spoken_emoji_1F4D8" msgid="7189799718984979521">"សៀវភៅពណ៌ខៀវ"</string> <string name="spoken_emoji_1F4D9" msgid="3874664073186440225">"សៀវភៅពណ៌ទឹកក្រូច"</string> - <string name="spoken_emoji_1F4DA" msgid="872212072924287762">"សៀវភៅ"</string> + <string name="spoken_emoji_1F4DA" msgid="872212072924287762">"សៀវភៅ"</string> <string name="spoken_emoji_1F4DB" msgid="2015183603583392969">"ស្លាកឈ្មោះ"</string> <string name="spoken_emoji_1F4DC" msgid="5075845110932456783">"ក្រដាសរមូរ"</string> <string name="spoken_emoji_1F4DD" msgid="2494006707147586786">"កំណត់ចំណាំ"</string> @@ -589,7 +589,7 @@ <string name="spoken_emoji_1F4E3" msgid="5588916572878599224">"ឧបករណ៍បំពងសំឡេង"</string> <string name="spoken_emoji_1F4E4" msgid="2063561529097749707">"ថាសចេញ"</string> <string name="spoken_emoji_1F4E5" msgid="3232462702926143576">"ថាសចូល"</string> - <string name="spoken_emoji_1F4E6" msgid="3399454337197561635">"កញ្ចប់"</string> + <string name="spoken_emoji_1F4E6" msgid="3399454337197561635">"កញ្ចប់"</string> <string name="spoken_emoji_1F4E7" msgid="5557136988503873238">"និមិត្តសញ្ញាអ៊ីមែល"</string> <string name="spoken_emoji_1F4E8" msgid="30698793974124123">"ស្រោមសំបុត្រចូល"</string> <string name="spoken_emoji_1F4E9" msgid="5947550337678643166">"ស្រោមសំបុត្រមានសញ្ញាព្រួញពីលើ"</string> @@ -626,7 +626,7 @@ <string name="spoken_emoji_1F50C" msgid="7793219132036431680">"ដុយអគ្គិសនី"</string> <string name="spoken_emoji_1F50D" msgid="8140244710637926780">"កែវពង្រីកចង្អុលខាងឆ្វេង"</string> <string name="spoken_emoji_1F50E" msgid="4751821352839693365">"កែវពង្រីកចង្អុលខាងស្ដាំ"</string> - <string name="spoken_emoji_1F50F" msgid="915079280472199605">"ចាក់សោដោយប្រើប៊ិច"</string> + <string name="spoken_emoji_1F50F" msgid="915079280472199605">"ចាក់សោដោយប្រើប៊ិច"</string> <string name="spoken_emoji_1F510" msgid="7658381761691758318">"បិទសោដោយប្រើកូនសោ"</string> <string name="spoken_emoji_1F511" msgid="262319867774655688">"សោ"</string> <string name="spoken_emoji_1F512" msgid="5628688337255115175">"ចាក់សោ"</string> @@ -645,15 +645,15 @@ <string name="spoken_emoji_1F51F" msgid="8673370823728653973">"គ្រាប់ចុច ១០"</string> <string name="spoken_emoji_1F520" msgid="7335109890337048900">"និមិត្តសញ្ញាបញ្ចូលសម្រាប់អក្សរឡាតាំងធំ"</string> <string name="spoken_emoji_1F521" msgid="2693185864450925778">"និមិត្តសញ្ញាបញ្ចូលសម្រាប់អក្សរឡាតាំងតូច"</string> - <string name="spoken_emoji_1F522" msgid="8419130286280673347">"និមិត្តសញ្ញាបញ្ចូលសម្រាប់លេខ"</string> + <string name="spoken_emoji_1F522" msgid="8419130286280673347">"និមិត្តសញ្ញាបញ្ចូលសម្រាប់លេខ"</string> <string name="spoken_emoji_1F523" msgid="3318053476401719421">"ការបញ្ចូលនិមិត្តសញ្ញា"</string> <string name="spoken_emoji_1F524" msgid="1625073997522316331">"និមិត្តសញ្ញាបញ្ចូលសម្រាប់អក្សរឡាតាំង"</string> <string name="spoken_emoji_1F525" msgid="4083884189172963790">"ភ្លើង"</string> <string name="spoken_emoji_1F526" msgid="2035494936742643580">"ពិលអគ្គិសនី"</string> <string name="spoken_emoji_1F527" msgid="134257142354034271">"ម៉ាឡេត"</string> <string name="spoken_emoji_1F528" msgid="700627429570609375">"ញញួរ"</string> - <string name="spoken_emoji_1F529" msgid="7480548235904988573">"ឡោស៊ី"</string> - <string name="spoken_emoji_1F52A" msgid="7613580031502317893">"កាំបិត"</string> + <string name="spoken_emoji_1F529" msgid="7480548235904988573">"ឡោស៊ី"</string> + <string name="spoken_emoji_1F52A" msgid="7613580031502317893">"កាំបិត"</string> <string name="spoken_emoji_1F52B" msgid="4554906608328118613">"កាំភ្លើងខ្លី"</string> <string name="spoken_emoji_1F52C" msgid="1330294501371770790">"មីក្រូទស្សន៍"</string> <string name="spoken_emoji_1F52D" msgid="7549551775445177140">"កែវយឹត"</string> @@ -662,7 +662,7 @@ <string name="spoken_emoji_1F530" msgid="3572898444281774023">"និមិត្តសញ្ញាជប៉ុនសម្រាប់អ្នកចាប់ផ្ដើម"</string> <string name="spoken_emoji_1F531" msgid="5225633376450025396">"លំពែងមុខបី"</string> <string name="spoken_emoji_1F532" msgid="9169568490485180779">"ប៊ូតុងការេពណ៌ខ្មៅ"</string> - <string name="spoken_emoji_1F533" msgid="6554193837201918598">"ប៊ូតុងការ៉េពណ៌ស"</string> + <string name="spoken_emoji_1F533" msgid="6554193837201918598">"ប៊ូតុងការ៉េពណ៌ស"</string> <string name="spoken_emoji_1F534" msgid="8339298801331865340">"រង្វង់ពណ៌ក្រហមធំ"</string> <string name="spoken_emoji_1F535" msgid="1227403104835533512">"រង្វង់ពណ៌ខៀវធំ"</string> <string name="spoken_emoji_1F536" msgid="5477372445510469331">"ពេជ្រពណ៌ទឹកក្រូចធំ"</string> @@ -745,8 +745,8 @@ <string name="spoken_emoji_1F628" msgid="8875777401624904224">"មុខភ័យខ្លាច"</string> <string name="spoken_emoji_1F629" msgid="1411538490319190118">"មុខនឿយហត់"</string> <string name="spoken_emoji_1F62A" msgid="4726686726690289969">"មុខងងុយគេង"</string> - <string name="spoken_emoji_1F62B" msgid="3221980473921623613">"មុខអស់កម្លាំង"</string> - <string name="spoken_emoji_1F62C" msgid="4616356691941225182">"មុខក្រញេវក្រញូវ"</string> + <string name="spoken_emoji_1F62B" msgid="3221980473921623613">"មុខអស់កម្លាំង"</string> + <string name="spoken_emoji_1F62C" msgid="4616356691941225182">"មុខក្រញេវក្រញូវ"</string> <string name="spoken_emoji_1F62D" msgid="4283677508698812232">"មុខយំលឺៗ"</string> <string name="spoken_emoji_1F62E" msgid="726083405284353894">"មុខបើកមាត់"</string> <string name="spoken_emoji_1F62F" msgid="7746620088234710962">"មុខស្ងៀមស្ងាត់"</string> @@ -784,7 +784,7 @@ <string name="spoken_emoji_1F683" msgid="8772750354339223092">"ទូររថភ្លើង"</string> <string name="spoken_emoji_1F684" msgid="346396777356203608">"រថភ្លើងល្បឿនលឿន"</string> <string name="spoken_emoji_1F685" msgid="1237059817190832730">"រថភ្លើងល្បឿនលឿនមានច្រមុះ"</string> - <string name="spoken_emoji_1F686" msgid="3525197227223620343">"រថភ្លើង"</string> + <string name="spoken_emoji_1F686" msgid="3525197227223620343">"រថភ្លើង"</string> <string name="spoken_emoji_1F687" msgid="5110143437960392837">"មេត្រូ"</string> <string name="spoken_emoji_1F688" msgid="4702085029871797965">"រថភ្លើងប្រើពន្លឺ"</string> <string name="spoken_emoji_1F689" msgid="2375851019798817094">"ស្ថានីយ"</string> @@ -803,7 +803,7 @@ <string name="spoken_emoji_1F696" msgid="6391604457418285404">"តាក់ស៊ីខាងមុខ"</string> <string name="spoken_emoji_1F697" msgid="7978399334396733790">"រថយន្ត"</string> <string name="spoken_emoji_1F698" msgid="7006050861129732018">"រថយន្តខាងមុខ"</string> - <string name="spoken_emoji_1F699" msgid="630317052666590607">"រថយន្តសម្រាប់កម្សាន្ត"</string> + <string name="spoken_emoji_1F699" msgid="630317052666590607">"រថយន្តសម្រាប់កម្សាន្ត"</string> <string name="spoken_emoji_1F69A" msgid="4739797891735823577">"រថយន្តចែកចាយ"</string> <string name="spoken_emoji_1F69B" msgid="4715997280786620649">"ឡានកាមីយ៉ុង"</string> <string name="spoken_emoji_1F69C" msgid="5557395610750818161">"ត្រាក់ទ័រ"</string> @@ -819,7 +819,7 @@ <string name="spoken_emoji_1F6A6" msgid="485575967773793454">"ភ្លើងចរាចរណ៍បញ្ឈរ"</string> <string name="spoken_emoji_1F6A7" msgid="6411048933816976794">"សញ្ញាសំណង់"</string> <string name="spoken_emoji_1F6A8" msgid="6345717218374788364">"រថយន្តប៉ូលិសបើកសារ៉ែនវិល"</string> - <string name="spoken_emoji_1F6A9" msgid="6586380356807600412">"បង្គោលទង់ជាតិរាងត្រីកោណ"</string> + <string name="spoken_emoji_1F6A9" msgid="6586380356807600412">"បង្គោលទង់ជាតិរាងត្រីកោណ"</string> <string name="spoken_emoji_1F6AA" msgid="8954448167261738885">"ទ្វារ"</string> <string name="spoken_emoji_1F6AB" msgid="5313946262888343544">"សញ្ញាហាមចូល"</string> <string name="spoken_emoji_1F6AC" msgid="6946858177965948288">"សញ្ញាជក់បារី"</string> diff --git a/java/res/values-km-rKH/strings-talkback-descriptions.xml b/java/res/values-km-rKH/strings-talkback-descriptions.xml index f9078323d..29d3b959f 100644 --- a/java/res/values-km-rKH/strings-talkback-descriptions.xml +++ b/java/res/values-km-rKH/strings-talkback-descriptions.xml @@ -78,7 +78,7 @@ <string name="spoken_emoji_unknown" msgid="5981009928135394306">"មិនស្គាល់សញ្ញាអារម្មណ៍"</string> <string name="spoken_emoticon_3A_2D_21_20" msgid="2410905667389534573">"មុខអផ្សុក"</string> <string name="spoken_emoticon_3A_2D_24_20" msgid="2481260475945560438">"មុខខ្មាសអៀន"</string> - <string name="spoken_emoticon_42_2D_29_20" msgid="1063205250387128068">"ពាក់វ៉ែនតា"</string> + <string name="spoken_emoticon_42_2D_29_20" msgid="1063205250387128068">"ពាក់វ៉ែនតា"</string> <string name="spoken_emoticon_3A_4F_20" msgid="532695091593447238">"មុខភ្ញាក់ផ្អើល"</string> <string name="spoken_emoticon_3A_2D_2A_20" msgid="5612342617244114291">"មុខថើប"</string> <string name="spoken_emoticon_3A_2D_5B_20" msgid="2223507987759905920">"មុខចងចិញ្ចើម"</string> diff --git a/java/res/values-km-rKH/strings.xml b/java/res/values-km-rKH/strings.xml index 8aea853a2..86fdf2957 100644 --- a/java/res/values-km-rKH/strings.xml +++ b/java/res/values-km-rKH/strings.xml @@ -39,7 +39,7 @@ <string name="include_other_imes_in_language_switch_list_summary" msgid="840637129103317635">"គ្រាប់ចុចប្ដូរភាសាតាមវិធីសាស្ត្របញ្ចូលផ្សេងទៀត"</string> <string name="show_language_switch_key" msgid="5915478828318774384">"គ្រាប់ចុចប្ដូរភាសា"</string> <string name="show_language_switch_key_summary" msgid="7343403647474265713">"បង្ហាញនៅពេលដែលបើកភាសាបញ្ចូលច្រើន"</string> - <string name="key_preview_popup_dismiss_delay" msgid="6213164897443068248">"សោលេចឡើងបោះបង់ការពន្យារពេល"</string> + <string name="key_preview_popup_dismiss_delay" msgid="6213164897443068248">"សោលេចឡើងបោះបង់ការពន្យារពេល"</string> <string name="key_preview_popup_dismiss_no_delay" msgid="2096123151571458064">"គ្មានការពន្យារពេល"</string> <string name="key_preview_popup_dismiss_default_delay" msgid="2166964333903906734">"លំនាំដើម"</string> <string name="abbreviation_unit_milliseconds" msgid="8700286094028323363">"<xliff:g id="MILLISECONDS">%s</xliff:g> មិល្លីវិនាទី"</string> @@ -50,7 +50,7 @@ <string name="enable_metrics_logging" msgid="5506372337118822837">"ធ្វើឲ្យ <xliff:g id="APPLICATION_NAME">%s</xliff:g> ប្រសើរឡើង"</string> <string name="use_double_space_period" msgid="8781529969425082860">"រយៈពេលចុចដកឃ្លាពីរដង"</string> <string name="use_double_space_period_summary" msgid="6532892187247952799">"ប៉ះដកឃ្លាពីរដងបញ្ចូលរយៈពេលដែលអនុវត្តតាមដកឃ្លា"</string> - <string name="auto_cap" msgid="1719746674854628252">"ការសរសេរជាអក្សរធំស្វ័យប្រវត្តិ"</string> + <string name="auto_cap" msgid="1719746674854628252">"ការសរសេរជាអក្សរធំស្វ័យប្រវត្តិ"</string> <string name="auto_cap_summary" msgid="7934452761022946874">"សរសេរពាក្យដំបូងជាអក្សរធំនៃប្រយោគនីមួយៗ"</string> <string name="edit_personal_dictionary" msgid="3996910038952940420">"វចនានុក្រមផ្ទាល់ខ្លួន"</string> <string name="configure_dictionaries_title" msgid="4238652338556902049">"ផ្នែកបន្ថែមវចនានុក្រម"</string> @@ -58,7 +58,7 @@ <string name="prefs_show_suggestions" msgid="8026799663445531637">"បង្ហាញការស្នើកែ"</string> <string name="prefs_show_suggestions_summary" msgid="1583132279498502825">"បង្ហាញពាក្យបានផ្ដល់ស្នើខណៈពេលវាយបញ្ចូល"</string> <string name="prefs_block_potentially_offensive_title" msgid="5078480071057408934">"ទប់ស្កាត់ពាក្យបំពាន"</string> - <string name="prefs_block_potentially_offensive_summary" msgid="2371835479734991364">"កុំស្នើឲ្យពាក្យបំពានមានសក្ដានុពល"</string> + <string name="prefs_block_potentially_offensive_summary" msgid="2371835479734991364">"កុំស្នើឲ្យពាក្យបំពានមានសក្ដានុពល"</string> <string name="auto_correction" msgid="7630720885194996950">"ការកែស្វ័យប្រវត្តិ"</string> <string name="auto_correction_summary" msgid="5625751551134658006">"ចន្លោះមិនឃើញ និងសញ្ញាវណ្ណយុត្តកែពាក្យដែលបានវាយខុសស្វ័យប្រវត្តិ"</string> <string name="auto_correction_threshold_mode_off" msgid="8470882665417944026">"បិទ"</string> @@ -149,7 +149,7 @@ <string name="dictionary_provider_name" msgid="3027315045397363079">"កម្មវិធីផ្ដល់វចនានុក្រម"</string> <string name="dictionary_service_name" msgid="6237472350693511448">"សេវាកម្មវចនានុក្រម"</string> <string name="download_description" msgid="6014835283119198591">"ព័ត៌មានបច្ចុប្បន្នភាពវចនានុក្រម"</string> - <string name="dictionary_settings_title" msgid="8091417676045693313">"ផ្នែកបន្ថែមវចនានុក្រម"</string> + <string name="dictionary_settings_title" msgid="8091417676045693313">"ផ្នែកបន្ថែមវចនានុក្រម"</string> <string name="dictionary_install_over_metered_network_prompt" msgid="3587517870006332980">"វចនានុក្រមអាចប្រើបាន"</string> <string name="dictionary_settings_summary" msgid="5305694987799824349">"ការកំណត់សម្រាប់វចនានុក្រម"</string> <string name="user_dictionaries" msgid="3582332055892252845">"វចនានុក្រមអ្នកប្រើ"</string> @@ -165,10 +165,10 @@ <string name="message_updating" msgid="4457761393932375219">"ពិនិត្យមើលបច្ចុប្បន្នភាព"</string> <string name="message_loading" msgid="5638680861387748936">"កំពុងផ្ទុក..."</string> <string name="main_dict_description" msgid="3072821352793492143">"វចនានុក្រមចម្បង"</string> - <string name="cancel" msgid="6830980399865683324">"បោះបង់"</string> + <string name="cancel" msgid="6830980399865683324">"បោះបង់"</string> <string name="go_to_settings" msgid="3876892339342569259">"ការកំណត់"</string> <string name="install_dict" msgid="180852772562189365">"ដំឡើង"</string> - <string name="cancel_download_dict" msgid="7843340278507019303">"បោះបង់"</string> + <string name="cancel_download_dict" msgid="7843340278507019303">"បោះបង់"</string> <string name="delete_dict" msgid="756853268088330054">"លុប"</string> <string name="should_download_over_metered_prompt" msgid="1583881200688185508">"ភាសាដែលបានជ្រើសនៅលើឧបករណ៍ចល័តមានវចនានុក្រមអាចប្រើបាន។<br/> យើងផ្ដល់អនុសាសន៍ឲ្យ <b>ទាញយក</b> វចនានុក្រមភាសា <xliff:g id="LANGUAGE_NAME">%1$s</xliff:g> ដើម្បីបង្កើនបទពិសោធន៍វាយបញ្ចូលរបស់អ្នក។<br/> <br/> ការទាញយកអាចចំណាយពេលប្រហែលពីរនាទីនៅតាម 3G។ ការគិតថ្លៃអាចអនុវត្តប្រសិនបើអ្នកមិនប្រើ <b>ផែនការទិន្នន័យគ្មានដែនកំណត់</b>.<br/> បើអ្នកមិនប្រាកដថាផែនការណាមួយដែលអ្នកមាន យើងផ្ដល់អនុសាសន៍ឲ្យភ្ជាប់វ៉ាយហ្វាយ ដើម្បីចាប់ផ្ដើមទាញយកដោយស្វ័យប្រវត្តិ។<br/> <br/> ជំនួយ៖ អ្នកអាចទាញយក និងលុបវចនានុក្រមដោយចូលទៅ <b>ភាសា & ការបញ្ចូល</b> នៅក្នុងម៉ឺនុយ <b>ការកំណត់</b> សម្រាប់ឧបករណ៍ចល័ត។"</string> <string name="download_over_metered" msgid="1643065851159409546">"ទាញយកឥឡូវនេះ (<xliff:g id="SIZE_IN_MEGABYTES">%1$.1f</xliff:g> មេកាបៃ)"</string> @@ -186,7 +186,7 @@ <string name="user_dict_settings_add_word_option_name" msgid="6665558053408962865">"ពាក្យ៖"</string> <string name="user_dict_settings_add_shortcut_option_name" msgid="3094731590655523777">"ផ្លូវកាត់៖"</string> <string name="user_dict_settings_add_locale_option_name" msgid="4738643440987277705">"ភាសា៖"</string> - <string name="user_dict_settings_add_word_hint" msgid="4902434148985906707">"វាយបញ្ចូលពាក្យ"</string> + <string name="user_dict_settings_add_word_hint" msgid="4902434148985906707">"វាយបញ្ចូលពាក្យ"</string> <string name="user_dict_settings_add_shortcut_hint" msgid="2265453012555060178">"ផ្លូវកាត់ជាជម្រើស"</string> <string name="user_dict_settings_edit_dialog_title" msgid="3765774633869590352">"កែពាក្យ"</string> <string name="user_dict_settings_context_menu_edit_title" msgid="6812255903472456302">"កែ"</string> diff --git a/java/res/values-lo-rLA/strings-emoji-descriptions.xml b/java/res/values-lo-rLA/strings-emoji-descriptions.xml index 84b9d0502..61845dafe 100644 --- a/java/res/values-lo-rLA/strings-emoji-descriptions.xml +++ b/java/res/values-lo-rLA/strings-emoji-descriptions.xml @@ -210,7 +210,7 @@ <string name="spoken_emoji_1F330" msgid="3115760035618051575">"ລູກເກົາລັດ"</string> <string name="spoken_emoji_1F331" msgid="5658888205290008691">"ກ້າໄມ້"</string> <string name="spoken_emoji_1F332" msgid="2935650450421165938">"ຕົ້ນໄມ້ບໍ່ຜັດໃບ"</string> - <string name="spoken_emoji_1F333" msgid="5898847427062482675">"ຕົ້ນໄມ້ຜັດໃບ"</string> + <string name="spoken_emoji_1F333" msgid="5898847427062482675">"ຕົ້ນໄມ້ຜັດໃບ"</string> <string name="spoken_emoji_1F334" msgid="6183375224678417894">"ຕົ້ນປາມ"</string> <string name="spoken_emoji_1F335" msgid="5352418412103584941">"ກະບອງເພັດ"</string> <string name="spoken_emoji_1F337" msgid="3839107352363566289">"ທິວລິບ"</string> @@ -267,7 +267,7 @@ <string name="spoken_emoji_1F36A" msgid="2726271795913042295">"ຄຸກກີ້"</string> <string name="spoken_emoji_1F36B" msgid="6342163604299875931">"ຊັອກໂກແລັດບາ"</string> <string name="spoken_emoji_1F36C" msgid="2168934753998218790">"ແຄນດີ້"</string> - <string name="spoken_emoji_1F36D" msgid="3671507903799975792">"Lollipop"</string> + <string name="spoken_emoji_1F36D" msgid="3671507903799975792">"ເຂົ້າໜົມອົມຍິ້ມ"</string> <string name="spoken_emoji_1F36E" msgid="4630541402785165902">"ຄັສຕາດ"</string> <string name="spoken_emoji_1F36F" msgid="5577915387425169439">"ໝໍ້ນ້ຳເຜິ້ງ"</string> <string name="spoken_emoji_1F370" msgid="7243244547866114951">"ຊັອດເຄັກ"</string> @@ -450,7 +450,7 @@ <string name="spoken_emoji_1F458" msgid="5704243858031107692">"ກິໂມໂນ"</string> <string name="spoken_emoji_1F459" msgid="3553148747050035251">"ບິກີນີ"</string> <string name="spoken_emoji_1F45A" msgid="1389654639484716101">"ເສື້ອຜ້າຜູ່ຍິງ"</string> - <string name="spoken_emoji_1F45B" msgid="1113293170254222904">"ກະເປົາ"</string> + <string name="spoken_emoji_1F45B" msgid="1113293170254222904">"ກະເປົາ"</string> <string name="spoken_emoji_1F45C" msgid="3410257778598006936">"ກະເປົາ"</string> <string name="spoken_emoji_1F45D" msgid="812176504300064819">"ກະເປົາ"</string> <string name="spoken_emoji_1F45E" msgid="2901741399934723562">"ເກີບຜູ່ຊາຍ"</string> diff --git a/java/res/values-lo-rLA/strings-letter-descriptions.xml b/java/res/values-lo-rLA/strings-letter-descriptions.xml index ecc0b7a71..47f7cbc81 100644 --- a/java/res/values-lo-rLA/strings-letter-descriptions.xml +++ b/java/res/values-lo-rLA/strings-letter-descriptions.xml @@ -186,7 +186,7 @@ <string name="spoken_symbol_2019" msgid="8892530161598134083">"Right single quotation mark"</string> <string name="spoken_symbol_201A" msgid="2072987157683446644">"Single low-9 quotation mark"</string> <string name="spoken_symbol_201C" msgid="4588048378803665427">"ເຄື່ອງໝາຍວົງຢືມຊ້າຍ"</string> - <string name="spoken_symbol_201D" msgid="1642776849495925895">"ເຄື່ອງໝາຍວົງຢືມຂວາ"</string> + <string name="spoken_symbol_201D" msgid="1642776849495925895">"ເຄື່ອງໝາຍວົງຢືມຂວາ"</string> <string name="spoken_symbol_2020" msgid="9084628638189344431">"Dagger"</string> <string name="spoken_symbol_2021" msgid="5081396468559426475">"Double dagger"</string> <string name="spoken_symbol_2030" msgid="9068837172419431755">"ເຄື່ອງໝາຍຕໍ່ໄມລ໌"</string> diff --git a/java/res/values-my-rMM/strings-action-keys.xml b/java/res/values-my-rMM/strings-action-keys.xml index d15c9e55e..f7a2ca9e1 100644 --- a/java/res/values-my-rMM/strings-action-keys.xml +++ b/java/res/values-my-rMM/strings-action-keys.xml @@ -27,5 +27,5 @@ <string name="label_send_key" msgid="482252074224462163">"ပို့ရန်"</string> <string name="label_search_key" msgid="7965186050435796642">"ရှာဖွေရန်"</string> <string name="label_pause_key" msgid="2225922926459730642">"ဆိုင်းငံ့ရန်"</string> - <string name="label_wait_key" msgid="5891247853595466039">"စောင့်ဆိုင်းရန်"</string> + <string name="label_wait_key" msgid="5891247853595466039">"စောင့်ဆိုင်းရန်"</string> </resources> diff --git a/java/res/values-my-rMM/strings-letter-descriptions.xml b/java/res/values-my-rMM/strings-letter-descriptions.xml index 2d5338b86..d904f53f6 100644 --- a/java/res/values-my-rMM/strings-letter-descriptions.xml +++ b/java/res/values-my-rMM/strings-letter-descriptions.xml @@ -29,7 +29,7 @@ <string name="spoken_accented_letter_00AA" msgid="4374325261868451570">"ဣထိလိင် အစဉ်ပြ အညွှန်း"</string> <string name="spoken_accented_letter_00B5" msgid="9031387673828823891">"မိုက်ခရို သင်္ကေတ"</string> <string name="spoken_accented_letter_00BA" msgid="5045198452071207437">"ပုလိင် အစဉ်ပြ အညွှန်း"</string> - <string name="spoken_accented_letter_00DF" msgid="2260098367028134281">"ပြတ်သားသည့် S"</string> + <string name="spoken_accented_letter_00DF" msgid="2260098367028134281">"ပြတ်သားသည့် S"</string> <string name="spoken_accented_letter_00E0" msgid="2234515772182387086">"A၊ တည်ငြိမ်သော"</string> <string name="spoken_accented_letter_00E1" msgid="7780174500802535063">"A၊ စူးရှသော"</string> <string name="spoken_accented_letter_00E2" msgid="7054108480488102631">"A၊ သရသံသင်္ကေတ"</string> @@ -133,45 +133,45 @@ <string name="spoken_accented_letter_0259" msgid="2464085263158415898">"Schwa"</string> <string name="spoken_accented_letter_1EA1" msgid="688124877202887630">"A၊ အောက်မှာ အစက်"</string> <string name="spoken_accented_letter_1EA3" msgid="327960130366386256">"A အပေါ်မှာ ချိတ်"</string> - <string name="spoken_accented_letter_1EA5" msgid="637406363453769610">"A၊ သရသံသင်္ကေတ နှင့် စူးရှသော"</string> - <string name="spoken_accented_letter_1EA7" msgid="1419591804181615409">"A၊ သရသံသင်္ကေတ နှင့် တည်ငြိမ်သော"</string> - <string name="spoken_accented_letter_1EA9" msgid="6068887382734896756">"A၊ သရသံသင်္ကေတ နှင့် အပေါ်မှာ ချိတ်"</string> - <string name="spoken_accented_letter_1EAB" msgid="7236523151662538333">"A၊ သရသံသင်္ကေတ နှင့် tilde"</string> - <string name="spoken_accented_letter_1EAD" msgid="2363364864106332076">"A,၊ သရသံသင်္ကေတ နှင့် အောက်မှာ အစက်"</string> - <string name="spoken_accented_letter_1EAF" msgid="1576329511464272935">"A၊ တည်ငြိမ်သော နှင့် စူးရှသော"</string> - <string name="spoken_accented_letter_1EB1" msgid="4634735072816076592">"A၊ breve နှင့် တည်ငြိမ်သော"</string> - <string name="spoken_accented_letter_1EB3" msgid="2325245849038771534">"A၊ breve နှင့် အပေါ်မှာ ချိတ်"</string> - <string name="spoken_accented_letter_1EB5" msgid="3720427596242746295">"A၊ breve နှင့် tilde"</string> - <string name="spoken_accented_letter_1EB7" msgid="700415535653646695">"A၊ breve နှင့် အောက်မှာ အစက်"</string> + <string name="spoken_accented_letter_1EA5" msgid="637406363453769610">"A၊ သရသံသင်္ကေတ နှင့် စူးရှသော"</string> + <string name="spoken_accented_letter_1EA7" msgid="1419591804181615409">"A၊ သရသံသင်္ကေတ နှင့် တည်ငြိမ်သော"</string> + <string name="spoken_accented_letter_1EA9" msgid="6068887382734896756">"A၊ သရသံသင်္ကေတ နှင့် အပေါ်မှာ ချိတ်"</string> + <string name="spoken_accented_letter_1EAB" msgid="7236523151662538333">"A၊ သရသံသင်္ကေတ နှင့် tilde"</string> + <string name="spoken_accented_letter_1EAD" msgid="2363364864106332076">"A,၊ သရသံသင်္ကေတ နှင့် အောက်မှာ အစက်"</string> + <string name="spoken_accented_letter_1EAF" msgid="1576329511464272935">"A၊ တည်ငြိမ်သော နှင့် စူးရှသော"</string> + <string name="spoken_accented_letter_1EB1" msgid="4634735072816076592">"A၊ breve နှင့် တည်ငြိမ်သော"</string> + <string name="spoken_accented_letter_1EB3" msgid="2325245849038771534">"A၊ breve နှင့် အပေါ်မှာ ချိတ်"</string> + <string name="spoken_accented_letter_1EB5" msgid="3720427596242746295">"A၊ breve နှင့် tilde"</string> + <string name="spoken_accented_letter_1EB7" msgid="700415535653646695">"A၊ breve နှင့် အောက်မှာ အစက်"</string> <string name="spoken_accented_letter_1EB9" msgid="3901338692305890487">"E၊ အောက်မှာ အစက်"</string> <string name="spoken_accented_letter_1EBB" msgid="4028688699415417302">"E၊ အပေါ်မှာ ချိတ်"</string> <string name="spoken_accented_letter_1EBD" msgid="181253633045931897">"E၊ tilde"</string> - <string name="spoken_accented_letter_1EBF" msgid="3309618845007944963">"E၊ သရသံသင်္ကေတ နှင့် စူးရှသော"</string> - <string name="spoken_accented_letter_1EC1" msgid="8139046749226332542">"E၊ သရသံသင်္ကေတ နှင့် တည်ငြိမ်သော"</string> - <string name="spoken_accented_letter_1EC3" msgid="3239674223053133383">"E၊ သရသံသင်္ကေတ နှင့် ချိတ် အပေါ်မှာ"</string> - <string name="spoken_accented_letter_1EC5" msgid="2216559244705714587">"E၊ သရသံသင်္ကေတ နှင့် tilde"</string> - <string name="spoken_accented_letter_1EC7" msgid="9012731468253986792">"E၊ သရသံသင်္ကေတ နှင့် အောက်မှာ အစက်"</string> + <string name="spoken_accented_letter_1EBF" msgid="3309618845007944963">"E၊ သရသံသင်္ကေတ နှင့် စူးရှသော"</string> + <string name="spoken_accented_letter_1EC1" msgid="8139046749226332542">"E၊ သရသံသင်္ကေတ နှင့် တည်ငြိမ်သော"</string> + <string name="spoken_accented_letter_1EC3" msgid="3239674223053133383">"E၊ သရသံသင်္ကေတ နှင့် ချိတ် အပေါ်မှာ"</string> + <string name="spoken_accented_letter_1EC5" msgid="2216559244705714587">"E၊ သရသံသင်္ကေတ နှင့် tilde"</string> + <string name="spoken_accented_letter_1EC7" msgid="9012731468253986792">"E၊ သရသံသင်္ကေတ နှင့် အောက်မှာ အစက်"</string> <string name="spoken_accented_letter_1EC9" msgid="2901917620195717034">"I၊ အပေါ်မှာ ချိတ်"</string> <string name="spoken_accented_letter_1ECB" msgid="5470387489820034621">"I၊ အောက်မှာ အစက်"</string> <string name="spoken_accented_letter_1ECD" msgid="1340122876914839806">"O၊ အောက်မှာ အစက်"</string> <string name="spoken_accented_letter_1ECF" msgid="2326921263882559755">"O၊ အပေါ်မှာ ချိတ်"</string> - <string name="spoken_accented_letter_1ED1" msgid="2885683296042774958">"O၊ သရသံသင်္ကေတ နှင့် စူးရှသော"</string> - <string name="spoken_accented_letter_1ED3" msgid="6857664926477376178">"O၊ သရသံသင်္ကေတ နှင့် တည်ငြိမ်သော"</string> - <string name="spoken_accented_letter_1ED5" msgid="2015209467290624062">"O၊ သရသံသင်္ကေတ နှင့် အပေါ်မှာ ချိတ်"</string> - <string name="spoken_accented_letter_1ED7" msgid="7924481354960306389">"O၊ သရသံသင်္ကေတ နှင့် tilde"</string> - <string name="spoken_accented_letter_1ED9" msgid="7023315590332365554">"O၊ သရသံသင်္ကေတ နှင့် အောက်မှာ အစက်"</string> - <string name="spoken_accented_letter_1EDB" msgid="2379438944917634496">"O၊ horn နှင့် စူးရှသော"</string> - <string name="spoken_accented_letter_1EDD" msgid="8107077534204404085">"O၊ horn နှင့် တည်ငြိမ်သော"</string> - <string name="spoken_accented_letter_1EDF" msgid="1846880105528347966">"O၊ horn နှင့် အပေါ်မှာ ချိတ်"</string> - <string name="spoken_accented_letter_1EE1" msgid="1520037313389776718">"O၊ horn နှင့် tilde"</string> - <string name="spoken_accented_letter_1EE3" msgid="907964027171008963">"O၊ horn နှင့် အောက်မှာ အစက်"</string> + <string name="spoken_accented_letter_1ED1" msgid="2885683296042774958">"O၊ သရသံသင်္ကေတ နှင့် စူးရှသော"</string> + <string name="spoken_accented_letter_1ED3" msgid="6857664926477376178">"O၊ သရသံသင်္ကေတ နှင့် တည်ငြိမ်သော"</string> + <string name="spoken_accented_letter_1ED5" msgid="2015209467290624062">"O၊ သရသံသင်္ကေတ နှင့် အပေါ်မှာ ချိတ်"</string> + <string name="spoken_accented_letter_1ED7" msgid="7924481354960306389">"O၊ သရသံသင်္ကေတ နှင့် tilde"</string> + <string name="spoken_accented_letter_1ED9" msgid="7023315590332365554">"O၊ သရသံသင်္ကေတ နှင့် အောက်မှာ အစက်"</string> + <string name="spoken_accented_letter_1EDB" msgid="2379438944917634496">"O၊ horn နှင့် စူးရှသော"</string> + <string name="spoken_accented_letter_1EDD" msgid="8107077534204404085">"O၊ horn နှင့် တည်ငြိမ်သော"</string> + <string name="spoken_accented_letter_1EDF" msgid="1846880105528347966">"O၊ horn နှင့် အပေါ်မှာ ချိတ်"</string> + <string name="spoken_accented_letter_1EE1" msgid="1520037313389776718">"O၊ horn နှင့် tilde"</string> + <string name="spoken_accented_letter_1EE3" msgid="907964027171008963">"O၊ horn နှင့် အောက်မှာ အစက်"</string> <string name="spoken_accented_letter_1EE5" msgid="1522024630360038700">"U၊ အောက်မှာ အစက်"</string> <string name="spoken_accented_letter_1EE7" msgid="7815412228302952637">"U၊ အပေါ်မှာ ချိတ်"</string> - <string name="spoken_accented_letter_1EE9" msgid="4219119671251485651">"U၊ horn နှင့် စူးရှသော"</string> - <string name="spoken_accented_letter_1EEB" msgid="4086009841269002231">"U၊ horn နှင့် တည်ငြိမ်သော"</string> - <string name="spoken_accented_letter_1EED" msgid="3528151733528719847">"U၊ horn နှင့် အပေါ်မှာ ချိတ်"</string> - <string name="spoken_accented_letter_1EEF" msgid="3508548229409072119">"U၊ horn နှင့် tilde"</string> - <string name="spoken_accented_letter_1EF1" msgid="1912816350401931115">"U၊ horn နှင့် အောက်မှာ အစက်"</string> + <string name="spoken_accented_letter_1EE9" msgid="4219119671251485651">"U၊ horn နှင့် စူးရှသော"</string> + <string name="spoken_accented_letter_1EEB" msgid="4086009841269002231">"U၊ horn နှင့် တည်ငြိမ်သော"</string> + <string name="spoken_accented_letter_1EED" msgid="3528151733528719847">"U၊ horn နှင့် အပေါ်မှာ ချိတ်"</string> + <string name="spoken_accented_letter_1EEF" msgid="3508548229409072119">"U၊ horn နှင့် tilde"</string> + <string name="spoken_accented_letter_1EF1" msgid="1912816350401931115">"U၊ horn နှင့် အောက်မှာ အစက်"</string> <string name="spoken_accented_letter_1EF3" msgid="7211760439435946494">"Y၊ တည်ငြိမ်သော"</string> <string name="spoken_accented_letter_1EF5" msgid="8998864482764007384">"Y၊ အောက်မှာ အစက်"</string> <string name="spoken_accented_letter_1EF7" msgid="922043627252869200">"Y၊ အပေါ်မှာ ချိတ်"</string> diff --git a/java/res/values-my-rMM/strings-talkback-descriptions.xml b/java/res/values-my-rMM/strings-talkback-descriptions.xml index 08fd19014..a4f84a27a 100644 --- a/java/res/values-my-rMM/strings-talkback-descriptions.xml +++ b/java/res/values-my-rMM/strings-talkback-descriptions.xml @@ -79,7 +79,7 @@ <string name="spoken_emoticon_3A_2D_21_20" msgid="2410905667389534573">"စိတ်ကုန်နေသော မျက်နှာ"</string> <string name="spoken_emoticon_3A_2D_24_20" msgid="2481260475945560438">"ကသိကအောက် မျက်နှာ"</string> <string name="spoken_emoticon_42_2D_29_20" msgid="1063205250387128068">"နေကာမျက်မှန်တပ် မျက်နှာ"</string> - <string name="spoken_emoticon_3A_4F_20" msgid="532695091593447238">"အံ့အားသင့်နေသော မျက်နှာ"</string> + <string name="spoken_emoticon_3A_4F_20" msgid="532695091593447238">"အံ့အားသင့်နေသော မျက်နှာ"</string> <string name="spoken_emoticon_3A_2D_2A_20" msgid="5612342617244114291">"နမ်းနေသော မျက်နှာ"</string> <string name="spoken_emoticon_3A_2D_5B_20" msgid="2223507987759905920">"မှုန်ကုပ်ကုပ် မျက်နှာ"</string> <string name="spoken_open_more_keys_keyboard" msgid="6832897688371903747">"အစားထိုးစရာ စာလုံးများ ရှိနိုင်"</string> diff --git a/java/res/values-my-rMM/strings.xml b/java/res/values-my-rMM/strings.xml index ab4037861..281004670 100644 --- a/java/res/values-my-rMM/strings.xml +++ b/java/res/values-my-rMM/strings.xml @@ -30,11 +30,11 @@ <string name="settings_screen_accounts" msgid="7570397912370223287">"အကောင့်များ & ကိုယ်ပိုင်ကိစ္စ"</string> <string name="settings_screen_appearance" msgid="9153102634339912029">"အပြင်ပန်း & အပြင်အဆင်များ"</string> <string name="settings_screen_multilingual" msgid="1391301621464509659">"ဘာသာစကားစုံ ရွေးချယ်စရာများ"</string> - <string name="settings_screen_gesture" msgid="8826372746901183556">"လှုပ်ရှားမှုဖြင့်စာရိုက်ခြင်း"</string> + <string name="settings_screen_gesture" msgid="8826372746901183556">"လှုပ်ရှားမှုဖြင့်စာရိုက်ခြင်း"</string> <string name="settings_screen_correction" msgid="1616818407747682955">"စာအမှားပြပြင်ခြင်း"</string> - <string name="settings_screen_advanced" msgid="7472408607625972994">"အဆင့်မြင့်"</string> + <string name="settings_screen_advanced" msgid="7472408607625972994">"အဆင့်မြင့်"</string> <string name="settings_screen_theme" msgid="2137262503543943871">"အပြင်အဆင်"</string> - <string name="enable_split_keyboard" msgid="4177264923999493614">"ကီးဘုတ် ခွဲခြမ်းမှု ဖွင့်ထားရန်"</string> + <string name="enable_split_keyboard" msgid="4177264923999493614">"ကီးဘုတ် ခွဲခြမ်းမှု ဖွင့်ထားရန်"</string> <string name="include_other_imes_in_language_switch_list" msgid="4533689960308565519">"အခြားထည့်သွင်းမည့် နည်းလမ်းများသို့ ပြောင်းရန်"</string> <string name="include_other_imes_in_language_switch_list_summary" msgid="840637129103317635">"ဘာသာပြောင်းသည့် ကီးသည် အခြားထည့်သွင်းရန် နည်းလမ်းများလည်း ပါဝင်သည်"</string> <string name="show_language_switch_key" msgid="5915478828318774384">"ဘာသာစကား ပြောင်းခလုတ်"</string> @@ -47,7 +47,7 @@ <string name="use_contacts_dict" msgid="4435317977804180815">"အဆယ်ကသွယ်အမည်များ အကြံပြုမည်"</string> <string name="use_contacts_dict_summary" msgid="6599983334507879959">"အကြံပြုချက်များနှင့် အမှားပြင်ခြင်းများအတွက် အဆက်သွယ်မှ အမည်များ အသုံးပြုမည်"</string> <string name="use_personalized_dicts" msgid="5167396352105467626">"ကိုယ်ရေးကိုယ်တာ အကြံပြုချက်များ"</string> - <string name="enable_metrics_logging" msgid="5506372337118822837">"မြှင့်တင်ပါ <xliff:g id="APPLICATION_NAME">%s</xliff:g>"</string> + <string name="enable_metrics_logging" msgid="5506372337118822837">"မြှင့်တင်ပါ <xliff:g id="APPLICATION_NAME">%s</xliff:g>"</string> <string name="use_double_space_period" msgid="8781529969425082860">"နှစ်နေရာခြား အဆုံးသတ်"</string> <string name="use_double_space_period_summary" msgid="6532892187247952799">"အချိန်ကာလ"</string> <string name="auto_cap" msgid="1719746674854628252">"အော်တိုစာလုံးကြီးပြောင်း"</string> @@ -84,7 +84,7 @@ <string name="hint_add_to_dictionary_without_word" msgid="3040385779511255101">"သိမ်းရန် ဤနေရာကို ထိပါ"</string> <string name="has_dictionary" msgid="6071847973466625007">"အဘိဓါန်ရနိုင်"</string> <string name="keyboard_layout" msgid="8451164783510487501">"ကီးဘုတ်အရောင်"</string> - <string name="switch_accounts" msgid="3321216593719006162">"အကောင့်များကို ပြောင်းရန်"</string> + <string name="switch_accounts" msgid="3321216593719006162">"အကောင့်များကို ပြောင်းရန်"</string> <string name="no_accounts_selected" msgid="2073821619103904330">"အကောင့်များ မရွေးရသေးပါ"</string> <string name="account_selected" msgid="2846876462199625974">"<xliff:g id="EMAIL_ADDRESS">%1$s</xliff:g>အား လတ်တလော သုံးနေ၏"</string> <string name="account_select_ok" msgid="9141195141763227797">"အိုကေ"</string> @@ -156,7 +156,7 @@ <string name="default_user_dict_pref_name" msgid="1625055720489280530">"သုံးစွဲသူ၏ အဘိဓာန်"</string> <string name="dictionary_available" msgid="4728975345815214218">"အဘိဓါန်ရရှိနိုင်"</string> <string name="dictionary_downloading" msgid="2982650524622620983">"လက်ရှိ ဒေါင်းလုပ်လုပ်နေသည်"</string> - <string name="dictionary_installed" msgid="8081558343559342962">"ထည့်သွင်းပြီး"</string> + <string name="dictionary_installed" msgid="8081558343559342962">"ထည့်သွင်းပြီး"</string> <string name="dictionary_disabled" msgid="8950383219564621762">"ထည့်သွင်းထားပြီး၊ ပိတ်ထားသည်"</string> <string name="cannot_connect_to_dict_service" msgid="9216933695765732398">"အဘိဓါန်ဝန်ဆောင်မှုသို့ ချိတ်ဆက်ရန် ပြဿနာရှိနေသည်"</string> <string name="no_dictionaries_available" msgid="8039920716566132611">"အဘိဓါန်မရှိ"</string> @@ -170,7 +170,7 @@ <string name="install_dict" msgid="180852772562189365">"တပ်ဆင်ပါ"</string> <string name="cancel_download_dict" msgid="7843340278507019303">"ထားတော့"</string> <string name="delete_dict" msgid="756853268088330054">"ဖျက်ရန်"</string> - <string name="should_download_over_metered_prompt" msgid="1583881200688185508">"သင့်ဖုန်းရှိ ရွေးချယ်ထားသည့် ဘာသာအတွက် အဘိဓါန်ရှိပါသည်။ <br/> အဘိဓါန်အား <b>ဒေါင်းလုပ်လုပ်ကာ</b> the <xliff:g id="LANGUAGE_NAME">%1$s</xliff:g> သင့်စာရိုက် အတွေ့အကြုံတိုးတက်စေရန် ကျွန်ုပ်တို့အကြံပြုပါသည်။ <br/> <br/> ဒေါင်းလုပ်လုပ်ရန် 3G ပေါ်တွင် ၁ မှ ၂ မိနစ်ခန့်ကြာနိုင်သည်။ သင့်တွင် <b>အကန့်သတ်မှရိ အချက်လက် သုံးစွဲမှု</b>မရှိလျှင် ငွေကျသင့်နိုင်ပါသည်။ <br/> သင့်တွင် မည်သည့်အချက်လက်သုံးစွဲမှု ရှိနေသည်ကိုမသိလျှင်၊ အလိုအလျောက် ဒေါင်းလုပ်လုပ်ရန် Wi-Fi ကွန်ရက်တစ်ခု ရှာဖွေရန် တိုက်တွန်းပါသည်။ <br/> <br/> နည်းလမ်း: သင့်ဖုန်းကိရိယာရှိ <b>ဆက်တင်ထဲတွင်</b> <b>ဘာသာ & စာရိုက်ထည့်မှု</b> သို့သွားကာ အဘိဓါန်များကို ဒေါင်းလုပ်လုပ်နိုင် ဖယ်ရှားနိုင်ပါသည်။"</string> + <string name="should_download_over_metered_prompt" msgid="1583881200688185508">"သင့်ဖုန်းရှိ ရွေးချယ်ထားသည့် ဘာသာအတွက် အဘိဓါန်ရှိပါသည်။ <br/> အဘိဓါန်အား <b>ဒေါင်းလုပ်လုပ်ကာ</b> the <xliff:g id="LANGUAGE_NAME">%1$s</xliff:g> သင့်စာရိုက် အတွေ့အကြုံတိုးတက်စေရန် ကျွန်ုပ်တို့အကြံပြုပါသည်။ <br/> <br/> ဒေါင်းလုပ်လုပ်ရန် 3G ပေါ်တွင် ၁ မှ ၂ မိနစ်ခန့်ကြာနိုင်သည်။ သင့်တွင် <b>အကန့်သတ်မှရိ အချက်လက် သုံးစွဲမှု</b>မရှိလျှင် ငွေကျသင့်နိုင်ပါသည်။ <br/> သင့်တွင် မည်သည့်အချက်လက်သုံးစွဲမှု ရှိနေသည်ကိုမသိလျှင်၊ အလိုအလျောက် ဒေါင်းလုပ်လုပ်ရန် Wi-Fi ကွန်ရက်တစ်ခု ရှာဖွေရန် တိုက်တွန်းပါသည်။ <br/> <br/> နည်းလမ်း: သင့်ဖုန်းကိရိယာရှိ <b>ဆက်တင်ထဲတွင်</b> <b>ဘာသာ & စာရိုက်ထည့်မှု</b> သို့သွားကာ အဘိဓါန်များကို ဒေါင်းလုပ်လုပ်နိုင် ဖယ်ရှားနိုင်ပါသည်။"</string> <string name="download_over_metered" msgid="1643065851159409546">"ယခုဒေါင်းလုပ်လုပ်မည် (<xliff:g id="SIZE_IN_MEGABYTES">%1$.1f</xliff:g>MB)"</string> <string name="do_not_download_over_metered" msgid="2176209579313941583">"Wi-Fi အသုံးပြု၍ ဒေါင်းလုပ်လုပ်ရန်"</string> <string name="dict_available_notification_title" msgid="4583842811218581658">"<xliff:g id="LANGUAGE_NAME">%1$s</xliff:g> အတွက် အဘိဓါန် ရနိုင်ပါသည်"</string> @@ -191,7 +191,7 @@ <string name="user_dict_settings_edit_dialog_title" msgid="3765774633869590352">"စာလုံးကို ပြင်ဆင်မည်"</string> <string name="user_dict_settings_context_menu_edit_title" msgid="6812255903472456302">"တည်းဖြတ်ရန်"</string> <string name="user_dict_settings_context_menu_delete_title" msgid="8142932447689461181">"ဖျက်ရန်"</string> - <string name="user_dict_settings_empty_text" msgid="558499587532668203">"သင့်အဘိဓာန်ထဲတွင် မည်သည့်စာလုံးမှမရှိပါ။ ထပ်ထည့်ခြင်း(+)ခလုတ်ကို ထိ၍ စာလုံးထည့်ပါ။"</string> + <string name="user_dict_settings_empty_text" msgid="558499587532668203">"သင့်အဘိဓာန်ထဲတွင် မည်သည့်စာလုံးမှမရှိပါ။ ထပ်ထည့်ခြင်း(+)ခလုတ်ကို ထိ၍ စာလုံးထည့်ပါ။"</string> <string name="user_dict_settings_all_languages" msgid="8276126583216298886">"ဘာသာစကားအားလုံးအတွက်"</string> <string name="user_dict_settings_more_languages" msgid="7131268499685180461">"ဘာသာစကားပိုများများ…"</string> <string name="user_dict_settings_delete" msgid="110413335187193859">"ဖျက်သိမ်းရန်"</string> diff --git a/java/res/xml/method.xml b/java/res/xml/method.xml index 5f05e8b18..e14862206 100644 --- a/java/res/xml/method.xml +++ b/java/res/xml/method.xml @@ -28,7 +28,7 @@ be_BY: Belarusian (Belarus)/east_slavic bg: Bulgarian/bulgarian bg: Bulgarian/bulgarian_bds - bn_BD: Bengali (Bangladesh)/bengali_akkhor # This is a preliminary keyboard layout. + bn_BD: Bengali (Bangladesh)/bengali_akkhor bn_IN: Bengali (India)/bengali ca: Catalan/spanish cs: Czech/qwertz @@ -181,8 +181,6 @@ android:imeSubtypeExtraValue="KeyboardLayoutSet=bulgarian_bds,EmojiCapable" android:isAsciiCapable="false" /> - <!-- TODO: This Bengali (Bangladesh) keyboard is a preliminary layout. - This isn't based on the final specification. --> <subtype android:icon="@drawable/ic_ime_switcher_dark" android:label="@string/subtype_generic" android:subtypeId="0xa2144b0c" diff --git a/java/src/com/android/inputmethod/accessibility/AccessibilityUtils.java b/java/src/com/android/inputmethod/accessibility/AccessibilityUtils.java index 2762a9f25..b0072eebe 100644 --- a/java/src/com/android/inputmethod/accessibility/AccessibilityUtils.java +++ b/java/src/com/android/inputmethod/accessibility/AccessibilityUtils.java @@ -152,12 +152,16 @@ public final class AccessibilityUtils { * will occur when a key is typed. * * @param suggestedWords the list of suggested auto-correction words - * @param typedWord the currently typed word */ - public void setAutoCorrection(final SuggestedWords suggestedWords, final String typedWord) { + public void setAutoCorrection(final SuggestedWords suggestedWords) { if (suggestedWords.mWillAutoCorrect) { mAutoCorrectionWord = suggestedWords.getWord(SuggestedWords.INDEX_OF_AUTO_CORRECTION); - mTypedWord = typedWord; + final SuggestedWords.SuggestedWordInfo typedWordInfo = suggestedWords.mTypedWordInfo; + if (null == typedWordInfo) { + mTypedWord = null; + } else { + mTypedWord = typedWordInfo.mWord; + } } else { mAutoCorrectionWord = null; mTypedWord = null; diff --git a/java/src/com/android/inputmethod/keyboard/Key.java b/java/src/com/android/inputmethod/keyboard/Key.java index 6b2094b9e..06e552e3d 100644 --- a/java/src/com/android/inputmethod/keyboard/Key.java +++ b/java/src/com/android/inputmethod/keyboard/Key.java @@ -341,17 +341,24 @@ public class Key implements Comparable<Key> { // code point nor as a surrogate pair. mLabel = new StringBuilder().appendCodePoint(code).toString(); } else { - mLabel = StringUtils.toUpperCaseOfStringForLocale( - KeySpecParser.getLabel(keySpec), needsToUpcase, localeForUpcasing); + final String label = KeySpecParser.getLabel(keySpec); + mLabel = needsToUpcase + ? StringUtils.toTitleCaseOfKeyLabel(label, localeForUpcasing) + : label; } if ((mLabelFlags & LABEL_FLAGS_DISABLE_HINT_LABEL) != 0) { mHintLabel = null; } else { - mHintLabel = StringUtils.toUpperCaseOfStringForLocale(style.getString(keyAttr, - R.styleable.Keyboard_Key_keyHintLabel), needsToUpcase, localeForUpcasing); + final String hintLabel = style.getString( + keyAttr, R.styleable.Keyboard_Key_keyHintLabel); + mHintLabel = needsToUpcase + ? StringUtils.toTitleCaseOfKeyLabel(hintLabel, localeForUpcasing) + : hintLabel; + } + String outputText = KeySpecParser.getOutputText(keySpec); + if (needsToUpcase) { + outputText = StringUtils.toTitleCaseOfKeyLabel(outputText, localeForUpcasing); } - String outputText = StringUtils.toUpperCaseOfStringForLocale( - KeySpecParser.getOutputText(keySpec), needsToUpcase, localeForUpcasing); // Choose the first letter of the label as primary code if not specified. if (code == CODE_UNSPECIFIED && TextUtils.isEmpty(outputText) && !TextUtils.isEmpty(mLabel)) { @@ -377,12 +384,14 @@ public class Key implements Comparable<Key> { mCode = CODE_OUTPUT_TEXT; } } else { - mCode = StringUtils.toUpperCaseOfCodeForLocale(code, needsToUpcase, localeForUpcasing); + mCode = needsToUpcase ? StringUtils.toTitleCaseOfKeyCode(code, localeForUpcasing) + : code; } final int altCodeInAttr = KeySpecParser.parseCode( style.getString(keyAttr, R.styleable.Keyboard_Key_altCode), CODE_UNSPECIFIED); - final int altCode = StringUtils.toUpperCaseOfCodeForLocale( - altCodeInAttr, needsToUpcase, localeForUpcasing); + final int altCode = needsToUpcase + ? StringUtils.toTitleCaseOfKeyCode(altCodeInAttr, localeForUpcasing) + : altCodeInAttr; mOptionalAttributes = OptionalAttributes.newInstance(outputText, altCode, disabledIconId, visualInsetsLeft, visualInsetsRight); mKeyVisualAttributes = KeyVisualAttributes.newInstance(keyAttr); diff --git a/java/src/com/android/inputmethod/keyboard/MainKeyboardView.java b/java/src/com/android/inputmethod/keyboard/MainKeyboardView.java index cba7ff2a2..06b87bd9a 100644 --- a/java/src/com/android/inputmethod/keyboard/MainKeyboardView.java +++ b/java/src/com/android/inputmethod/keyboard/MainKeyboardView.java @@ -57,7 +57,6 @@ import com.android.inputmethod.latin.RichInputMethodSubtype; import com.android.inputmethod.latin.SuggestedWords; import com.android.inputmethod.latin.common.Constants; import com.android.inputmethod.latin.common.CoordinateUtils; -import com.android.inputmethod.latin.common.StringUtils; import com.android.inputmethod.latin.settings.DebugSettings; import com.android.inputmethod.latin.utils.TypefaceUtils; @@ -874,8 +873,7 @@ public final class MainKeyboardView extends KeyboardView implements DrawingProxy final Locale[] locales = subtype.getLocales(); final String[] languages = new String[locales.length]; for (int i = 0; i < locales.length; ++i) { - languages[i] = StringUtils.toUpperCaseOfStringForLocale( - locales[i].getLanguage(), true /* needsToUpperCase */, Locale.ROOT); + languages[i] = locales[i].getLanguage().toUpperCase(Locale.ROOT); } return TextUtils.join(" / ", languages); } diff --git a/java/src/com/android/inputmethod/keyboard/internal/MoreKeySpec.java b/java/src/com/android/inputmethod/keyboard/internal/MoreKeySpec.java index b1a3887d8..87c96cc0d 100644 --- a/java/src/com/android/inputmethod/keyboard/internal/MoreKeySpec.java +++ b/java/src/com/android/inputmethod/keyboard/internal/MoreKeySpec.java @@ -55,10 +55,11 @@ public final class MoreKeySpec { if (TextUtils.isEmpty(moreKeySpec)) { throw new KeySpecParser.KeySpecParserError("Empty more key spec"); } - mLabel = StringUtils.toUpperCaseOfStringForLocale( - KeySpecParser.getLabel(moreKeySpec), needsToUpperCase, locale); - final int code = StringUtils.toUpperCaseOfCodeForLocale( - KeySpecParser.getCode(moreKeySpec), needsToUpperCase, locale); + final String label = KeySpecParser.getLabel(moreKeySpec); + mLabel = needsToUpperCase ? StringUtils.toTitleCaseOfKeyLabel(label, locale) : label; + final int codeInSpec = KeySpecParser.getCode(moreKeySpec); + final int code = needsToUpperCase ? StringUtils.toTitleCaseOfKeyCode(codeInSpec, locale) + : codeInSpec; if (code == Constants.CODE_UNSPECIFIED) { // Some letter, for example German Eszett (U+00DF: "ß"), has multiple characters // upper case representation ("SS"). @@ -66,8 +67,9 @@ public final class MoreKeySpec { mOutputText = mLabel; } else { mCode = code; - mOutputText = StringUtils.toUpperCaseOfStringForLocale( - KeySpecParser.getOutputText(moreKeySpec), needsToUpperCase, locale); + final String outputText = KeySpecParser.getOutputText(moreKeySpec); + mOutputText = needsToUpperCase + ? StringUtils.toTitleCaseOfKeyLabel(outputText, locale) : outputText; } mIconId = KeySpecParser.getIconId(moreKeySpec); } diff --git a/java/src/com/android/inputmethod/latin/DictionaryFacilitator.java b/java/src/com/android/inputmethod/latin/DictionaryFacilitator.java index d23639a0d..b24fdea55 100644 --- a/java/src/com/android/inputmethod/latin/DictionaryFacilitator.java +++ b/java/src/com/android/inputmethod/latin/DictionaryFacilitator.java @@ -266,6 +266,12 @@ public class DictionaryFacilitator { } final DictionaryGroup newMostProbableDictionaryGroup = findDictionaryGroupWithLocale(mDictionaryGroups, locale); + if (null == newMostProbableDictionaryGroup) { + // It seems this may happen as a race condition; pressing the globe key and space + // in quick succession could commit a word out of a dictionary that's not in the + // facilitator any more. In this case, just not changing things is fine. + return; + } mMostProbableDictionaryGroup.mWeightForTypingInLocale = DictionaryGroup.WEIGHT_FOR_TYPING_IN_NOT_MOST_PROBABLE_LANGUAGE; mMostProbableDictionaryGroup.mWeightForGesturingInLocale = diff --git a/java/src/com/android/inputmethod/latin/LatinIME.java b/java/src/com/android/inputmethod/latin/LatinIME.java index 719656b07..7b7b6d35e 100644 --- a/java/src/com/android/inputmethod/latin/LatinIME.java +++ b/java/src/com/android/inputmethod/latin/LatinIME.java @@ -201,8 +201,9 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen private static final int MSG_RESET_CACHES = 7; private static final int MSG_WAIT_FOR_DICTIONARY_LOAD = 8; private static final int MSG_DEALLOCATE_MEMORY = 9; + private static final int MSG_RESUME_SUGGESTIONS_FOR_START_INPUT = 10; // Update this when adding new messages - private static final int MSG_LAST = MSG_DEALLOCATE_MEMORY; + private static final int MSG_LAST = MSG_RESUME_SUGGESTIONS_FOR_START_INPUT; private static final int ARG1_NOT_GESTURE_INPUT = 0; private static final int ARG1_DISMISS_GESTURE_FLOATING_PREVIEW_TEXT = 1; @@ -257,7 +258,12 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen break; case MSG_RESUME_SUGGESTIONS: latinIme.mInputLogic.restartSuggestionsOnWordTouchedByCursor( - latinIme.mSettings.getCurrent(), + latinIme.mSettings.getCurrent(), false /* forStartInput */, + latinIme.mKeyboardSwitcher.getCurrentKeyboardScriptId()); + break; + case MSG_RESUME_SUGGESTIONS_FOR_START_INPUT: + latinIme.mInputLogic.restartSuggestionsOnWordTouchedByCursor( + latinIme.mSettings.getCurrent(), true /* forStartInput */, latinIme.mKeyboardSwitcher.getCurrentKeyboardScriptId()); break; case MSG_REOPEN_DICTIONARIES: @@ -303,7 +309,8 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen sendMessage(obtainMessage(MSG_REOPEN_DICTIONARIES)); } - public void postResumeSuggestions(final boolean shouldDelay) { + private void postResumeSuggestionsInternal(final boolean shouldDelay, + final boolean forStartInput) { final LatinIME latinIme = getOwnerInstance(); if (latinIme == null) { return; @@ -312,14 +319,25 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen return; } removeMessages(MSG_RESUME_SUGGESTIONS); + removeMessages(MSG_RESUME_SUGGESTIONS_FOR_START_INPUT); + final int message = forStartInput ? MSG_RESUME_SUGGESTIONS_FOR_START_INPUT + : MSG_RESUME_SUGGESTIONS; if (shouldDelay) { - sendMessageDelayed(obtainMessage(MSG_RESUME_SUGGESTIONS), + sendMessageDelayed(obtainMessage(message), mDelayInMillisecondsToUpdateSuggestions); } else { - sendMessage(obtainMessage(MSG_RESUME_SUGGESTIONS)); + sendMessage(obtainMessage(message)); } } + public void postResumeSuggestions(final boolean shouldDelay) { + postResumeSuggestionsInternal(shouldDelay, false /* forStartInput */); + } + + public void postResumeSuggestionsForStartInput(final boolean shouldDelay) { + postResumeSuggestionsInternal(shouldDelay, true /* forStartInput */); + } + public void postResetCaches(final boolean tryResumeSuggestions, final int remainingTries) { removeMessages(MSG_RESET_CACHES); sendMessage(obtainMessage(MSG_RESET_CACHES, tryResumeSuggestions ? 1 : 0, @@ -969,7 +987,7 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen // initialSelStart and initialSelEnd sometimes are lying. Make a best effort to // work around this bug. mInputLogic.mConnection.tryFixLyingCursorPosition(); - mHandler.postResumeSuggestions(true /* shouldDelay */); + mHandler.postResumeSuggestionsForStartInput(true /* shouldDelay */); needToCallLoadKeyboardLater = false; } } else { @@ -1171,9 +1189,13 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen SuggestedWords.getFromApplicationSpecifiedCompletions( applicationSpecifiedCompletions); final SuggestedWords suggestedWords = new SuggestedWords(applicationSuggestedWords, - null /* rawSuggestions */, false /* typedWordValid */, false /* willAutoCorrect */, + null /* rawSuggestions */, + null /* typedWord */, + false /* typedWordValid */, + false /* willAutoCorrect */, false /* isObsoleteSuggestions */, - SuggestedWords.INPUT_STYLE_APPLICATION_SPECIFIED /* inputStyle */); + SuggestedWords.INPUT_STYLE_APPLICATION_SPECIFIED /* inputStyle */, + SuggestedWords.NOT_A_SEQUENCE_NUMBER); // When in fullscreen mode, show completions generated by the application forcibly setSuggestedWords(suggestedWords); } @@ -1615,8 +1637,7 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen } // Cache the auto-correction in accessibility code so we can speak it if the user // touches a key that will insert it. - AccessibilityUtils.getInstance().setAutoCorrection(suggestedWords, - suggestedWords.mTypedWord); + AccessibilityUtils.getInstance().setAutoCorrection(suggestedWords); } // Called from {@link SuggestionStripView} through the {@link SuggestionStripView#Listener} diff --git a/java/src/com/android/inputmethod/latin/PunctuationSuggestions.java b/java/src/com/android/inputmethod/latin/PunctuationSuggestions.java index a65304cd0..555bbc7d4 100644 --- a/java/src/com/android/inputmethod/latin/PunctuationSuggestions.java +++ b/java/src/com/android/inputmethod/latin/PunctuationSuggestions.java @@ -33,10 +33,12 @@ public final class PunctuationSuggestions extends SuggestedWords { private PunctuationSuggestions(final ArrayList<SuggestedWordInfo> punctuationsList) { super(punctuationsList, null /* rawSuggestions */, + null /* typedWord */, false /* typedWordValid */, false /* hasAutoCorrectionCandidate */, false /* isObsoleteSuggestions */, - INPUT_STYLE_NONE /* inputStyle */); + INPUT_STYLE_NONE /* inputStyle */, + SuggestedWords.NOT_A_SEQUENCE_NUMBER); } /** diff --git a/java/src/com/android/inputmethod/latin/RichInputMethodManager.java b/java/src/com/android/inputmethod/latin/RichInputMethodManager.java index a1ac55a20..686c3a4b2 100644 --- a/java/src/com/android/inputmethod/latin/RichInputMethodManager.java +++ b/java/src/com/android/inputmethod/latin/RichInputMethodManager.java @@ -110,7 +110,7 @@ public class RichInputMethodManager { // Initialize additional subtypes. SubtypeLocaleUtils.init(context); - final InputMethodSubtype[] additionalSubtypes = getAdditionalSubtypes(context); + final InputMethodSubtype[] additionalSubtypes = getAdditionalSubtypes(); setAdditionalInputMethodSubtypes(additionalSubtypes); final ConnectivityManager connectivityManager = @@ -119,11 +119,10 @@ public class RichInputMethodManager { mIsNetworkConnected = (info != null && info.isConnected()); } - public InputMethodSubtype[] getAdditionalSubtypes(final Context context) { - SubtypeLocaleUtils.init(context); - final SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context); + public InputMethodSubtype[] getAdditionalSubtypes() { + final SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(mContext); final String prefAdditionalSubtypes = Settings.readPrefAdditionalSubtypes( - prefs, context.getResources()); + prefs, mContext.getResources()); return AdditionalSubtypeUtils.createAdditionalSubtypesArray(prefAdditionalSubtypes); } diff --git a/java/src/com/android/inputmethod/latin/Suggest.java b/java/src/com/android/inputmethod/latin/Suggest.java index ee8d3f8cb..2d0ec42a6 100644 --- a/java/src/com/android/inputmethod/latin/Suggest.java +++ b/java/src/com/android/inputmethod/latin/Suggest.java @@ -32,6 +32,8 @@ import java.util.ArrayList; import java.util.HashMap; import java.util.Locale; +import javax.annotation.Nullable; + /** * This class loads a dictionary and provides a list of suggestions for a given sequence of * characters. This includes corrections and completions. @@ -133,23 +135,26 @@ public final class Suggest { final SettingsValuesForSuggestion settingsValuesForSuggestion, final int inputStyleIfNotPrediction, final boolean isCorrectionEnabled, final int sequenceNumber, final OnGetSuggestedWordsCallback callback) { - final String typedWord = wordComposer.getTypedWord(); - final int trailingSingleQuotesCount = StringUtils.getTrailingSingleQuotesCount(typedWord); + final String typedWordString = wordComposer.getTypedWord(); + final int trailingSingleQuotesCount = + StringUtils.getTrailingSingleQuotesCount(typedWordString); final String consideredWord = trailingSingleQuotesCount > 0 - ? typedWord.substring(0, typedWord.length() - trailingSingleQuotesCount) - : typedWord; + ? typedWordString.substring(0, typedWordString.length() - trailingSingleQuotesCount) + : typedWordString; final SuggestionResults suggestionResults = mDictionaryFacilitator.getSuggestionResults( wordComposer, ngramContext, proximityInfo.getNativeProximityInfo(), settingsValuesForSuggestion, SESSION_ID_TYPING); + final Locale mostProbableLocale = mDictionaryFacilitator.getMostProbableLocale(); final ArrayList<SuggestedWordInfo> suggestionsContainer = getTransformedSuggestedWordInfoList(wordComposer, suggestionResults, trailingSingleQuotesCount, // For transforming suggestions that don't come for any dictionary, we // use the currently most probable locale as it's our best bet. - mDictionaryFacilitator.getMostProbableLocale()); - final boolean didRemoveTypedWord = - SuggestedWordInfo.removeDups(wordComposer.getTypedWord(), suggestionsContainer); + mostProbableLocale); + @Nullable final Dictionary sourceDictionaryOfRemovedWord = + SuggestedWordInfo.removeDupsAndReturnSourceOfTypedWord(wordComposer.getTypedWord(), + mostProbableLocale /* preferredLocale */, suggestionsContainer); final String whitelistedWord = getWhitelistedWordOrNull(suggestionsContainer); final boolean resultsArePredictions = !wordComposer.isComposingWord(); @@ -157,7 +162,7 @@ public final class Suggest { // We allow auto-correction if we have a whitelisted word, or if the word had more than // one char and was not suggested. final boolean allowsToBeAutoCorrected = (null != whitelistedWord) - || (consideredWord.length() > 1 && !didRemoveTypedWord); + || (consideredWord.length() > 1 && (null == sourceDictionaryOfRemovedWord)); final boolean hasAutoCorrection; // If correction is not enabled, we never auto-correct. This is for example for when @@ -206,17 +211,20 @@ public final class Suggest { } } - if (!TextUtils.isEmpty(typedWord)) { - suggestionsContainer.add(0, new SuggestedWordInfo(typedWord, - SuggestedWordInfo.MAX_SCORE, SuggestedWordInfo.KIND_TYPED, - Dictionary.DICTIONARY_USER_TYPED, - SuggestedWordInfo.NOT_AN_INDEX /* indexOfTouchPointOfSecondWord */, - SuggestedWordInfo.NOT_A_CONFIDENCE /* autoCommitFirstWordConfidence */)); + final SuggestedWordInfo typedWordInfo = new SuggestedWordInfo(typedWordString, + SuggestedWordInfo.MAX_SCORE, SuggestedWordInfo.KIND_TYPED, + null == sourceDictionaryOfRemovedWord ? Dictionary.DICTIONARY_USER_TYPED + : sourceDictionaryOfRemovedWord, + SuggestedWordInfo.NOT_AN_INDEX /* indexOfTouchPointOfSecondWord */, + SuggestedWordInfo.NOT_A_CONFIDENCE /* autoCommitFirstWordConfidence */); + if (!TextUtils.isEmpty(typedWordString)) { + suggestionsContainer.add(0, typedWordInfo); } final ArrayList<SuggestedWordInfo> suggestionsList; if (DBG && !suggestionsContainer.isEmpty()) { - suggestionsList = getSuggestionsInfoListWithDebugInfo(typedWord, suggestionsContainer); + suggestionsList = getSuggestionsInfoListWithDebugInfo(typedWordString, + suggestionsContainer); } else { suggestionsList = suggestionsContainer; } @@ -230,7 +238,7 @@ public final class Suggest { inputStyle = inputStyleIfNotPrediction; } callback.onGetSuggestedWords(new SuggestedWords(suggestionsList, - suggestionResults.mRawSuggestions, typedWord, + suggestionResults.mRawSuggestions, typedWordInfo, // TODO: this first argument is lying. If this is a whitelisted word which is an // actual word, it says typedWordValid = false, which looks wrong. We should either // rename the attribute or change the value. @@ -272,7 +280,8 @@ public final class Suggest { final SuggestedWordInfo rejected = suggestionsContainer.remove(0); suggestionsContainer.add(1, rejected); } - SuggestedWordInfo.removeDups(null /* typedWord */, suggestionsContainer); + SuggestedWordInfo.removeDupsAndReturnSourceOfTypedWord(null /* typedWord */, + null /* preferredLocale */, suggestionsContainer); // For some reason some suggestions with MIN_VALUE are making their way here. // TODO: Find a more robust way to detect distracters. @@ -286,12 +295,12 @@ public final class Suggest { // (typedWordValid=true), not as an "auto correct word" (willAutoCorrect=false). // Note that because this method is never used to get predictions, there is no need to // modify inputType such in getSuggestedWordsForNonBatchInput. - final String pseudoTypedWord = suggestionsContainer.isEmpty() ? null - : suggestionsContainer.get(0).mWord; + final SuggestedWordInfo pseudoTypedWordInfo = suggestionsContainer.isEmpty() ? null + : suggestionsContainer.get(0); callback.onGetSuggestedWords(new SuggestedWords(suggestionsContainer, suggestionResults.mRawSuggestions, - pseudoTypedWord, + pseudoTypedWordInfo, true /* typedWordValid */, false /* willAutoCorrect */, false /* isObsoleteSuggestions */, diff --git a/java/src/com/android/inputmethod/latin/SuggestedWords.java b/java/src/com/android/inputmethod/latin/SuggestedWords.java index bddeac495..cbf48f0c0 100644 --- a/java/src/com/android/inputmethod/latin/SuggestedWords.java +++ b/java/src/com/android/inputmethod/latin/SuggestedWords.java @@ -27,8 +27,10 @@ import com.android.inputmethod.latin.define.DebugFlags; import java.util.ArrayList; import java.util.Arrays; import java.util.HashSet; +import java.util.Locale; import javax.annotation.Nonnull; +import javax.annotation.Nullable; public class SuggestedWords { public static final int INDEX_OF_TYPED_WORD = 0; @@ -50,10 +52,12 @@ public class SuggestedWords { private static final ArrayList<SuggestedWordInfo> EMPTY_WORD_INFO_LIST = new ArrayList<>(0); @Nonnull private static final SuggestedWords EMPTY = new SuggestedWords( - EMPTY_WORD_INFO_LIST, null /* rawSuggestions */, false /* typedWordValid */, - false /* willAutoCorrect */, false /* isObsoleteSuggestions */, INPUT_STYLE_NONE); + EMPTY_WORD_INFO_LIST, null /* rawSuggestions */, null /* typedWord */, + false /* typedWordValid */, false /* willAutoCorrect */, + false /* isObsoleteSuggestions */, INPUT_STYLE_NONE, NOT_A_SEQUENCE_NUMBER); - public final String mTypedWord; + @Nullable + public final SuggestedWordInfo mTypedWordInfo; public final boolean mTypedWordValid; // Note: this INCLUDES cases where the word will auto-correct to itself. A good definition // of what this flag means would be "the top suggestion is strong enough to auto-correct", @@ -64,25 +68,14 @@ public class SuggestedWords { // INPUT_STYLE_* constants above. public final int mInputStyle; public final int mSequenceNumber; // Sequence number for auto-commit. + @Nonnull protected final ArrayList<SuggestedWordInfo> mSuggestedWordInfoList; + @Nullable public final ArrayList<SuggestedWordInfo> mRawSuggestions; - public SuggestedWords(final ArrayList<SuggestedWordInfo> suggestedWordInfoList, - final ArrayList<SuggestedWordInfo> rawSuggestions, - final boolean typedWordValid, - final boolean willAutoCorrect, - final boolean isObsoleteSuggestions, - final int inputStyle) { - this(suggestedWordInfoList, rawSuggestions, - (suggestedWordInfoList.isEmpty() || isPrediction(inputStyle)) ? null - : suggestedWordInfoList.get(INDEX_OF_TYPED_WORD).mWord, - typedWordValid, willAutoCorrect, - isObsoleteSuggestions, inputStyle, NOT_A_SEQUENCE_NUMBER); - } - - public SuggestedWords(final ArrayList<SuggestedWordInfo> suggestedWordInfoList, - final ArrayList<SuggestedWordInfo> rawSuggestions, - final String typedWord, + public SuggestedWords(@Nonnull final ArrayList<SuggestedWordInfo> suggestedWordInfoList, + @Nullable final ArrayList<SuggestedWordInfo> rawSuggestions, + @Nullable final SuggestedWordInfo typedWordInfo, final boolean typedWordValid, final boolean willAutoCorrect, final boolean isObsoleteSuggestions, @@ -95,7 +88,7 @@ public class SuggestedWords { mIsObsoleteSuggestions = isObsoleteSuggestions; mInputStyle = inputStyle; mSequenceNumber = sequenceNumber; - mTypedWord = typedWord; + mTypedWordInfo = typedWordInfo; } public boolean isEmpty() { @@ -211,14 +204,12 @@ public class SuggestedWords { // Should get rid of the first one (what the user typed previously) from suggestions // and replace it with what the user currently typed. public static ArrayList<SuggestedWordInfo> getTypedWordAndPreviousSuggestions( - final String typedWord, final SuggestedWords previousSuggestions) { + @Nonnull final SuggestedWordInfo typedWordInfo, + @Nonnull final SuggestedWords previousSuggestions) { final ArrayList<SuggestedWordInfo> suggestionsList = new ArrayList<>(); final HashSet<String> alreadySeen = new HashSet<>(); - suggestionsList.add(new SuggestedWordInfo(typedWord, SuggestedWordInfo.MAX_SCORE, - SuggestedWordInfo.KIND_TYPED, Dictionary.DICTIONARY_USER_TYPED, - SuggestedWordInfo.NOT_AN_INDEX /* indexOfTouchPointOfSecondWord */, - SuggestedWordInfo.NOT_A_CONFIDENCE /* autoCommitFirstWordConfidence */)); - alreadySeen.add(typedWord.toString()); + suggestionsList.add(typedWordInfo); + alreadySeen.add(typedWordInfo.mWord); final int previousSize = previousSuggestions.size(); for (int index = 1; index < previousSize; index++) { final SuggestedWordInfo prevWordInfo = previousSuggestions.getInfo(index); @@ -365,37 +356,53 @@ public class SuggestedWords { } // This will always remove the higher index if a duplicate is found. - public static boolean removeDups(final String typedWord, - ArrayList<SuggestedWordInfo> candidates) { + // Returns null if the typed word is not found. Always return the dictionary for the + // highest suggestion matching the locale if found, otherwise return the dictionary for + // the highest suggestion. + @Nullable + public static Dictionary removeDupsAndReturnSourceOfTypedWord( + @Nullable final String typedWord, + @Nullable final Locale preferredLocale, + @Nonnull ArrayList<SuggestedWordInfo> candidates) { if (candidates.isEmpty()) { - return false; + return null; } - final boolean didRemoveTypedWord; + final Dictionary sourceDictionaryOfTypedWord; if (!TextUtils.isEmpty(typedWord)) { - didRemoveTypedWord = removeSuggestedWordInfoFrom(typedWord, candidates, - -1 /* startIndexExclusive */); + sourceDictionaryOfTypedWord = + removeSuggestedWordInfoFromListAndReturnSourceDictionary(typedWord, + preferredLocale, candidates, -1 /* startIndexExclusive */); } else { - didRemoveTypedWord = false; + sourceDictionaryOfTypedWord = null; } for (int i = 0; i < candidates.size(); ++i) { - removeSuggestedWordInfoFrom(candidates.get(i).mWord, candidates, - i /* startIndexExclusive */); + removeSuggestedWordInfoFromListAndReturnSourceDictionary(candidates.get(i).mWord, + null /* preferredLocale */, candidates, i /* startIndexExclusive */); } - return didRemoveTypedWord; + return sourceDictionaryOfTypedWord; } - private static boolean removeSuggestedWordInfoFrom(final String word, - final ArrayList<SuggestedWordInfo> candidates, final int startIndexExclusive) { - boolean didRemove = false; + @Nullable + private static Dictionary removeSuggestedWordInfoFromListAndReturnSourceDictionary( + @Nonnull final String word, @Nullable final Locale preferredLocale, + @Nonnull final ArrayList<SuggestedWordInfo> candidates, + final int startIndexExclusive) { + Dictionary sourceDictionaryOfTypedWord = null; for (int i = startIndexExclusive + 1; i < candidates.size(); ++i) { final SuggestedWordInfo previous = candidates.get(i); if (word.equals(previous.mWord)) { - didRemove = true; + if (null == sourceDictionaryOfTypedWord + || (null != preferredLocale + && preferredLocale.equals(previous.mSourceDict.mLocale))) { + if (Dictionary.TYPE_USER_HISTORY != previous.mSourceDict.mDictType) { + sourceDictionaryOfTypedWord = previous.mSourceDict; + } + } candidates.remove(i); --i; } } - return didRemove; + return sourceDictionaryOfTypedWord; } } @@ -423,8 +430,10 @@ public class SuggestedWords { info.mSourceDict, SuggestedWordInfo.NOT_AN_INDEX, SuggestedWordInfo.NOT_A_CONFIDENCE)); } - return new SuggestedWords(newSuggestions, null /* rawSuggestions */, mTypedWordValid, - mWillAutoCorrect, mIsObsoleteSuggestions, INPUT_STYLE_TAIL_BATCH); + return new SuggestedWords(newSuggestions, null /* rawSuggestions */, + newSuggestions.isEmpty() ? null : newSuggestions.get(0) /* typedWordInfo */, + mTypedWordValid, mWillAutoCorrect, mIsObsoleteSuggestions, INPUT_STYLE_TAIL_BATCH, + NOT_A_SEQUENCE_NUMBER); } /** diff --git a/java/src/com/android/inputmethod/latin/SystemBroadcastReceiver.java b/java/src/com/android/inputmethod/latin/SystemBroadcastReceiver.java index 123ab208c..982d4c690 100644 --- a/java/src/com/android/inputmethod/latin/SystemBroadcastReceiver.java +++ b/java/src/com/android/inputmethod/latin/SystemBroadcastReceiver.java @@ -69,7 +69,7 @@ public final class SystemBroadcastReceiver extends BroadcastReceiver { // subtypes when the package is replaced. RichInputMethodManager.init(context); final RichInputMethodManager richImm = RichInputMethodManager.getInstance(); - final InputMethodSubtype[] additionalSubtypes = richImm.getAdditionalSubtypes(context); + final InputMethodSubtype[] additionalSubtypes = richImm.getAdditionalSubtypes(); richImm.setAdditionalInputMethodSubtypes(additionalSubtypes); LauncherIconVisibilityManager.updateSetupWizardIconVisibility(context); } else if (Intent.ACTION_BOOT_COMPLETED.equals(intentAction)) { diff --git a/java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java b/java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java index bafea178e..0185a04ef 100644 --- a/java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java +++ b/java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java @@ -255,7 +255,7 @@ public final class InputLogic { handler.postUpdateSuggestionStrip(SuggestedWords.INPUT_STYLE_TYPING); final String text = performSpecificTldProcessingOnTextInput(rawText); if (SpaceState.PHANTOM == mSpaceState) { - promotePhantomSpace(settingsValues); + insertAutomaticSpaceIfOptionsAndTextAllow(settingsValues); } mConnection.commitText(text, 1); StatsUtils.onWordCommitUserTyped(mEnteredText, mWordComposer.isBatchMode()); @@ -322,7 +322,7 @@ public final class InputLogic { final int firstChar = Character.codePointAt(suggestion, 0); if (!settingsValues.isWordSeparator(firstChar) || settingsValues.isUsuallyPrecededBySpace(firstChar)) { - promotePhantomSpace(settingsValues); + insertAutomaticSpaceIfOptionsAndTextAllow(settingsValues); } } @@ -584,7 +584,9 @@ public final class InputLogic { if (candidate.mSourceDict.shouldAutoCommit(candidate)) { final String[] commitParts = candidate.mWord.split(Constants.WORD_SEPARATOR, 2); batchPointers.shift(candidate.mIndexOfTouchPointOfSecondWord); - promotePhantomSpace(settingsValues); + if (SpaceState.PHANTOM == mSpaceState) { + insertAutomaticSpaceIfOptionsAndTextAllow(settingsValues); + } mConnection.commitText(commitParts[0], 0); StatsUtils.onWordCommitUserTyped(commitParts[0], mWordComposer.isBatchMode()); mSpaceState = SpaceState.PHANTOM; @@ -621,11 +623,7 @@ public final class InputLogic { } else { // We can't use suggestedWords.getWord(SuggestedWords.INDEX_OF_TYPED_WORD) // because it may differ from mWordComposer.mTypedWord. - suggestedWordInfo = new SuggestedWordInfo(suggestedWords.mTypedWord, - SuggestedWordInfo.MAX_SCORE, - SuggestedWordInfo.KIND_TYPED, Dictionary.DICTIONARY_USER_TYPED, - SuggestedWordInfo.NOT_AN_INDEX /* indexOfTouchPointOfSecondWord */, - SuggestedWordInfo.NOT_A_CONFIDENCE /* autoCommitFirstWordConfidence */); + suggestedWordInfo = suggestedWords.mTypedWordInfo; } mWordComposer.setAutoCorrection(suggestedWordInfo); } @@ -861,7 +859,7 @@ public final class InputLogic { // Sanity check throw new RuntimeException("Should not be composing here"); } - promotePhantomSpace(settingsValues); + insertAutomaticSpaceIfOptionsAndTextAllow(settingsValues); } if (mWordComposer.isCursorFrontOrMiddleOfComposingWord()) { @@ -972,7 +970,7 @@ public final class InputLogic { } if (needsPrecedingSpace) { - promotePhantomSpace(settingsValues); + insertAutomaticSpaceIfOptionsAndTextAllow(settingsValues); } if (tryPerformDoubleSpacePeriod(event, inputTransaction)) { @@ -1176,14 +1174,13 @@ public final class InputLogic { StatsUtils.onBackspacePressed(totalDeletedLength); } } - if (inputTransaction.mSettingsValues - .isSuggestionsEnabledPerUserSettings() + if (inputTransaction.mSettingsValues.isSuggestionsEnabledPerUserSettings() && inputTransaction.mSettingsValues.mSpacingAndPunctuations .mCurrentLanguageHasSpaces && !mConnection.isCursorFollowedByWordCharacter( inputTransaction.mSettingsValues.mSpacingAndPunctuations)) { restartSuggestionsOnWordTouchedByCursor(inputTransaction.mSettingsValues, - currentKeyboardScriptId); + false /* forStartInput */, currentKeyboardScriptId); } } } @@ -1413,14 +1410,19 @@ public final class InputLogic { new OnGetSuggestedWordsCallback() { @Override public void onGetSuggestedWords(final SuggestedWords suggestedWords) { - final String typedWord = mWordComposer.getTypedWord(); + final String typedWordString = mWordComposer.getTypedWord(); + final SuggestedWordInfo typedWordInfo = new SuggestedWordInfo( + typedWordString, SuggestedWordInfo.MAX_SCORE, + SuggestedWordInfo.KIND_TYPED, Dictionary.DICTIONARY_USER_TYPED, + SuggestedWordInfo.NOT_AN_INDEX /* indexOfTouchPointOfSecondWord */, + SuggestedWordInfo.NOT_A_CONFIDENCE); // Show new suggestions if we have at least one. Otherwise keep the old // suggestions with the new typed word. Exception: if the length of the // typed word is <= 1 (after a deletion typically) we clear old suggestions. - if (suggestedWords.size() > 1 || typedWord.length() <= 1) { + if (suggestedWords.size() > 1 || typedWordString.length() <= 1) { holder.set(suggestedWords); } else { - holder.set(retrieveOlderSuggestions(typedWord, mSuggestedWords)); + holder.set(retrieveOlderSuggestions(typedWordInfo, mSuggestedWords)); } } } @@ -1439,10 +1441,13 @@ public final class InputLogic { * do nothing. * * @param settingsValues the current values of the settings. - * suggestions in the suggestion list. + * @param forStartInput whether we're doing this in answer to starting the input (as opposed + * to a cursor move, for example). In ICS, there is a platform bug that we need to work + * around only when we come here at input start time. */ // TODO: make this private. public void restartSuggestionsOnWordTouchedByCursor(final SettingsValues settingsValues, + final boolean forStartInput, // TODO: remove this argument, put it into settingsValues final int currentKeyboardScriptId) { // HACK: We may want to special-case some apps that exhibit bad behavior in case of @@ -1489,13 +1494,14 @@ public final class InputLogic { final int numberOfCharsInWordBeforeCursor = range.getNumberOfCharsInWordBeforeCursor(); if (numberOfCharsInWordBeforeCursor > expectedCursorPosition) return; final ArrayList<SuggestedWordInfo> suggestions = new ArrayList<>(); - final String typedWord = range.mWord.toString(); - suggestions.add(new SuggestedWordInfo(typedWord, + final String typedWordString = range.mWord.toString(); + final SuggestedWordInfo typedWordInfo = new SuggestedWordInfo(typedWordString, SuggestedWords.MAX_SUGGESTIONS + 1, SuggestedWordInfo.KIND_TYPED, Dictionary.DICTIONARY_USER_TYPED, SuggestedWordInfo.NOT_AN_INDEX /* indexOfTouchPointOfSecondWord */, - SuggestedWordInfo.NOT_A_CONFIDENCE /* autoCommitFirstWordConfidence */)); - if (!isResumableWord(settingsValues, typedWord)) { + SuggestedWordInfo.NOT_A_CONFIDENCE /* autoCommitFirstWordConfidence */); + suggestions.add(typedWordInfo); + if (!isResumableWord(settingsValues, typedWordString)) { mSuggestionStripViewAccessor.setNeutralSuggestionStrip(); return; } @@ -1503,7 +1509,7 @@ public final class InputLogic { for (final SuggestionSpan span : range.getSuggestionSpansAtWord()) { for (final String s : span.getSuggestions()) { ++i; - if (!TextUtils.equals(s, typedWord)) { + if (!TextUtils.equals(s, typedWordString)) { suggestions.add(new SuggestedWordInfo(s, SuggestedWords.MAX_SUGGESTIONS - i, SuggestedWordInfo.KIND_RESUMED, Dictionary.DICTIONARY_RESUMED, @@ -1513,12 +1519,14 @@ public final class InputLogic { } } } - final int[] codePoints = StringUtils.toCodePointArray(typedWord); + final int[] codePoints = StringUtils.toCodePointArray(typedWordString); mWordComposer.setComposingWord(codePoints, mLatinIME.getCoordinatesForCurrentKeyboard(codePoints)); mWordComposer.setCursorPositionWithinWord( - typedWord.codePointCount(0, numberOfCharsInWordBeforeCursor)); - mConnection.maybeMoveTheCursorAroundAndRestoreToWorkaroundABug(); + typedWordString.codePointCount(0, numberOfCharsInWordBeforeCursor)); + if (forStartInput) { + mConnection.maybeMoveTheCursorAroundAndRestoreToWorkaroundABug(); + } mConnection.setComposingRegion(expectedCursorPosition - numberOfCharsInWordBeforeCursor, expectedCursorPosition + range.getNumberOfCharsInWordAfterCursor()); if (suggestions.size() <= 1) { @@ -1537,7 +1545,7 @@ public final class InputLogic { // color of the word in the suggestion strip changes according to this parameter, // and false gives the correct color. final SuggestedWords suggestedWords = new SuggestedWords(suggestions, - null /* rawSuggestions */, typedWord, false /* typedWordValid */, + null /* rawSuggestions */, typedWordInfo, false /* typedWordValid */, false /* willAutoCorrect */, false /* isObsoleteSuggestions */, SuggestedWords.INPUT_STYLE_RECORRECTION, SuggestedWords.NOT_A_SEQUENCE_NUMBER); doShowSuggestionsAndClearAutoCorrectionIndicator(suggestedWords); @@ -1870,20 +1878,21 @@ public final class InputLogic { * Make a {@link com.android.inputmethod.latin.SuggestedWords} object containing a typed word * and obsolete suggestions. * See {@link com.android.inputmethod.latin.SuggestedWords#getTypedWordAndPreviousSuggestions( - * String, com.android.inputmethod.latin.SuggestedWords)}. - * @param typedWord The typed word as a string. + * SuggestedWordInfo, com.android.inputmethod.latin.SuggestedWords)}. + * @param typedWordInfo The typed word as a SuggestedWordInfo. * @param previousSuggestedWords The previously suggested words. * @return Obsolete suggestions with the newly typed word. */ - static SuggestedWords retrieveOlderSuggestions(final String typedWord, + static SuggestedWords retrieveOlderSuggestions(final SuggestedWordInfo typedWordInfo, final SuggestedWords previousSuggestedWords) { final SuggestedWords oldSuggestedWords = previousSuggestedWords.isPunctuationSuggestions() ? SuggestedWords.getEmptyInstance() : previousSuggestedWords; final ArrayList<SuggestedWords.SuggestedWordInfo> typedWordAndPreviousSuggestions = - SuggestedWords.getTypedWordAndPreviousSuggestions(typedWord, oldSuggestedWords); + SuggestedWords.getTypedWordAndPreviousSuggestions(typedWordInfo, oldSuggestedWords); return new SuggestedWords(typedWordAndPreviousSuggestions, null /* rawSuggestions */, - false /* typedWordValid */, false /* hasAutoCorrectionCandidate */, - true /* isObsoleteSuggestions */, oldSuggestedWords.mInputStyle); + typedWordInfo, false /* typedWordValid */, false /* hasAutoCorrectionCandidate */, + true /* isObsoleteSuggestions */, oldSuggestedWords.mInputStyle, + SuggestedWords.NOT_A_SEQUENCE_NUMBER); } /** @@ -1960,14 +1969,14 @@ public final class InputLogic { } /** - * Promote a phantom space to an actual space. + * Insert an automatic space, if the options allow it. * - * This essentially inserts a space, and that's it. It just checks the options and the text - * before the cursor are appropriate before doing it. + * This checks the options and the text before the cursor are appropriate before inserting + * an automatic space. * * @param settingsValues the current values of the settings. */ - private void promotePhantomSpace(final SettingsValues settingsValues) { + private void insertAutomaticSpaceIfOptionsAndTextAllow(final SettingsValues settingsValues) { if (settingsValues.shouldInsertSpacesAutomatically() && settingsValues.mSpacingAndPunctuations.mCurrentLanguageHasSpaces && !mConnection.textBeforeCursorLooksLikeURL()) { @@ -1990,7 +1999,7 @@ public final class InputLogic { } mConnection.beginBatchEdit(); if (SpaceState.PHANTOM == mSpaceState) { - promotePhantomSpace(settingsValues); + insertAutomaticSpaceIfOptionsAndTextAllow(settingsValues); } final SuggestedWordInfo autoCommitCandidate = mSuggestedWords.getAutoCommitCandidate(); // Commit except the last word for phrase gesture if the top suggestion is eligible for auto diff --git a/java/src/com/android/inputmethod/latin/utils/SubtypeLocaleUtils.java b/java/src/com/android/inputmethod/latin/utils/SubtypeLocaleUtils.java index 013f024c0..0e7f4717d 100644 --- a/java/src/com/android/inputmethod/latin/utils/SubtypeLocaleUtils.java +++ b/java/src/com/android/inputmethod/latin/utils/SubtypeLocaleUtils.java @@ -34,6 +34,7 @@ import java.util.HashMap; import java.util.Locale; import javax.annotation.Nonnull; +import javax.annotation.Nullable; /** * A helper class to deal with subtype locales. @@ -273,7 +274,7 @@ public final class SubtypeLocaleUtils { } @Nonnull - public static String getSubtypeNameForLogging(@Nonnull final InputMethodSubtype subtype) { + public static String getSubtypeNameForLogging(@Nullable final InputMethodSubtype subtype) { if (subtype == null) { return "<null subtype>"; } diff --git a/native/jni/Android.mk b/native/jni/Android.mk index 402cb3b67..6003a6f64 100644 --- a/native/jni/Android.mk +++ b/native/jni/Android.mk @@ -92,9 +92,6 @@ LOCAL_SDK_VERSION := 14 LOCAL_NDK_STL_VARIANT := c++_static LOCAL_LDFLAGS += -ldl -# TODO: Figure out what we should do with --hash-style=gnu for unbundled builds -LOCAL_LDFLAGS += -Wl,--hash-style=sysv - include $(BUILD_SHARED_LIBRARY) #################### Clean up the tmp vars include $(LOCAL_PATH)/CleanupNativeFileList.mk diff --git a/native/jni/src/utils/char_utils.cpp b/native/jni/src/utils/char_utils.cpp index 3bb9055b2..a43e6dd62 100644 --- a/native/jni/src/utils/char_utils.cpp +++ b/native/jni/src/utils/char_utils.cpp @@ -1117,7 +1117,9 @@ static int compare_pair_capital(const void *a, const void *b) { // TODO: Check if it's really acceptable to consider ø a diacritical variant of o /* U+0100 */ 0x0041, 0x0061, 0x0041, 0x0061, 0x0041, 0x0061, 0x0043, 0x0063, /* U+0108 */ 0x0043, 0x0063, 0x0043, 0x0063, 0x0043, 0x0063, 0x0044, 0x0064, - /* U+0110 */ 0x0110, 0x0111, 0x0045, 0x0065, 0x0045, 0x0065, 0x0045, 0x0065, + /* U+0110 */ 0x0046, 0x0064, 0x0045, 0x0065, 0x0045, 0x0065, 0x0045, 0x0065, + // U+0110: Manually changed from 0110 to 0046 + // U+0111: Manually changed from 0111 to 0064 /* U+0118 */ 0x0045, 0x0065, 0x0045, 0x0065, 0x0047, 0x0067, 0x0047, 0x0067, /* U+0120 */ 0x0047, 0x0067, 0x0047, 0x0067, 0x0048, 0x0068, 0x0126, 0x0127, /* U+0128 */ 0x0049, 0x0069, 0x0049, 0x0069, 0x0049, 0x0069, 0x0049, 0x0069, @@ -1135,6 +1137,9 @@ static int compare_pair_capital(const void *a, const void *b) { /* U+0170 */ 0x0055, 0x0075, 0x0055, 0x0075, 0x0057, 0x0077, 0x0059, 0x0079, /* U+0178 */ 0x0059, 0x005A, 0x007A, 0x005A, 0x007A, 0x005A, 0x007A, 0x0073, /* U+0180 */ 0x0180, 0x0181, 0x0182, 0x0183, 0x0184, 0x0185, 0x0186, 0x0187, + // TODO: A lot of letters are their own base code points, but for + // some (e.g. U+0180) it doesn't seem right. Ideally each code point should + // be checked individually with all languages it's used in. /* U+0188 */ 0x0188, 0x0189, 0x018A, 0x018B, 0x018C, 0x018D, 0x018E, 0x018F, /* U+0190 */ 0x0190, 0x0191, 0x0192, 0x0193, 0x0194, 0x0195, 0x0196, 0x0197, /* U+0198 */ 0x0198, 0x0199, 0x019A, 0x019B, 0x019C, 0x019D, 0x019E, 0x019F, diff --git a/tests/src/com/android/inputmethod/compat/SuggestionSpanUtilsTest.java b/tests/src/com/android/inputmethod/compat/SuggestionSpanUtilsTest.java index 1c320db1c..7bbf965f9 100644 --- a/tests/src/com/android/inputmethod/compat/SuggestionSpanUtilsTest.java +++ b/tests/src/com/android/inputmethod/compat/SuggestionSpanUtilsTest.java @@ -102,11 +102,11 @@ public class SuggestionSpanUtilsTest extends AndroidTestCase { } public void testGetTextWithSuggestionSpan() { - final SuggestedWordInfo predicition1 = + final SuggestedWordInfo prediction1 = createWordInfo("Quality", SuggestedWordInfo.KIND_PREDICTION); - final SuggestedWordInfo predicition2 = + final SuggestedWordInfo prediction2 = createWordInfo("Speed", SuggestedWordInfo.KIND_PREDICTION); - final SuggestedWordInfo predicition3 = + final SuggestedWordInfo prediction3 = createWordInfo("Price", SuggestedWordInfo.KIND_PREDICTION); final SuggestedWordInfo typed = @@ -122,13 +122,15 @@ public class SuggestionSpanUtilsTest extends AndroidTestCase { // is specified. { final SuggestedWords predictedWords = new SuggestedWords( - new ArrayList<>(Arrays.asList(predicition1, predicition2, predicition3)), + new ArrayList<>(Arrays.asList(prediction1, prediction2, prediction3)), null /* rawSuggestions */, + null /* typedWord */, false /* typedWordValid */, false /* willAutoCorrect */, false /* isObsoleteSuggestions */, - SuggestedWords.INPUT_STYLE_PREDICTION); - final String PICKED_WORD = predicition2.mWord; + SuggestedWords.INPUT_STYLE_PREDICTION, + SuggestedWords.NOT_A_SEQUENCE_NUMBER); + final String PICKED_WORD = prediction2.mWord; assertNotSuggestionSpan( PICKED_WORD, SuggestionSpanUtils.getTextWithSuggestionSpan(getContext(), PICKED_WORD, @@ -137,17 +139,19 @@ public class SuggestionSpanUtilsTest extends AndroidTestCase { final ArrayList<SuggestedWordInfo> suggestedWordList = new ArrayList<>(); suggestedWordList.add(typed); - suggestedWordList.add(predicition1); - suggestedWordList.add(predicition2); - suggestedWordList.add(predicition3); + suggestedWordList.add(prediction1); + suggestedWordList.add(prediction2); + suggestedWordList.add(prediction3); suggestedWordList.addAll(Arrays.asList(corrections)); final SuggestedWords typedAndCollectedWords = new SuggestedWords( suggestedWordList, null /* rawSuggestions */, + null /* typedWord */, false /* typedWordValid */, false /* willAutoCorrect */, false /* isObsoleteSuggestions */, - SuggestedWords.INPUT_STYLE_TYPING); + SuggestedWords.INPUT_STYLE_TYPING, + SuggestedWords.NOT_A_SEQUENCE_NUMBER); for (final SuggestedWordInfo pickedWord : suggestedWordList) { final String PICKED_WORD = pickedWord.mWord; diff --git a/tests/src/com/android/inputmethod/keyboard/KeyboardLayoutSetTestsBase.java b/tests/src/com/android/inputmethod/keyboard/KeyboardLayoutSetTestsBase.java index 0246c49a1..7f828111d 100644 --- a/tests/src/com/android/inputmethod/keyboard/KeyboardLayoutSetTestsBase.java +++ b/tests/src/com/android/inputmethod/keyboard/KeyboardLayoutSetTestsBase.java @@ -75,7 +75,7 @@ public abstract class KeyboardLayoutSetTestsBase extends AndroidTestCase { mRichImm = RichInputMethodManager.getInstance(); // Save and reset additional subtypes preference. - mSavedAdditionalSubtypes = mRichImm.getAdditionalSubtypes(context); + mSavedAdditionalSubtypes = mRichImm.getAdditionalSubtypes(); final InputMethodSubtype[] predefinedAdditionalSubtypes = AdditionalSubtypeUtils.createAdditionalSubtypesArray( AdditionalSubtypeUtils.createPrefSubtypes( diff --git a/tests/src/com/android/inputmethod/keyboard/layout/expected/ExpectedKeyOutput.java b/tests/src/com/android/inputmethod/keyboard/layout/expected/ExpectedKeyOutput.java index 9bb5f187a..e7b0f091d 100644 --- a/tests/src/com/android/inputmethod/keyboard/layout/expected/ExpectedKeyOutput.java +++ b/tests/src/com/android/inputmethod/keyboard/layout/expected/ExpectedKeyOutput.java @@ -63,7 +63,7 @@ abstract class ExpectedKeyOutput { final String codeString = StringUtils.newSingleCodePointString(mCode); // A letter may have an upper case counterpart that consists of multiple code // points, for instance the upper case of "ß" is "SS". - return newInstance(codeString.toUpperCase(locale)); + return newInstance(StringUtils.toTitleCaseOfKeyLabel(codeString, locale)); } // A special negative value has no upper case. return this; diff --git a/tests/src/com/android/inputmethod/keyboard/layout/expected/ExpectedKeyVisual.java b/tests/src/com/android/inputmethod/keyboard/layout/expected/ExpectedKeyVisual.java index 2f3a0c15f..3f9f12a2b 100644 --- a/tests/src/com/android/inputmethod/keyboard/layout/expected/ExpectedKeyVisual.java +++ b/tests/src/com/android/inputmethod/keyboard/layout/expected/ExpectedKeyVisual.java @@ -19,6 +19,7 @@ package com.android.inputmethod.keyboard.layout.expected; import com.android.inputmethod.keyboard.Key; import com.android.inputmethod.keyboard.internal.KeyboardIconsSet; import com.android.inputmethod.keyboard.internal.MoreKeySpec; +import com.android.inputmethod.latin.common.StringUtils; import java.util.Locale; @@ -134,7 +135,7 @@ public abstract class ExpectedKeyVisual { @Override ExpectedKeyVisual toUpperCase(final Locale locale) { - return new Label(mLabel.toUpperCase(locale)); + return new Label(StringUtils.toTitleCaseOfKeyLabel(mLabel, locale)); } @Override diff --git a/tests/src/com/android/inputmethod/latin/RichInputMethodSubtypeTests.java b/tests/src/com/android/inputmethod/latin/RichInputMethodSubtypeTests.java index aed7d6ad6..9c8e16511 100644 --- a/tests/src/com/android/inputmethod/latin/RichInputMethodSubtypeTests.java +++ b/tests/src/com/android/inputmethod/latin/RichInputMethodSubtypeTests.java @@ -76,7 +76,7 @@ public class RichInputMethodSubtypeTests extends AndroidTestCase { mRichImm = RichInputMethodManager.getInstance(); // Save and reset additional subtypes - mSavedAddtionalSubtypes = mRichImm.getAdditionalSubtypes(context); + mSavedAddtionalSubtypes = mRichImm.getAdditionalSubtypes(); final InputMethodSubtype[] predefinedAddtionalSubtypes = AdditionalSubtypeUtils.createAdditionalSubtypesArray( AdditionalSubtypeUtils.createPrefSubtypes( diff --git a/tests/src/com/android/inputmethod/latin/SuggestedWordsTests.java b/tests/src/com/android/inputmethod/latin/SuggestedWordsTests.java index 90db75e39..f658d726b 100644 --- a/tests/src/com/android/inputmethod/latin/SuggestedWordsTests.java +++ b/tests/src/com/android/inputmethod/latin/SuggestedWordsTests.java @@ -89,9 +89,10 @@ public class SuggestedWordsTests extends AndroidTestCase { public void testGetTypedWordInfoOrNull() { final String TYPED_WORD = "typed"; + final SuggestedWordInfo TYPED_WORD_INFO = createTypedWordInfo(TYPED_WORD); final int NUMBER_OF_ADDED_SUGGESTIONS = 5; final ArrayList<SuggestedWordInfo> list = new ArrayList<>(); - list.add(createTypedWordInfo(TYPED_WORD)); + list.add(TYPED_WORD_INFO); for (int i = 0; i < NUMBER_OF_ADDED_SUGGESTIONS; ++i) { list.add(createCorrectionWordInfo(Integer.toString(i))); } @@ -99,10 +100,12 @@ public class SuggestedWordsTests extends AndroidTestCase { // Make sure getTypedWordInfoOrNull() returns non-null object. final SuggestedWords wordsWithTypedWord = new SuggestedWords( list, null /* rawSuggestions */, + TYPED_WORD_INFO, false /* typedWordValid */, false /* willAutoCorrect */, false /* isObsoleteSuggestions */, - SuggestedWords.INPUT_STYLE_NONE); + SuggestedWords.INPUT_STYLE_NONE, + SuggestedWords.NOT_A_SEQUENCE_NUMBER); final SuggestedWordInfo typedWord = wordsWithTypedWord.getTypedWordInfoOrNull(); assertNotNull(typedWord); assertEquals(TYPED_WORD, typedWord.mWord); @@ -111,10 +114,12 @@ public class SuggestedWordsTests extends AndroidTestCase { list.remove(0); final SuggestedWords wordsWithoutTypedWord = new SuggestedWords( list, null /* rawSuggestions */, + null /* typedWord */, false /* typedWordValid */, false /* willAutoCorrect */, false /* isObsoleteSuggestions */, - SuggestedWords.INPUT_STYLE_NONE); + SuggestedWords.INPUT_STYLE_NONE, + SuggestedWords.NOT_A_SEQUENCE_NUMBER); assertNull(wordsWithoutTypedWord.getTypedWordInfoOrNull()); // Make sure getTypedWordInfoOrNull() returns null. @@ -122,10 +127,12 @@ public class SuggestedWordsTests extends AndroidTestCase { final SuggestedWords emptySuggestedWords = new SuggestedWords( new ArrayList<SuggestedWordInfo>(), null /* rawSuggestions */, + null /* typedWord */, false /* typedWordValid */, false /* willAutoCorrect */, false /* isObsoleteSuggestions */, - SuggestedWords.INPUT_STYLE_NONE); + SuggestedWords.INPUT_STYLE_NONE, + SuggestedWords.NOT_A_SEQUENCE_NUMBER); assertNull(emptySuggestedWords.getTypedWordInfoOrNull()); assertNull(SuggestedWords.getEmptyInstance().getTypedWordInfoOrNull()); diff --git a/tests/src/com/android/inputmethod/latin/utils/StringAndJsonUtilsTests.java b/tests/src/com/android/inputmethod/latin/common/StringUtilsTests.java index 0389fefb0..ec9d4be92 100644 --- a/tests/src/com/android/inputmethod/latin/utils/StringAndJsonUtilsTests.java +++ b/tests/src/com/android/inputmethod/latin/common/StringUtilsTests.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012 The Android Open Source Project + * Copyright (C) 2014 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,24 +14,177 @@ * limitations under the License. */ -package com.android.inputmethod.latin.utils; +package com.android.inputmethod.latin.common; import android.test.AndroidTestCase; import android.test.suitebuilder.annotation.SmallTest; -import android.text.SpannableString; -import android.text.Spanned; -import android.text.SpannedString; -import com.android.inputmethod.latin.common.Constants; -import com.android.inputmethod.latin.common.StringUtils; -import com.android.inputmethod.latin.utils.SpannableStringUtils; - -import java.util.Arrays; -import java.util.List; import java.util.Locale; @SmallTest -public class StringAndJsonUtilsTests extends AndroidTestCase { +public class StringUtilsTests extends AndroidTestCase { + private static final Locale US = Locale.US; + private static final Locale GERMAN = Locale.GERMAN; + private static final Locale TURKEY = new Locale("tr", "TR"); + private static final Locale GREECE = new Locale("el", "GR"); + + private static void assert_toTitleCaseOfKeyLabel(final Locale locale, + final String lowerCase, final String expected) { + assertEquals(lowerCase + " in " + locale, expected, + StringUtils.toTitleCaseOfKeyLabel(lowerCase, locale)); + } + + public void test_toTitleCaseOfKeyLabel() { + assert_toTitleCaseOfKeyLabel(US, null, null); + assert_toTitleCaseOfKeyLabel(US, "", ""); + assert_toTitleCaseOfKeyLabel(US, "aeiou", "AEIOU"); + // U+00E0: "à" LATIN SMALL LETTER A WITH GRAVE + // U+00E8: "è" LATIN SMALL LETTER E WITH GRAVE + // U+00EE: "î" LATIN SMALL LETTER I WITH CIRCUMFLEX + // U+00F6: "ö" LATIN SMALL LETTER O WITH DIAERESIS + // U+016B: "ū" LATIN SMALL LETTER U WITH MACRON + // U+00F1: "ñ" LATIN SMALL LETTER N WITH TILDE + // U+00E7: "ç" LATIN SMALL LETTER C WITH CEDILLA + // U+00C0: "À" LATIN CAPITAL LETTER A WITH GRAVE + // U+00C8: "È" LATIN CAPITAL LETTER E WITH GRAVE + // U+00CE: "Î" LATIN CAPITAL LETTER I WITH CIRCUMFLEX + // U+00D6: "Ö" LATIN CAPITAL LETTER O WITH DIAERESIS + // U+016A: "Ū" LATIN CAPITAL LETTER U WITH MACRON + // U+00D1: "Ñ" LATIN CAPITAL LETTER N WITH TILDE + // U+00C7: "Ç" LATIN CAPITAL LETTER C WITH CEDILLA + assert_toTitleCaseOfKeyLabel(US, + "\u00E0\u00E8\u00EE\u00F6\u016B\u00F1\u00E7", + "\u00C0\u00C8\u00CE\u00D6\u016A\u00D1\u00C7"); + // U+00DF: "ß" LATIN SMALL LETTER SHARP S + // U+015B: "ś" LATIN SMALL LETTER S WITH ACUTE + // U+0161: "š" LATIN SMALL LETTER S WITH CARON + // U+015A: "Ś" LATIN CAPITAL LETTER S WITH ACUTE + // U+0160: "Š" LATIN CAPITAL LETTER S WITH CARONZ + assert_toTitleCaseOfKeyLabel(GERMAN, + "\u00DF\u015B\u0161", + "SS\u015A\u0160"); + // U+0259: "ə" LATIN SMALL LETTER SCHWA + // U+0069: "i" LATIN SMALL LETTER I + // U+0131: "ı" LATIN SMALL LETTER DOTLESS I + // U+018F: "Ə" LATIN SMALL LETTER SCHWA + // U+0130: "İ" LATIN SMALL LETTER I WITH DOT ABOVE + // U+0049: "I" LATIN SMALL LETTER I + assert_toTitleCaseOfKeyLabel(TURKEY, + "\u0259\u0069\u0131", + "\u018F\u0130\u0049"); + // U+03C3: "σ" GREEK SMALL LETTER SIGMA + // U+03C2: "ς" GREEK SMALL LETTER FINAL SIGMA + // U+03A3: "Σ" GREEK CAPITAL LETTER SIGMA + assert_toTitleCaseOfKeyLabel(GREECE, + "\u03C3\u03C2", + "\u03A3\u03A3"); + // U+03AC: "ά" GREEK SMALL LETTER ALPHA WITH TONOS + // U+03AD: "έ" GREEK SMALL LETTER EPSILON WITH TONOS + // U+03AE: "ή" GREEK SMALL LETTER ETA WITH TONOS + // U+03AF: "ί" GREEK SMALL LETTER IOTA WITH TONOS + // U+03CC: "ό" GREEK SMALL LETTER OMICRON WITH TONOS + // U+03CD: "ύ" GREEK SMALL LETTER UPSILON WITH TONOS + // U+03CE: "ώ" GREEK SMALL LETTER OMEGA WITH TONOS + // U+0386: "Ά" GREEK CAPITAL LETTER ALPHA WITH TONOS + // U+0388: "Έ" GREEK CAPITAL LETTER EPSILON WITH TONOS + // U+0389: "Ή" GREEK CAPITAL LETTER ETA WITH TONOS + // U+038A: "Ί" GREEK CAPITAL LETTER IOTA WITH TONOS + // U+038C: "Ό" GREEK CAPITAL LETTER OMICRON WITH TONOS + // U+038E: "Ύ" GREEK CAPITAL LETTER UPSILON WITH TONOS + // U+038F: "Ώ" GREEK CAPITAL LETTER OMEGA WITH TONOS + assert_toTitleCaseOfKeyLabel(GREECE, + "\u03AC\u03AD\u03AE\u03AF\u03CC\u03CD\u03CE", + "\u0386\u0388\u0389\u038A\u038C\u038E\u038F"); + // U+03CA: "ϊ" GREEK SMALL LETTER IOTA WITH DIALYTIKA + // U+03CB: "ϋ" GREEK SMALL LETTER UPSILON WITH DIALYTIKA + // U+0390: "ΐ" GREEK SMALL LETTER IOTA WITH DIALYTIKA AND TONOS + // U+03B0: "ΰ" GREEK SMALL LETTER UPSILON WITH DIALYTIKA AND TONOS + // U+03AA: "Ϊ" GREEK CAPITAL LETTER IOTA WITH DIALYTIKA + // U+03AB: "Ϋ" GREEK CAPITAL LETTER UPSILON WITH DIALYTIKA + // U+0399: "Ι" GREEK CAPITAL LETTER IOTA + // U+03A5: "Υ" GREEK CAPITAL LETTER UPSILON + // U+0308: COMBINING DIAERESIS + // U+0301: COMBINING GRAVE ACCENT + assert_toTitleCaseOfKeyLabel(GREECE, + "\u03CA\u03CB\u0390\u03B0", + "\u03AA\u03AB\u0399\u0308\u0301\u03A5\u0308\u0301"); + } + + private static void assert_toTitleCaseOfKeyCode(final Locale locale, final int lowerCase, + final int expected) { + assertEquals(lowerCase + " in " + locale, expected, + StringUtils.toTitleCaseOfKeyCode(lowerCase, locale)); + } + + public void test_toTitleCaseOfKeyCode() { + assert_toTitleCaseOfKeyCode(US, Constants.CODE_ENTER, Constants.CODE_ENTER); + assert_toTitleCaseOfKeyCode(US, Constants.CODE_SPACE, Constants.CODE_SPACE); + assert_toTitleCaseOfKeyCode(US, Constants.CODE_COMMA, Constants.CODE_COMMA); + // U+0069: "i" LATIN SMALL LETTER I + // U+0131: "ı" LATIN SMALL LETTER DOTLESS I + // U+0130: "İ" LATIN SMALL LETTER I WITH DOT ABOVE + // U+0049: "I" LATIN SMALL LETTER I + assert_toTitleCaseOfKeyCode(US, 0x0069, 0x0049); // i -> I + assert_toTitleCaseOfKeyCode(US, 0x0131, 0x0049); // ı -> I + assert_toTitleCaseOfKeyCode(TURKEY, 0x0069, 0x0130); // i -> İ + assert_toTitleCaseOfKeyCode(TURKEY, 0x0131, 0x0049); // ı -> I + // U+00DF: "ß" LATIN SMALL LETTER SHARP S + // The title case of "ß" is "SS". + assert_toTitleCaseOfKeyCode(US, 0x00DF, Constants.CODE_UNSPECIFIED); + // U+03AC: "ά" GREEK SMALL LETTER ALPHA WITH TONOS + // U+0386: "Ά" GREEK CAPITAL LETTER ALPHA WITH TONOS + assert_toTitleCaseOfKeyCode(GREECE, 0x03AC, 0x0386); + // U+03CA: "ϊ" GREEK SMALL LETTER IOTA WITH DIALYTIKA + // U+03AA: "Ϊ" GREEK CAPITAL LETTER IOTA WITH DIALYTIKA + assert_toTitleCaseOfKeyCode(GREECE, 0x03CA, 0x03AA); + // U+03B0: "ΰ" GREEK SMALL LETTER UPSILON WITH DIALYTIKA AND TONOS + // The title case of "ΰ" is "\u03A5\u0308\u0301". + assert_toTitleCaseOfKeyCode(GREECE, 0x03B0, Constants.CODE_UNSPECIFIED); + } + + private static void assert_capitalizeFirstCodePoint(final Locale locale, final String text, + final String expected) { + assertEquals(text + " in " + locale, expected, + StringUtils.capitalizeFirstCodePoint(text, locale)); + } + + public void test_capitalizeFirstCodePoint() { + assert_capitalizeFirstCodePoint(US, "", ""); + assert_capitalizeFirstCodePoint(US, "a", "A"); + assert_capitalizeFirstCodePoint(US, "à", "À"); + assert_capitalizeFirstCodePoint(US, "ß", "SS"); + assert_capitalizeFirstCodePoint(US, "text", "Text"); + assert_capitalizeFirstCodePoint(US, "iGoogle", "IGoogle"); + assert_capitalizeFirstCodePoint(TURKEY, "iyi", "İyi"); + assert_capitalizeFirstCodePoint(TURKEY, "ısırdı", "Isırdı"); + assert_capitalizeFirstCodePoint(GREECE, "ά", "Ά"); + assert_capitalizeFirstCodePoint(GREECE, "άνεση", "Άνεση"); + } + + private static void assert_capitalizeFirstAndDowncaseRest(final Locale locale, + final String text, final String expected) { + assertEquals(text + " in " + locale, expected, + StringUtils.capitalizeFirstAndDowncaseRest(text, locale)); + } + + public void test_capitalizeFirstAndDowncaseRest() { + assert_capitalizeFirstAndDowncaseRest(US, "", ""); + assert_capitalizeFirstAndDowncaseRest(US, "a", "A"); + assert_capitalizeFirstAndDowncaseRest(US, "à", "À"); + assert_capitalizeFirstAndDowncaseRest(US, "ß", "SS"); + assert_capitalizeFirstAndDowncaseRest(US, "text", "Text"); + assert_capitalizeFirstAndDowncaseRest(US, "iGoogle", "Igoogle"); + assert_capitalizeFirstAndDowncaseRest(US, "invite", "Invite"); + assert_capitalizeFirstAndDowncaseRest(US, "INVITE", "Invite"); + assert_capitalizeFirstAndDowncaseRest(TURKEY, "iyi", "İyi"); + assert_capitalizeFirstAndDowncaseRest(TURKEY, "İYİ", "İyi"); + assert_capitalizeFirstAndDowncaseRest(TURKEY, "ısırdı", "Isırdı"); + assert_capitalizeFirstAndDowncaseRest(TURKEY, "ISIRDI", "Isırdı"); + assert_capitalizeFirstAndDowncaseRest(GREECE, "ά", "Ά"); + assert_capitalizeFirstAndDowncaseRest(GREECE, "άνεση", "Άνεση"); + assert_capitalizeFirstAndDowncaseRest(GREECE, "ΆΝΕΣΗ", "Άνεση"); + } + public void testContainsInArray() { assertFalse("empty array", StringUtils.containsInArray("key", new String[0])); assertFalse("not in 1 element", StringUtils.containsInArray("key", new String[] { @@ -248,16 +401,6 @@ public class StringAndJsonUtilsTests extends AndroidTestCase { assertTrue(bytesStr.equals(bytesStr2)); } - public void testJsonUtils() { - final Object[] objs = new Object[] { 1, "aaa", "bbb", 3 }; - final List<Object> objArray = Arrays.asList(objs); - final String str = JsonUtils.listToJsonStr(objArray); - final List<Object> newObjArray = JsonUtils.jsonStrToList(str); - for (int i = 0; i < objs.length; ++i) { - assertEquals(objs[i], newObjArray.get(i)); - } - } - public void testToCodePointArray() { final String STR_WITH_SUPPLEMENTARY_CHAR = "abcde\uD861\uDED7fgh\u0000\u2002\u2003\u3000xx"; final int[] EXPECTED_RESULT = new int[] { 'a', 'b', 'c', 'd', 'e', 0x286D7, 'f', 'g', 'h', @@ -331,171 +474,4 @@ public class StringAndJsonUtilsTests extends AndroidTestCase { assertEquals(1, StringUtils.getTrailingSingleQuotesCount("'word'")); assertEquals(0, StringUtils.getTrailingSingleQuotesCount("I'm")); } - - private static void assertSpanCount(final int expectedCount, final CharSequence cs) { - final int actualCount; - if (cs instanceof Spanned) { - final Spanned spanned = (Spanned) cs; - actualCount = spanned.getSpans(0, spanned.length(), Object.class).length; - } else { - actualCount = 0; - } - assertEquals(expectedCount, actualCount); - } - - private static void assertSpan(final CharSequence cs, final Object expectedSpan, - final int expectedStart, final int expectedEnd, final int expectedFlags) { - assertTrue(cs instanceof Spanned); - final Spanned spanned = (Spanned) cs; - final Object[] actualSpans = spanned.getSpans(0, spanned.length(), Object.class); - for (Object actualSpan : actualSpans) { - if (actualSpan == expectedSpan) { - final int actualStart = spanned.getSpanStart(actualSpan); - final int actualEnd = spanned.getSpanEnd(actualSpan); - final int actualFlags = spanned.getSpanFlags(actualSpan); - assertEquals(expectedStart, actualStart); - assertEquals(expectedEnd, actualEnd); - assertEquals(expectedFlags, actualFlags); - return; - } - } - assertTrue(false); - } - - public void testSplitCharSequenceWithSpan() { - // text: " a bcd efg hij " - // span1: ^^^^^^^ - // span2: ^^^^^ - // span3: ^ - final SpannableString spannableString = new SpannableString(" a bcd efg hij "); - final Object span1 = new Object(); - final Object span2 = new Object(); - final Object span3 = new Object(); - final int SPAN1_FLAGS = Spanned.SPAN_EXCLUSIVE_EXCLUSIVE; - final int SPAN2_FLAGS = Spanned.SPAN_EXCLUSIVE_INCLUSIVE; - final int SPAN3_FLAGS = Spanned.SPAN_INCLUSIVE_INCLUSIVE; - spannableString.setSpan(span1, 0, 7, SPAN1_FLAGS); - spannableString.setSpan(span2, 0, 5, SPAN2_FLAGS); - spannableString.setSpan(span3, 12, 13, SPAN3_FLAGS); - final CharSequence[] charSequencesFromSpanned = SpannableStringUtils.split( - spannableString, " ", true /* preserveTrailingEmptySegmengs */); - final CharSequence[] charSequencesFromString = SpannableStringUtils.split( - spannableString.toString(), " ", true /* preserveTrailingEmptySegmengs */); - - - assertEquals(7, charSequencesFromString.length); - assertEquals(7, charSequencesFromSpanned.length); - - // text: "" - // span1: ^ - // span2: ^ - // span3: - assertEquals("", charSequencesFromString[0].toString()); - assertSpanCount(0, charSequencesFromString[0]); - assertEquals("", charSequencesFromSpanned[0].toString()); - assertSpanCount(2, charSequencesFromSpanned[0]); - assertSpan(charSequencesFromSpanned[0], span1, 0, 0, SPAN1_FLAGS); - assertSpan(charSequencesFromSpanned[0], span2, 0, 0, SPAN2_FLAGS); - - // text: "a" - // span1: ^ - // span2: ^ - // span3: - assertEquals("a", charSequencesFromString[1].toString()); - assertSpanCount(0, charSequencesFromString[1]); - assertEquals("a", charSequencesFromSpanned[1].toString()); - assertSpanCount(2, charSequencesFromSpanned[1]); - assertSpan(charSequencesFromSpanned[1], span1, 0, 1, SPAN1_FLAGS); - assertSpan(charSequencesFromSpanned[1], span2, 0, 1, SPAN2_FLAGS); - - // text: "bcd" - // span1: ^^^ - // span2: ^^ - // span3: - assertEquals("bcd", charSequencesFromString[2].toString()); - assertSpanCount(0, charSequencesFromString[2]); - assertEquals("bcd", charSequencesFromSpanned[2].toString()); - assertSpanCount(2, charSequencesFromSpanned[2]); - assertSpan(charSequencesFromSpanned[2], span1, 0, 3, SPAN1_FLAGS); - assertSpan(charSequencesFromSpanned[2], span2, 0, 2, SPAN2_FLAGS); - - // text: "efg" - // span1: - // span2: - // span3: - assertEquals("efg", charSequencesFromString[3].toString()); - assertSpanCount(0, charSequencesFromString[3]); - assertEquals("efg", charSequencesFromSpanned[3].toString()); - assertSpanCount(0, charSequencesFromSpanned[3]); - - // text: "hij" - // span1: - // span2: - // span3: ^ - assertEquals("hij", charSequencesFromString[4].toString()); - assertSpanCount(0, charSequencesFromString[4]); - assertEquals("hij", charSequencesFromSpanned[4].toString()); - assertSpanCount(1, charSequencesFromSpanned[4]); - assertSpan(charSequencesFromSpanned[4], span3, 1, 2, SPAN3_FLAGS); - - // text: "" - // span1: - // span2: - // span3: - assertEquals("", charSequencesFromString[5].toString()); - assertSpanCount(0, charSequencesFromString[5]); - assertEquals("", charSequencesFromSpanned[5].toString()); - assertSpanCount(0, charSequencesFromSpanned[5]); - - // text: "" - // span1: - // span2: - // span3: - assertEquals("", charSequencesFromString[6].toString()); - assertSpanCount(0, charSequencesFromString[6]); - assertEquals("", charSequencesFromSpanned[6].toString()); - assertSpanCount(0, charSequencesFromSpanned[6]); - } - - public void testSplitCharSequencePreserveTrailingEmptySegmengs() { - assertEquals(1, SpannableStringUtils.split("", " ", - false /* preserveTrailingEmptySegmengs */).length); - assertEquals(1, SpannableStringUtils.split(new SpannedString(""), " ", - false /* preserveTrailingEmptySegmengs */).length); - - assertEquals(1, SpannableStringUtils.split("", " ", - true /* preserveTrailingEmptySegmengs */).length); - assertEquals(1, SpannableStringUtils.split(new SpannedString(""), " ", - true /* preserveTrailingEmptySegmengs */).length); - - assertEquals(0, SpannableStringUtils.split(" ", " ", - false /* preserveTrailingEmptySegmengs */).length); - assertEquals(0, SpannableStringUtils.split(new SpannedString(" "), " ", - false /* preserveTrailingEmptySegmengs */).length); - - assertEquals(2, SpannableStringUtils.split(" ", " ", - true /* preserveTrailingEmptySegmengs */).length); - assertEquals(2, SpannableStringUtils.split(new SpannedString(" "), " ", - true /* preserveTrailingEmptySegmengs */).length); - - assertEquals(3, SpannableStringUtils.split("a b c ", " ", - false /* preserveTrailingEmptySegmengs */).length); - assertEquals(3, SpannableStringUtils.split(new SpannedString("a b c "), " ", - false /* preserveTrailingEmptySegmengs */).length); - - assertEquals(5, SpannableStringUtils.split("a b c ", " ", - true /* preserveTrailingEmptySegmengs */).length); - assertEquals(5, SpannableStringUtils.split(new SpannedString("a b c "), " ", - true /* preserveTrailingEmptySegmengs */).length); - - assertEquals(6, SpannableStringUtils.split("a b ", " ", - false /* preserveTrailingEmptySegmengs */).length); - assertEquals(6, SpannableStringUtils.split(new SpannedString("a b "), " ", - false /* preserveTrailingEmptySegmengs */).length); - - assertEquals(7, SpannableStringUtils.split("a b ", " ", - true /* preserveTrailingEmptySegmengs */).length); - assertEquals(7, SpannableStringUtils.split(new SpannedString("a b "), " ", - true /* preserveTrailingEmptySegmengs */).length); - } } diff --git a/tests/src/com/android/inputmethod/latin/utils/JsonUtilsTests.java b/tests/src/com/android/inputmethod/latin/utils/JsonUtilsTests.java new file mode 100644 index 000000000..194112070 --- /dev/null +++ b/tests/src/com/android/inputmethod/latin/utils/JsonUtilsTests.java @@ -0,0 +1,36 @@ +/* + * Copyright (C) 2014 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.android.inputmethod.latin.utils; + +import android.test.AndroidTestCase; +import android.test.suitebuilder.annotation.SmallTest; + +import java.util.Arrays; +import java.util.List; + +@SmallTest +public class JsonUtilsTests extends AndroidTestCase { + public void testJsonUtils() { + final Object[] objs = new Object[] { 1, "aaa", "bbb", 3 }; + final List<Object> objArray = Arrays.asList(objs); + final String str = JsonUtils.listToJsonStr(objArray); + final List<Object> newObjArray = JsonUtils.jsonStrToList(str); + for (int i = 0; i < objs.length; ++i) { + assertEquals(objs[i], newObjArray.get(i)); + } + } +} diff --git a/tests/src/com/android/inputmethod/latin/utils/SpannableStringUtilsTests.java b/tests/src/com/android/inputmethod/latin/utils/SpannableStringUtilsTests.java index 11d10aa2f..665d81ccd 100644 --- a/tests/src/com/android/inputmethod/latin/utils/SpannableStringUtilsTests.java +++ b/tests/src/com/android/inputmethod/latin/utils/SpannableStringUtilsTests.java @@ -20,8 +20,10 @@ import android.test.AndroidTestCase; import android.test.suitebuilder.annotation.SmallTest; import android.text.style.SuggestionSpan; import android.text.style.URLSpan; +import android.text.SpannableString; import android.text.SpannableStringBuilder; import android.text.Spanned; +import android.text.SpannedString; @SmallTest public class SpannableStringUtilsTests extends AndroidTestCase { @@ -54,4 +56,171 @@ public class SpannableStringUtilsTests extends AndroidTestCase { assertTrue("Should be a SuggestionSpan", spans[i] instanceof SuggestionSpan); } } + + private static void assertSpanCount(final int expectedCount, final CharSequence cs) { + final int actualCount; + if (cs instanceof Spanned) { + final Spanned spanned = (Spanned) cs; + actualCount = spanned.getSpans(0, spanned.length(), Object.class).length; + } else { + actualCount = 0; + } + assertEquals(expectedCount, actualCount); + } + + private static void assertSpan(final CharSequence cs, final Object expectedSpan, + final int expectedStart, final int expectedEnd, final int expectedFlags) { + assertTrue(cs instanceof Spanned); + final Spanned spanned = (Spanned) cs; + final Object[] actualSpans = spanned.getSpans(0, spanned.length(), Object.class); + for (Object actualSpan : actualSpans) { + if (actualSpan == expectedSpan) { + final int actualStart = spanned.getSpanStart(actualSpan); + final int actualEnd = spanned.getSpanEnd(actualSpan); + final int actualFlags = spanned.getSpanFlags(actualSpan); + assertEquals(expectedStart, actualStart); + assertEquals(expectedEnd, actualEnd); + assertEquals(expectedFlags, actualFlags); + return; + } + } + assertTrue(false); + } + + public void testSplitCharSequenceWithSpan() { + // text: " a bcd efg hij " + // span1: ^^^^^^^ + // span2: ^^^^^ + // span3: ^ + final SpannableString spannableString = new SpannableString(" a bcd efg hij "); + final Object span1 = new Object(); + final Object span2 = new Object(); + final Object span3 = new Object(); + final int SPAN1_FLAGS = Spanned.SPAN_EXCLUSIVE_EXCLUSIVE; + final int SPAN2_FLAGS = Spanned.SPAN_EXCLUSIVE_INCLUSIVE; + final int SPAN3_FLAGS = Spanned.SPAN_INCLUSIVE_INCLUSIVE; + spannableString.setSpan(span1, 0, 7, SPAN1_FLAGS); + spannableString.setSpan(span2, 0, 5, SPAN2_FLAGS); + spannableString.setSpan(span3, 12, 13, SPAN3_FLAGS); + final CharSequence[] charSequencesFromSpanned = SpannableStringUtils.split( + spannableString, " ", true /* preserveTrailingEmptySegmengs */); + final CharSequence[] charSequencesFromString = SpannableStringUtils.split( + spannableString.toString(), " ", true /* preserveTrailingEmptySegmengs */); + + + assertEquals(7, charSequencesFromString.length); + assertEquals(7, charSequencesFromSpanned.length); + + // text: "" + // span1: ^ + // span2: ^ + // span3: + assertEquals("", charSequencesFromString[0].toString()); + assertSpanCount(0, charSequencesFromString[0]); + assertEquals("", charSequencesFromSpanned[0].toString()); + assertSpanCount(2, charSequencesFromSpanned[0]); + assertSpan(charSequencesFromSpanned[0], span1, 0, 0, SPAN1_FLAGS); + assertSpan(charSequencesFromSpanned[0], span2, 0, 0, SPAN2_FLAGS); + + // text: "a" + // span1: ^ + // span2: ^ + // span3: + assertEquals("a", charSequencesFromString[1].toString()); + assertSpanCount(0, charSequencesFromString[1]); + assertEquals("a", charSequencesFromSpanned[1].toString()); + assertSpanCount(2, charSequencesFromSpanned[1]); + assertSpan(charSequencesFromSpanned[1], span1, 0, 1, SPAN1_FLAGS); + assertSpan(charSequencesFromSpanned[1], span2, 0, 1, SPAN2_FLAGS); + + // text: "bcd" + // span1: ^^^ + // span2: ^^ + // span3: + assertEquals("bcd", charSequencesFromString[2].toString()); + assertSpanCount(0, charSequencesFromString[2]); + assertEquals("bcd", charSequencesFromSpanned[2].toString()); + assertSpanCount(2, charSequencesFromSpanned[2]); + assertSpan(charSequencesFromSpanned[2], span1, 0, 3, SPAN1_FLAGS); + assertSpan(charSequencesFromSpanned[2], span2, 0, 2, SPAN2_FLAGS); + + // text: "efg" + // span1: + // span2: + // span3: + assertEquals("efg", charSequencesFromString[3].toString()); + assertSpanCount(0, charSequencesFromString[3]); + assertEquals("efg", charSequencesFromSpanned[3].toString()); + assertSpanCount(0, charSequencesFromSpanned[3]); + + // text: "hij" + // span1: + // span2: + // span3: ^ + assertEquals("hij", charSequencesFromString[4].toString()); + assertSpanCount(0, charSequencesFromString[4]); + assertEquals("hij", charSequencesFromSpanned[4].toString()); + assertSpanCount(1, charSequencesFromSpanned[4]); + assertSpan(charSequencesFromSpanned[4], span3, 1, 2, SPAN3_FLAGS); + + // text: "" + // span1: + // span2: + // span3: + assertEquals("", charSequencesFromString[5].toString()); + assertSpanCount(0, charSequencesFromString[5]); + assertEquals("", charSequencesFromSpanned[5].toString()); + assertSpanCount(0, charSequencesFromSpanned[5]); + + // text: "" + // span1: + // span2: + // span3: + assertEquals("", charSequencesFromString[6].toString()); + assertSpanCount(0, charSequencesFromString[6]); + assertEquals("", charSequencesFromSpanned[6].toString()); + assertSpanCount(0, charSequencesFromSpanned[6]); + } + + public void testSplitCharSequencePreserveTrailingEmptySegmengs() { + assertEquals(1, SpannableStringUtils.split("", " ", + false /* preserveTrailingEmptySegmengs */).length); + assertEquals(1, SpannableStringUtils.split(new SpannedString(""), " ", + false /* preserveTrailingEmptySegmengs */).length); + + assertEquals(1, SpannableStringUtils.split("", " ", + true /* preserveTrailingEmptySegmengs */).length); + assertEquals(1, SpannableStringUtils.split(new SpannedString(""), " ", + true /* preserveTrailingEmptySegmengs */).length); + + assertEquals(0, SpannableStringUtils.split(" ", " ", + false /* preserveTrailingEmptySegmengs */).length); + assertEquals(0, SpannableStringUtils.split(new SpannedString(" "), " ", + false /* preserveTrailingEmptySegmengs */).length); + + assertEquals(2, SpannableStringUtils.split(" ", " ", + true /* preserveTrailingEmptySegmengs */).length); + assertEquals(2, SpannableStringUtils.split(new SpannedString(" "), " ", + true /* preserveTrailingEmptySegmengs */).length); + + assertEquals(3, SpannableStringUtils.split("a b c ", " ", + false /* preserveTrailingEmptySegmengs */).length); + assertEquals(3, SpannableStringUtils.split(new SpannedString("a b c "), " ", + false /* preserveTrailingEmptySegmengs */).length); + + assertEquals(5, SpannableStringUtils.split("a b c ", " ", + true /* preserveTrailingEmptySegmengs */).length); + assertEquals(5, SpannableStringUtils.split(new SpannedString("a b c "), " ", + true /* preserveTrailingEmptySegmengs */).length); + + assertEquals(6, SpannableStringUtils.split("a b ", " ", + false /* preserveTrailingEmptySegmengs */).length); + assertEquals(6, SpannableStringUtils.split(new SpannedString("a b "), " ", + false /* preserveTrailingEmptySegmengs */).length); + + assertEquals(7, SpannableStringUtils.split("a b ", " ", + true /* preserveTrailingEmptySegmengs */).length); + assertEquals(7, SpannableStringUtils.split(new SpannedString("a b "), " ", + true /* preserveTrailingEmptySegmengs */).length); + } } diff --git a/tests/src/com/android/inputmethod/latin/utils/SubtypeLocaleUtilsTests.java b/tests/src/com/android/inputmethod/latin/utils/SubtypeLocaleUtilsTests.java index 03dcdfc78..111d5c56a 100644 --- a/tests/src/com/android/inputmethod/latin/utils/SubtypeLocaleUtilsTests.java +++ b/tests/src/com/android/inputmethod/latin/utils/SubtypeLocaleUtilsTests.java @@ -73,7 +73,7 @@ public class SubtypeLocaleUtilsTests extends AndroidTestCase { mRichImm = RichInputMethodManager.getInstance(); // Save and reset additional subtypes - mSavedAddtionalSubtypes = mRichImm.getAdditionalSubtypes(context); + mSavedAddtionalSubtypes = mRichImm.getAdditionalSubtypes(); final InputMethodSubtype[] predefinedAddtionalSubtypes = AdditionalSubtypeUtils.createAdditionalSubtypesArray( AdditionalSubtypeUtils.createPrefSubtypes( @@ -418,9 +418,17 @@ public class SubtypeLocaleUtilsTests extends AndroidTestCase { SubtypeLocaleUtils.getSubtypeDisplayNameInSystemLocale(HI)); // These are preliminary subtypes and may not exist. if (HI_LATN != null) { - assertEquals("hi_ZZ", "हिंग्लिश", + // TODO: Uncommented because of the current translation of these strings + // in Hindi are described in Latin script. + // assertEquals("hi_ZZ", "हिंग्लिश", + // SubtypeLocaleUtils.getSubtypeDisplayNameInSystemLocale(HI_LATN)); + // assertEquals("hi_ZZ", "हिंग्लिश (Dvorak)", + // SubtypeLocaleUtils.getSubtypeDisplayNameInSystemLocale(HI_LATN_DVORAK)); + // TODO: Remove these tests once the translation of these strings in Hindi + // are described in Devanagari script. + assertEquals("hi_ZZ", "Hinglish", SubtypeLocaleUtils.getSubtypeDisplayNameInSystemLocale(HI_LATN)); - assertEquals("hi_ZZ", "हिंग्लिश (Dvorak)", + assertEquals("hi_ZZ", "Hinglish (Dvorak)", SubtypeLocaleUtils.getSubtypeDisplayNameInSystemLocale(HI_LATN_DVORAK)); } return null; |