diff options
-rw-r--r-- | java/res/values-is/strings.xml | 263 | ||||
-rw-r--r-- | java/res/values-ka/strings.xml | 263 | ||||
-rw-r--r-- | java/res/values-mk/strings.xml | 263 | ||||
-rw-r--r-- | java/src/com/android/inputmethod/latin/makedict/FusionDictionary.java | 11 | ||||
-rw-r--r-- | native/jni/src/correction.cpp | 2 | ||||
-rw-r--r-- | native/jni/src/correction.h | 154 | ||||
-rw-r--r-- | native/jni/src/proximity_info.h | 24 | ||||
-rw-r--r-- | native/jni/src/proximity_info_state.h | 7 | ||||
-rw-r--r-- | tests/src/com/android/inputmethod/latin/FusionDictionaryTests.java | 42 |
9 files changed, 933 insertions, 96 deletions
diff --git a/java/res/values-is/strings.xml b/java/res/values-is/strings.xml new file mode 100644 index 000000000..8d5b00766 --- /dev/null +++ b/java/res/values-is/strings.xml @@ -0,0 +1,263 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- +/* +** +** Copyright 2008, The Android Open Source Project +** +** Licensed under the Apache License, Version 2.0 (the "License"); +** you may not use this file except in compliance with the License. +** You may obtain a copy of the License at +** +** http://www.apache.org/licenses/LICENSE-2.0 +** +** Unless required by applicable law or agreed to in writing, software +** distributed under the License is distributed on an "AS IS" BASIS, +** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +** See the License for the specific language governing permissions and +** limitations under the License. +*/ + --> + +<resources xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> + <!-- no translation found for aosp_android_keyboard_ime_name (7877134937939182296) --> + <skip /> + <!-- no translation found for english_ime_input_options (3909945612939668554) --> + <skip /> + <!-- no translation found for english_ime_research_log (8492602295696577851) --> + <skip /> + <!-- no translation found for aosp_spell_checker_service_name (6985142605330377819) --> + <skip /> + <!-- no translation found for use_contacts_for_spellchecking_option_title (5374120998125353898) --> + <skip /> + <!-- no translation found for use_contacts_for_spellchecking_option_summary (8754413382543307713) --> + <skip /> + <!-- no translation found for vibrate_on_keypress (5258079494276955460) --> + <skip /> + <!-- no translation found for sound_on_keypress (6093592297198243644) --> + <skip /> + <!-- no translation found for popup_on_keypress (123894815723512944) --> + <skip /> + <!-- no translation found for general_category (1859088467017573195) --> + <skip /> + <!-- no translation found for correction_category (2236750915056607613) --> + <skip /> + <!-- no translation found for misc_category (6894192814868233453) --> + <skip /> + <!-- no translation found for advanced_settings (362895144495591463) --> + <skip /> + <!-- no translation found for advanced_settings_summary (4487980456152830271) --> + <skip /> + <!-- no translation found for include_other_imes_in_language_switch_list (4533689960308565519) --> + <skip /> + <!-- no translation found for include_other_imes_in_language_switch_list_summary (840637129103317635) --> + <skip /> + <!-- no translation found for suppress_language_switch_key (8003788410354806368) --> + <skip /> + <!-- no translation found for key_preview_popup_dismiss_delay (6213164897443068248) --> + <skip /> + <!-- no translation found for key_preview_popup_dismiss_no_delay (2096123151571458064) --> + <skip /> + <!-- no translation found for key_preview_popup_dismiss_default_delay (2166964333903906734) --> + <skip /> + <!-- no translation found for use_contacts_dict (4435317977804180815) --> + <skip /> + <!-- no translation found for use_contacts_dict_summary (6599983334507879959) --> + <skip /> + <!-- no translation found for auto_cap (1719746674854628252) --> + <skip /> + <!-- no translation found for configure_dictionaries_title (4238652338556902049) --> + <skip /> + <!-- no translation found for main_dictionary (4798763781818361168) --> + <skip /> + <!-- no translation found for prefs_show_suggestions (8026799663445531637) --> + <skip /> + <!-- no translation found for prefs_show_suggestions_summary (1583132279498502825) --> + <skip /> + <!-- no translation found for prefs_suggestion_visibility_show_name (3219916594067551303) --> + <skip /> + <!-- no translation found for prefs_suggestion_visibility_show_only_portrait_name (3551821800439659812) --> + <skip /> + <!-- no translation found for prefs_suggestion_visibility_hide_name (6309143926422234673) --> + <skip /> + <!-- no translation found for auto_correction (4979925752001319458) --> + <skip /> + <!-- no translation found for auto_correction_summary (5625751551134658006) --> + <skip /> + <!-- no translation found for auto_correction_threshold_mode_off (8470882665417944026) --> + <skip /> + <!-- no translation found for auto_correction_threshold_mode_modest (8788366690620799097) --> + <skip /> + <!-- no translation found for auto_correction_threshold_mode_aggeressive (3524029103734923819) --> + <skip /> + <!-- no translation found for auto_correction_threshold_mode_very_aggeressive (3386782235540547678) --> + <skip /> + <!-- no translation found for bigram_prediction (5809665643352206540) --> + <skip /> + <!-- no translation found for bigram_prediction_summary (3253961591626441019) --> + <skip /> + <!-- no translation found for gesture_input (3310827802759290774) --> + <skip /> + <!-- no translation found for gesture_input_summary (7019742443455085809) --> + <skip /> + <!-- no translation found for gesture_preview_trail (3802333369335722221) --> + <skip /> + <!-- no translation found for gesture_floating_preview_text (6859416520117939680) --> + <skip /> + <!-- no translation found for gesture_floating_preview_text_summary (3333754126434989709) --> + <skip /> + <!-- no translation found for added_word (8993883354622484372) --> + <skip /> + <string name="label_go_key" msgid="1635148082137219148">"Áfram"</string> + <string name="label_next_key" msgid="362972844525672568">"Næsta"</string> + <string name="label_previous_key" msgid="1211868118071386787">"Fyrra"</string> + <string name="label_done_key" msgid="2441578748772529288">"Lokið"</string> + <string name="label_send_key" msgid="2815056534433717444">"Senda"</string> + <string name="label_to_alpha_key" msgid="4793983863798817523">"ABC"</string> + <!-- no translation found for label_to_symbol_key (8516904117128967293) --> + <skip /> + <!-- no translation found for label_to_symbol_with_microphone_key (9035925553010061906) --> + <skip /> + <!-- no translation found for label_pause_key (181098308428035340) --> + <skip /> + <!-- no translation found for label_wait_key (6402152600878093134) --> + <skip /> + <!-- no translation found for spoken_use_headphones (896961781287283493) --> + <skip /> + <!-- no translation found for spoken_current_text_is (2485723011272583845) --> + <skip /> + <!-- no translation found for spoken_no_text_entered (7479685225597344496) --> + <skip /> + <!-- no translation found for spoken_description_unknown (3197434010402179157) --> + <skip /> + <!-- no translation found for spoken_description_shift (244197883292549308) --> + <skip /> + <!-- no translation found for spoken_description_shift_shifted (1681877323344195035) --> + <skip /> + <!-- no translation found for spoken_description_caps_lock (3276478269526304432) --> + <skip /> + <!-- no translation found for spoken_description_delete (8740376944276199801) --> + <skip /> + <!-- no translation found for spoken_description_to_symbol (5486340107500448969) --> + <skip /> + <!-- no translation found for spoken_description_to_alpha (23129338819771807) --> + <skip /> + <!-- no translation found for spoken_description_to_numeric (591752092685161732) --> + <skip /> + <!-- no translation found for spoken_description_settings (4627462689603838099) --> + <skip /> + <!-- no translation found for spoken_description_tab (2667716002663482248) --> + <skip /> + <!-- no translation found for spoken_description_space (2582521050049860859) --> + <skip /> + <!-- no translation found for spoken_description_mic (615536748882611950) --> + <skip /> + <!-- no translation found for spoken_description_smiley (2256309826200113918) --> + <skip /> + <!-- no translation found for spoken_description_return (8178083177238315647) --> + <skip /> + <!-- no translation found for spoken_description_search (1247236163755920808) --> + <skip /> + <!-- no translation found for spoken_description_dot (40711082435231673) --> + <skip /> + <!-- no translation found for spoken_description_language_switch (5507091328222331316) --> + <skip /> + <!-- no translation found for spoken_description_action_next (8636078276664150324) --> + <skip /> + <!-- no translation found for spoken_description_action_previous (800872415009336208) --> + <skip /> + <!-- no translation found for spoken_description_shiftmode_on (5700440798609574589) --> + <skip /> + <!-- no translation found for spoken_description_shiftmode_locked (593175803181701830) --> + <skip /> + <!-- no translation found for spoken_description_shiftmode_off (657219998449174808) --> + <skip /> + <!-- no translation found for spoken_description_mode_symbol (7183343879909747642) --> + <skip /> + <!-- no translation found for spoken_description_mode_alpha (3528307674390156956) --> + <skip /> + <!-- no translation found for spoken_description_mode_phone (6520207943132026264) --> + <skip /> + <!-- no translation found for spoken_description_mode_phone_shift (5499629753962641227) --> + <skip /> + <!-- no translation found for voice_input (3583258583521397548) --> + <skip /> + <!-- no translation found for voice_input_modes_main_keyboard (3360660341121083174) --> + <skip /> + <!-- no translation found for voice_input_modes_symbols_keyboard (7203213240786084067) --> + <skip /> + <!-- no translation found for voice_input_modes_off (3745699748218082014) --> + <skip /> + <!-- no translation found for voice_input_modes_summary_main_keyboard (6586544292900314339) --> + <skip /> + <!-- no translation found for voice_input_modes_summary_symbols_keyboard (5233725927281932391) --> + <skip /> + <!-- no translation found for voice_input_modes_summary_off (63875609591897607) --> + <skip /> + <!-- no translation found for configure_input_method (373356270290742459) --> + <skip /> + <!-- no translation found for language_selection_title (1651299598555326750) --> + <skip /> + <!-- no translation found for select_language (3693815588777926848) --> + <skip /> + <!-- no translation found for hint_add_to_dictionary (573678656946085380) --> + <skip /> + <!-- no translation found for has_dictionary (6071847973466625007) --> + <skip /> + <!-- no translation found for prefs_enable_log (6620424505072963557) --> + <skip /> + <!-- no translation found for prefs_description_log (5827825607258246003) --> + <skip /> + <!-- no translation found for keyboard_layout (8451164783510487501) --> + <skip /> + <!-- no translation found for subtype_en_GB (88170601942311355) --> + <skip /> + <!-- no translation found for subtype_en_US (6160452336634534239) --> + <skip /> + <!-- no translation found for subtype_with_layout_en_GB (2179097748724725906) --> + <skip /> + <!-- no translation found for subtype_with_layout_en_US (1362581347576714579) --> + <skip /> + <!-- no translation found for subtype_no_language (141420857808801746) --> + <skip /> + <!-- no translation found for subtype_no_language_qwerty (2956121451616633133) --> + <skip /> + <!-- no translation found for subtype_no_language_qwertz (1177848172397202890) --> + <skip /> + <!-- no translation found for subtype_no_language_azerty (8721460968141187394) --> + <skip /> + <!-- no translation found for subtype_no_language_dvorak (3122976737669823935) --> + <skip /> + <!-- no translation found for subtype_no_language_colemak (4205992994906097244) --> + <skip /> + <!-- no translation found for subtype_no_language_pcqwerty (8840928374394180189) --> + <skip /> + <!-- no translation found for custom_input_styles_title (8429952441821251512) --> + <skip /> + <!-- no translation found for add_style (6163126614514489951) --> + <skip /> + <!-- no translation found for add (8299699805688017798) --> + <skip /> + <!-- no translation found for remove (4486081658752944606) --> + <skip /> + <!-- no translation found for save (7646738597196767214) --> + <skip /> + <!-- no translation found for subtype_locale (8576443440738143764) --> + <skip /> + <!-- no translation found for keyboard_layout_set (4309233698194565609) --> + <skip /> + <!-- no translation found for custom_input_style_note_message (8826731320846363423) --> + <skip /> + <!-- no translation found for enable (5031294444630523247) --> + <skip /> + <!-- no translation found for not_now (6172462888202790482) --> + <skip /> + <!-- no translation found for custom_input_style_already_exists (8008728952215449707) --> + <skip /> + <!-- no translation found for prefs_usability_study_mode (1261130555134595254) --> + <skip /> + <!-- no translation found for prefs_keypress_vibration_duration_settings (1829950405285211668) --> + <skip /> + <!-- no translation found for prefs_keypress_sound_volume_settings (5875933757082305040) --> + <skip /> +</resources> diff --git a/java/res/values-ka/strings.xml b/java/res/values-ka/strings.xml new file mode 100644 index 000000000..fcb666d57 --- /dev/null +++ b/java/res/values-ka/strings.xml @@ -0,0 +1,263 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- +/* +** +** Copyright 2008, The Android Open Source Project +** +** Licensed under the Apache License, Version 2.0 (the "License"); +** you may not use this file except in compliance with the License. +** You may obtain a copy of the License at +** +** http://www.apache.org/licenses/LICENSE-2.0 +** +** Unless required by applicable law or agreed to in writing, software +** distributed under the License is distributed on an "AS IS" BASIS, +** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +** See the License for the specific language governing permissions and +** limitations under the License. +*/ + --> + +<resources xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> + <!-- no translation found for aosp_android_keyboard_ime_name (7877134937939182296) --> + <skip /> + <!-- no translation found for english_ime_input_options (3909945612939668554) --> + <skip /> + <!-- no translation found for english_ime_research_log (8492602295696577851) --> + <skip /> + <!-- no translation found for aosp_spell_checker_service_name (6985142605330377819) --> + <skip /> + <!-- no translation found for use_contacts_for_spellchecking_option_title (5374120998125353898) --> + <skip /> + <!-- no translation found for use_contacts_for_spellchecking_option_summary (8754413382543307713) --> + <skip /> + <!-- no translation found for vibrate_on_keypress (5258079494276955460) --> + <skip /> + <!-- no translation found for sound_on_keypress (6093592297198243644) --> + <skip /> + <!-- no translation found for popup_on_keypress (123894815723512944) --> + <skip /> + <!-- no translation found for general_category (1859088467017573195) --> + <skip /> + <!-- no translation found for correction_category (2236750915056607613) --> + <skip /> + <!-- no translation found for misc_category (6894192814868233453) --> + <skip /> + <!-- no translation found for advanced_settings (362895144495591463) --> + <skip /> + <!-- no translation found for advanced_settings_summary (4487980456152830271) --> + <skip /> + <!-- no translation found for include_other_imes_in_language_switch_list (4533689960308565519) --> + <skip /> + <!-- no translation found for include_other_imes_in_language_switch_list_summary (840637129103317635) --> + <skip /> + <!-- no translation found for suppress_language_switch_key (8003788410354806368) --> + <skip /> + <!-- no translation found for key_preview_popup_dismiss_delay (6213164897443068248) --> + <skip /> + <!-- no translation found for key_preview_popup_dismiss_no_delay (2096123151571458064) --> + <skip /> + <!-- no translation found for key_preview_popup_dismiss_default_delay (2166964333903906734) --> + <skip /> + <!-- no translation found for use_contacts_dict (4435317977804180815) --> + <skip /> + <!-- no translation found for use_contacts_dict_summary (6599983334507879959) --> + <skip /> + <!-- no translation found for auto_cap (1719746674854628252) --> + <skip /> + <!-- no translation found for configure_dictionaries_title (4238652338556902049) --> + <skip /> + <!-- no translation found for main_dictionary (4798763781818361168) --> + <skip /> + <!-- no translation found for prefs_show_suggestions (8026799663445531637) --> + <skip /> + <!-- no translation found for prefs_show_suggestions_summary (1583132279498502825) --> + <skip /> + <!-- no translation found for prefs_suggestion_visibility_show_name (3219916594067551303) --> + <skip /> + <!-- no translation found for prefs_suggestion_visibility_show_only_portrait_name (3551821800439659812) --> + <skip /> + <!-- no translation found for prefs_suggestion_visibility_hide_name (6309143926422234673) --> + <skip /> + <!-- no translation found for auto_correction (4979925752001319458) --> + <skip /> + <!-- no translation found for auto_correction_summary (5625751551134658006) --> + <skip /> + <!-- no translation found for auto_correction_threshold_mode_off (8470882665417944026) --> + <skip /> + <!-- no translation found for auto_correction_threshold_mode_modest (8788366690620799097) --> + <skip /> + <!-- no translation found for auto_correction_threshold_mode_aggeressive (3524029103734923819) --> + <skip /> + <!-- no translation found for auto_correction_threshold_mode_very_aggeressive (3386782235540547678) --> + <skip /> + <!-- no translation found for bigram_prediction (5809665643352206540) --> + <skip /> + <!-- no translation found for bigram_prediction_summary (3253961591626441019) --> + <skip /> + <!-- no translation found for gesture_input (3310827802759290774) --> + <skip /> + <!-- no translation found for gesture_input_summary (7019742443455085809) --> + <skip /> + <!-- no translation found for gesture_preview_trail (3802333369335722221) --> + <skip /> + <!-- no translation found for gesture_floating_preview_text (6859416520117939680) --> + <skip /> + <!-- no translation found for gesture_floating_preview_text_summary (3333754126434989709) --> + <skip /> + <!-- no translation found for added_word (8993883354622484372) --> + <skip /> + <string name="label_go_key" msgid="1635148082137219148">"გადასვლა"</string> + <string name="label_next_key" msgid="362972844525672568">"შემდეგი"</string> + <string name="label_previous_key" msgid="1211868118071386787">"წინა"</string> + <string name="label_done_key" msgid="2441578748772529288">"შესრულებულია"</string> + <string name="label_send_key" msgid="2815056534433717444">"გაგზავნა"</string> + <string name="label_to_alpha_key" msgid="4793983863798817523">"ABC"</string> + <!-- no translation found for label_to_symbol_key (8516904117128967293) --> + <skip /> + <!-- no translation found for label_to_symbol_with_microphone_key (9035925553010061906) --> + <skip /> + <!-- no translation found for label_pause_key (181098308428035340) --> + <skip /> + <!-- no translation found for label_wait_key (6402152600878093134) --> + <skip /> + <!-- no translation found for spoken_use_headphones (896961781287283493) --> + <skip /> + <!-- no translation found for spoken_current_text_is (2485723011272583845) --> + <skip /> + <!-- no translation found for spoken_no_text_entered (7479685225597344496) --> + <skip /> + <!-- no translation found for spoken_description_unknown (3197434010402179157) --> + <skip /> + <!-- no translation found for spoken_description_shift (244197883292549308) --> + <skip /> + <!-- no translation found for spoken_description_shift_shifted (1681877323344195035) --> + <skip /> + <!-- no translation found for spoken_description_caps_lock (3276478269526304432) --> + <skip /> + <!-- no translation found for spoken_description_delete (8740376944276199801) --> + <skip /> + <!-- no translation found for spoken_description_to_symbol (5486340107500448969) --> + <skip /> + <!-- no translation found for spoken_description_to_alpha (23129338819771807) --> + <skip /> + <!-- no translation found for spoken_description_to_numeric (591752092685161732) --> + <skip /> + <!-- no translation found for spoken_description_settings (4627462689603838099) --> + <skip /> + <!-- no translation found for spoken_description_tab (2667716002663482248) --> + <skip /> + <!-- no translation found for spoken_description_space (2582521050049860859) --> + <skip /> + <!-- no translation found for spoken_description_mic (615536748882611950) --> + <skip /> + <!-- no translation found for spoken_description_smiley (2256309826200113918) --> + <skip /> + <!-- no translation found for spoken_description_return (8178083177238315647) --> + <skip /> + <!-- no translation found for spoken_description_search (1247236163755920808) --> + <skip /> + <!-- no translation found for spoken_description_dot (40711082435231673) --> + <skip /> + <!-- no translation found for spoken_description_language_switch (5507091328222331316) --> + <skip /> + <!-- no translation found for spoken_description_action_next (8636078276664150324) --> + <skip /> + <!-- no translation found for spoken_description_action_previous (800872415009336208) --> + <skip /> + <!-- no translation found for spoken_description_shiftmode_on (5700440798609574589) --> + <skip /> + <!-- no translation found for spoken_description_shiftmode_locked (593175803181701830) --> + <skip /> + <!-- no translation found for spoken_description_shiftmode_off (657219998449174808) --> + <skip /> + <!-- no translation found for spoken_description_mode_symbol (7183343879909747642) --> + <skip /> + <!-- no translation found for spoken_description_mode_alpha (3528307674390156956) --> + <skip /> + <!-- no translation found for spoken_description_mode_phone (6520207943132026264) --> + <skip /> + <!-- no translation found for spoken_description_mode_phone_shift (5499629753962641227) --> + <skip /> + <!-- no translation found for voice_input (3583258583521397548) --> + <skip /> + <!-- no translation found for voice_input_modes_main_keyboard (3360660341121083174) --> + <skip /> + <!-- no translation found for voice_input_modes_symbols_keyboard (7203213240786084067) --> + <skip /> + <!-- no translation found for voice_input_modes_off (3745699748218082014) --> + <skip /> + <!-- no translation found for voice_input_modes_summary_main_keyboard (6586544292900314339) --> + <skip /> + <!-- no translation found for voice_input_modes_summary_symbols_keyboard (5233725927281932391) --> + <skip /> + <!-- no translation found for voice_input_modes_summary_off (63875609591897607) --> + <skip /> + <!-- no translation found for configure_input_method (373356270290742459) --> + <skip /> + <!-- no translation found for language_selection_title (1651299598555326750) --> + <skip /> + <!-- no translation found for select_language (3693815588777926848) --> + <skip /> + <!-- no translation found for hint_add_to_dictionary (573678656946085380) --> + <skip /> + <!-- no translation found for has_dictionary (6071847973466625007) --> + <skip /> + <!-- no translation found for prefs_enable_log (6620424505072963557) --> + <skip /> + <!-- no translation found for prefs_description_log (5827825607258246003) --> + <skip /> + <!-- no translation found for keyboard_layout (8451164783510487501) --> + <skip /> + <!-- no translation found for subtype_en_GB (88170601942311355) --> + <skip /> + <!-- no translation found for subtype_en_US (6160452336634534239) --> + <skip /> + <!-- no translation found for subtype_with_layout_en_GB (2179097748724725906) --> + <skip /> + <!-- no translation found for subtype_with_layout_en_US (1362581347576714579) --> + <skip /> + <!-- no translation found for subtype_no_language (141420857808801746) --> + <skip /> + <!-- no translation found for subtype_no_language_qwerty (2956121451616633133) --> + <skip /> + <!-- no translation found for subtype_no_language_qwertz (1177848172397202890) --> + <skip /> + <!-- no translation found for subtype_no_language_azerty (8721460968141187394) --> + <skip /> + <!-- no translation found for subtype_no_language_dvorak (3122976737669823935) --> + <skip /> + <!-- no translation found for subtype_no_language_colemak (4205992994906097244) --> + <skip /> + <!-- no translation found for subtype_no_language_pcqwerty (8840928374394180189) --> + <skip /> + <!-- no translation found for custom_input_styles_title (8429952441821251512) --> + <skip /> + <!-- no translation found for add_style (6163126614514489951) --> + <skip /> + <!-- no translation found for add (8299699805688017798) --> + <skip /> + <!-- no translation found for remove (4486081658752944606) --> + <skip /> + <!-- no translation found for save (7646738597196767214) --> + <skip /> + <!-- no translation found for subtype_locale (8576443440738143764) --> + <skip /> + <!-- no translation found for keyboard_layout_set (4309233698194565609) --> + <skip /> + <!-- no translation found for custom_input_style_note_message (8826731320846363423) --> + <skip /> + <!-- no translation found for enable (5031294444630523247) --> + <skip /> + <!-- no translation found for not_now (6172462888202790482) --> + <skip /> + <!-- no translation found for custom_input_style_already_exists (8008728952215449707) --> + <skip /> + <!-- no translation found for prefs_usability_study_mode (1261130555134595254) --> + <skip /> + <!-- no translation found for prefs_keypress_vibration_duration_settings (1829950405285211668) --> + <skip /> + <!-- no translation found for prefs_keypress_sound_volume_settings (5875933757082305040) --> + <skip /> +</resources> diff --git a/java/res/values-mk/strings.xml b/java/res/values-mk/strings.xml new file mode 100644 index 000000000..7f293e4dc --- /dev/null +++ b/java/res/values-mk/strings.xml @@ -0,0 +1,263 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- +/* +** +** Copyright 2008, The Android Open Source Project +** +** Licensed under the Apache License, Version 2.0 (the "License"); +** you may not use this file except in compliance with the License. +** You may obtain a copy of the License at +** +** http://www.apache.org/licenses/LICENSE-2.0 +** +** Unless required by applicable law or agreed to in writing, software +** distributed under the License is distributed on an "AS IS" BASIS, +** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +** See the License for the specific language governing permissions and +** limitations under the License. +*/ + --> + +<resources xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> + <!-- no translation found for aosp_android_keyboard_ime_name (7877134937939182296) --> + <skip /> + <!-- no translation found for english_ime_input_options (3909945612939668554) --> + <skip /> + <!-- no translation found for english_ime_research_log (8492602295696577851) --> + <skip /> + <!-- no translation found for aosp_spell_checker_service_name (6985142605330377819) --> + <skip /> + <!-- no translation found for use_contacts_for_spellchecking_option_title (5374120998125353898) --> + <skip /> + <!-- no translation found for use_contacts_for_spellchecking_option_summary (8754413382543307713) --> + <skip /> + <!-- no translation found for vibrate_on_keypress (5258079494276955460) --> + <skip /> + <!-- no translation found for sound_on_keypress (6093592297198243644) --> + <skip /> + <!-- no translation found for popup_on_keypress (123894815723512944) --> + <skip /> + <!-- no translation found for general_category (1859088467017573195) --> + <skip /> + <!-- no translation found for correction_category (2236750915056607613) --> + <skip /> + <!-- no translation found for misc_category (6894192814868233453) --> + <skip /> + <!-- no translation found for advanced_settings (362895144495591463) --> + <skip /> + <!-- no translation found for advanced_settings_summary (4487980456152830271) --> + <skip /> + <!-- no translation found for include_other_imes_in_language_switch_list (4533689960308565519) --> + <skip /> + <!-- no translation found for include_other_imes_in_language_switch_list_summary (840637129103317635) --> + <skip /> + <!-- no translation found for suppress_language_switch_key (8003788410354806368) --> + <skip /> + <!-- no translation found for key_preview_popup_dismiss_delay (6213164897443068248) --> + <skip /> + <!-- no translation found for key_preview_popup_dismiss_no_delay (2096123151571458064) --> + <skip /> + <!-- no translation found for key_preview_popup_dismiss_default_delay (2166964333903906734) --> + <skip /> + <!-- no translation found for use_contacts_dict (4435317977804180815) --> + <skip /> + <!-- no translation found for use_contacts_dict_summary (6599983334507879959) --> + <skip /> + <!-- no translation found for auto_cap (1719746674854628252) --> + <skip /> + <!-- no translation found for configure_dictionaries_title (4238652338556902049) --> + <skip /> + <!-- no translation found for main_dictionary (4798763781818361168) --> + <skip /> + <!-- no translation found for prefs_show_suggestions (8026799663445531637) --> + <skip /> + <!-- no translation found for prefs_show_suggestions_summary (1583132279498502825) --> + <skip /> + <!-- no translation found for prefs_suggestion_visibility_show_name (3219916594067551303) --> + <skip /> + <!-- no translation found for prefs_suggestion_visibility_show_only_portrait_name (3551821800439659812) --> + <skip /> + <!-- no translation found for prefs_suggestion_visibility_hide_name (6309143926422234673) --> + <skip /> + <!-- no translation found for auto_correction (4979925752001319458) --> + <skip /> + <!-- no translation found for auto_correction_summary (5625751551134658006) --> + <skip /> + <!-- no translation found for auto_correction_threshold_mode_off (8470882665417944026) --> + <skip /> + <!-- no translation found for auto_correction_threshold_mode_modest (8788366690620799097) --> + <skip /> + <!-- no translation found for auto_correction_threshold_mode_aggeressive (3524029103734923819) --> + <skip /> + <!-- no translation found for auto_correction_threshold_mode_very_aggeressive (3386782235540547678) --> + <skip /> + <!-- no translation found for bigram_prediction (5809665643352206540) --> + <skip /> + <!-- no translation found for bigram_prediction_summary (3253961591626441019) --> + <skip /> + <!-- no translation found for gesture_input (3310827802759290774) --> + <skip /> + <!-- no translation found for gesture_input_summary (7019742443455085809) --> + <skip /> + <!-- no translation found for gesture_preview_trail (3802333369335722221) --> + <skip /> + <!-- no translation found for gesture_floating_preview_text (6859416520117939680) --> + <skip /> + <!-- no translation found for gesture_floating_preview_text_summary (3333754126434989709) --> + <skip /> + <!-- no translation found for added_word (8993883354622484372) --> + <skip /> + <string name="label_go_key" msgid="1635148082137219148">"Оди"</string> + <string name="label_next_key" msgid="362972844525672568">"Следно"</string> + <string name="label_previous_key" msgid="1211868118071386787">"Претходно"</string> + <string name="label_done_key" msgid="2441578748772529288">"Готово"</string> + <string name="label_send_key" msgid="2815056534433717444">"Испрати"</string> + <string name="label_to_alpha_key" msgid="4793983863798817523">"АБВ"</string> + <!-- no translation found for label_to_symbol_key (8516904117128967293) --> + <skip /> + <!-- no translation found for label_to_symbol_with_microphone_key (9035925553010061906) --> + <skip /> + <!-- no translation found for label_pause_key (181098308428035340) --> + <skip /> + <!-- no translation found for label_wait_key (6402152600878093134) --> + <skip /> + <!-- no translation found for spoken_use_headphones (896961781287283493) --> + <skip /> + <!-- no translation found for spoken_current_text_is (2485723011272583845) --> + <skip /> + <!-- no translation found for spoken_no_text_entered (7479685225597344496) --> + <skip /> + <!-- no translation found for spoken_description_unknown (3197434010402179157) --> + <skip /> + <!-- no translation found for spoken_description_shift (244197883292549308) --> + <skip /> + <!-- no translation found for spoken_description_shift_shifted (1681877323344195035) --> + <skip /> + <!-- no translation found for spoken_description_caps_lock (3276478269526304432) --> + <skip /> + <!-- no translation found for spoken_description_delete (8740376944276199801) --> + <skip /> + <!-- no translation found for spoken_description_to_symbol (5486340107500448969) --> + <skip /> + <!-- no translation found for spoken_description_to_alpha (23129338819771807) --> + <skip /> + <!-- no translation found for spoken_description_to_numeric (591752092685161732) --> + <skip /> + <!-- no translation found for spoken_description_settings (4627462689603838099) --> + <skip /> + <!-- no translation found for spoken_description_tab (2667716002663482248) --> + <skip /> + <!-- no translation found for spoken_description_space (2582521050049860859) --> + <skip /> + <!-- no translation found for spoken_description_mic (615536748882611950) --> + <skip /> + <!-- no translation found for spoken_description_smiley (2256309826200113918) --> + <skip /> + <!-- no translation found for spoken_description_return (8178083177238315647) --> + <skip /> + <!-- no translation found for spoken_description_search (1247236163755920808) --> + <skip /> + <!-- no translation found for spoken_description_dot (40711082435231673) --> + <skip /> + <!-- no translation found for spoken_description_language_switch (5507091328222331316) --> + <skip /> + <!-- no translation found for spoken_description_action_next (8636078276664150324) --> + <skip /> + <!-- no translation found for spoken_description_action_previous (800872415009336208) --> + <skip /> + <!-- no translation found for spoken_description_shiftmode_on (5700440798609574589) --> + <skip /> + <!-- no translation found for spoken_description_shiftmode_locked (593175803181701830) --> + <skip /> + <!-- no translation found for spoken_description_shiftmode_off (657219998449174808) --> + <skip /> + <!-- no translation found for spoken_description_mode_symbol (7183343879909747642) --> + <skip /> + <!-- no translation found for spoken_description_mode_alpha (3528307674390156956) --> + <skip /> + <!-- no translation found for spoken_description_mode_phone (6520207943132026264) --> + <skip /> + <!-- no translation found for spoken_description_mode_phone_shift (5499629753962641227) --> + <skip /> + <!-- no translation found for voice_input (3583258583521397548) --> + <skip /> + <!-- no translation found for voice_input_modes_main_keyboard (3360660341121083174) --> + <skip /> + <!-- no translation found for voice_input_modes_symbols_keyboard (7203213240786084067) --> + <skip /> + <!-- no translation found for voice_input_modes_off (3745699748218082014) --> + <skip /> + <!-- no translation found for voice_input_modes_summary_main_keyboard (6586544292900314339) --> + <skip /> + <!-- no translation found for voice_input_modes_summary_symbols_keyboard (5233725927281932391) --> + <skip /> + <!-- no translation found for voice_input_modes_summary_off (63875609591897607) --> + <skip /> + <!-- no translation found for configure_input_method (373356270290742459) --> + <skip /> + <!-- no translation found for language_selection_title (1651299598555326750) --> + <skip /> + <!-- no translation found for select_language (3693815588777926848) --> + <skip /> + <!-- no translation found for hint_add_to_dictionary (573678656946085380) --> + <skip /> + <!-- no translation found for has_dictionary (6071847973466625007) --> + <skip /> + <!-- no translation found for prefs_enable_log (6620424505072963557) --> + <skip /> + <!-- no translation found for prefs_description_log (5827825607258246003) --> + <skip /> + <!-- no translation found for keyboard_layout (8451164783510487501) --> + <skip /> + <!-- no translation found for subtype_en_GB (88170601942311355) --> + <skip /> + <!-- no translation found for subtype_en_US (6160452336634534239) --> + <skip /> + <!-- no translation found for subtype_with_layout_en_GB (2179097748724725906) --> + <skip /> + <!-- no translation found for subtype_with_layout_en_US (1362581347576714579) --> + <skip /> + <!-- no translation found for subtype_no_language (141420857808801746) --> + <skip /> + <!-- no translation found for subtype_no_language_qwerty (2956121451616633133) --> + <skip /> + <!-- no translation found for subtype_no_language_qwertz (1177848172397202890) --> + <skip /> + <!-- no translation found for subtype_no_language_azerty (8721460968141187394) --> + <skip /> + <!-- no translation found for subtype_no_language_dvorak (3122976737669823935) --> + <skip /> + <!-- no translation found for subtype_no_language_colemak (4205992994906097244) --> + <skip /> + <!-- no translation found for subtype_no_language_pcqwerty (8840928374394180189) --> + <skip /> + <!-- no translation found for custom_input_styles_title (8429952441821251512) --> + <skip /> + <!-- no translation found for add_style (6163126614514489951) --> + <skip /> + <!-- no translation found for add (8299699805688017798) --> + <skip /> + <!-- no translation found for remove (4486081658752944606) --> + <skip /> + <!-- no translation found for save (7646738597196767214) --> + <skip /> + <!-- no translation found for subtype_locale (8576443440738143764) --> + <skip /> + <!-- no translation found for keyboard_layout_set (4309233698194565609) --> + <skip /> + <!-- no translation found for custom_input_style_note_message (8826731320846363423) --> + <skip /> + <!-- no translation found for enable (5031294444630523247) --> + <skip /> + <!-- no translation found for not_now (6172462888202790482) --> + <skip /> + <!-- no translation found for custom_input_style_already_exists (8008728952215449707) --> + <skip /> + <!-- no translation found for prefs_usability_study_mode (1261130555134595254) --> + <skip /> + <!-- no translation found for prefs_keypress_vibration_duration_settings (1829950405285211668) --> + <skip /> + <!-- no translation found for prefs_keypress_sound_volume_settings (5875933757082305040) --> + <skip /> +</resources> diff --git a/java/src/com/android/inputmethod/latin/makedict/FusionDictionary.java b/java/src/com/android/inputmethod/latin/makedict/FusionDictionary.java index 5864db28e..260155174 100644 --- a/java/src/com/android/inputmethod/latin/makedict/FusionDictionary.java +++ b/java/src/com/android/inputmethod/latin/makedict/FusionDictionary.java @@ -516,13 +516,22 @@ public class FusionDictionary implements Iterable<Word> { int indexOfGroup = findIndexOfChar(node, s.codePointAt(index)); if (CHARACTER_NOT_FOUND == indexOfGroup) return null; currentGroup = node.mData.get(indexOfGroup); + + if (s.length() - index < currentGroup.mChars.length) return null; + int newIndex = index; + while (newIndex < s.length() && newIndex - index < currentGroup.mChars.length) { + if (currentGroup.mChars[newIndex - index] != s.codePointAt(newIndex)) return null; + newIndex++; + } + index = newIndex; + if (DBG) checker.append(new String(currentGroup.mChars, 0, currentGroup.mChars.length)); - index += currentGroup.mChars.length; if (index < s.length()) { node = currentGroup.mChildren; } } while (null != node && index < s.length()); + if (index < s.length()) return null; if (DBG && !s.equals(checker.toString())) return null; return currentGroup; } diff --git a/native/jni/src/correction.cpp b/native/jni/src/correction.cpp index e55da0113..7513b307d 100644 --- a/native/jni/src/correction.cpp +++ b/native/jni/src/correction.cpp @@ -230,7 +230,7 @@ int Correction::goDownTree( } // TODO: remove -int Correction::getInputIndex() { +int Correction::getInputIndex() const { return mInputIndex; } diff --git a/native/jni/src/correction.h b/native/jni/src/correction.h index 57e7b7189..9899f6e66 100644 --- a/native/jni/src/correction.h +++ b/native/jni/src/correction.h @@ -38,63 +38,8 @@ class Correction { NOT_ON_TERMINAL } CorrectionType; - ///////////////////////// - // static inline utils // - ///////////////////////// - - static const int TWO_31ST_DIV_255 = S_INT_MAX / 255; - static inline int capped255MultForFullMatchAccentsOrCapitalizationDifference(const int num) { - return (num < TWO_31ST_DIV_255 ? 255 * num : S_INT_MAX); - } - - static const int TWO_31ST_DIV_2 = S_INT_MAX / 2; - inline static void multiplyIntCapped(const int multiplier, int *base) { - const int temp = *base; - if (temp != S_INT_MAX) { - // Branch if multiplier == 2 for the optimization - if (multiplier < 0) { - if (DEBUG_DICT) { - assert(false); - } - AKLOGI("--- Invalid multiplier: %d", multiplier); - } else if (multiplier == 0) { - *base = 0; - } else if (multiplier == 2) { - *base = TWO_31ST_DIV_2 >= temp ? temp << 1 : S_INT_MAX; - } else { - // TODO: This overflow check gives a wrong answer when, for example, - // temp = 2^16 + 1 and multiplier = 2^17 + 1. - // Fix this behavior. - const int tempRetval = temp * multiplier; - *base = tempRetval >= temp ? tempRetval : S_INT_MAX; - } - } - } - - inline static int powerIntCapped(const int base, const int n) { - if (n <= 0) return 1; - if (base == 2) { - return n < 31 ? 1 << n : S_INT_MAX; - } else { - int ret = base; - for (int i = 1; i < n; ++i) multiplyIntCapped(base, &ret); - return ret; - } - } - - inline static void multiplyRate(const int rate, int *freq) { - if (*freq != S_INT_MAX) { - if (*freq > 1000000) { - *freq /= 100; - multiplyIntCapped(rate, freq); - } else { - multiplyIntCapped(rate, freq); - *freq /= 100; - } - } - } - Correction() {}; + virtual ~Correction(); void resetCorrection(); void initCorrection( const ProximityInfo *pi, const int inputLength, const int maxWordLength); @@ -108,27 +53,7 @@ class Correction { bool sameAsTyped(); bool initProcessState(const int index); - int getInputIndex(); - - virtual ~Correction(); - int getSpaceProximityPos() const { - return mSpaceProximityPos; - } - int getMissingSpacePos() const { - return mMissingSpacePos; - } - - int getSkipPos() const { - return mSkipPos; - } - - int getExcessivePos() const { - return mExcessivePos; - } - - int getTransposedPos() const { - return mTransposedPos; - } + int getInputIndex() const; bool needsToPrune() const; @@ -195,6 +120,81 @@ class Correction { private: DISALLOW_COPY_AND_ASSIGN(Correction); + + ///////////////////////// + // static inline utils // + ///////////////////////// + static const int TWO_31ST_DIV_255 = S_INT_MAX / 255; + static inline int capped255MultForFullMatchAccentsOrCapitalizationDifference(const int num) { + return (num < TWO_31ST_DIV_255 ? 255 * num : S_INT_MAX); + } + + static const int TWO_31ST_DIV_2 = S_INT_MAX / 2; + inline static void multiplyIntCapped(const int multiplier, int *base) { + const int temp = *base; + if (temp != S_INT_MAX) { + // Branch if multiplier == 2 for the optimization + if (multiplier < 0) { + if (DEBUG_DICT) { + assert(false); + } + AKLOGI("--- Invalid multiplier: %d", multiplier); + } else if (multiplier == 0) { + *base = 0; + } else if (multiplier == 2) { + *base = TWO_31ST_DIV_2 >= temp ? temp << 1 : S_INT_MAX; + } else { + // TODO: This overflow check gives a wrong answer when, for example, + // temp = 2^16 + 1 and multiplier = 2^17 + 1. + // Fix this behavior. + const int tempRetval = temp * multiplier; + *base = tempRetval >= temp ? tempRetval : S_INT_MAX; + } + } + } + + inline static int powerIntCapped(const int base, const int n) { + if (n <= 0) return 1; + if (base == 2) { + return n < 31 ? 1 << n : S_INT_MAX; + } else { + int ret = base; + for (int i = 1; i < n; ++i) multiplyIntCapped(base, &ret); + return ret; + } + } + + inline static void multiplyRate(const int rate, int *freq) { + if (*freq != S_INT_MAX) { + if (*freq > 1000000) { + *freq /= 100; + multiplyIntCapped(rate, freq); + } else { + multiplyIntCapped(rate, freq); + *freq /= 100; + } + } + } + + inline int getSpaceProximityPos() const { + return mSpaceProximityPos; + } + inline int getMissingSpacePos() const { + return mMissingSpacePos; + } + + inline int getSkipPos() const { + return mSkipPos; + } + + inline int getExcessivePos() const { + return mExcessivePos; + } + + inline int getTransposedPos() const { + return mTransposedPos; + } + inline void incrementInputIndex(); inline void incrementOutputIndex(); inline void startToTraverseAllNodes(); diff --git a/native/jni/src/proximity_info.h b/native/jni/src/proximity_info.h index 8a407e71a..7ee633ba8 100644 --- a/native/jni/src/proximity_info.h +++ b/native/jni/src/proximity_info.h @@ -41,21 +41,12 @@ class ProximityInfo { float getNormalizedSquaredDistanceFromCenterFloat( const int keyId, const int x, const int y) const; bool sameAsTyped(const unsigned short *word, int length) const; - int squaredDistanceToEdge(const int keyId, const int x, const int y) const; - bool isOnKey(const int keyId, const int x, const int y) const { - if (keyId < 0) return true; // NOT_A_ID is -1, but return whenever < 0 just in case - const int left = mKeyXCoordinates[keyId]; - const int top = mKeyYCoordinates[keyId]; - const int right = left + mKeyWidths[keyId] + 1; - const int bottom = top + mKeyHeights[keyId]; - return left < right && top < bottom && x >= left && x < right && y >= top && y < bottom; - } int getKeyIndex(const int c) const; int getKeyCode(const int keyIndex) const; bool hasSweetSpotData(const int keyIndex) const { // When there are no calibration data for a key, // the radius of the key is assigned to zero. - return mSweetSpotRadii[keyIndex] > 0.0; + return mSweetSpotRadii[keyIndex] > 0.0f; } float getSweetSpotRadiiAt(int keyIndex) const { return mSweetSpotRadii[keyIndex]; @@ -111,10 +102,6 @@ class ProximityInfo { float getKeyCenterYOfIdG(int keyId) const; int getKeyKeyDistanceG(int key0, int key1) const; - // Returns the keyboard key-center information. - void getCenters(int *centersX, int *centersY, int *codeToKeyIndex, int *keyToCodeIndex, - int *keyCount, int *keyWidth) const; - private: DISALLOW_IMPLICIT_CONSTRUCTORS(ProximityInfo); // The max number of the keys in one keyboard layout @@ -131,6 +118,15 @@ class ProximityInfo { float calculateSquaredDistanceFromSweetSpotCenter( const int keyIndex, const int inputIndex) const; bool hasInputCoordinates() const; + int squaredDistanceToEdge(const int keyId, const int x, const int y) const; + bool isOnKey(const int keyId, const int x, const int y) const { + if (keyId < 0) return true; // NOT_A_ID is -1, but return whenever < 0 just in case + const int left = mKeyXCoordinates[keyId]; + const int top = mKeyYCoordinates[keyId]; + const int right = left + mKeyWidths[keyId] + 1; + const int bottom = top + mKeyHeights[keyId]; + return left < right && top < bottom && x >= left && x < right && y >= top && y < bottom; + } const int MAX_PROXIMITY_CHARS_SIZE; const int KEYBOARD_WIDTH; diff --git a/native/jni/src/proximity_info_state.h b/native/jni/src/proximity_info_state.h index 474c40757..2fb0ae044 100644 --- a/native/jni/src/proximity_info_state.h +++ b/native/jni/src/proximity_info_state.h @@ -48,9 +48,6 @@ class ProximityInfoState { // Defined here // ///////////////////////////////////////// ProximityInfoState() {}; - inline const int *getProximityCharsAt(const int index) const { - return mInputCodes + (index * MAX_PROXIMITY_CHARS_SIZE_INTERNAL); - } inline unsigned short getPrimaryCharAt(const int index) const { return getProximityCharsAt(index)[0]; @@ -194,6 +191,10 @@ class ProximityInfoState { return mInputXCoordinates && mInputYCoordinates; } + inline const int *getProximityCharsAt(const int index) const { + return mInputCodes + (index * MAX_PROXIMITY_CHARS_SIZE_INTERNAL); + } + // const const ProximityInfo *mProximityInfo; bool mHasTouchPositionCorrectionData; diff --git a/tests/src/com/android/inputmethod/latin/FusionDictionaryTests.java b/tests/src/com/android/inputmethod/latin/FusionDictionaryTests.java new file mode 100644 index 000000000..e3f75839e --- /dev/null +++ b/tests/src/com/android/inputmethod/latin/FusionDictionaryTests.java @@ -0,0 +1,42 @@ +/* + * Copyright (C) 2012 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + */ + +package com.android.inputmethod.latin; + +import android.test.AndroidTestCase; + +import com.android.inputmethod.latin.makedict.FusionDictionary; +import com.android.inputmethod.latin.makedict.FusionDictionary.Node; + +import java.util.HashMap; + +/** + * Unit test for FusionDictionary + */ +public class FusionDictionaryTests extends AndroidTestCase { + public void testFindWordInTree() { + FusionDictionary dict = new FusionDictionary(new Node(), + new FusionDictionary.DictionaryOptions(new HashMap<String,String>(), false, false)); + + dict.add("abc", 10, null); + assertNull(FusionDictionary.findWordInTree(dict.mRoot, "aaa")); + assertNotNull(FusionDictionary.findWordInTree(dict.mRoot, "abc")); + + dict.add("aa", 10, null); + assertNull(FusionDictionary.findWordInTree(dict.mRoot, "aaa")); + assertNotNull(FusionDictionary.findWordInTree(dict.mRoot, "aa")); + } +} |