aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--res/values-cs/strings.xml17
-rw-r--r--res/values-da/strings.xml17
-rw-r--r--res/values-de/strings.xml17
-rw-r--r--res/values-el/strings.xml17
-rw-r--r--res/values-es-rUS/strings.xml17
-rw-r--r--res/values-es/strings.xml19
-rw-r--r--res/values-fr/donottranslate.xml2
-rw-r--r--res/values-fr/strings.xml17
-rw-r--r--res/values-it/donottranslate.xml2
-rw-r--r--res/values-it/strings.xml17
-rw-r--r--res/values-ja/strings.xml17
-rw-r--r--res/values-ko/strings.xml17
-rw-r--r--res/values-nb/strings.xml17
-rw-r--r--res/values-nl/strings.xml17
-rw-r--r--res/values-pl/strings.xml17
-rw-r--r--res/values-pt-rPT/strings.xml19
-rw-r--r--res/values-pt/strings.xml19
-rw-r--r--res/values-ru/strings.xml17
-rw-r--r--res/values-sv/strings.xml17
-rw-r--r--res/values-tr/strings.xml17
-rw-r--r--res/values-zh-rCN/strings.xml18
-rw-r--r--res/values-zh-rTW/strings.xml17
-rw-r--r--res/values/donottranslate.xml2
-rwxr-xr-xres/xml/kbd_symbols.xml2
-rwxr-xr-xres/xml/kbd_symbols_shift.xml2
-rw-r--r--res/xml/popup_punctuation.xml18
-rw-r--r--src/com/android/inputmethod/latin/AutoDictionary.java217
-rw-r--r--src/com/android/inputmethod/latin/InputLanguageSelection.java7
-rw-r--r--src/com/android/inputmethod/latin/KeyboardSwitcher.java11
-rw-r--r--src/com/android/inputmethod/latin/LanguageSwitcher.java6
-rw-r--r--src/com/android/inputmethod/latin/LatinIME.java186
-rw-r--r--src/com/android/inputmethod/latin/LatinIMESettings.java2
-rw-r--r--src/com/android/inputmethod/latin/LatinKeyboard.java44
-rwxr-xr-xsrc/com/android/inputmethod/latin/Suggest.java3
-rw-r--r--src/com/android/inputmethod/latin/UserDictionary.java19
35 files changed, 662 insertions, 208 deletions
diff --git a/res/values-cs/strings.xml b/res/values-cs/strings.xml
index 75bdda152..02361e1c1 100644
--- a/res/values-cs/strings.xml
+++ b/res/values-cs/strings.xml
@@ -98,7 +98,17 @@
<string name="voice_punctuation_hint" msgid="1611389463237317754"><b>"Nápověda:"</b>" Příště zkuste vyslovit interpunkci, například „tečka“, „čárka“ nebo „otazník“."</string>
<string name="cancel" msgid="6830980399865683324">"Zrušit"</string>
<string name="ok" msgid="7898366843681727667">"OK"</string>
- <string name="enable_voice" msgid="8299503298530853956">"Hlasový vstup"</string>
+ <string name="voice_input" msgid="2466640768843347841">"Hlasový vstup"</string>
+ <string-array name="voice_input_modes">
+ <item msgid="1349082139076086774">"Na hlavní klávesnici"</item>
+ <item msgid="8529385602829095903">"Na klávesnici se symboly"</item>
+ <item msgid="7283103513488381103">"Vypnout"</item>
+ </string-array>
+ <string-array name="voice_input_modes_summary">
+ <item msgid="554248625705084903">"Mikrofon na hlavní klávesnici"</item>
+ <item msgid="6907837061058876770">"Mikrofon na klávesnici se symboly"</item>
+ <item msgid="3664304608587798036">"Hlasový vstup je deaktivován"</item>
+ </string-array>
<string name="auto_submit" msgid="9151008027068358518">"Po hlasovém vstupu automaticky odeslat"</string>
<string name="auto_submit_summary" msgid="4961875269610384226">"Při vyhledávání nebo přechodu na další pole automaticky stisknout Enter."</string>
<string name="open_the_keyboard" msgid="2215920976029260466"><font size="17"><b>"Otevřete klávesnici"\n</b></font><font size="3">\n</font>"Dotkněte se jakéhokoli textového pole."</string>
@@ -110,7 +120,8 @@
<string name="popular_domain_2" msgid="3036812463748402878">".org"</string>
<string name="popular_domain_3" msgid="8718639560809452028">".net"</string>
<string name="popular_domain_4" msgid="35359437471311470">".eu"</string>
- <!-- no translation found for language_selection_title (530749890984542339) -->
- <skip />
<string name="inputMethod" msgid="7854532062009028116">"Metoda zadávání dat"</string>
+ <string name="language_selection_title" msgid="1651299598555326750">"Vstupní jazyky"</string>
+ <string name="language_selection_summary" msgid="187110938289512256">"Jazyk můžete změnit posunutím prstu po mezerníku."</string>
+ <string name="hint_add_to_dictionary" msgid="8058519710062071085">"← Uložte slovo opětovným klepnutím"</string>
</resources>
diff --git a/res/values-da/strings.xml b/res/values-da/strings.xml
index 70ba54729..15f6b1c6b 100644
--- a/res/values-da/strings.xml
+++ b/res/values-da/strings.xml
@@ -98,7 +98,17 @@
<string name="voice_punctuation_hint" msgid="1611389463237317754"><b>"Tip:"</b>" Næste gang kan du forsøge at sige tegnsætning, f.eks. \"punktum\", \"komma\" eller \"spørgsmålstegn\"."</string>
<string name="cancel" msgid="6830980399865683324">"Annuller"</string>
<string name="ok" msgid="7898366843681727667">"OK"</string>
- <string name="enable_voice" msgid="8299503298530853956">"Stemmeinput"</string>
+ <string name="voice_input" msgid="2466640768843347841">"Stemmeinput"</string>
+ <string-array name="voice_input_modes">
+ <item msgid="1349082139076086774">"På hovedtastatur"</item>
+ <item msgid="8529385602829095903">"På symboltastatur"</item>
+ <item msgid="7283103513488381103">"Fra"</item>
+ </string-array>
+ <string-array name="voice_input_modes_summary">
+ <item msgid="554248625705084903">"Mikrofon på hovedtastatur"</item>
+ <item msgid="6907837061058876770">"Mikrofon på symboltastatur"</item>
+ <item msgid="3664304608587798036">"Stemmeinput er deaktiveret"</item>
+ </string-array>
<string name="auto_submit" msgid="9151008027068358518">"Send automatisk efter stemme"</string>
<string name="auto_submit_summary" msgid="4961875269610384226">"Tryk automatisk på enter, når du søger eller går til det næste felt."</string>
<string name="open_the_keyboard" msgid="2215920976029260466"><font size="17"><b>"Åbn tastaturet"\n</b></font><font size="3">\n</font>"Tryk på et hvilket som helst tekstfelt."</string>
@@ -110,7 +120,8 @@
<string name="popular_domain_2" msgid="3036812463748402878">".org"</string>
<string name="popular_domain_3" msgid="8718639560809452028">".gov"</string>
<string name="popular_domain_4" msgid="35359437471311470">".edu"</string>
- <!-- no translation found for language_selection_title (530749890984542339) -->
- <skip />
<string name="inputMethod" msgid="7854532062009028116">"Inputmetode"</string>
+ <string name="language_selection_title" msgid="1651299598555326750">"Inputsprog"</string>
+ <string name="language_selection_summary" msgid="187110938289512256">"Træk fingeren på mellemrumstasten for at skifte sprog"</string>
+ <string name="hint_add_to_dictionary" msgid="8058519710062071085">"← Tast igen for at gemme"</string>
</resources>
diff --git a/res/values-de/strings.xml b/res/values-de/strings.xml
index 1d821899e..e203fb394 100644
--- a/res/values-de/strings.xml
+++ b/res/values-de/strings.xml
@@ -98,7 +98,17 @@
<string name="voice_punctuation_hint" msgid="1611389463237317754"><b>"Hinweis:"</b>" Versuchen Sie beim nächsten Mal, Satzzeichen wie \"Punkt\", \"Komma\" oder \"Fragezeichen\" per Sprachbefehl einzugeben."</string>
<string name="cancel" msgid="6830980399865683324">"Abbrechen"</string>
<string name="ok" msgid="7898366843681727667">"OK"</string>
- <string name="enable_voice" msgid="8299503298530853956">"Spracheingabe"</string>
+ <string name="voice_input" msgid="2466640768843347841">"Spracheingabe"</string>
+ <string-array name="voice_input_modes">
+ <item msgid="1349082139076086774">"Auf Haupttastatur"</item>
+ <item msgid="8529385602829095903">"Auf Symboltastatur"</item>
+ <item msgid="7283103513488381103">"Aus"</item>
+ </string-array>
+ <string-array name="voice_input_modes_summary">
+ <item msgid="554248625705084903">"Mikrofon auf Haupttastatur"</item>
+ <item msgid="6907837061058876770">"Mikrofon auf Symboltastatur"</item>
+ <item msgid="3664304608587798036">"Spracheingabe ist deaktiviert"</item>
+ </string-array>
<string name="auto_submit" msgid="9151008027068358518">"Nach Sprachaufnahme automatisch senden"</string>
<string name="auto_submit_summary" msgid="4961875269610384226">"Drücken Sie auf die Eingabetaste, wenn Sie einen Suchvorgang durchführen oder zum nächsten Feld wechseln."</string>
<string name="open_the_keyboard" msgid="2215920976029260466"><font size="17"><b>"Tastatur öffnen"\n</b></font><font size="3">\n</font>"Berühren Sie ein beliebiges Textfeld."</string>
@@ -110,7 +120,8 @@
<string name="popular_domain_2" msgid="3036812463748402878">".org"</string>
<string name="popular_domain_3" msgid="8718639560809452028">".gov"</string>
<string name="popular_domain_4" msgid="35359437471311470">".edu"</string>
- <!-- no translation found for language_selection_title (530749890984542339) -->
- <skip />
<string name="inputMethod" msgid="7854532062009028116">"Eingabemethode"</string>
+ <string name="language_selection_title" msgid="1651299598555326750">"Eingabesprachen"</string>
+ <string name="language_selection_summary" msgid="187110938289512256">"Finger über die Leertaste bewegen, um die Sprache zu ändern"</string>
+ <string name="hint_add_to_dictionary" msgid="8058519710062071085">"← Zum Speichern erneut tippen"</string>
</resources>
diff --git a/res/values-el/strings.xml b/res/values-el/strings.xml
index acbe2945b..85c18dff4 100644
--- a/res/values-el/strings.xml
+++ b/res/values-el/strings.xml
@@ -98,7 +98,17 @@
<string name="voice_punctuation_hint" msgid="1611389463237317754"><b>"Υπόδειξη:"</b>" Την επόμενη φορά, προσπαθήστε να προφέρετε σημεία στίξης, όπως \"τελεία\", \"κόμμα\" ή \"ερωτηματικό\"."</string>
<string name="cancel" msgid="6830980399865683324">"Ακύρωση"</string>
<string name="ok" msgid="7898366843681727667">"ΟΚ"</string>
- <string name="enable_voice" msgid="8299503298530853956">"Φωνητική είσοδος"</string>
+ <string name="voice_input" msgid="2466640768843347841">"Φωνητική είσοδος"</string>
+ <string-array name="voice_input_modes">
+ <item msgid="1349082139076086774">"Στο κύριο πληκτρολόγιο"</item>
+ <item msgid="8529385602829095903">"Πληκτρολόγιο συμβόλων ενεργοποίησης"</item>
+ <item msgid="7283103513488381103">"Απενεργοποίηση"</item>
+ </string-array>
+ <string-array name="voice_input_modes_summary">
+ <item msgid="554248625705084903">"Μικρόφωνο στο κύριο πληκτρολόγιο"</item>
+ <item msgid="6907837061058876770">"Μικρόφωνο στο πληκτρολόγιο συμβόλων"</item>
+ <item msgid="3664304608587798036">"Η φωνητική είσοδος είναι απενεργοποιημένη"</item>
+ </string-array>
<string name="auto_submit" msgid="9151008027068358518">"Αυτόματη υποβολή μετά από ήχο"</string>
<string name="auto_submit_summary" msgid="4961875269610384226">"Πατήστε enter αυτόματα κατά την αναζήτηση ή τη μετάβαση στο επόμενο πεδίο."</string>
<string name="open_the_keyboard" msgid="2215920976029260466"><font size="17"><b>"Ανοίξτε το πληκτρολόγιο"\n</b></font><font size="3">\n</font>"Αγγίξτε οποιοδήποτε πεδίο κειμένου."</string>
@@ -110,7 +120,8 @@
<string name="popular_domain_2" msgid="3036812463748402878">".org"</string>
<string name="popular_domain_3" msgid="8718639560809452028">".gov"</string>
<string name="popular_domain_4" msgid="35359437471311470">".edu"</string>
- <!-- no translation found for language_selection_title (530749890984542339) -->
- <skip />
<string name="inputMethod" msgid="7854532062009028116">"Μέθοδος εισόδου"</string>
+ <string name="language_selection_title" msgid="1651299598555326750">"Γλώσσες εισόδου"</string>
+ <string name="language_selection_summary" msgid="187110938289512256">"Σύρετε το δάχτυλο στο πλήκτρο διαστήματος για να αλλάξετε γλώσσα"</string>
+ <string name="hint_add_to_dictionary" msgid="8058519710062071085">"← Πατήστε ξανά για αποθήκευση"</string>
</resources>
diff --git a/res/values-es-rUS/strings.xml b/res/values-es-rUS/strings.xml
index 8a8ded8f9..541e153b3 100644
--- a/res/values-es-rUS/strings.xml
+++ b/res/values-es-rUS/strings.xml
@@ -98,7 +98,17 @@
<string name="voice_punctuation_hint" msgid="1611389463237317754"><b>"Sugerencia:"</b>" La próxima vez intenta decir la puntuación como \"punto\", \"coma\" o \"signo de pregunta\"."</string>
<string name="cancel" msgid="6830980399865683324">"Cancelar"</string>
<string name="ok" msgid="7898366843681727667">"Aceptar"</string>
- <string name="enable_voice" msgid="8299503298530853956">"Entrada por voz"</string>
+ <string name="voice_input" msgid="2466640768843347841">"Entrada por voz"</string>
+ <string-array name="voice_input_modes">
+ <item msgid="1349082139076086774">"En el teclado principal"</item>
+ <item msgid="8529385602829095903">"En el teclado de símbolos"</item>
+ <item msgid="7283103513488381103">"Apagado"</item>
+ </string-array>
+ <string-array name="voice_input_modes_summary">
+ <item msgid="554248625705084903">"Micrófono en el teclado principal"</item>
+ <item msgid="6907837061058876770">"Micrófono en el teclado de símbolos"</item>
+ <item msgid="3664304608587798036">"La entrada por voz está inhabilitada."</item>
+ </string-array>
<string name="auto_submit" msgid="9151008027068358518">"Enviar automáticamente después del audio"</string>
<string name="auto_submit_summary" msgid="4961875269610384226">"Presionar automáticamente Ingresar al buscar o ir al campo siguiente."</string>
<string name="open_the_keyboard" msgid="2215920976029260466"><font size="17"><b>"Abrir el teclado"\n</b></font><font size="3">\n</font>"Tocar cualquier campo de texto."</string>
@@ -110,7 +120,8 @@
<string name="popular_domain_2" msgid="3036812463748402878">".org"</string>
<string name="popular_domain_3" msgid="8718639560809452028">".gov"</string>
<string name="popular_domain_4" msgid="35359437471311470">".edu"</string>
- <!-- no translation found for language_selection_title (530749890984542339) -->
- <skip />
<string name="inputMethod" msgid="7854532062009028116">"Método de entrada"</string>
+ <string name="language_selection_title" msgid="1651299598555326750">"Idiomas de entrada"</string>
+ <string name="language_selection_summary" msgid="187110938289512256">"Deslizarse manualmente por la barra espaciadora para cambiar el idioma"</string>
+ <string name="hint_add_to_dictionary" msgid="8058519710062071085">"← Presionar nuevamente para guardar"</string>
</resources>
diff --git a/res/values-es/strings.xml b/res/values-es/strings.xml
index 4977cbac5..fbc597ed2 100644
--- a/res/values-es/strings.xml
+++ b/res/values-es/strings.xml
@@ -83,7 +83,7 @@
<string name="voice_warning_how_to_turn_off" msgid="5652369578498701761">"Para desactivar la función de introducción de voz, accede a la configuración del teclado."</string>
<string name="voice_hint_dialog_message" msgid="6892342981545727994">"Para utilizar la función de introducción de voz, pulsa el botón de micrófono o desliza el dedo por el teclado en pantalla."</string>
<string name="voice_listening" msgid="467518160751321844">"Hablar ahora"</string>
- <string name="voice_working" msgid="6666937792815731889">"Trabajando"</string>
+ <string name="voice_working" msgid="6666937792815731889">"En curso"</string>
<!-- no translation found for voice_initializing (661962047129906646) -->
<skip />
<string name="voice_error" msgid="5140896300312186162">"Se ha producido un error. Inténtalo de nuevo."</string>
@@ -98,7 +98,17 @@
<string name="voice_punctuation_hint" msgid="1611389463237317754"><b>"Sugerencia:"</b>" la próxima vez, prueba a indicar signos de puntuación como, por ejemplo, \"punto\", \"coma\" o \"signo de interrogación\"."</string>
<string name="cancel" msgid="6830980399865683324">"Cancelar"</string>
<string name="ok" msgid="7898366843681727667">"Aceptar"</string>
- <string name="enable_voice" msgid="8299503298530853956">"Introducción de voz"</string>
+ <string name="voice_input" msgid="2466640768843347841">"Introducción de voz"</string>
+ <string-array name="voice_input_modes">
+ <item msgid="1349082139076086774">"En teclado principal"</item>
+ <item msgid="8529385602829095903">"En teclado de símbolos"</item>
+ <item msgid="7283103513488381103">"Desactivado"</item>
+ </string-array>
+ <string-array name="voice_input_modes_summary">
+ <item msgid="554248625705084903">"Micrófono en teclado principal"</item>
+ <item msgid="6907837061058876770">"Micrófono en teclado de símbolos"</item>
+ <item msgid="3664304608587798036">"La función de introducción de voz no está habilitada."</item>
+ </string-array>
<string name="auto_submit" msgid="9151008027068358518">"Enviar automáticamente después de la introducción de voz"</string>
<string name="auto_submit_summary" msgid="4961875269610384226">"Pulsar Intro automáticamente al buscar o al pasar al siguiente campo"</string>
<string name="open_the_keyboard" msgid="2215920976029260466"><font size="17"><b>"Abrir el teclado"\n</b></font><font size="3">\n</font>"Pulsa cualquier campo de texto."</string>
@@ -110,7 +120,8 @@
<string name="popular_domain_2" msgid="3036812463748402878">".org"</string>
<string name="popular_domain_3" msgid="8718639560809452028">".gov"</string>
<string name="popular_domain_4" msgid="35359437471311470">".edu"</string>
- <!-- no translation found for language_selection_title (530749890984542339) -->
- <skip />
<string name="inputMethod" msgid="7854532062009028116">"Método de introducción de texto"</string>
+ <string name="language_selection_title" msgid="1651299598555326750">"Idiomas de entrada"</string>
+ <string name="language_selection_summary" msgid="187110938289512256">"Deslizar el dedo por la barra espaciadora para cambiar el idioma"</string>
+ <string name="hint_add_to_dictionary" msgid="8058519710062071085">"← Volver a tocar para guardar"</string>
</resources>
diff --git a/res/values-fr/donottranslate.xml b/res/values-fr/donottranslate.xml
index 527f15e94..b79df7b37 100644
--- a/res/values-fr/donottranslate.xml
+++ b/res/values-fr/donottranslate.xml
@@ -19,7 +19,7 @@
-->
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<!-- Symbols that are commonly considered word separators in this language -->
- <string name="word_separators">.\u0020,;:!?\'\n()[]*&amp;@{}/&lt;&gt;_+=|\u0022</string>
+ <string name="word_separators">.\u0009\u0020,;:!?\'\n()[]*&amp;@{}/&lt;&gt;_+=|\u0022</string>
<!-- Symbols that are sentence separators, for purposes of making it hug the last sentence. -->
<string name="sentence_separators">.,</string>
</resources>
diff --git a/res/values-fr/strings.xml b/res/values-fr/strings.xml
index f4834da13..085941415 100644
--- a/res/values-fr/strings.xml
+++ b/res/values-fr/strings.xml
@@ -98,7 +98,17 @@
<string name="voice_punctuation_hint" msgid="1611389463237317754"><b>"Astuce :"</b>" La prochaine fois, essayez de prononcer la ponctuation, en énonçant des termes tels que \"point\", \"virgule\" ou \"point d\'interrogation\"."</string>
<string name="cancel" msgid="6830980399865683324">"Annuler"</string>
<string name="ok" msgid="7898366843681727667">"OK"</string>
- <string name="enable_voice" msgid="8299503298530853956">"Saisie vocale"</string>
+ <string name="voice_input" msgid="2466640768843347841">"Saisie vocale"</string>
+ <string-array name="voice_input_modes">
+ <item msgid="1349082139076086774">"Sur le clavier principal"</item>
+ <item msgid="8529385602829095903">"Sur le clavier des symboles"</item>
+ <item msgid="7283103513488381103">"Désactivée"</item>
+ </string-array>
+ <string-array name="voice_input_modes_summary">
+ <item msgid="554248625705084903">"Micro sur le clavier principal"</item>
+ <item msgid="6907837061058876770">"Micro sur le clavier des symboles"</item>
+ <item msgid="3664304608587798036">"Saisie vocale désactivée"</item>
+ </string-array>
<string name="auto_submit" msgid="9151008027068358518">"Envoi automatique après la saisie vocale"</string>
<string name="auto_submit_summary" msgid="4961875269610384226">"Appuyez automatiquement sur Entrée pour effectuer une recherche ou accéder au champ suivant."</string>
<string name="open_the_keyboard" msgid="2215920976029260466"><font size="17"><b>"Ouvrir le clavier"\n</b></font><font size="3">\n</font>"Appuyez sur un champ de texte."</string>
@@ -110,7 +120,8 @@
<string name="popular_domain_2" msgid="3036812463748402878">".org"</string>
<string name="popular_domain_3" msgid="8718639560809452028">".gouv"</string>
<string name="popular_domain_4" msgid="35359437471311470">".edu"</string>
- <!-- no translation found for language_selection_title (530749890984542339) -->
- <skip />
<string name="inputMethod" msgid="7854532062009028116">"Mode de saisie"</string>
+ <string name="language_selection_title" msgid="1651299598555326750">"Langues de saisie"</string>
+ <string name="language_selection_summary" msgid="187110938289512256">"Faites glisser votre doigt sur la barre d\'espacement pour changer la langue."</string>
+ <string name="hint_add_to_dictionary" msgid="8058519710062071085">"← Appuyer de nouveau pour enregistrer"</string>
</resources>
diff --git a/res/values-it/donottranslate.xml b/res/values-it/donottranslate.xml
index 5cb72adf5..3e3f3ef2a 100644
--- a/res/values-it/donottranslate.xml
+++ b/res/values-it/donottranslate.xml
@@ -19,5 +19,5 @@
-->
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<!-- Symbols that are commonly considered word separators in this language -->
- <string name="word_separators">.\u0020,;:!?\'\n()[]*&amp;@{}/&lt;&gt;_+=|\u0022</string>
+ <string name="word_separators">.\u0009\u0020,;:!?\'\n()[]*&amp;@{}/&lt;&gt;_+=|\u0022</string>
</resources>
diff --git a/res/values-it/strings.xml b/res/values-it/strings.xml
index 94478ce88..1135dd00a 100644
--- a/res/values-it/strings.xml
+++ b/res/values-it/strings.xml
@@ -98,7 +98,17 @@
<string name="voice_punctuation_hint" msgid="1611389463237317754"><b>"Suggerimento."</b>" La prossima volta, prova a pronunciare termini relativi alla punteggiatura come \"punto\", \"virgola\" o \"punto di domanda\"."</string>
<string name="cancel" msgid="6830980399865683324">"Annulla"</string>
<string name="ok" msgid="7898366843681727667">"OK"</string>
- <string name="enable_voice" msgid="8299503298530853956">"Comandi vocali"</string>
+ <string name="voice_input" msgid="2466640768843347841">"Comandi vocali"</string>
+ <string-array name="voice_input_modes">
+ <item msgid="1349082139076086774">"Su tastiera principale"</item>
+ <item msgid="8529385602829095903">"Su tastiera simboli"</item>
+ <item msgid="7283103513488381103">"Non attivi"</item>
+ </string-array>
+ <string-array name="voice_input_modes_summary">
+ <item msgid="554248625705084903">"Microfono su tastiera principale"</item>
+ <item msgid="6907837061058876770">"Microfono su tastiera simboli"</item>
+ <item msgid="3664304608587798036">"Comandi vocali disabilitati"</item>
+ </string-array>
<string name="auto_submit" msgid="9151008027068358518">"Invia automaticamente dopo comando vocale"</string>
<string name="auto_submit_summary" msgid="4961875269610384226">"Premi automaticamente \"Invio\" durante una ricerca o un passaggio al campo successivo."</string>
<string name="open_the_keyboard" msgid="2215920976029260466"><font size="17"><b>"Apertura tastiera"\n</b></font><font size="3">\n</font>"Tocca qualsiasi campo di testo."</string>
@@ -110,7 +120,8 @@
<string name="popular_domain_2" msgid="3036812463748402878">".org"</string>
<string name="popular_domain_3" msgid="8718639560809452028">".gov"</string>
<string name="popular_domain_4" msgid="35359437471311470">".edu"</string>
- <!-- no translation found for language_selection_title (530749890984542339) -->
- <skip />
<string name="inputMethod" msgid="7854532062009028116">"Metodo inserimento"</string>
+ <string name="language_selection_title" msgid="1651299598555326750">"Lingue comandi"</string>
+ <string name="language_selection_summary" msgid="187110938289512256">"Scorri il dito sulla barra spaziatrice per cambiare la lingua"</string>
+ <string name="hint_add_to_dictionary" msgid="8058519710062071085">"← Tocca di nuovo per salvare"</string>
</resources>
diff --git a/res/values-ja/strings.xml b/res/values-ja/strings.xml
index 3f29eb96b..9097bd936 100644
--- a/res/values-ja/strings.xml
+++ b/res/values-ja/strings.xml
@@ -98,7 +98,17 @@
<string name="voice_punctuation_hint" msgid="1611389463237317754"><b>"ヒント:"</b>" 次回は句読点として「period」、「comma」、「question mark」などの音声入力を試してみてください。"</string>
<string name="cancel" msgid="6830980399865683324">"キャンセル"</string>
<string name="ok" msgid="7898366843681727667">"OK"</string>
- <string name="enable_voice" msgid="8299503298530853956">"音声入力"</string>
+ <string name="voice_input" msgid="2466640768843347841">"音声入力"</string>
+ <string-array name="voice_input_modes">
+ <item msgid="1349082139076086774">"メインキーボード上"</item>
+ <item msgid="8529385602829095903">"記号キーボード上"</item>
+ <item msgid="7283103513488381103">"OFF"</item>
+ </string-array>
+ <string-array name="voice_input_modes_summary">
+ <item msgid="554248625705084903">"メインキーボードのマイク"</item>
+ <item msgid="6907837061058876770">"記号キーボードのマイク"</item>
+ <item msgid="3664304608587798036">"音声入力は無効です"</item>
+ </string-array>
<string name="auto_submit" msgid="9151008027068358518">"入力後に自動送信する"</string>
<string name="auto_submit_summary" msgid="4961875269610384226">"検索または次のフィールドに進む際、Enterキーが自動的に押されます。"</string>
<string name="open_the_keyboard" msgid="2215920976029260466"><font size="17"><b>"キーボードを開く"\n</b></font><font size="3">\n</font>"テキストフィールドをタップします。"</string>
@@ -110,7 +120,8 @@
<string name="popular_domain_2" msgid="3036812463748402878">".org"</string>
<string name="popular_domain_3" msgid="8718639560809452028">".gov"</string>
<string name="popular_domain_4" msgid="35359437471311470">".edu"</string>
- <!-- no translation found for language_selection_title (530749890984542339) -->
- <skip />
<string name="inputMethod" msgid="7854532062009028116">"入力方法"</string>
+ <string name="language_selection_title" msgid="1651299598555326750">"入力言語"</string>
+ <string name="language_selection_summary" msgid="187110938289512256">"スペースバーで指をスライドさせて言語を変更する"</string>
+ <string name="hint_add_to_dictionary" msgid="8058519710062071085">"←保存するにはもう一度タップ"</string>
</resources>
diff --git a/res/values-ko/strings.xml b/res/values-ko/strings.xml
index 1d9e0bd30..15000e655 100644
--- a/res/values-ko/strings.xml
+++ b/res/values-ko/strings.xml
@@ -98,7 +98,17 @@
<string name="voice_punctuation_hint" msgid="1611389463237317754"><b>"도움말:"</b>" 다음 번에는 \'마침표\', \'쉼표\', \'물음표\'와 같은 구두점을 말해 보세요."</string>
<string name="cancel" msgid="6830980399865683324">"취소"</string>
<string name="ok" msgid="7898366843681727667">"확인"</string>
- <string name="enable_voice" msgid="8299503298530853956">"음성 입력"</string>
+ <string name="voice_input" msgid="2466640768843347841">"음성 입력"</string>
+ <string-array name="voice_input_modes">
+ <item msgid="1349082139076086774">"기본 키보드"</item>
+ <item msgid="8529385602829095903">"기호 키보드"</item>
+ <item msgid="7283103513488381103">"사용 안함"</item>
+ </string-array>
+ <string-array name="voice_input_modes_summary">
+ <item msgid="554248625705084903">"기본 키보드의 마이크"</item>
+ <item msgid="6907837061058876770">"기호 키보드의 마이크"</item>
+ <item msgid="3664304608587798036">"음성 입력이 사용 중지됨"</item>
+ </string-array>
<string name="auto_submit" msgid="9151008027068358518">"음성을 입력한 다음 자동 제출"</string>
<string name="auto_submit_summary" msgid="4961875269610384226">"검색하거나 다음 입력란으로 이동할 때 자동으로 Enter 키를 누릅니다."</string>
<string name="open_the_keyboard" msgid="2215920976029260466"><font size="17"><b>"키보드 열기"\n</b></font><font size="3">\n</font>"아무 텍스트 입력란이나 터치하세요."</string>
@@ -110,7 +120,8 @@
<string name="popular_domain_2" msgid="3036812463748402878">".org"</string>
<string name="popular_domain_3" msgid="8718639560809452028">".gov"</string>
<string name="popular_domain_4" msgid="35359437471311470">".edu"</string>
- <!-- no translation found for language_selection_title (530749890984542339) -->
- <skip />
<string name="inputMethod" msgid="7854532062009028116">"입력 방법"</string>
+ <string name="language_selection_title" msgid="1651299598555326750">"입력 언어"</string>
+ <string name="language_selection_summary" msgid="187110938289512256">"손가락을 스페이스바에서 미끄러지듯 움직여 언어 변경"</string>
+ <string name="hint_add_to_dictionary" msgid="8058519710062071085">"← 저장하려면 다시 누르세요."</string>
</resources>
diff --git a/res/values-nb/strings.xml b/res/values-nb/strings.xml
index 971bc1445..a7ddc7533 100644
--- a/res/values-nb/strings.xml
+++ b/res/values-nb/strings.xml
@@ -98,7 +98,17 @@
<string name="voice_punctuation_hint" msgid="1611389463237317754"><b>"Hint:"</b>" Neste gang kan du prøve å tale inn tegnsettingen ved for eksempel å si «punktum», «komma» eller «spørsmålstegn»."</string>
<string name="cancel" msgid="6830980399865683324">"Avbryt"</string>
<string name="ok" msgid="7898366843681727667">"OK"</string>
- <string name="enable_voice" msgid="8299503298530853956">"Stemmedata"</string>
+ <string name="voice_input" msgid="2466640768843347841">"Talekommando"</string>
+ <string-array name="voice_input_modes">
+ <item msgid="1349082139076086774">"På hovedtastatur"</item>
+ <item msgid="8529385602829095903">"På talltastatur"</item>
+ <item msgid="7283103513488381103">"Av"</item>
+ </string-array>
+ <string-array name="voice_input_modes_summary">
+ <item msgid="554248625705084903">"Mikronfon på hovedtastatur"</item>
+ <item msgid="6907837061058876770">"Mikronfon på talltastatur"</item>
+ <item msgid="3664304608587798036">"Talekommando er deaktivert"</item>
+ </string-array>
<string name="auto_submit" msgid="9151008027068358518">"Send inn automatisk etter tale"</string>
<string name="auto_submit_summary" msgid="4961875269610384226">"Trykk Enter automatisk ved søk eller flytting til neste felt."</string>
<string name="open_the_keyboard" msgid="2215920976029260466"><font size="17"><b>"Åpne tastaturet"\n</b></font><font size="3">\n</font>"Trykk på et tekstfelt."</string>
@@ -110,7 +120,8 @@
<string name="popular_domain_2" msgid="3036812463748402878">".net"</string>
<string name="popular_domain_3" msgid="8718639560809452028">".org"</string>
<string name="popular_domain_4" msgid="35359437471311470">".info"</string>
- <!-- no translation found for language_selection_title (530749890984542339) -->
- <skip />
<string name="inputMethod" msgid="7854532062009028116">"Inndatametode"</string>
+ <string name="language_selection_title" msgid="1651299598555326750">"Inndataspråk"</string>
+ <string name="language_selection_summary" msgid="187110938289512256">"Dra fingeren på mellomromstasten for å endre språk"</string>
+ <string name="hint_add_to_dictionary" msgid="8058519710062071085">"← Trykk på nytt for å lagre"</string>
</resources>
diff --git a/res/values-nl/strings.xml b/res/values-nl/strings.xml
index beeb0af11..9a69c128e 100644
--- a/res/values-nl/strings.xml
+++ b/res/values-nl/strings.xml
@@ -98,7 +98,17 @@
<string name="voice_punctuation_hint" msgid="1611389463237317754"><b>"Hint:"</b>" spreek de volgende keer interpunctie uit, zoals \'period\' (punt), \'comma\' (komma) of \'question mark\' (vraagteken)."</string>
<string name="cancel" msgid="6830980399865683324">"Annuleren"</string>
<string name="ok" msgid="7898366843681727667">"OK"</string>
- <string name="enable_voice" msgid="8299503298530853956">"Spraakinvoer"</string>
+ <string name="voice_input" msgid="2466640768843347841">"Spraakinvoer"</string>
+ <string-array name="voice_input_modes">
+ <item msgid="1349082139076086774">"Op hoofdtoetsenbord"</item>
+ <item msgid="8529385602829095903">"Op toetsenbord voor symbolen"</item>
+ <item msgid="7283103513488381103">"Uit"</item>
+ </string-array>
+ <string-array name="voice_input_modes_summary">
+ <item msgid="554248625705084903">"Microfoon op hoofdtoetsenbord"</item>
+ <item msgid="6907837061058876770">"Microfoon op toetsenbord voor symbolen"</item>
+ <item msgid="3664304608587798036">"Spraakinvoer is uitgeschakeld"</item>
+ </string-array>
<string name="auto_submit" msgid="9151008027068358518">"Automatisch verzenden na spraak"</string>
<string name="auto_submit_summary" msgid="4961875269610384226">"Drukt automatisch op Enter tijdens het zoeken of wanneer u naar het volgende veld wilt gaan."</string>
<string name="open_the_keyboard" msgid="2215920976029260466"><font size="17"><b>"Het toetsenbord openen"\n</b></font><font size="3">\n</font>"Raak een tekstveld aan."</string>
@@ -110,7 +120,8 @@
<string name="popular_domain_2" msgid="3036812463748402878">".org"</string>
<string name="popular_domain_3" msgid="8718639560809452028">".gov"</string>
<string name="popular_domain_4" msgid="35359437471311470">".edu"</string>
- <!-- no translation found for language_selection_title (530749890984542339) -->
- <skip />
<string name="inputMethod" msgid="7854532062009028116">"Invoermethode"</string>
+ <string name="language_selection_title" msgid="1651299598555326750">"Invoertalen"</string>
+ <string name="language_selection_summary" msgid="187110938289512256">"Schuif uw vinger over de spatiebalk om de taal te wijzigen"</string>
+ <string name="hint_add_to_dictionary" msgid="8058519710062071085">"← Tik nogmaals om op te slaan"</string>
</resources>
diff --git a/res/values-pl/strings.xml b/res/values-pl/strings.xml
index 2da020783..a411cc213 100644
--- a/res/values-pl/strings.xml
+++ b/res/values-pl/strings.xml
@@ -98,7 +98,17 @@
<string name="voice_punctuation_hint" msgid="1611389463237317754"><b>"Wskazówka:"</b>" następnym razem spróbuj wypowiadać nazwy znaków interpunkcyjnych: „kropka”, „przecinek” lub „pytajnik”."</string>
<string name="cancel" msgid="6830980399865683324">"Anuluj"</string>
<string name="ok" msgid="7898366843681727667">"OK"</string>
- <string name="enable_voice" msgid="8299503298530853956">"Wprowadzanie głosowe"</string>
+ <string name="voice_input" msgid="2466640768843347841">"Wprowadzanie głosowe"</string>
+ <string-array name="voice_input_modes">
+ <item msgid="1349082139076086774">"Na klawiaturze głównej"</item>
+ <item msgid="8529385602829095903">"Na klawiaturze z symbolami"</item>
+ <item msgid="7283103513488381103">"Wyłączone"</item>
+ </string-array>
+ <string-array name="voice_input_modes_summary">
+ <item msgid="554248625705084903">"Mikrofon na klawiaturze głównej"</item>
+ <item msgid="6907837061058876770">"Mikrofon na klawiaturze z symbolami"</item>
+ <item msgid="3664304608587798036">"Wprowadzanie głosowe jest wyłączone"</item>
+ </string-array>
<string name="auto_submit" msgid="9151008027068358518">"Automatyczne przesyłanie uruchamiane głosem"</string>
<string name="auto_submit_summary" msgid="4961875269610384226">"Podczas wyszukiwania lub przechodzenia do następnego pola automatycznie naciśnij klawisz Enter."</string>
<string name="open_the_keyboard" msgid="2215920976029260466"><font size="17"><b>"Otwórz klawiaturę"\n</b></font><font size="3">\n</font>"Dotknij dowolnego pola tekstowego."</string>
@@ -110,7 +120,8 @@
<string name="popular_domain_2" msgid="3036812463748402878">".org"</string>
<string name="popular_domain_3" msgid="8718639560809452028">".gov"</string>
<string name="popular_domain_4" msgid="35359437471311470">".edu"</string>
- <!-- no translation found for language_selection_title (530749890984542339) -->
- <skip />
<string name="inputMethod" msgid="7854532062009028116">"Metoda wprowadzania"</string>
+ <string name="language_selection_title" msgid="1651299598555326750">"Języki wprowadzania"</string>
+ <string name="language_selection_summary" msgid="187110938289512256">"Przesuń palcem po spacji, aby zmienić język"</string>
+ <string name="hint_add_to_dictionary" msgid="8058519710062071085">"← Dotknij ponownie, aby zapisać"</string>
</resources>
diff --git a/res/values-pt-rPT/strings.xml b/res/values-pt-rPT/strings.xml
index ec397b66f..399975d88 100644
--- a/res/values-pt-rPT/strings.xml
+++ b/res/values-pt-rPT/strings.xml
@@ -98,7 +98,17 @@
<string name="voice_punctuation_hint" msgid="1611389463237317754"><b>"Sugestão:"</b>" Da próxima vez, experimente dizer a pontuação como \"ponto final\", \"vírgula\" ou \"ponto de interrogação\"."</string>
<string name="cancel" msgid="6830980399865683324">"Cancelar"</string>
<string name="ok" msgid="7898366843681727667">"OK"</string>
- <string name="enable_voice" msgid="8299503298530853956">"Entrada de voz"</string>
+ <string name="voice_input" msgid="2466640768843347841">"Entrada de voz"</string>
+ <string-array name="voice_input_modes">
+ <item msgid="1349082139076086774">"No teclado principal"</item>
+ <item msgid="8529385602829095903">"No teclado de símbolos"</item>
+ <item msgid="7283103513488381103">"Desactivada"</item>
+ </string-array>
+ <string-array name="voice_input_modes_summary">
+ <item msgid="554248625705084903">"Microfone no teclado principal"</item>
+ <item msgid="6907837061058876770">"Microfone no teclado de símbolos"</item>
+ <item msgid="3664304608587798036">"A entrada de voz está desactivada"</item>
+ </string-array>
<string name="auto_submit" msgid="9151008027068358518">"Enviar automaticamente depois da voz"</string>
<string name="auto_submit_summary" msgid="4961875269610384226">"Premir automaticamente ENTER ao pesquisar ou avançar para o campo seguinte."</string>
<string name="open_the_keyboard" msgid="2215920976029260466"><font size="17"><b>"Abra o teclado"\n</b></font><font size="3">\n</font>"Toque em qualquer campo de texto."</string>
@@ -110,7 +120,8 @@
<string name="popular_domain_2" msgid="3036812463748402878">".org"</string>
<string name="popular_domain_3" msgid="8718639560809452028">".gov"</string>
<string name="popular_domain_4" msgid="35359437471311470">".edu"</string>
- <string name="inputMethod" msgid="1653630062304567879">"Método de entrada"</string>
- <!-- no translation found for language_selection_title (530749890984542339) -->
- <skip />
+ <string name="inputMethod" msgid="7854532062009028116">"Método de entrada"</string>
+ <string name="language_selection_title" msgid="1651299598555326750">"Idiomas de entrada"</string>
+ <string name="language_selection_summary" msgid="187110938289512256">"Deslize o dedo pela barra de espaço para alterar o idioma"</string>
+ <string name="hint_add_to_dictionary" msgid="8058519710062071085">"← Toque novamente para guardar"</string>
</resources>
diff --git a/res/values-pt/strings.xml b/res/values-pt/strings.xml
index 64042b30b..18ffdf011 100644
--- a/res/values-pt/strings.xml
+++ b/res/values-pt/strings.xml
@@ -98,7 +98,17 @@
<string name="voice_punctuation_hint" msgid="1611389463237317754"><b>"Dica:"</b>" Da próxima vez, tente falar o nome da pontuação como \"ponto\", \"vírgula\" ou \"ponto de interrogação\"."</string>
<string name="cancel" msgid="6830980399865683324">"Cancelar"</string>
<string name="ok" msgid="7898366843681727667">"OK"</string>
- <string name="enable_voice" msgid="8299503298530853956">"Entrada de voz"</string>
+ <string name="voice_input" msgid="2466640768843347841">"Entrada de voz"</string>
+ <string-array name="voice_input_modes">
+ <item msgid="1349082139076086774">"No teclado principal"</item>
+ <item msgid="8529385602829095903">"No teclado de símbolos"</item>
+ <item msgid="7283103513488381103">"Desativado"</item>
+ </string-array>
+ <string-array name="voice_input_modes_summary">
+ <item msgid="554248625705084903">"Microfone no teclado principal"</item>
+ <item msgid="6907837061058876770">"Microfone no teclado de símbolos"</item>
+ <item msgid="3664304608587798036">"Entrada de voz desativada"</item>
+ </string-array>
<string name="auto_submit" msgid="9151008027068358518">"Enviar automaticamente depois de falar"</string>
<string name="auto_submit_summary" msgid="4961875269610384226">"Pressione Enter automaticamente ao pesquisar ou ir para o próximo campo."</string>
<string name="open_the_keyboard" msgid="2215920976029260466"><font size="17"><b>"Abra o teclado"\n</b></font><font size="3">\n</font>"Toque em qualquer campo de texto."</string>
@@ -110,7 +120,8 @@
<string name="popular_domain_2" msgid="3036812463748402878">".org"</string>
<string name="popular_domain_3" msgid="8718639560809452028">".gov"</string>
<string name="popular_domain_4" msgid="35359437471311470">".edu"</string>
- <string name="inputMethod" msgid="1653630062304567879">"Método de entrada"</string>
- <!-- no translation found for language_selection_title (530749890984542339) -->
- <skip />
+ <string name="inputMethod" msgid="7854532062009028116">"Método de entrada"</string>
+ <string name="language_selection_title" msgid="1651299598555326750">"Idiomas de entrada"</string>
+ <string name="language_selection_summary" msgid="187110938289512256">"Deslize o dedo na barra de espaços para alterar o idioma"</string>
+ <string name="hint_add_to_dictionary" msgid="8058519710062071085">"← Toque novamente para salvar"</string>
</resources>
diff --git a/res/values-ru/strings.xml b/res/values-ru/strings.xml
index 6e81f7d03..d4ebc6d60 100644
--- a/res/values-ru/strings.xml
+++ b/res/values-ru/strings.xml
@@ -98,7 +98,17 @@
<string name="voice_punctuation_hint" msgid="1611389463237317754"><b>"Совет"</b>". В следующий раз проговаривайте знаки препинания, например \"точка\", \"запятая\", \"вопросительный знак\"."</string>
<string name="cancel" msgid="6830980399865683324">"Отмена"</string>
<string name="ok" msgid="7898366843681727667">"ОК"</string>
- <string name="enable_voice" msgid="8299503298530853956">"Голосовой ввод"</string>
+ <string name="voice_input" msgid="2466640768843347841">"Голосовой ввод"</string>
+ <string-array name="voice_input_modes">
+ <item msgid="1349082139076086774">"На основной клавиатуре"</item>
+ <item msgid="8529385602829095903">"На клавиатуре символов"</item>
+ <item msgid="7283103513488381103">"Выкл."</item>
+ </string-array>
+ <string-array name="voice_input_modes_summary">
+ <item msgid="554248625705084903">"Микрофон на основной клавиатуре"</item>
+ <item msgid="6907837061058876770">"Микрофон на клавиатуре символов"</item>
+ <item msgid="3664304608587798036">"Голосовой ввод отключен"</item>
+ </string-array>
<string name="auto_submit" msgid="9151008027068358518">"Автоматически отправлять по окончании голосового ввода"</string>
<string name="auto_submit_summary" msgid="4961875269610384226">"Автоматически нажимать \"Ввод\" при поиске или переходе к следующему полю."</string>
<string name="open_the_keyboard" msgid="2215920976029260466"><font size="17"><b>"Откройте клавиатуру"\n</b></font><font size="3">\n</font>"Нажмите на любое текстовое поле."</string>
@@ -110,7 +120,8 @@
<string name="popular_domain_2" msgid="3036812463748402878">".org"</string>
<string name="popular_domain_3" msgid="8718639560809452028">".gov"</string>
<string name="popular_domain_4" msgid="35359437471311470">".edu"</string>
- <!-- no translation found for language_selection_title (530749890984542339) -->
- <skip />
<string name="inputMethod" msgid="7854532062009028116">"Способ ввода"</string>
+ <string name="language_selection_title" msgid="1651299598555326750">"Языки ввода"</string>
+ <string name="language_selection_summary" msgid="187110938289512256">"Для изменения языка проведите пальцем по пробелу"</string>
+ <string name="hint_add_to_dictionary" msgid="8058519710062071085">"← Нажмите повторно, чтобы сохранить"</string>
</resources>
diff --git a/res/values-sv/strings.xml b/res/values-sv/strings.xml
index 8027eb3f7..2d07a076a 100644
--- a/res/values-sv/strings.xml
+++ b/res/values-sv/strings.xml
@@ -98,7 +98,17 @@
<string name="voice_punctuation_hint" msgid="1611389463237317754"><b>"Tips!"</b>" Nästa gång testar du att säga skiljetecknen, som \"punkt\", \"komma\" eller \"frågetecken\"."</string>
<string name="cancel" msgid="6830980399865683324">"Avbryt"</string>
<string name="ok" msgid="7898366843681727667">"OK"</string>
- <string name="enable_voice" msgid="8299503298530853956">"Röstindata"</string>
+ <string name="voice_input" msgid="2466640768843347841">"Röstindata"</string>
+ <string-array name="voice_input_modes">
+ <item msgid="1349082139076086774">"På huvudtangentbordet"</item>
+ <item msgid="8529385602829095903">"På symboltangentbordet"</item>
+ <item msgid="7283103513488381103">"Av"</item>
+ </string-array>
+ <string-array name="voice_input_modes_summary">
+ <item msgid="554248625705084903">"Mikrofon på huvudtangentbordet"</item>
+ <item msgid="6907837061058876770">"Mikrofon på symboltangentbordet"</item>
+ <item msgid="3664304608587798036">"Röstindata är inaktiverat"</item>
+ </string-array>
<string name="auto_submit" msgid="9151008027068358518">"Skicka automatiskt efter röst"</string>
<string name="auto_submit_summary" msgid="4961875269610384226">"Tryck automatiskt på retur vid sökning eller när du fortsätter till nästa fält."</string>
<string name="open_the_keyboard" msgid="2215920976029260466"><font size="17"><b>"Öppna tangentbordet"\n</b></font><font size="3">\n</font>"Tryck på ett textfält."</string>
@@ -110,7 +120,8 @@
<string name="popular_domain_2" msgid="3036812463748402878">".org"</string>
<string name="popular_domain_3" msgid="8718639560809452028">".gov"</string>
<string name="popular_domain_4" msgid="35359437471311470">".edu"</string>
- <!-- no translation found for language_selection_title (530749890984542339) -->
- <skip />
<string name="inputMethod" msgid="7854532062009028116">"Indatametod"</string>
+ <string name="language_selection_title" msgid="1651299598555326750">"Inmatningsspråk"</string>
+ <string name="language_selection_summary" msgid="187110938289512256">"Dra med fingret på blanksteg om du vill ändra språk"</string>
+ <string name="hint_add_to_dictionary" msgid="8058519710062071085">"← Peka igen för att spara"</string>
</resources>
diff --git a/res/values-tr/strings.xml b/res/values-tr/strings.xml
index 069abeb14..e150a5ee7 100644
--- a/res/values-tr/strings.xml
+++ b/res/values-tr/strings.xml
@@ -98,7 +98,17 @@
<string name="voice_punctuation_hint" msgid="1611389463237317754"><b>"İpucu:"</b>" Sonraki sefer, \"nokta\", \"virgül\" veya \"soru işareti\" gibi noktalama işaretlerini telaffuz etmeyi deneyin."</string>
<string name="cancel" msgid="6830980399865683324">"İptal"</string>
<string name="ok" msgid="7898366843681727667">"Tamam"</string>
- <string name="enable_voice" msgid="8299503298530853956">"Ses girişi"</string>
+ <string name="voice_input" msgid="2466640768843347841">"Ses girişi"</string>
+ <string-array name="voice_input_modes">
+ <item msgid="1349082139076086774">"Ana klavyede"</item>
+ <item msgid="8529385602829095903">"Simge klavyesinde"</item>
+ <item msgid="7283103513488381103">"Kapalı"</item>
+ </string-array>
+ <string-array name="voice_input_modes_summary">
+ <item msgid="554248625705084903">"Ana klavyedeki mikrofon"</item>
+ <item msgid="6907837061058876770">"Simge klavyesindeki mikrofon"</item>
+ <item msgid="3664304608587798036">"Sesle giriş devre dışı bırakıldı"</item>
+ </string-array>
<string name="auto_submit" msgid="9151008027068358518">"Sesten sonra otomatik gönder"</string>
<string name="auto_submit_summary" msgid="4961875269610384226">"Arama yaparken veya bir sonraki alana giderken enter tuşuna otomatik olarak basın."</string>
<string name="open_the_keyboard" msgid="2215920976029260466"><font size="17"><b>"Klavyeyi açın"\n</b></font><font size="3">\n</font>"Herhangi bir metin alanına dokunun."</string>
@@ -110,7 +120,8 @@
<string name="popular_domain_2" msgid="3036812463748402878">".org"</string>
<string name="popular_domain_3" msgid="8718639560809452028">".gov"</string>
<string name="popular_domain_4" msgid="35359437471311470">".edu"</string>
- <!-- no translation found for language_selection_title (530749890984542339) -->
- <skip />
<string name="inputMethod" msgid="7854532062009028116">"Giriş yöntemi"</string>
+ <string name="language_selection_title" msgid="1651299598555326750">"Giriş dilleri"</string>
+ <string name="language_selection_summary" msgid="187110938289512256">"Dili değiştirmek için parmağınızı boşluk çubuğu üzerinde kaydırın"</string>
+ <string name="hint_add_to_dictionary" msgid="8058519710062071085">"← Kaydetmek için tekrar dokunun"</string>
</resources>
diff --git a/res/values-zh-rCN/strings.xml b/res/values-zh-rCN/strings.xml
index 034f32739..f3729914b 100644
--- a/res/values-zh-rCN/strings.xml
+++ b/res/values-zh-rCN/strings.xml
@@ -57,7 +57,6 @@
<string name="alternates_for_n" msgid="6257322556221886400">"ñ"</string>
<string name="alternates_for_c" msgid="151699780720639892">"ç"</string>
<string name="alternates_for_y" msgid="1722776806607271199">"ýÿ"</string>
- <string name="key_i" msgid="6483655742552255124">"i"</string>
<string name="tip_long_press" msgid="6101270866284343344">"按住某个键可看到重音符号(例如 ø、ö 等)"</string>
<string name="tip_dismiss" msgid="7585579046862204381">"随时可以通过按后退键 ↶ 关闭键盘"</string>
<string name="tip_access_symbols" msgid="6344098517525531652">"访问数字和符号"</string>
@@ -99,7 +98,17 @@
<string name="voice_punctuation_hint" msgid="1611389463237317754"><b>"提示:"</b>"稍后,请尝试使用语音输入标点符号,如“句号”、“逗号”或“问号”。"</string>
<string name="cancel" msgid="6830980399865683324">"取消"</string>
<string name="ok" msgid="7898366843681727667">"确定"</string>
- <string name="enable_voice" msgid="8299503298530853956">"语音输入"</string>
+ <string name="voice_input" msgid="2466640768843347841">"语音输入"</string>
+ <string-array name="voice_input_modes">
+ <item msgid="1349082139076086774">"主键盘上"</item>
+ <item msgid="8529385602829095903">"符号键盘上"</item>
+ <item msgid="7283103513488381103">"关"</item>
+ </string-array>
+ <string-array name="voice_input_modes_summary">
+ <item msgid="554248625705084903">"主键盘上的麦克风"</item>
+ <item msgid="6907837061058876770">"符号键盘上的麦克风"</item>
+ <item msgid="3664304608587798036">"已停用语音输入"</item>
+ </string-array>
<string name="auto_submit" msgid="9151008027068358518">"语音结束后自动提交"</string>
<string name="auto_submit_summary" msgid="4961875269610384226">"搜索或转到下一字段时自动按 Enter。"</string>
<string name="open_the_keyboard" msgid="2215920976029260466"><font size="17"><b>"打开键盘"\n</b></font><font size="3">\n</font>"轻触任意文本字段。"</string>
@@ -111,7 +120,8 @@
<string name="popular_domain_2" msgid="3036812463748402878">".org"</string>
<string name="popular_domain_3" msgid="8718639560809452028">".gov"</string>
<string name="popular_domain_4" msgid="35359437471311470">".edu"</string>
- <!-- no translation found for language_selection_title (530749890984542339) -->
- <skip />
<string name="inputMethod" msgid="7854532062009028116">"输入法"</string>
+ <string name="language_selection_title" msgid="1651299598555326750">"输入语言"</string>
+ <string name="language_selection_summary" msgid="187110938289512256">"在空格键上滑动手指可更改语言"</string>
+ <string name="hint_add_to_dictionary" msgid="8058519710062071085">"← 再次点按即可保存"</string>
</resources>
diff --git a/res/values-zh-rTW/strings.xml b/res/values-zh-rTW/strings.xml
index 9603c6b80..c4efd00a6 100644
--- a/res/values-zh-rTW/strings.xml
+++ b/res/values-zh-rTW/strings.xml
@@ -98,7 +98,14 @@
<string name="voice_punctuation_hint" msgid="1611389463237317754"><b>"提示:"</b>"下次可嘗試說出標點符號,例如「句號」、「逗號」或「問號」。"</string>
<string name="cancel" msgid="6830980399865683324">"取消"</string>
<string name="ok" msgid="7898366843681727667">"確定"</string>
- <string name="enable_voice" msgid="8299503298530853956">"語音輸入"</string>
+ <!-- no translation found for voice_input (2466640768843347841) -->
+ <skip />
+ <!-- no translation found for voice_input_modes:0 (1349082139076086774) -->
+ <!-- no translation found for voice_input_modes:1 (8529385602829095903) -->
+ <!-- no translation found for voice_input_modes:2 (7283103513488381103) -->
+ <!-- no translation found for voice_input_modes_summary:0 (554248625705084903) -->
+ <!-- no translation found for voice_input_modes_summary:1 (6907837061058876770) -->
+ <!-- no translation found for voice_input_modes_summary:2 (3664304608587798036) -->
<string name="auto_submit" msgid="9151008027068358518">"說話後自動提交"</string>
<string name="auto_submit_summary" msgid="4961875269610384226">"搜尋或前往下一個欄位時自動按下輸入。"</string>
<string name="open_the_keyboard" msgid="2215920976029260466"><font size="17"><b>"開啟鍵盤"\n</b></font><font size="3">\n</font>"輕觸任何文字欄位。"</string>
@@ -110,7 +117,11 @@
<string name="popular_domain_2" msgid="3036812463748402878">".org"</string>
<string name="popular_domain_3" msgid="8718639560809452028">".gov"</string>
<string name="popular_domain_4" msgid="35359437471311470">".edu"</string>
- <!-- no translation found for language_selection_title (530749890984542339) -->
- <skip />
<string name="inputMethod" msgid="7854532062009028116">"輸入方式"</string>
+ <!-- no translation found for language_selection_title (1651299598555326750) -->
+ <skip />
+ <!-- no translation found for language_selection_summary (187110938289512256) -->
+ <skip />
+ <!-- no translation found for hint_add_to_dictionary (8058519710062071085) -->
+ <skip />
</resources>
diff --git a/res/values/donottranslate.xml b/res/values/donottranslate.xml
index edf230061..87c28aeba 100644
--- a/res/values/donottranslate.xml
+++ b/res/values/donottranslate.xml
@@ -19,7 +19,7 @@
-->
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<!-- Symbols that are commonly considered word separators in this language -->
- <string name="word_separators">.\u0020,;:!?\n()[]*&amp;@{}/&lt;&gt;_+=|\u0022</string>
+ <string name="word_separators">.\u0009\u0020,;:!?\n()[]*&amp;@{}/&lt;&gt;_+=|\u0022</string>
<!-- Symbols that are sentence separators, for purposes of making it hug the last sentence. -->
<string name="sentence_separators">.,!?</string>
<!-- Symbols that are suggested between words -->
diff --git a/res/xml/kbd_symbols.xml b/res/xml/kbd_symbols.xml
index 067932b3f..ede7b50fc 100755
--- a/res/xml/kbd_symbols.xml
+++ b/res/xml/kbd_symbols.xml
@@ -77,7 +77,7 @@
/>
<Key android:codes="45" android:keyLabel="-"
android:popupKeyboard="@xml/kbd_popup_template"
- android:popupCharacters="–—"
+ android:popupCharacters="_–—"
/>
<Key android:keyLabel="+"
android:popupKeyboard="@xml/kbd_popup_template"
diff --git a/res/xml/kbd_symbols_shift.xml b/res/xml/kbd_symbols_shift.xml
index d83594a24..09b5c3f9d 100755
--- a/res/xml/kbd_symbols_shift.xml
+++ b/res/xml/kbd_symbols_shift.xml
@@ -42,7 +42,7 @@
</Row>
<Row>
- <Key android:keyLabel="¥" android:keyEdgeFlags="left"/>
+ <Key android:codes="9" android:keyLabel="\u21E5" android:keyEdgeFlags="left"/>
<Key android:keyLabel="£"/>
<Key android:keyLabel="¢"/>
<Key android:keyLabel="€"/>
diff --git a/res/xml/popup_punctuation.xml b/res/xml/popup_punctuation.xml
index 518e3f1f2..a29fb520d 100644
--- a/res/xml/popup_punctuation.xml
+++ b/res/xml/popup_punctuation.xml
@@ -26,8 +26,8 @@
>
<Row android:rowEdgeFlags="top">
- <Key android:keyLabel=";" android:keyEdgeFlags="left" />
- <Key android:keyLabel="," />
+ <Key android:keyLabel=":" android:keyEdgeFlags="left" />
+ <Key android:keyLabel="/" />
<Key android:keyLabel="&amp;" />
<Key android:keyLabel="(" />
<Key android:keyLabel=")" />
@@ -35,12 +35,12 @@
<Key android:keyLabel="+" android:keyEdgeFlags="right" />
</Row>
<Row android:rowEdgeFlags="bottom">
- <Key android:codes="58" android:keyLabel=":" android:keyEdgeFlags="left" />
- <Key android:codes="47" android:keyLabel="/" />
- <Key android:codes="64" android:keyLabel="\@" />
- <Key android:codes="39" android:keyLabel="\'" />
- <Key android:codes="34" android:keyLabel="&quot;" />
- <Key android:codes="63" android:keyLabel="\?" />
- <Key android:codes="33" android:keyLabel="!" android:keyEdgeFlags="right" />
+ <Key android:keyLabel=";" android:keyEdgeFlags="left" />
+ <Key android:keyLabel="," />
+ <Key android:keyLabel="\@" />
+ <Key android:keyLabel="\'" />
+ <Key android:keyLabel="&quot;" />
+ <Key android:keyLabel="\?" />
+ <Key android:keyLabel="!" android:keyEdgeFlags="right" />
</Row>
</Keyboard>
diff --git a/src/com/android/inputmethod/latin/AutoDictionary.java b/src/com/android/inputmethod/latin/AutoDictionary.java
new file mode 100644
index 000000000..3d76dc301
--- /dev/null
+++ b/src/com/android/inputmethod/latin/AutoDictionary.java
@@ -0,0 +1,217 @@
+/*
+ * Copyright (C) 2010 Google Inc.
+ *
+ * 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 java.util.HashMap;
+
+import android.content.ContentValues;
+import android.content.Context;
+import android.database.Cursor;
+import android.database.sqlite.SQLiteDatabase;
+import android.database.sqlite.SQLiteOpenHelper;
+import android.database.sqlite.SQLiteQueryBuilder;
+import android.provider.BaseColumns;
+import android.provider.UserDictionary.Words;
+import android.util.Log;
+
+/**
+ * Stores new words temporarily until they are promoted to the user dictionary
+ * for longevity. Words in the auto dictionary are used to determine if it's ok
+ * to accept a word that's not in the main or user dictionary. Using a new word
+ * repeatedly will promote it to the user dictionary.
+ */
+public class AutoDictionary extends ExpandableDictionary {
+ // Weight added to a user picking a new word from the suggestion strip
+ static final int FREQUENCY_FOR_PICKED = 3;
+ // Weight added to a user typing a new word that doesn't get corrected (or is reverted)
+ static final int FREQUENCY_FOR_TYPED = 1;
+ // A word that is frequently typed and gets promoted to the user dictionary, uses this
+ // frequency.
+ static final int FREQUENCY_FOR_AUTO_ADD = 250;
+ // If the user touches a typed word 2 times or more, it will become valid.
+ private static final int VALIDITY_THRESHOLD = 2 * FREQUENCY_FOR_PICKED;
+ // If the user touches a typed word 4 times or more, it will be added to the user dict.
+ private static final int PROMOTION_THRESHOLD = 4 * FREQUENCY_FOR_PICKED;
+
+ private LatinIME mIme;
+ // Locale for which this auto dictionary is storing words
+ private String mLocale;
+
+ private static final String DATABASE_NAME = "auto_dict.db";
+ private static final int DATABASE_VERSION = 1;
+
+ // These are the columns in the dictionary
+ // TODO: Consume less space by using a unique id for locale instead of the whole
+ // 2-5 character string.
+ private static final String COLUMN_ID = BaseColumns._ID;
+ private static final String COLUMN_WORD = "word";
+ private static final String COLUMN_FREQUENCY = "freq";
+ private static final String COLUMN_LOCALE = "locale";
+
+ /** Sort by descending order of frequency. */
+ public static final String DEFAULT_SORT_ORDER = COLUMN_FREQUENCY + " DESC";
+
+ /** Name of the words table in the auto_dict.db */
+ private static final String AUTODICT_TABLE_NAME = "words";
+
+ private static HashMap<String, String> sDictProjectionMap;
+
+ static {
+ sDictProjectionMap = new HashMap<String, String>();
+ sDictProjectionMap.put(COLUMN_ID, COLUMN_ID);
+ sDictProjectionMap.put(COLUMN_WORD, COLUMN_WORD);
+ sDictProjectionMap.put(COLUMN_FREQUENCY, COLUMN_FREQUENCY);
+ sDictProjectionMap.put(COLUMN_LOCALE, COLUMN_LOCALE);
+ }
+
+ private DatabaseHelper mOpenHelper;
+
+ public AutoDictionary(Context context, LatinIME ime, String locale) {
+ super(context);
+ mIme = ime;
+ mLocale = locale;
+ mOpenHelper = new DatabaseHelper(getContext());
+ if (mLocale != null && mLocale.length() > 1) {
+ loadDictionary();
+ }
+ }
+
+ @Override
+ public boolean isValidWord(CharSequence word) {
+ final int frequency = getWordFrequency(word);
+ return frequency >= VALIDITY_THRESHOLD;
+ }
+
+ public void close() {
+ mOpenHelper.close();
+ }
+
+ private void loadDictionary() {
+ // Load the words that correspond to the current input locale
+ Cursor cursor = query(COLUMN_LOCALE + "=?", new String[] { mLocale });
+ if (cursor.moveToFirst()) {
+ int wordIndex = cursor.getColumnIndex(COLUMN_WORD);
+ int frequencyIndex = cursor.getColumnIndex(COLUMN_FREQUENCY);
+ while (!cursor.isAfterLast()) {
+ String word = cursor.getString(wordIndex);
+ int frequency = cursor.getInt(frequencyIndex);
+ // Safeguard against adding really long words. Stack may overflow due
+ // to recursive lookup
+ if (word.length() < getMaxWordLength()) {
+ super.addWord(word, frequency);
+ }
+ cursor.moveToNext();
+ }
+ }
+ cursor.close();
+ }
+
+ @Override
+ public void addWord(String word, int addFrequency) {
+ final int length = word.length();
+ // Don't add very short or very long words.
+ if (length < 2 || length > getMaxWordLength()) return;
+ if (mIme.getCurrentWord().isAutoCapitalized()) {
+ // Remove caps before adding
+ word = Character.toLowerCase(word.charAt(0)) + word.substring(1);
+ }
+ int freq = getWordFrequency(word);
+ freq = freq < 0 ? addFrequency : freq + addFrequency;
+ super.addWord(word, freq);
+ if (freq >= PROMOTION_THRESHOLD) {
+ mIme.promoteToUserDictionary(word, FREQUENCY_FOR_AUTO_ADD);
+ // Delete the word (for input locale) from the auto dictionary db, as it
+ // is now in the user dictionary provider.
+ delete(COLUMN_WORD + "=? AND " + COLUMN_LOCALE + "=?",
+ new String[] { word, mLocale });
+ } else {
+ update(word, freq, mLocale);
+ }
+ }
+
+ /**
+ * This class helps open, create, and upgrade the database file.
+ */
+ private static class DatabaseHelper extends SQLiteOpenHelper {
+
+ DatabaseHelper(Context context) {
+ super(context, DATABASE_NAME, null, DATABASE_VERSION);
+ }
+
+ @Override
+ public void onCreate(SQLiteDatabase db) {
+ db.execSQL("CREATE TABLE " + AUTODICT_TABLE_NAME + " ("
+ + COLUMN_ID + " INTEGER PRIMARY KEY,"
+ + COLUMN_WORD + " TEXT,"
+ + COLUMN_FREQUENCY + " INTEGER,"
+ + COLUMN_LOCALE + " TEXT"
+ + ");");
+ }
+
+ @Override
+ public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
+ Log.w("AutoDictionary", "Upgrading database from version " + oldVersion + " to "
+ + newVersion + ", which will destroy all old data");
+ db.execSQL("DROP TABLE IF EXISTS " + AUTODICT_TABLE_NAME);
+ onCreate(db);
+ }
+ }
+
+ private Cursor query(String selection, String[] selectionArgs) {
+ SQLiteQueryBuilder qb = new SQLiteQueryBuilder();
+ qb.setTables(AUTODICT_TABLE_NAME);
+ qb.setProjectionMap(sDictProjectionMap);
+
+ // Get the database and run the query
+ SQLiteDatabase db = mOpenHelper.getReadableDatabase();
+ Cursor c = qb.query(db, null, selection, selectionArgs, null, null,
+ DEFAULT_SORT_ORDER);
+ return c;
+ }
+
+ private boolean insert(ContentValues values) {
+ SQLiteDatabase db = mOpenHelper.getWritableDatabase();
+ long rowId = db.insert(AUTODICT_TABLE_NAME, Words.WORD, values);
+ if (rowId > 0) {
+ return true;
+ }
+ return false;
+ }
+
+ private int delete(String where, String[] whereArgs) {
+ SQLiteDatabase db = mOpenHelper.getWritableDatabase();
+ int count = db.delete(AUTODICT_TABLE_NAME, where, whereArgs);
+ return count;
+ }
+
+ private int update(String word, int frequency, String locale) {
+ SQLiteDatabase db = mOpenHelper.getWritableDatabase();
+ long count = db.delete(AUTODICT_TABLE_NAME, COLUMN_WORD + "=? AND " + COLUMN_LOCALE + "=?",
+ new String[] { word, locale });
+ count = db.insert(AUTODICT_TABLE_NAME, null,
+ getContentValues(word, frequency, locale));
+ return (int) count;
+ }
+
+ private ContentValues getContentValues(String word, int frequency, String locale) {
+ ContentValues values = new ContentValues(4);
+ values.put(COLUMN_WORD, word);
+ values.put(COLUMN_FREQUENCY, frequency);
+ values.put(COLUMN_LOCALE, locale);
+ return values;
+ }
+}
diff --git a/src/com/android/inputmethod/latin/InputLanguageSelection.java b/src/com/android/inputmethod/latin/InputLanguageSelection.java
index 2c5fec6e8..73298e33c 100644
--- a/src/com/android/inputmethod/latin/InputLanguageSelection.java
+++ b/src/com/android/inputmethod/latin/InputLanguageSelection.java
@@ -19,7 +19,6 @@ package com.android.inputmethod.latin;
import java.text.Collator;
import java.util.ArrayList;
import java.util.Arrays;
-import java.util.List;
import java.util.Locale;
import android.content.SharedPreferences;
@@ -29,7 +28,7 @@ import android.preference.CheckBoxPreference;
import android.preference.PreferenceActivity;
import android.preference.PreferenceGroup;
import android.preference.PreferenceManager;
-import android.util.Log;
+import android.text.TextUtils;
public class InputLanguageSelection extends PreferenceActivity {
@@ -91,7 +90,9 @@ public class InputLanguageSelection extends PreferenceActivity {
}
private String get5Code(Locale locale) {
- return locale.getLanguage() + "_" + locale.getCountry();
+ String country = locale.getCountry();
+ return locale.getLanguage()
+ + (TextUtils.isEmpty(country) ? "" : "_" + country);
}
@Override
diff --git a/src/com/android/inputmethod/latin/KeyboardSwitcher.java b/src/com/android/inputmethod/latin/KeyboardSwitcher.java
index 529edeb81..4322997e8 100644
--- a/src/com/android/inputmethod/latin/KeyboardSwitcher.java
+++ b/src/com/android/inputmethod/latin/KeyboardSwitcher.java
@@ -178,11 +178,13 @@ public class KeyboardSwitcher {
mPreferSymbols);
}
- void setKeyboardMode(int mode, int imeOptions,
- boolean enableVoice, boolean isSymbols) {
+ void setKeyboardMode(int mode, int imeOptions, boolean enableVoice, boolean isSymbols) {
+ if (mInputView == null) return;
mMode = mode;
mImeOptions = imeOptions;
- mHasVoice = enableVoice;
+ if (enableVoice != mHasVoice) {
+ setVoiceMode(mHasVoice, mVoiceOnPrimary);
+ }
mIsSymbols = isSymbols;
mInputView.setPreviewEnabled(true);
@@ -210,7 +212,8 @@ public class KeyboardSwitcher {
conf.locale = mInputLocale;
orig.updateConfiguration(conf, null);
LatinKeyboard keyboard = new LatinKeyboard(
- mContext, id.mXml, id.mKeyboardMode, id.mHasVoice);
+ mContext, id.mXml, id.mKeyboardMode);
+ keyboard.setVoiceMode(hasVoiceButton(id.mXml == R.xml.kbd_symbols), mHasVoice);
keyboard.setLanguageSwitcher(mLanguageSwitcher);
if (id.mKeyboardMode == KEYBOARDMODE_NORMAL
|| id.mKeyboardMode == KEYBOARDMODE_URL
diff --git a/src/com/android/inputmethod/latin/LanguageSwitcher.java b/src/com/android/inputmethod/latin/LanguageSwitcher.java
index 68d0d15cc..12045125f 100644
--- a/src/com/android/inputmethod/latin/LanguageSwitcher.java
+++ b/src/com/android/inputmethod/latin/LanguageSwitcher.java
@@ -21,6 +21,7 @@ import java.util.Locale;
import android.content.SharedPreferences;
import android.content.SharedPreferences.Editor;
import android.preference.PreferenceManager;
+import android.text.TextUtils;
/**
* Keeps track of list of selected input languages and the current
@@ -88,8 +89,9 @@ public class LanguageSwitcher {
private void loadDefaults() {
mDefaultInputLocale = mIme.getResources().getConfiguration().locale;
- mDefaultInputLanguage = mDefaultInputLocale.getLanguage() + "_"
- + mDefaultInputLocale.getCountry();
+ String country = mDefaultInputLocale.getCountry();
+ mDefaultInputLanguage = mDefaultInputLocale.getLanguage() +
+ (TextUtils.isEmpty(country) ? "" : "_" + country);
}
private void constructLocales() {
diff --git a/src/com/android/inputmethod/latin/LatinIME.java b/src/com/android/inputmethod/latin/LatinIME.java
index 2af59d651..18b277c5a 100644
--- a/src/com/android/inputmethod/latin/LatinIME.java
+++ b/src/com/android/inputmethod/latin/LatinIME.java
@@ -130,24 +130,14 @@ public class LatinIME extends InputMethodService
// ignored, since it may in fact be two key presses in quick succession.
private static final long MIN_MILLIS_AFTER_TYPING_BEFORE_SWIPE = 1000;
- // If we detect a swipe gesture, and the user types N ms later, cancel the
- // swipe since it was probably a false trigger.
- private static final long MIN_MILLIS_AFTER_SWIPE_TO_WAIT_FOR_TYPING = 500;
-
// How many continuous deletes at which to start deleting at a higher speed.
private static final int DELETE_ACCELERATE_AT = 20;
// Key events coming any faster than this are long-presses.
private static final int QUICK_PRESS = 200;
- // Weight added to a user picking a new word from the suggestion strip
- static final int FREQUENCY_FOR_PICKED = 3;
- // Weight added to a user typing a new word that doesn't get corrected (or is reverted)
- static final int FREQUENCY_FOR_TYPED = 1;
- // A word that is frequently typed and get's promoted to the user dictionary, uses this
- // frequency.
- static final int FREQUENCY_FOR_AUTO_ADD = 250;
static final int KEYCODE_ENTER = '\n';
static final int KEYCODE_SPACE = ' ';
+ static final int KEYCODE_PERIOD = '.';
// Contextual menu positions
private static final int POS_SETTINGS = 0;
@@ -318,23 +308,24 @@ public class LatinIME extends InputMethodService
Resources orig = getResources();
Configuration conf = orig.getConfiguration();
Locale saveLocale = conf.locale;
- boolean different = !conf.locale.getCountry().equalsIgnoreCase(locale.substring(0, 2));
conf.locale = new Locale(locale);
orig.updateConfiguration(conf, orig.getDisplayMetrics());
if (mSuggest != null) {
mSuggest.close();
}
+ SharedPreferences sp = PreferenceManager.getDefaultSharedPreferences(this);
+ mQuickFixes = sp.getBoolean(PREF_QUICK_FIXES, true);
mSuggest = new Suggest(this, R.raw.main);
- mSuggest.setAutoTextEnabled(!different);
+ updateAutoTextEnabled(saveLocale);
if (mUserDictionary != null) mUserDictionary.close();
- mUserDictionary = new UserDictionary(this);
+ mUserDictionary = new UserDictionary(this, mLocale);
if (mContactsDictionary == null) {
mContactsDictionary = new ContactsDictionary(this);
}
- // TODO: Save and restore the dictionary for the current input language.
- if (mAutoDictionary == null) {
- mAutoDictionary = new AutoDictionary(this);
+ if (mAutoDictionary != null) {
+ mAutoDictionary.close();
}
+ mAutoDictionary = new AutoDictionary(this, this, mLocale);
mSuggest.setUserDictionary(mUserDictionary);
mSuggest.setContactsDictionary(mContactsDictionary);
mSuggest.setAutoDictionary(mAutoDictionary);
@@ -359,8 +350,18 @@ public class LatinIME extends InputMethodService
@Override
public void onConfigurationChanged(Configuration conf) {
+ // If the system locale changes and is different from the saved
+ // locale (mLocale), then reload the input locale list from the
+ // latin ime settings (shared prefs) and reset the input locale
+ // to the first one.
if (!TextUtils.equals(conf.locale.toString(), mLocale)) {
- initSuggest(conf.locale.toString());
+ if (mLanguageSwitcher != null) {
+ mLanguageSwitcher.loadLocales(
+ PreferenceManager.getDefaultSharedPreferences(this));
+ toggleLanguage(true, true);
+ } else {
+ reloadKeyboards();
+ }
}
// If orientation changed while predicting, commit the change
if (conf.orientation != mOrientation) {
@@ -368,8 +369,8 @@ public class LatinIME extends InputMethodService
commitTyped(ic);
if (ic != null) ic.finishComposingText(); // For voice input
mOrientation = conf.orientation;
+ reloadKeyboards();
}
- reloadKeyboards();
super.onConfigurationChanged(conf);
}
@@ -447,7 +448,6 @@ public class LatinIME extends InputMethodService
mShowingVoiceSuggestions = false;
mImmediatelyAfterVoiceSuggestions = false;
mVoiceInputHighlighted = false;
- boolean disableAutoCorrect = false;
mWordToSuggestions.clear();
mInputTypeNoAutoCorrect = false;
mPredictionOn = false;
@@ -534,24 +534,18 @@ public class LatinIME extends InputMethodService
mDeleteCount = 0;
mJustAddedAutoSpace = false;
loadSettings();
+ updateShiftKeyState(attribute);
setCandidatesViewShown(false);
setSuggestions(null, false, false, false);
- // Override auto correct
- if (disableAutoCorrect) {
- mAutoCorrectOn = false;
- if (mCorrectionMode == Suggest.CORRECTION_FULL) {
- mCorrectionMode = Suggest.CORRECTION_BASIC;
- }
- }
// If the dictionary is not big enough, don't auto correct
mHasDictionary = mSuggest.hasMainDictionary();
updateCorrectionMode();
mInputView.setProximityCorrectionEnabled(true);
- mPredictionOn = mPredictionOn && mCorrectionMode > 0;
+ mPredictionOn = mPredictionOn && (mCorrectionMode > 0 || mShowSuggestions);
checkTutorial(attribute.privateImeOptions);
if (TRACE) Debug.startMethodTracing("/data/trace/latinime");
}
@@ -797,7 +791,7 @@ public class LatinIME extends InputMethodService
}
mKeyboardSwitcher.setLanguageSwitcher(mLanguageSwitcher);
if (mInputView != null) {
- mKeyboardSwitcher.setVoiceMode(mEnableVoice, mVoiceOnPrimary);
+ mKeyboardSwitcher.setVoiceMode(mEnableVoice && mEnableVoiceButton, mVoiceOnPrimary);
}
mKeyboardSwitcher.makeKeyboards(true);
}
@@ -811,7 +805,7 @@ public class LatinIME extends InputMethodService
}
mCommittedLength = mComposing.length();
TextEntryState.acceptedTyped(mComposing);
- mAutoDictionary.addWord(mComposing.toString(), FREQUENCY_FOR_TYPED);
+ checkAddToDictionary(mComposing, AutoDictionary.FREQUENCY_FOR_TYPED);
}
updateSuggestions();
}
@@ -854,6 +848,22 @@ public class LatinIME extends InputMethodService
}
}
+ private void reswapPeriodAndSpace() {
+ final InputConnection ic = getCurrentInputConnection();
+ if (ic == null) return;
+ CharSequence lastThree = ic.getTextBeforeCursor(3, 0);
+ if (lastThree != null && lastThree.length() == 3
+ && lastThree.charAt(0) == KEYCODE_PERIOD
+ && lastThree.charAt(1) == KEYCODE_SPACE
+ && lastThree.charAt(2) == KEYCODE_PERIOD) {
+ ic.beginBatchEdit();
+ ic.deleteSurroundingText(3, 0);
+ ic.commitText(" ..", 1);
+ ic.endBatchEdit();
+ updateShiftKeyState(getCurrentInputEditorInfo());
+ }
+ }
+
private void doubleSpace() {
//if (!mAutoPunctuate) return;
if (mCorrectionMode == Suggest.CORRECTION_NONE) return;
@@ -879,8 +889,9 @@ public class LatinIME extends InputMethodService
// When the text's first character is '.', remove the previous period
// if there is one.
CharSequence lastOne = ic.getTextBeforeCursor(1, 0);
- if (lastOne != null && lastOne.length() == 1 && lastOne.charAt(0) == '.'
- && text.charAt(0) == '.') {
+ if (lastOne != null && lastOne.length() == 1
+ && lastOne.charAt(0) == KEYCODE_PERIOD
+ && text.charAt(0) == KEYCODE_PERIOD) {
ic.deleteSurroundingText(1, 0);
}
}
@@ -976,6 +987,9 @@ public class LatinIME extends InputMethodService
}
public void onText(CharSequence text) {
+ if (VOICE_INSTALLED && mVoiceInputHighlighted) {
+ commitVoiceInput();
+ }
InputConnection ic = getCurrentInputConnection();
if (ic == null) return;
ic.beginBatchEdit();
@@ -1117,6 +1131,14 @@ public class LatinIME extends InputMethodService
mJustAddedAutoSpace = false;
}
sendKeyChar((char)primaryCode);
+
+ // Handle the case of ". ." -> " .." with auto-space if necessary
+ // before changing the TextEntryState.
+ if (TextEntryState.getState() == TextEntryState.STATE_PUNCTUATION_AFTER_ACCEPTED
+ && primaryCode == KEYCODE_PERIOD) {
+ reswapPeriodAndSpace();
+ }
+
TextEntryState.typedCharacter((char) primaryCode, true);
if (TextEntryState.getState() == TextEntryState.STATE_PUNCTUATION_AFTER_ACCEPTED
&& primaryCode != KEYCODE_ENTER) {
@@ -1164,7 +1186,6 @@ public class LatinIME extends InputMethodService
private boolean isPredictionOn() {
boolean predictionOn = mPredictionOn;
- //if (isFullscreenMode()) predictionOn &= mPredictionLandscape;
return predictionOn;
}
@@ -1419,6 +1440,8 @@ public class LatinIME extends InputMethodService
TextEntryState.acceptedDefault(mWord.getTypedWord(), mBestWord);
mJustAccepted = true;
pickSuggestion(mBestWord);
+ // Add the word to the auto dictionary if it's not a known word
+ checkAddToDictionary(mBestWord, AutoDictionary.FREQUENCY_FOR_TYPED);
}
}
@@ -1456,6 +1479,8 @@ public class LatinIME extends InputMethodService
}
mJustAccepted = true;
pickSuggestion(suggestion);
+ // Add the word to the auto dictionary if it's not a known word
+ checkAddToDictionary(suggestion, AutoDictionary.FREQUENCY_FOR_PICKED);
TextEntryState.acceptedSuggestion(mComposing.toString(), suggestion);
// Follow it with a space
if (mAutoSpace) {
@@ -1464,7 +1489,7 @@ public class LatinIME extends InputMethodService
}
// Fool the state watcher so that a subsequent backspace will not do a revert
TextEntryState.typedCharacter((char) KEYCODE_SPACE, true);
- if (index == 0 && !mSuggest.isValidWord(suggestion)) {
+ if (index == 0 && mCorrectionMode > 0 && !mSuggest.isValidWord(suggestion)) {
mCandidateView.showAddToDictionaryHint(suggestion);
}
if (ic != null) {
@@ -1489,12 +1514,9 @@ public class LatinIME extends InputMethodService
ic.commitText(suggestion, 1);
}
}
- // Add the word to the auto dictionary if it's not a known word
- if (mAutoDictionary.isValidWord(suggestion) || !mSuggest.isValidWord(suggestion)) {
- mAutoDictionary.addWord(suggestion.toString(), FREQUENCY_FOR_PICKED);
- }
mPredicting = false;
mCommittedLength = suggestion.length();
+ ((LatinKeyboard) mInputView.getKeyboard()).setPreferredLetters(null);
setNextSuggestions();
updateShiftKeyState(getCurrentInputEditorInfo());
}
@@ -1503,6 +1525,13 @@ public class LatinIME extends InputMethodService
setSuggestions(mSuggestPuncList, false, false, false);
}
+ private void checkAddToDictionary(CharSequence suggestion, int frequencyDelta) {
+ if (mAutoDictionary.isValidWord(suggestion)
+ || !mSuggest.isValidWord(suggestion.toString().toLowerCase())) {
+ mAutoDictionary.addWord(suggestion.toString(), frequencyDelta);
+ }
+ }
+
private boolean isCursorTouchingWord() {
InputConnection ic = getCurrentInputConnection();
if (ic == null) return false;
@@ -1646,11 +1675,6 @@ public class LatinIME extends InputMethodService
&& !mVoiceInput.isBlacklistedField(fieldContext);
}
- private boolean fieldIsRecommendedForVoice(FieldContext fieldContext) {
- // TODO: Move this logic into the VoiceInput method.
- return !mPasswordText && !mEmailText && mVoiceInput.isRecommendedField(fieldContext);
- }
-
private boolean shouldShowVoiceButton(FieldContext fieldContext, EditorInfo attribute) {
return ENABLE_VOICE_BUTTON && fieldCanDoVoice(fieldContext)
&& !(attribute != null && attribute.privateImeOptions != null
@@ -1681,21 +1705,6 @@ public class LatinIME extends InputMethodService
> MIN_MILLIS_AFTER_TYPING_BEFORE_SWIPE;
}
- /*
- * Only trigger a swipe action if the user hasn't typed X millis before
- * now, and if they don't type Y millis after the swipe is detected. This
- * delays the onset of the swipe action by Y millis.
- */
- private void conservativelyTriggerSwipeAction(final Runnable action) {
- if (userHasNotTypedRecently()) {
- mSwipeTriggerTimeMillis = System.currentTimeMillis();
- mHandler.sendMessageDelayed(
- mHandler.obtainMessage(MSG_START_LISTENING_AFTER_SWIPE),
- MIN_MILLIS_AFTER_SWIPE_TO_WAIT_FOR_TYPING);
- }
- }
-
-
private void playKeyClick(int primaryCode) {
// if mAudioManager is null, we don't have the ringer state yet
// mAudioManager will be set by updateRingerMode
@@ -1759,18 +1768,28 @@ public class LatinIME extends InputMethodService
mUserDictionary.addWord(word, frequency);
}
+ WordComposer getCurrentWord() {
+ return mWord;
+ }
+
private void updateCorrectionMode() {
mHasDictionary = mSuggest != null ? mSuggest.hasMainDictionary() : false;
mAutoCorrectOn = (mAutoCorrectEnabled || mQuickFixes)
&& !mInputTypeNoAutoCorrect && mHasDictionary;
- mCorrectionMode = mAutoCorrectOn
+ mCorrectionMode = (mAutoCorrectOn && mAutoCorrectEnabled)
? Suggest.CORRECTION_FULL
- : (mQuickFixes ? Suggest.CORRECTION_BASIC : Suggest.CORRECTION_NONE);
+ : (mAutoCorrectOn ? Suggest.CORRECTION_BASIC : Suggest.CORRECTION_NONE);
if (mSuggest != null) {
mSuggest.setCorrectionMode(mCorrectionMode);
}
}
+ private void updateAutoTextEnabled(Locale systemLocale) {
+ if (mSuggest == null) return;
+ boolean different = !systemLocale.getLanguage().equalsIgnoreCase(mLocale.substring(0, 2));
+ mSuggest.setAutoTextEnabled(!different && mQuickFixes);
+ }
+
protected void launchSettings() {
launchSettings(LatinIMESettings.class);
}
@@ -1808,15 +1827,13 @@ public class LatinIME extends InputMethodService
mLocaleSupportedForVoiceInput = voiceInputSupportedLocales.contains(mLocale);
- // If there is no auto text data, then quickfix is forced to "on", so that the other options
- // will continue to work
-
- if (AutoText.getSize(mInputView) < 1) mQuickFixes = true;
- mShowSuggestions = sp.getBoolean(PREF_SHOW_SUGGESTIONS, true) & mQuickFixes;
+ mShowSuggestions = sp.getBoolean(PREF_SHOW_SUGGESTIONS, true);
if (VOICE_INSTALLED) {
- final String voiceMode = sp.getString(PREF_VOICE_MODE, "");
- boolean enableVoice = !voiceMode.equals(getString(R.string.voice_mode_off));
+ final String voiceMode = sp.getString(PREF_VOICE_MODE,
+ getString(R.string.voice_mode_main));
+ boolean enableVoice = !voiceMode.equals(getString(R.string.voice_mode_off))
+ && mEnableVoiceButton;
boolean voiceOnPrimary = voiceMode.equals(getString(R.string.voice_mode_main));
if (mKeyboardSwitcher != null &&
(enableVoice != mEnableVoice || voiceOnPrimary != mVoiceOnPrimary)) {
@@ -1828,6 +1845,7 @@ public class LatinIME extends InputMethodService
mAutoCorrectEnabled = sp.getBoolean(PREF_AUTO_COMPLETE,
mResources.getBoolean(R.bool.enable_autocorrect)) & mShowSuggestions;
updateCorrectionMode();
+ updateAutoTextEnabled(mResources.getConfiguration().locale);
mLanguageSwitcher.loadLocales(sp);
}
@@ -1932,38 +1950,4 @@ public class LatinIME extends InputMethodService
System.out.println("CPS = " + ((CPS_BUFFER_SIZE * 1000f) / total));
}
- class AutoDictionary extends ExpandableDictionary {
- // If the user touches a typed word 2 times or more, it will become valid.
- private static final int VALIDITY_THRESHOLD = 2 * FREQUENCY_FOR_PICKED;
- // If the user touches a typed word 5 times or more, it will be added to the user dict.
- private static final int PROMOTION_THRESHOLD = 4 * FREQUENCY_FOR_PICKED;
-
- public AutoDictionary(Context context) {
- super(context);
- }
-
- @Override
- public boolean isValidWord(CharSequence word) {
- final int frequency = getWordFrequency(word);
- return frequency >= VALIDITY_THRESHOLD;
- }
-
- @Override
- public void addWord(String word, int addFrequency) {
- final int length = word.length();
- // Don't add very short or very long words.
- if (length < 2 || length > getMaxWordLength()) return;
- if (mWord.isAutoCapitalized()) {
- // Remove caps before adding
- word = Character.toLowerCase(word.charAt(0))
- + word.substring(1);
- }
- int freq = getWordFrequency(word);
- freq = freq < 0 ? addFrequency : freq + addFrequency;
- super.addWord(word, freq);
- if (freq >= PROMOTION_THRESHOLD) {
- LatinIME.this.promoteToUserDictionary(word, FREQUENCY_FOR_AUTO_ADD);
- }
- }
- }
}
diff --git a/src/com/android/inputmethod/latin/LatinIMESettings.java b/src/com/android/inputmethod/latin/LatinIMESettings.java
index f87c56cfc..82f5d54b3 100644
--- a/src/com/android/inputmethod/latin/LatinIMESettings.java
+++ b/src/com/android/inputmethod/latin/LatinIMESettings.java
@@ -86,8 +86,6 @@ public class LatinIMESettings extends PreferenceActivity
if (autoTextSize < 1) {
((PreferenceGroup) findPreference(PREDICTION_SETTINGS_KEY))
.removePreference(mQuickFixes);
- } else {
- mShowSuggestions.setDependency(QUICK_FIXES_KEY);
}
if (!LatinIME.VOICE_INSTALLED
|| !RecognitionManager.isRecognitionAvailable(this)) {
diff --git a/src/com/android/inputmethod/latin/LatinKeyboard.java b/src/com/android/inputmethod/latin/LatinKeyboard.java
index 9b742a5f9..58e1dc767 100644
--- a/src/com/android/inputmethod/latin/LatinKeyboard.java
+++ b/src/com/android/inputmethod/latin/LatinKeyboard.java
@@ -69,7 +69,12 @@ public class LatinKeyboard extends Keyboard {
private Resources mRes;
private Context mContext;
private int mMode;
- private boolean mHasVoice;
+ // Whether this keyboard has voice icon on it
+ private boolean mHasVoiceButton;
+ // Whether voice icon is enabled at all
+ private boolean mVoiceEnabled;
+ private boolean mIsAlphaKeyboard;
+ private CharSequence m123Label;
private boolean mCurrentlyInSpace;
private SlidingLocaleDrawable mSlidingLocaleIcon;
private Rect mBounds = new Rect();
@@ -95,16 +100,15 @@ public class LatinKeyboard extends Keyboard {
static int sSpacebarVerticalCorrection;
public LatinKeyboard(Context context, int xmlLayoutResId) {
- this(context, xmlLayoutResId, 0, false);
+ this(context, xmlLayoutResId, 0);
}
- public LatinKeyboard(Context context, int xmlLayoutResId, int mode, boolean hasVoice) {
+ public LatinKeyboard(Context context, int xmlLayoutResId, int mode) {
super(context, xmlLayoutResId, mode);
final Resources res = context.getResources();
mContext = context;
mMode = mode;
mRes = res;
- mHasVoice = hasVoice;
mShiftLockIcon = res.getDrawable(R.drawable.sym_keyboard_shift_locked);
mShiftLockPreviewIcon = res.getDrawable(R.drawable.sym_keyboard_feedback_shift_locked);
mShiftLockPreviewIcon.setBounds(0, 0,
@@ -122,7 +126,7 @@ public class LatinKeyboard extends Keyboard {
setDefaultBounds(m123MicPreviewIcon);
sSpacebarVerticalCorrection = res.getDimensionPixelOffset(
R.dimen.spacebar_vertical_correction);
- setF1Key(xmlLayoutResId == R.xml.kbd_qwerty);
+ mIsAlphaKeyboard = xmlLayoutResId == R.xml.kbd_qwerty;
mSpaceKeyIndex = indexOf((int) ' ');
}
@@ -147,6 +151,7 @@ public class LatinKeyboard extends Keyboard {
break;
case KEYCODE_MODE_CHANGE:
m123Key = key;
+ m123Label = key.label;
break;
}
return key;
@@ -284,23 +289,36 @@ public class LatinKeyboard extends Keyboard {
drawable.setBounds(0, 0, drawable.getIntrinsicWidth(), drawable.getIntrinsicHeight());
}
- private void setF1Key(boolean isAlphaKeyboard) {
+ public void setVoiceMode(boolean hasVoiceButton, boolean hasVoice) {
+ mHasVoiceButton = hasVoiceButton;
+ mVoiceEnabled = hasVoice;
+ updateF1Key();
+ }
+
+ private void updateF1Key() {
if (mF1Key == null) return;
- if (!mHasVoice) {
- mF1Key.label = ",";
- mF1Key.codes = new int[] { ',' };
- mF1Key.icon = null;
- mF1Key.iconPreview = null;
- if (isAlphaKeyboard && m123Key != null) {
+ if (m123Key != null && mIsAlphaKeyboard) {
+ if (mVoiceEnabled && !mHasVoiceButton) {
m123Key.icon = m123MicIcon;
m123Key.iconPreview = m123MicPreviewIcon;
m123Key.label = null;
+ } else {
+ m123Key.icon = null;
+ m123Key.iconPreview = null;
+ m123Key.label = m123Label;
}
- } else {
+ }
+
+ if (mHasVoiceButton && mVoiceEnabled) {
mF1Key.codes = new int[] { LatinKeyboardView.KEYCODE_VOICE };
mF1Key.label = null;
mF1Key.icon = mMicIcon;
mF1Key.iconPreview = mMicPreviewIcon;
+ } else {
+ mF1Key.label = ",";
+ mF1Key.codes = new int[] { ',' };
+ mF1Key.icon = null;
+ mF1Key.iconPreview = null;
}
}
diff --git a/src/com/android/inputmethod/latin/Suggest.java b/src/com/android/inputmethod/latin/Suggest.java
index e806dc59b..712b9cf37 100755
--- a/src/com/android/inputmethod/latin/Suggest.java
+++ b/src/com/android/inputmethod/latin/Suggest.java
@@ -194,7 +194,8 @@ public class Suggest implements Dictionary.WordCallback {
mContactsDictionary.getWords(wordComposer, this, mNextLettersFrequencies);
}
- if (mSuggestions.size() > 0 && isValidWord(mOriginalWord)) {
+ if (mSuggestions.size() > 0 && isValidWord(mOriginalWord)
+ && mCorrectionMode == CORRECTION_FULL) {
mHaveCorrection = true;
}
}
diff --git a/src/com/android/inputmethod/latin/UserDictionary.java b/src/com/android/inputmethod/latin/UserDictionary.java
index edd82aaa3..4b98eacce 100644
--- a/src/com/android/inputmethod/latin/UserDictionary.java
+++ b/src/com/android/inputmethod/latin/UserDictionary.java
@@ -21,9 +21,11 @@ import java.util.List;
import java.util.Locale;
import android.content.ContentResolver;
+import android.content.ContentValues;
import android.content.Context;
import android.database.ContentObserver;
import android.database.Cursor;
+import android.net.Uri;
import android.provider.UserDictionary.Words;
public class UserDictionary extends ExpandableDictionary {
@@ -40,9 +42,11 @@ public class UserDictionary extends ExpandableDictionary {
private ContentObserver mObserver;
private boolean mRequiresReload;
-
- public UserDictionary(Context context) {
+ private String mLocale;
+
+ public UserDictionary(Context context, String locale) {
super(context);
+ mLocale = locale;
// Perform a managed query. The Activity will handle closing and requerying the cursor
// when needed.
ContentResolver cres = context.getContentResolver();
@@ -67,7 +71,7 @@ public class UserDictionary extends ExpandableDictionary {
private synchronized void loadDictionary() {
Cursor cursor = getContext().getContentResolver()
.query(Words.CONTENT_URI, PROJECTION, "(locale IS NULL) or (locale=?)",
- new String[] { Locale.getDefault().toString() }, null);
+ new String[] { mLocale }, null);
addWords(cursor);
mRequiresReload = false;
}
@@ -88,7 +92,14 @@ public class UserDictionary extends ExpandableDictionary {
super.addWord(word, frequency);
- Words.addWord(getContext(), word, frequency, Words.LOCALE_TYPE_CURRENT);
+ // Update the user dictionary provider
+ ContentValues values = new ContentValues(5);
+ values.put(Words.WORD, word);
+ values.put(Words.FREQUENCY, frequency);
+ values.put(Words.LOCALE, mLocale);
+ values.put(Words.APP_ID, 0);
+
+ getContext().getContentResolver().insert(Words.CONTENT_URI, values);
// In case the above does a synchronous callback of the change observer
mRequiresReload = false;
}