diff options
author | rsadam <rsadam@chromium.org> | 2015-04-20 11:25:24 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-04-20 18:26:31 +0000 |
commit | b3efffd4585afdd0683c55638e87eb6f9c928da8 (patch) | |
tree | 472af90c740c36d646bb07a8542b085c43d10da5 /third_party/google_input_tools | |
parent | 4f89cad4240a30e0dcb6af5c474697e91a4a074c (diff) | |
download | chromium_src-b3efffd4585afdd0683c55638e87eb6f9c928da8.zip chromium_src-b3efffd4585afdd0683c55638e87eb6f9c928da8.tar.gz chromium_src-b3efffd4585afdd0683c55638e87eb6f9c928da8.tar.bz2 |
Update Google Input Tools.
BUG=450050
Review URL: https://codereview.chromium.org/1097943003
Cr-Commit-Position: refs/heads/master@{#325881}
Diffstat (limited to 'third_party/google_input_tools')
113 files changed, 1140 insertions, 661 deletions
diff --git a/third_party/google_input_tools/README.chromium b/third_party/google_input_tools/README.chromium index fd2da1b..2bfd588 100644 --- a/third_party/google_input_tools/README.chromium +++ b/third_party/google_input_tools/README.chromium @@ -1,8 +1,8 @@ Name: Google Input Tools Short Name: google_input_tools URL: https://github.com/googlei18n/google-input-tools.git -Version: 1.0.4.3 -Revision: @3730e096a782f1c74a3db0831aff63fb74540b97 +Version: 1.0.4.5 +Revision: @69d9e3a716c6e2f67d4a75f3bba61b5f1bbebc74 License: Apache 2.0 License File: LICENSE Security Critical: yes diff --git a/third_party/google_input_tools/inputview.gypi b/third_party/google_input_tools/inputview.gypi index 0200158..0c824f7 100644 --- a/third_party/google_input_tools/inputview.gypi +++ b/third_party/google_input_tools/inputview.gypi @@ -57,6 +57,7 @@ 'src/chrome/os/inputview/elements/content/selectview.js', 'src/chrome/os/inputview/elements/content/softkey.js', 'src/chrome/os/inputview/elements/content/spacekey.js', + 'src/chrome/os/inputview/elements/content/spanelement.js', 'src/chrome/os/inputview/elements/content/swipeview.js', 'src/chrome/os/inputview/elements/content/switcherkey.js', 'src/chrome/os/inputview/elements/content/tabbarkey.js', @@ -92,6 +93,7 @@ 'src/chrome/os/inputview/layouts/material/rowsof101.js', 'src/chrome/os/inputview/layouts/material/rowsof102.js', 'src/chrome/os/inputview/layouts/material/rowsofcompact.js', + 'src/chrome/os/inputview/layouts/material/rowsofjp.js', 'src/chrome/os/inputview/layouts/material/spacerow.js', 'src/chrome/os/inputview/layouts/material/util.js', 'src/chrome/os/inputview/layouts/rowsof101.js', diff --git a/third_party/google_input_tools/src/chrome/os/common.js b/third_party/google_input_tools/src/chrome/os/common.js index 76b23ba..dd26b92 100644 --- a/third_party/google_input_tools/src/chrome/os/common.js +++ b/third_party/google_input_tools/src/chrome/os/common.js @@ -32,6 +32,7 @@ i18n.input.chrome.MessageKey = { CORRECTION: 'correction', DELETE: 'delete', ENABLE_USER_DICT: 'enable_user_dict', + ENTRIES: 'entries', FREQUENCY: 'frequency', FUZZY_PAIRS: 'fuzzy_pairs', HIGHLIGHT: 'highlight', @@ -44,7 +45,9 @@ i18n.input.chrome.MessageKey = { SELECT: 'select', SELECT_HIGHLIGHT: 'select_highlight', SOURCE: 'source', - UPDATE_ALL: 'update_all' + TARGET: 'target', + UPDATE_ALL: 'update_all', + USER_DICT: 'user_dict' }; diff --git a/third_party/google_input_tools/src/chrome/os/inputview/_locales/am/messages.json b/third_party/google_input_tools/src/chrome/os/inputview/_locales/am/messages.json index b82e32e..ffcd44e 100644 --- a/third_party/google_input_tools/src/chrome/os/inputview/_locales/am/messages.json +++ b/third_party/google_input_tools/src/chrome/os/inputview/_locales/am/messages.json @@ -1,12 +1,12 @@ { "add_to_dictionary": { - "message": "Add to dictionary" + "message": "\u12c8\u12f0 \u1218\u12dd\u1308\u1260-\u1243\u120b\u1275 \u12a0\u12ad\u120d" }, "add_to_personal_dictionary": { "message": "\u12c8\u12f0 \u12e8\u130d\u120d \u1218\u12dd\u1308\u1260 \u1243\u120b\u1275 \u12a0\u12ad\u120d" }, "add_word_to_dictionary": { - "message": "Add \"$1\" to dictionary", + "message": "$1/}\u00bb\u1295 \u12c8\u12f0 \u1218\u12dd\u1308\u1260-\u1243\u120b\u1275 \u12a0\u12ad\u120d", "placeholders": { "1": { "content": "$1" diff --git a/third_party/google_input_tools/src/chrome/os/inputview/_locales/ar/messages.json b/third_party/google_input_tools/src/chrome/os/inputview/_locales/ar/messages.json index aa6f3ff..b30bcb49 100644 --- a/third_party/google_input_tools/src/chrome/os/inputview/_locales/ar/messages.json +++ b/third_party/google_input_tools/src/chrome/os/inputview/_locales/ar/messages.json @@ -1,12 +1,12 @@ { "add_to_dictionary": { - "message": "Add to dictionary" + "message": "\u0625\u0636\u0627\u0641\u0629 \u0625\u0644\u0649 \u0627\u0644\u0642\u0627\u0645\u0648\u0633" }, "add_to_personal_dictionary": { "message": "\u0627\u0644\u0625\u0636\u0627\u0641\u0629 \u0625\u0644\u0649 \u0627\u0644\u0642\u0627\u0645\u0648\u0633 \u0627\u0644\u0634\u062e\u0635\u064a" }, "add_word_to_dictionary": { - "message": "Add \"$1\" to dictionary", + "message": "\u0625\u0636\u0627\u0641\u0629 \"$1\" \u0625\u0644\u0649 \u0627\u0644\u0642\u0627\u0645\u0648\u0633", "placeholders": { "1": { "content": "$1" diff --git a/third_party/google_input_tools/src/chrome/os/inputview/_locales/bg/messages.json b/third_party/google_input_tools/src/chrome/os/inputview/_locales/bg/messages.json index 29a2089..ff86b93 100644 --- a/third_party/google_input_tools/src/chrome/os/inputview/_locales/bg/messages.json +++ b/third_party/google_input_tools/src/chrome/os/inputview/_locales/bg/messages.json @@ -1,12 +1,12 @@ { "add_to_dictionary": { - "message": "Add to dictionary" + "message": "\u0414\u043e\u0431\u0430\u0432\u044f\u043d\u0435 \u043a\u044a\u043c \u0440\u0435\u0447\u043d\u0438\u043a\u0430" }, "add_to_personal_dictionary": { "message": "\u0414\u043e\u0431\u0430\u0432\u044f\u043d\u0435 \u043a\u044a\u043c \u043b\u0438\u0447\u043d\u0438\u044f \u0440\u0435\u0447\u043d\u0438\u043a" }, "add_word_to_dictionary": { - "message": "Add \"$1\" to dictionary", + "message": "\u0414\u043e\u0431\u0430\u0432\u044f\u043d\u0435 \u043d\u0430 \u201e$1\u201c \u043a\u044a\u043c \u0440\u0435\u0447\u043d\u0438\u043a\u0430", "placeholders": { "1": { "content": "$1" diff --git a/third_party/google_input_tools/src/chrome/os/inputview/_locales/bn/messages.json b/third_party/google_input_tools/src/chrome/os/inputview/_locales/bn/messages.json index 1dd6979..bfbc91b 100644 --- a/third_party/google_input_tools/src/chrome/os/inputview/_locales/bn/messages.json +++ b/third_party/google_input_tools/src/chrome/os/inputview/_locales/bn/messages.json @@ -1,12 +1,12 @@ { "add_to_dictionary": { - "message": "Add to dictionary" + "message": "\u0985\u09ad\u09bf\u09a7\u09be\u09a8\u09c7 \u09af\u09c1\u0995\u09cd\u09a4 \u0995\u09b0\u09c1\u09a8" }, "add_to_personal_dictionary": { "message": "\u09ac\u09cd\u09af\u0995\u09cd\u09a4\u09bf\u0997\u09a4 \u0985\u09ad\u09bf\u09a7\u09be\u09a8\u09c7 \u09af\u09cb\u0997 \u0995\u09b0\u09c1\u09a8" }, "add_word_to_dictionary": { - "message": "Add \"$1\" to dictionary", + "message": "\u0985\u09ad\u09bf\u09a7\u09be\u09a8\u09c7 \"$1\" \u09af\u09c1\u0995\u09cd\u09a4 \u0995\u09b0\u09c1\u09a8", "placeholders": { "1": { "content": "$1" diff --git a/third_party/google_input_tools/src/chrome/os/inputview/_locales/ca/messages.json b/third_party/google_input_tools/src/chrome/os/inputview/_locales/ca/messages.json index 43e2658..50ececd 100644 --- a/third_party/google_input_tools/src/chrome/os/inputview/_locales/ca/messages.json +++ b/third_party/google_input_tools/src/chrome/os/inputview/_locales/ca/messages.json @@ -1,12 +1,12 @@ { "add_to_dictionary": { - "message": "Add to dictionary" + "message": "Afegeix al diccionari" }, "add_to_personal_dictionary": { "message": "Afegeix al diccionari personal" }, "add_word_to_dictionary": { - "message": "Add \"$1\" to dictionary", + "message": "Afegeix \"$1\" al diccionari", "placeholders": { "1": { "content": "$1" diff --git a/third_party/google_input_tools/src/chrome/os/inputview/_locales/cs/messages.json b/third_party/google_input_tools/src/chrome/os/inputview/_locales/cs/messages.json index a2979c4..3cacf2e 100644 --- a/third_party/google_input_tools/src/chrome/os/inputview/_locales/cs/messages.json +++ b/third_party/google_input_tools/src/chrome/os/inputview/_locales/cs/messages.json @@ -1,12 +1,12 @@ { "add_to_dictionary": { - "message": "Add to dictionary" + "message": "P\u0159idat do slovn\u00edku" }, "add_to_personal_dictionary": { "message": "P\u0159idat do osobn\u00edho slovn\u00edku" }, "add_word_to_dictionary": { - "message": "Add \"$1\" to dictionary", + "message": "P\u0159idat slovo \u201e$1\u201c do slovn\u00edku", "placeholders": { "1": { "content": "$1" diff --git a/third_party/google_input_tools/src/chrome/os/inputview/_locales/da/messages.json b/third_party/google_input_tools/src/chrome/os/inputview/_locales/da/messages.json index 4909559..4f4a43d 100644 --- a/third_party/google_input_tools/src/chrome/os/inputview/_locales/da/messages.json +++ b/third_party/google_input_tools/src/chrome/os/inputview/_locales/da/messages.json @@ -1,12 +1,12 @@ { "add_to_dictionary": { - "message": "Add to dictionary" + "message": "F\u00f8j til ordbogen" }, "add_to_personal_dictionary": { "message": "F\u00f8j til personlig ordbog" }, "add_word_to_dictionary": { - "message": "Add \"$1\" to dictionary", + "message": "F\u00f8j \"$1\" til ordbogen", "placeholders": { "1": { "content": "$1" diff --git a/third_party/google_input_tools/src/chrome/os/inputview/_locales/de/messages.json b/third_party/google_input_tools/src/chrome/os/inputview/_locales/de/messages.json index 6eb4105..15fc7f0 100644 --- a/third_party/google_input_tools/src/chrome/os/inputview/_locales/de/messages.json +++ b/third_party/google_input_tools/src/chrome/os/inputview/_locales/de/messages.json @@ -1,12 +1,12 @@ { "add_to_dictionary": { - "message": "Add to dictionary" + "message": "Zum W\u00f6rterbuch hinzuf\u00fcgen" }, "add_to_personal_dictionary": { "message": "In pers\u00f6nliches W\u00f6rterbuch aufnehmen" }, "add_word_to_dictionary": { - "message": "Add \"$1\" to dictionary", + "message": "\"$1\" zum W\u00f6rterbuch hinzuf\u00fcgen", "placeholders": { "1": { "content": "$1" diff --git a/third_party/google_input_tools/src/chrome/os/inputview/_locales/el/messages.json b/third_party/google_input_tools/src/chrome/os/inputview/_locales/el/messages.json index c370b02..6b55a33 100644 --- a/third_party/google_input_tools/src/chrome/os/inputview/_locales/el/messages.json +++ b/third_party/google_input_tools/src/chrome/os/inputview/_locales/el/messages.json @@ -1,12 +1,12 @@ { "add_to_dictionary": { - "message": "Add to dictionary" + "message": "\u03a0\u03c1\u03bf\u03c3\u03b8\u03ae\u03ba\u03b7 \u03c3\u03c4\u03bf \u03bb\u03b5\u03be\u03b9\u03ba\u03cc" }, "add_to_personal_dictionary": { "message": "\u03a0\u03c1\u03bf\u03c3\u03b8\u03ae\u03ba\u03b7 \u03c3\u03c4\u03bf \u03c0\u03c1\u03bf\u03c3\u03c9\u03c0\u03b9\u03ba\u03cc \u03bb\u03b5\u03be\u03b9\u03ba\u03cc" }, "add_word_to_dictionary": { - "message": "Add \"$1\" to dictionary", + "message": "\u03a0\u03c1\u03bf\u03c3\u03b8\u03ae\u03ba\u03b7 \u03c4\u03b7\u03c2 \u03bb\u03ad\u03be\u03b7\u03c2 \"$1\" \u03c3\u03c4\u03bf \u03bb\u03b5\u03be\u03b9\u03ba\u03cc", "placeholders": { "1": { "content": "$1" diff --git a/third_party/google_input_tools/src/chrome/os/inputview/_locales/es/messages.json b/third_party/google_input_tools/src/chrome/os/inputview/_locales/es/messages.json index 4752099..901b980 100644 --- a/third_party/google_input_tools/src/chrome/os/inputview/_locales/es/messages.json +++ b/third_party/google_input_tools/src/chrome/os/inputview/_locales/es/messages.json @@ -1,12 +1,12 @@ { "add_to_dictionary": { - "message": "Add to dictionary" + "message": "A\u00f1adir al diccionario" }, "add_to_personal_dictionary": { "message": "A\u00f1adir a diccionario personal" }, "add_word_to_dictionary": { - "message": "Add \"$1\" to dictionary", + "message": "A\u00f1adir \"$1\" al diccionario", "placeholders": { "1": { "content": "$1" @@ -2591,7 +2591,7 @@ "message": "cambiar a emoji" }, "footer_handwriting_button": { - "message": "cambiar a escritura t\u00e1ctil" + "message": "cambiar a escritura a mano" }, "footer_settings_button": { "message": "abrir la configuraci\u00f3n del m\u00e9todo de entrada" @@ -2624,7 +2624,7 @@ "message": "Atr\u00e1s" }, "handwriting_netowrk_error": { - "message": "No se puede utilizar la escritura t\u00e1ctil porque la red no est\u00e1 disponible." + "message": "No se puede utilizar la escritura a mano porque la red no est\u00e1 disponible." }, "handwriting_privacy_info": { "message": "Tu entrada se enviar\u00e1 a los servidores de Google para reconocer el texto." diff --git a/third_party/google_input_tools/src/chrome/os/inputview/_locales/es_419/messages.json b/third_party/google_input_tools/src/chrome/os/inputview/_locales/es_419/messages.json index c155f54..fa8d1fb 100644 --- a/third_party/google_input_tools/src/chrome/os/inputview/_locales/es_419/messages.json +++ b/third_party/google_input_tools/src/chrome/os/inputview/_locales/es_419/messages.json @@ -1,12 +1,12 @@ { "add_to_dictionary": { - "message": "Add to dictionary" + "message": "Agregar al diccionario" }, "add_to_personal_dictionary": { "message": "Agregar a diccionario personal" }, "add_word_to_dictionary": { - "message": "Add \"$1\" to dictionary", + "message": "Agregar \"$1\" al diccionario", "placeholders": { "1": { "content": "$1" diff --git a/third_party/google_input_tools/src/chrome/os/inputview/_locales/et/messages.json b/third_party/google_input_tools/src/chrome/os/inputview/_locales/et/messages.json index 0bf2375..cc9c3af 100644 --- a/third_party/google_input_tools/src/chrome/os/inputview/_locales/et/messages.json +++ b/third_party/google_input_tools/src/chrome/os/inputview/_locales/et/messages.json @@ -1,12 +1,12 @@ { "add_to_dictionary": { - "message": "Add to dictionary" + "message": "Lisa s\u00f5nastikku" }, "add_to_personal_dictionary": { "message": "Isiklikku s\u00f5nastikku lisamine" }, "add_word_to_dictionary": { - "message": "Add \"$1\" to dictionary", + "message": "Lisa \u201e$1\u201d s\u00f5nastikku", "placeholders": { "1": { "content": "$1" diff --git a/third_party/google_input_tools/src/chrome/os/inputview/_locales/fa/messages.json b/third_party/google_input_tools/src/chrome/os/inputview/_locales/fa/messages.json index 53ff97e..37ddcce 100644 --- a/third_party/google_input_tools/src/chrome/os/inputview/_locales/fa/messages.json +++ b/third_party/google_input_tools/src/chrome/os/inputview/_locales/fa/messages.json @@ -1,12 +1,12 @@ { "add_to_dictionary": { - "message": "Add to dictionary" + "message": "\u0627\u0641\u0632\u0648\u062f\u0646 \u0628\u0647 \u0641\u0631\u0647\u0646\u06af \u0644\u063a\u062a" }, "add_to_personal_dictionary": { "message": "\u0627\u0641\u0632\u0648\u062f\u0646 \u0628\u0647 \u0641\u0631\u0647\u0646\u06af \u0644\u063a\u062a \u0634\u062e\u0635\u06cc" }, "add_word_to_dictionary": { - "message": "Add \"$1\" to dictionary", + "message": "\u0627\u0641\u0632\u0648\u062f\u0646 \u00ab$1\u00bb \u0628\u0647 \u0641\u0631\u0647\u0646\u06af \u0644\u063a\u062a", "placeholders": { "1": { "content": "$1" diff --git a/third_party/google_input_tools/src/chrome/os/inputview/_locales/fi/messages.json b/third_party/google_input_tools/src/chrome/os/inputview/_locales/fi/messages.json index 5ac5966..5a599cb 100644 --- a/third_party/google_input_tools/src/chrome/os/inputview/_locales/fi/messages.json +++ b/third_party/google_input_tools/src/chrome/os/inputview/_locales/fi/messages.json @@ -1,12 +1,12 @@ { "add_to_dictionary": { - "message": "Add to dictionary" + "message": "Lis\u00e4\u00e4 sanakirjaan" }, "add_to_personal_dictionary": { "message": "Lis\u00e4\u00e4 omaan sanakirjaan" }, "add_word_to_dictionary": { - "message": "Add \"$1\" to dictionary", + "message": "Lis\u00e4\u00e4 $1 sanakirjaan", "placeholders": { "1": { "content": "$1" diff --git a/third_party/google_input_tools/src/chrome/os/inputview/_locales/fil/messages.json b/third_party/google_input_tools/src/chrome/os/inputview/_locales/fil/messages.json index 962a93d..8238ec1 100644 --- a/third_party/google_input_tools/src/chrome/os/inputview/_locales/fil/messages.json +++ b/third_party/google_input_tools/src/chrome/os/inputview/_locales/fil/messages.json @@ -1,12 +1,12 @@ { "add_to_dictionary": { - "message": "Add to dictionary" + "message": "Idagdag sa diksyunaryo" }, "add_to_personal_dictionary": { "message": "Idagdag sa personal na diksyunaryo" }, "add_word_to_dictionary": { - "message": "Add \"$1\" to dictionary", + "message": "Idagdag ang \"$1\" sa diksyunaryo", "placeholders": { "1": { "content": "$1" diff --git a/third_party/google_input_tools/src/chrome/os/inputview/_locales/fr/messages.json b/third_party/google_input_tools/src/chrome/os/inputview/_locales/fr/messages.json index e42bb10..f831938 100644 --- a/third_party/google_input_tools/src/chrome/os/inputview/_locales/fr/messages.json +++ b/third_party/google_input_tools/src/chrome/os/inputview/_locales/fr/messages.json @@ -1,12 +1,12 @@ { "add_to_dictionary": { - "message": "Add to dictionary" + "message": "Ajouter au dictionnaire" }, "add_to_personal_dictionary": { "message": "Ajouter au dictionnaire personnel" }, "add_word_to_dictionary": { - "message": "Add \"$1\" to dictionary", + "message": "Ajouter \"$1\" au dictionnaire", "placeholders": { "1": { "content": "$1" diff --git a/third_party/google_input_tools/src/chrome/os/inputview/_locales/gu/messages.json b/third_party/google_input_tools/src/chrome/os/inputview/_locales/gu/messages.json index e835037..f1c6560 100644 --- a/third_party/google_input_tools/src/chrome/os/inputview/_locales/gu/messages.json +++ b/third_party/google_input_tools/src/chrome/os/inputview/_locales/gu/messages.json @@ -1,12 +1,12 @@ { "add_to_dictionary": { - "message": "Add to dictionary" + "message": "\u0ab6\u0aac\u0acd\u0aa6\u0a95\u0acb\u0ab6\u0aae\u0abe\u0a82 \u0a89\u0aae\u0ac7\u0ab0\u0acb" }, "add_to_personal_dictionary": { "message": "\u0ab5\u0acd\u0aaf\u0a95\u0acd\u0aa4\u0abf\u0a97\u0aa4 \u0ab6\u0aac\u0acd\u0aa6\u0a95\u0acb\u0ab6\u0aae\u0abe\u0a82 \u0a89\u0aae\u0ac7\u0ab0\u0acb" }, "add_word_to_dictionary": { - "message": "Add \"$1\" to dictionary", + "message": "\"$1\" \u0aa8\u0ac7 \u0ab6\u0aac\u0acd\u0aa6\u0a95\u0acb\u0ab6\u0aae\u0abe\u0a82 \u0a89\u0aae\u0ac7\u0ab0\u0acb", "placeholders": { "1": { "content": "$1" diff --git a/third_party/google_input_tools/src/chrome/os/inputview/_locales/hi/messages.json b/third_party/google_input_tools/src/chrome/os/inputview/_locales/hi/messages.json index 575ff9e..bf488e7 100644 --- a/third_party/google_input_tools/src/chrome/os/inputview/_locales/hi/messages.json +++ b/third_party/google_input_tools/src/chrome/os/inputview/_locales/hi/messages.json @@ -1,12 +1,12 @@ { "add_to_dictionary": { - "message": "Add to dictionary" + "message": "\u0936\u092c\u094d\u0926\u0915\u094b\u0936 \u092e\u0947\u0902 \u091c\u094b\u0921\u093c\u0947\u0902" }, "add_to_personal_dictionary": { "message": "\u0935\u094d\u092f\u0915\u094d\u0924\u093f\u0917\u0924 \u0936\u092c\u094d\u0926\u0915\u094b\u0936 \u092e\u0947\u0902 \u091c\u094b\u0921\u093c\u0947\u0902" }, "add_word_to_dictionary": { - "message": "Add \"$1\" to dictionary", + "message": "\"$1\" \u0915\u094b \u0936\u092c\u094d\u200d\u0926\u0915\u094b\u0936 \u092e\u0947\u0902 \u091c\u094b\u0921\u093c\u0947\u0902", "placeholders": { "1": { "content": "$1" diff --git a/third_party/google_input_tools/src/chrome/os/inputview/_locales/hr/messages.json b/third_party/google_input_tools/src/chrome/os/inputview/_locales/hr/messages.json index 3ef1a46..7b64100 100644 --- a/third_party/google_input_tools/src/chrome/os/inputview/_locales/hr/messages.json +++ b/third_party/google_input_tools/src/chrome/os/inputview/_locales/hr/messages.json @@ -1,12 +1,12 @@ { "add_to_dictionary": { - "message": "Add to dictionary" + "message": "Dodaj u rje\u010dnik" }, "add_to_personal_dictionary": { "message": "Dodaj u osobni rje\u010dnik" }, "add_word_to_dictionary": { - "message": "Add \"$1\" to dictionary", + "message": "Dodaj \"$1\" u rje\u010dnik", "placeholders": { "1": { "content": "$1" diff --git a/third_party/google_input_tools/src/chrome/os/inputview/_locales/hu/messages.json b/third_party/google_input_tools/src/chrome/os/inputview/_locales/hu/messages.json index f0e846c..630cbca 100644 --- a/third_party/google_input_tools/src/chrome/os/inputview/_locales/hu/messages.json +++ b/third_party/google_input_tools/src/chrome/os/inputview/_locales/hu/messages.json @@ -1,12 +1,12 @@ { "add_to_dictionary": { - "message": "Add to dictionary" + "message": "Hozz\u00e1ad\u00e1s a sz\u00f3t\u00e1rhoz" }, "add_to_personal_dictionary": { "message": "Hozz\u00e1ad\u00e1s a szem\u00e9lyes sz\u00f3t\u00e1rhoz" }, "add_word_to_dictionary": { - "message": "Add \"$1\" to dictionary", + "message": "$1/}\u201d hozz\u00e1ad\u00e1sa a sz\u00f3t\u00e1rhoz", "placeholders": { "1": { "content": "$1" diff --git a/third_party/google_input_tools/src/chrome/os/inputview/_locales/id/messages.json b/third_party/google_input_tools/src/chrome/os/inputview/_locales/id/messages.json index ecc8685..f32d96e 100644 --- a/third_party/google_input_tools/src/chrome/os/inputview/_locales/id/messages.json +++ b/third_party/google_input_tools/src/chrome/os/inputview/_locales/id/messages.json @@ -1,12 +1,12 @@ { "add_to_dictionary": { - "message": "Add to dictionary" + "message": "Tambahkan ke kamus" }, "add_to_personal_dictionary": { "message": "Tambahkan ke kamus pribadi" }, "add_word_to_dictionary": { - "message": "Add \"$1\" to dictionary", + "message": "Tambah \"$1\" ke kamus", "placeholders": { "1": { "content": "$1" diff --git a/third_party/google_input_tools/src/chrome/os/inputview/_locales/it/messages.json b/third_party/google_input_tools/src/chrome/os/inputview/_locales/it/messages.json index f17f4f7..53b7a58 100644 --- a/third_party/google_input_tools/src/chrome/os/inputview/_locales/it/messages.json +++ b/third_party/google_input_tools/src/chrome/os/inputview/_locales/it/messages.json @@ -1,12 +1,12 @@ { "add_to_dictionary": { - "message": "Add to dictionary" + "message": "Aggiungi al dizionario" }, "add_to_personal_dictionary": { "message": "Aggiungi al dizionario personale" }, "add_word_to_dictionary": { - "message": "Add \"$1\" to dictionary", + "message": "Aggiungi \"$1\" al dizionario", "placeholders": { "1": { "content": "$1" diff --git a/third_party/google_input_tools/src/chrome/os/inputview/_locales/iw/messages.json b/third_party/google_input_tools/src/chrome/os/inputview/_locales/iw/messages.json index 6766b24..a1bca37 100644 --- a/third_party/google_input_tools/src/chrome/os/inputview/_locales/iw/messages.json +++ b/third_party/google_input_tools/src/chrome/os/inputview/_locales/iw/messages.json @@ -1,12 +1,12 @@ { "add_to_dictionary": { - "message": "Add to dictionary" + "message": "\u05d4\u05d5\u05e1\u05e3 \u05dc\u05de\u05d9\u05dc\u05d5\u05df" }, "add_to_personal_dictionary": { "message": "\u05d4\u05d5\u05e1\u05e3 \u05dc\u05de\u05d9\u05dc\u05d5\u05df \u05d4\u05d0\u05d9\u05e9\u05d9" }, "add_word_to_dictionary": { - "message": "Add \"$1\" to dictionary", + "message": "\u05d4\u05d5\u05e1\u05e3 \u05d0\u05ea \"$1\" \u05dc\u05de\u05d9\u05dc\u05d5\u05df", "placeholders": { "1": { "content": "$1" diff --git a/third_party/google_input_tools/src/chrome/os/inputview/_locales/ja/messages.json b/third_party/google_input_tools/src/chrome/os/inputview/_locales/ja/messages.json index 8642a18..a8d9871 100644 --- a/third_party/google_input_tools/src/chrome/os/inputview/_locales/ja/messages.json +++ b/third_party/google_input_tools/src/chrome/os/inputview/_locales/ja/messages.json @@ -1,12 +1,12 @@ { "add_to_dictionary": { - "message": "Add to dictionary" + "message": "\u8f9e\u66f8\u306b\u8ffd\u52a0" }, "add_to_personal_dictionary": { "message": "\u30e6\u30fc\u30b6\u30fc\u8f9e\u66f8\u306b\u8ffd\u52a0" }, "add_word_to_dictionary": { - "message": "Add \"$1\" to dictionary", + "message": "\u300c$1\u300d\u3092\u8f9e\u66f8\u306b\u8ffd\u52a0", "placeholders": { "1": { "content": "$1" diff --git a/third_party/google_input_tools/src/chrome/os/inputview/_locales/kn/messages.json b/third_party/google_input_tools/src/chrome/os/inputview/_locales/kn/messages.json index 92ccc91..fbd2ca8 100644 --- a/third_party/google_input_tools/src/chrome/os/inputview/_locales/kn/messages.json +++ b/third_party/google_input_tools/src/chrome/os/inputview/_locales/kn/messages.json @@ -1,12 +1,12 @@ { "add_to_dictionary": { - "message": "Add to dictionary" + "message": "\u0ca8\u0cbf\u0c98\u0c82\u0c9f\u0cbf\u0c97\u0cc6 \u0cb8\u0cc6\u0cd5\u0cb0\u0cbf\u0cb8\u0cbf" }, "add_to_personal_dictionary": { "message": "\u0cb5\u0cc6\u0cd6\u0caf\u0c95\u0ccd\u0ca4\u0cbf\u0c95 \u0ca8\u0cbf\u0c98\u0c82\u0c9f\u0cbf\u0c97\u0cc6 \u0cb8\u0cc6\u0cd5\u0cb0\u0cbf\u0cb8\u0cbf" }, "add_word_to_dictionary": { - "message": "Add \"$1\" to dictionary", + "message": "\u0ca8\u0cbf\u0c98\u0c82\u0c9f\u0cbf\u0c97\u0cc6 \"$1\" \u0cb8\u0cc7\u0cb0\u0cbf\u0cb8\u0cbf", "placeholders": { "1": { "content": "$1" diff --git a/third_party/google_input_tools/src/chrome/os/inputview/_locales/ko/messages.json b/third_party/google_input_tools/src/chrome/os/inputview/_locales/ko/messages.json index 530fb28..bbd70bc 100644 --- a/third_party/google_input_tools/src/chrome/os/inputview/_locales/ko/messages.json +++ b/third_party/google_input_tools/src/chrome/os/inputview/_locales/ko/messages.json @@ -1,12 +1,12 @@ { "add_to_dictionary": { - "message": "Add to dictionary" + "message": "\uc0ac\uc804\uc5d0 \ucd94\uac00" }, "add_to_personal_dictionary": { "message": "\uac1c\uc778 \uc0ac\uc804\uc5d0 \ucd94\uac00" }, "add_word_to_dictionary": { - "message": "Add \"$1\" to dictionary", + "message": "\uc0ac\uc804\uc5d0 '$1' \ucd94\uac00", "placeholders": { "1": { "content": "$1" diff --git a/third_party/google_input_tools/src/chrome/os/inputview/_locales/lt/messages.json b/third_party/google_input_tools/src/chrome/os/inputview/_locales/lt/messages.json index 180a126..f49c089 100644 --- a/third_party/google_input_tools/src/chrome/os/inputview/_locales/lt/messages.json +++ b/third_party/google_input_tools/src/chrome/os/inputview/_locales/lt/messages.json @@ -1,12 +1,12 @@ { "add_to_dictionary": { - "message": "Add to dictionary" + "message": "Prid\u0117ti \u012f \u017eodyn\u0105" }, "add_to_personal_dictionary": { "message": "Prid\u0117ti prie asmeninio \u017eodyno" }, "add_word_to_dictionary": { - "message": "Add \"$1\" to dictionary", + "message": "Prid\u0117ti \u017eod\u012f \u201e$1\u201c \u012f \u017eodyn\u0105", "placeholders": { "1": { "content": "$1" diff --git a/third_party/google_input_tools/src/chrome/os/inputview/_locales/lv/messages.json b/third_party/google_input_tools/src/chrome/os/inputview/_locales/lv/messages.json index f5386c1..86c97d0 100644 --- a/third_party/google_input_tools/src/chrome/os/inputview/_locales/lv/messages.json +++ b/third_party/google_input_tools/src/chrome/os/inputview/_locales/lv/messages.json @@ -1,12 +1,12 @@ { "add_to_dictionary": { - "message": "Add to dictionary" + "message": "Pievienot v\u0101rdn\u012bcai" }, "add_to_personal_dictionary": { "message": "Pievienot personiskajai v\u0101rdn\u012bcai" }, "add_word_to_dictionary": { - "message": "Add \"$1\" to dictionary", + "message": "Pievienot \u201c$1\u201d v\u0101rdn\u012bcai", "placeholders": { "1": { "content": "$1" diff --git a/third_party/google_input_tools/src/chrome/os/inputview/_locales/ml/messages.json b/third_party/google_input_tools/src/chrome/os/inputview/_locales/ml/messages.json index cf3a69a..a273109 100644 --- a/third_party/google_input_tools/src/chrome/os/inputview/_locales/ml/messages.json +++ b/third_party/google_input_tools/src/chrome/os/inputview/_locales/ml/messages.json @@ -1,12 +1,12 @@ { "add_to_dictionary": { - "message": "Add to dictionary" + "message": "\u0d28\u0d3f\u0d18\u0d23\u0d4d\u0d1f\u0d41\u0d35\u0d3f\u0d7d \u0d1a\u0d47\u0d7c\u0d15\u0d4d\u0d15\u0d41\u0d15" }, "add_to_personal_dictionary": { "message": "\u0d35\u0d4d\u0d2f\u0d15\u0d4d\u0d24\u0d3f\u0d17\u0d24 \u0d28\u0d3f\u0d18\u0d23\u0d4d\u0d1f\u0d41\u0d35\u0d3f\u0d7d \u0d1a\u0d47\u0d7c\u0d15\u0d4d\u0d15\u0d41\u0d15" }, "add_word_to_dictionary": { - "message": "Add \"$1\" to dictionary", + "message": "\u0d28\u0d3f\u0d18\u0d23\u0d4d\u0d1f\u0d41\u0d35\u0d3f\u0d7d \"$1\"\u0d1a\u0d47\u0d7c\u0d15\u0d4d\u0d15\u0d41\u0d15", "placeholders": { "1": { "content": "$1" diff --git a/third_party/google_input_tools/src/chrome/os/inputview/_locales/mr/messages.json b/third_party/google_input_tools/src/chrome/os/inputview/_locales/mr/messages.json index 3b0f2ee..b38715d 100644 --- a/third_party/google_input_tools/src/chrome/os/inputview/_locales/mr/messages.json +++ b/third_party/google_input_tools/src/chrome/os/inputview/_locales/mr/messages.json @@ -1,12 +1,12 @@ { "add_to_dictionary": { - "message": "Add to dictionary" + "message": "\u0936\u092c\u094d\u0926\u0915\u094b\u0936\u093e\u0924 \u091c\u094b\u0921\u093e" }, "add_to_personal_dictionary": { "message": "\u0935\u0948\u092f\u0915\u094d\u0924\u093f\u0915 \u0936\u092c\u094d\u0926\u0915\u094b\u0936\u093e\u0924 \u091c\u094b\u0921\u093e" }, "add_word_to_dictionary": { - "message": "Add \"$1\" to dictionary", + "message": "\u0936\u092c\u094d\u0926\u0915\u094b\u0936\u093e\u0924 \"$1\" \u091c\u094b\u0921\u093e", "placeholders": { "1": { "content": "$1" diff --git a/third_party/google_input_tools/src/chrome/os/inputview/_locales/ms/messages.json b/third_party/google_input_tools/src/chrome/os/inputview/_locales/ms/messages.json index 8ed334b..72dc744 100644 --- a/third_party/google_input_tools/src/chrome/os/inputview/_locales/ms/messages.json +++ b/third_party/google_input_tools/src/chrome/os/inputview/_locales/ms/messages.json @@ -1,12 +1,12 @@ { "add_to_dictionary": { - "message": "Add to dictionary" + "message": "Tambahkan pada kamus" }, "add_to_personal_dictionary": { "message": "Tambahkan pada kamus peribadi" }, "add_word_to_dictionary": { - "message": "Add \"$1\" to dictionary", + "message": "Tambahkan \"$1\" pada kamus", "placeholders": { "1": { "content": "$1" diff --git a/third_party/google_input_tools/src/chrome/os/inputview/_locales/nb/messages.json b/third_party/google_input_tools/src/chrome/os/inputview/_locales/nb/messages.json index c987159..0820d45 100644 --- a/third_party/google_input_tools/src/chrome/os/inputview/_locales/nb/messages.json +++ b/third_party/google_input_tools/src/chrome/os/inputview/_locales/nb/messages.json @@ -1,12 +1,12 @@ { "add_to_dictionary": { - "message": "Add to dictionary" + "message": "Legg til i ordlisten" }, "add_to_personal_dictionary": { "message": "Legg til i den personlige ordboken" }, "add_word_to_dictionary": { - "message": "Add \"$1\" to dictionary", + "message": "Legg til \u00ab$1\u00bb i ordlisten", "placeholders": { "1": { "content": "$1" diff --git a/third_party/google_input_tools/src/chrome/os/inputview/_locales/nl/messages.json b/third_party/google_input_tools/src/chrome/os/inputview/_locales/nl/messages.json index 2c0bd4a..dd7a186 100644 --- a/third_party/google_input_tools/src/chrome/os/inputview/_locales/nl/messages.json +++ b/third_party/google_input_tools/src/chrome/os/inputview/_locales/nl/messages.json @@ -1,12 +1,12 @@ { "add_to_dictionary": { - "message": "Add to dictionary" + "message": "Toevoegen aan woordenboek" }, "add_to_personal_dictionary": { "message": "Toevoegen aan persoonlijk woordenboek" }, "add_word_to_dictionary": { - "message": "Add \"$1\" to dictionary", + "message": "$1 toevoegen aan woordenboek", "placeholders": { "1": { "content": "$1" diff --git a/third_party/google_input_tools/src/chrome/os/inputview/_locales/pl/messages.json b/third_party/google_input_tools/src/chrome/os/inputview/_locales/pl/messages.json index 6eaa2fd..35437dc 100644 --- a/third_party/google_input_tools/src/chrome/os/inputview/_locales/pl/messages.json +++ b/third_party/google_input_tools/src/chrome/os/inputview/_locales/pl/messages.json @@ -1,12 +1,12 @@ { "add_to_dictionary": { - "message": "Add to dictionary" + "message": "Dodaj do s\u0142ownika" }, "add_to_personal_dictionary": { "message": "Dodaj do s\u0142ownika osobistego" }, "add_word_to_dictionary": { - "message": "Add \"$1\" to dictionary", + "message": "Dodaj \u201e$1\u201d do s\u0142ownika", "placeholders": { "1": { "content": "$1" diff --git a/third_party/google_input_tools/src/chrome/os/inputview/_locales/pt_BR/messages.json b/third_party/google_input_tools/src/chrome/os/inputview/_locales/pt_BR/messages.json index 1f9c2f7..e94327f 100644 --- a/third_party/google_input_tools/src/chrome/os/inputview/_locales/pt_BR/messages.json +++ b/third_party/google_input_tools/src/chrome/os/inputview/_locales/pt_BR/messages.json @@ -1,12 +1,12 @@ { "add_to_dictionary": { - "message": "Add to dictionary" + "message": "Adicionar ao dicion\u00e1rio" }, "add_to_personal_dictionary": { "message": "Adicionar ao dicion\u00e1rio pessoal" }, "add_word_to_dictionary": { - "message": "Add \"$1\" to dictionary", + "message": "Adicionar \"$1\" ao dicion\u00e1rio", "placeholders": { "1": { "content": "$1" diff --git a/third_party/google_input_tools/src/chrome/os/inputview/_locales/pt_PT/messages.json b/third_party/google_input_tools/src/chrome/os/inputview/_locales/pt_PT/messages.json index 460d453..d5b33a6 100644 --- a/third_party/google_input_tools/src/chrome/os/inputview/_locales/pt_PT/messages.json +++ b/third_party/google_input_tools/src/chrome/os/inputview/_locales/pt_PT/messages.json @@ -1,12 +1,12 @@ { "add_to_dictionary": { - "message": "Add to dictionary" + "message": "Adicionar ao dicion\u00e1rio" }, "add_to_personal_dictionary": { "message": "Adicionar ao dicion\u00e1rio pessoal" }, "add_word_to_dictionary": { - "message": "Add \"$1\" to dictionary", + "message": "Adicionar \"$1\" ao dicion\u00e1rio", "placeholders": { "1": { "content": "$1" diff --git a/third_party/google_input_tools/src/chrome/os/inputview/_locales/ro/messages.json b/third_party/google_input_tools/src/chrome/os/inputview/_locales/ro/messages.json index d993b53..1493a1c 100644 --- a/third_party/google_input_tools/src/chrome/os/inputview/_locales/ro/messages.json +++ b/third_party/google_input_tools/src/chrome/os/inputview/_locales/ro/messages.json @@ -1,12 +1,12 @@ { "add_to_dictionary": { - "message": "Add to dictionary" + "message": "Adaug\u0103 \u00een dic\u021bionar" }, "add_to_personal_dictionary": { "message": "Adaug\u0103 \u00een dic\u021bionarul personal" }, "add_word_to_dictionary": { - "message": "Add \"$1\" to dictionary", + "message": "Adaug\u0103 \u201e$1\u201d \u00een dic\u021bionar", "placeholders": { "1": { "content": "$1" diff --git a/third_party/google_input_tools/src/chrome/os/inputview/_locales/ru/messages.json b/third_party/google_input_tools/src/chrome/os/inputview/_locales/ru/messages.json index c03c6e3..cbb3b94 100644 --- a/third_party/google_input_tools/src/chrome/os/inputview/_locales/ru/messages.json +++ b/third_party/google_input_tools/src/chrome/os/inputview/_locales/ru/messages.json @@ -1,12 +1,12 @@ { "add_to_dictionary": { - "message": "Add to dictionary" + "message": "\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0432 \u0441\u043b\u043e\u0432\u0430\u0440\u044c" }, "add_to_personal_dictionary": { "message": "\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0432 \u043f\u0435\u0440\u0441\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u0439 \u0441\u043b\u043e\u0432\u0430\u0440\u044c" }, "add_word_to_dictionary": { - "message": "Add \"$1\" to dictionary", + "message": "\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \"$1\" \u0432 \u0441\u043b\u043e\u0432\u0430\u0440\u044c", "placeholders": { "1": { "content": "$1" diff --git a/third_party/google_input_tools/src/chrome/os/inputview/_locales/sk/messages.json b/third_party/google_input_tools/src/chrome/os/inputview/_locales/sk/messages.json index a257ca2..8948cfb 100644 --- a/third_party/google_input_tools/src/chrome/os/inputview/_locales/sk/messages.json +++ b/third_party/google_input_tools/src/chrome/os/inputview/_locales/sk/messages.json @@ -1,12 +1,12 @@ { "add_to_dictionary": { - "message": "Add to dictionary" + "message": "Prida\u0165 do slovn\u00edka" }, "add_to_personal_dictionary": { "message": "Prida\u0165 do osobn\u00e9ho slovn\u00edka" }, "add_word_to_dictionary": { - "message": "Add \"$1\" to dictionary", + "message": "Prida\u0165 slovo \u201e$1\u201c do slovn\u00edka", "placeholders": { "1": { "content": "$1" @@ -2615,7 +2615,7 @@ "message": "prepn\u00fa\u0165 na predch\u00e1dzaj\u00facu kl\u00e1vesnicu" }, "got_it": { - "message": "Rozumiem" + "message": "Dobre" }, "gr_gre_settings_page": { "message": "Str\u00e1nka s nastaveniami gr\u00e9ckej kl\u00e1vesnice" diff --git a/third_party/google_input_tools/src/chrome/os/inputview/_locales/sl/messages.json b/third_party/google_input_tools/src/chrome/os/inputview/_locales/sl/messages.json index 7ef917f..52cc98c 100644 --- a/third_party/google_input_tools/src/chrome/os/inputview/_locales/sl/messages.json +++ b/third_party/google_input_tools/src/chrome/os/inputview/_locales/sl/messages.json @@ -1,12 +1,12 @@ { "add_to_dictionary": { - "message": "Add to dictionary" + "message": "Dodaj v slovar" }, "add_to_personal_dictionary": { "message": "Dodaj v osebni slovar" }, "add_word_to_dictionary": { - "message": "Add \"$1\" to dictionary", + "message": "Dodaj besedo \u00bb$1\u00ab v slovar", "placeholders": { "1": { "content": "$1" diff --git a/third_party/google_input_tools/src/chrome/os/inputview/_locales/sr/messages.json b/third_party/google_input_tools/src/chrome/os/inputview/_locales/sr/messages.json index 6341202..95e6e09 100644 --- a/third_party/google_input_tools/src/chrome/os/inputview/_locales/sr/messages.json +++ b/third_party/google_input_tools/src/chrome/os/inputview/_locales/sr/messages.json @@ -1,12 +1,12 @@ { "add_to_dictionary": { - "message": "Add to dictionary" + "message": "\u0414\u043e\u0434\u0430\u0458 \u0443 \u0440\u0435\u0447\u043d\u0438\u043a" }, "add_to_personal_dictionary": { "message": "\u0414\u043e\u0434\u0430\u0458 \u0443 \u043b\u0438\u0447\u043d\u0438 \u0440\u0435\u0447\u043d\u0438\u043a" }, "add_word_to_dictionary": { - "message": "Add \"$1\" to dictionary", + "message": "\u0414\u043e\u0434\u0430\u0458 \u201e$1\u201c \u0443 \u0440\u0435\u0447\u043d\u0438\u043a", "placeholders": { "1": { "content": "$1" diff --git a/third_party/google_input_tools/src/chrome/os/inputview/_locales/sv/messages.json b/third_party/google_input_tools/src/chrome/os/inputview/_locales/sv/messages.json index ab65ad0..426c5b5 100644 --- a/third_party/google_input_tools/src/chrome/os/inputview/_locales/sv/messages.json +++ b/third_party/google_input_tools/src/chrome/os/inputview/_locales/sv/messages.json @@ -1,12 +1,12 @@ { "add_to_dictionary": { - "message": "Add to dictionary" + "message": "L\u00e4gg till i ordlistan" }, "add_to_personal_dictionary": { "message": "L\u00e4gg till i personlig ordlista" }, "add_word_to_dictionary": { - "message": "Add \"$1\" to dictionary", + "message": "L\u00e4gg till $1 i ordlistan", "placeholders": { "1": { "content": "$1" diff --git a/third_party/google_input_tools/src/chrome/os/inputview/_locales/sw/messages.json b/third_party/google_input_tools/src/chrome/os/inputview/_locales/sw/messages.json index ff7aef5..f40a418 100644 --- a/third_party/google_input_tools/src/chrome/os/inputview/_locales/sw/messages.json +++ b/third_party/google_input_tools/src/chrome/os/inputview/_locales/sw/messages.json @@ -1,12 +1,12 @@ { "add_to_dictionary": { - "message": "Add to dictionary" + "message": "Kuongeza kwenye kamusi" }, "add_to_personal_dictionary": { "message": "Ongeza kwenye kamusi ya binafsi" }, "add_word_to_dictionary": { - "message": "Add \"$1\" to dictionary", + "message": "Kuongeza \"$1\" kwenye kamusi", "placeholders": { "1": { "content": "$1" diff --git a/third_party/google_input_tools/src/chrome/os/inputview/_locales/ta/messages.json b/third_party/google_input_tools/src/chrome/os/inputview/_locales/ta/messages.json index df116d6..e4568e3 100644 --- a/third_party/google_input_tools/src/chrome/os/inputview/_locales/ta/messages.json +++ b/third_party/google_input_tools/src/chrome/os/inputview/_locales/ta/messages.json @@ -1,12 +1,12 @@ { "add_to_dictionary": { - "message": "Add to dictionary" + "message": "\u0b85\u0b95\u0bb0\u0bbe\u0ba4\u0bbf\u0baf\u0bbf\u0bb2\u0bcd \u0b9a\u0bc7\u0bb0\u0bcd" }, "add_to_personal_dictionary": { "message": "\u0ba4\u0ba9\u0bbf\u0baa\u0bcd\u0baa\u0b9f\u0bcd\u0b9f \u0b85\u0b95\u0bb0\u0bbe\u0ba4\u0bbf\u0baf\u0bbf\u0bb2\u0bcd \u0b9a\u0bc7\u0bb0\u0bcd" }, "add_word_to_dictionary": { - "message": "Add \"$1\" to dictionary", + "message": "\u0b85\u0b95\u0bb0\u0bbe\u0ba4\u0bbf\u0baf\u0bbf\u0bb2\u0bcd \"$1\"\u0b90\u0b9a\u0bcd \u0b9a\u0bc7\u0bb0\u0bcd", "placeholders": { "1": { "content": "$1" diff --git a/third_party/google_input_tools/src/chrome/os/inputview/_locales/te/messages.json b/third_party/google_input_tools/src/chrome/os/inputview/_locales/te/messages.json index 6522e84..e81536c 100644 --- a/third_party/google_input_tools/src/chrome/os/inputview/_locales/te/messages.json +++ b/third_party/google_input_tools/src/chrome/os/inputview/_locales/te/messages.json @@ -1,12 +1,12 @@ { "add_to_dictionary": { - "message": "Add to dictionary" + "message": "\u0c28\u0c3f\u0c18\u0c02\u0c1f\u0c41\u0c35\u0c41\u0c15\u0c3f \u0c1c\u0c4b\u0c21\u0c3f\u0c02\u0c1a\u0c41" }, "add_to_personal_dictionary": { "message": "\u0c35\u0c4d\u0c2f\u0c15\u0c4d\u0c24\u0c3f\u0c17\u0c24 \u0c28\u0c3f\u0c18\u0c02\u0c1f\u0c41\u0c35\u0c41\u0c15\u0c3f \u0c1c\u0c4b\u0c21\u0c3f\u0c02\u0c1a\u0c02\u0c21\u0c3f" }, "add_word_to_dictionary": { - "message": "Add \"$1\" to dictionary", + "message": "\"$1\"\u0c28\u0c3f \u0c28\u0c3f\u0c18\u0c02\u0c1f\u0c41\u0c35\u0c41\u0c15\u0c3f \u0c1c\u0c4b\u0c21\u0c3f\u0c02\u0c1a\u0c41", "placeholders": { "1": { "content": "$1" diff --git a/third_party/google_input_tools/src/chrome/os/inputview/_locales/th/messages.json b/third_party/google_input_tools/src/chrome/os/inputview/_locales/th/messages.json index bc63285..4a30eaa 100644 --- a/third_party/google_input_tools/src/chrome/os/inputview/_locales/th/messages.json +++ b/third_party/google_input_tools/src/chrome/os/inputview/_locales/th/messages.json @@ -1,12 +1,12 @@ { "add_to_dictionary": { - "message": "Add to dictionary" + "message": "\u0e40\u0e1e\u0e34\u0e48\u0e21\u0e25\u0e07\u0e43\u0e19\u0e1e\u0e08\u0e19\u0e32\u0e19\u0e38\u0e01\u0e23\u0e21" }, "add_to_personal_dictionary": { "message": "\u0e40\u0e1e\u0e34\u0e48\u0e21\u0e44\u0e1b\u0e22\u0e31\u0e07\u0e1e\u0e08\u0e19\u0e32\u0e19\u0e38\u0e01\u0e23\u0e21\u0e2a\u0e48\u0e27\u0e19\u0e15\u0e31\u0e27" }, "add_word_to_dictionary": { - "message": "Add \"$1\" to dictionary", + "message": "\u0e40\u0e1e\u0e34\u0e48\u0e21 \"$1\" \u0e43\u0e19\u0e1e\u0e08\u0e19\u0e32\u0e19\u0e38\u0e01\u0e23\u0e21", "placeholders": { "1": { "content": "$1" diff --git a/third_party/google_input_tools/src/chrome/os/inputview/_locales/tr/messages.json b/third_party/google_input_tools/src/chrome/os/inputview/_locales/tr/messages.json index 70ed72f..6096b91 100644 --- a/third_party/google_input_tools/src/chrome/os/inputview/_locales/tr/messages.json +++ b/third_party/google_input_tools/src/chrome/os/inputview/_locales/tr/messages.json @@ -1,12 +1,12 @@ { "add_to_dictionary": { - "message": "Add to dictionary" + "message": "S\u00f6zl\u00fc\u011fe ekle" }, "add_to_personal_dictionary": { "message": "Ki\u015fisel s\u00f6zl\u00fc\u011fe ekle" }, "add_word_to_dictionary": { - "message": "Add \"$1\" to dictionary", + "message": "\"$1\" kelimesini s\u00f6zl\u00fc\u011fe ekle", "placeholders": { "1": { "content": "$1" diff --git a/third_party/google_input_tools/src/chrome/os/inputview/_locales/uk/messages.json b/third_party/google_input_tools/src/chrome/os/inputview/_locales/uk/messages.json index 82efa7c..7bb5c53 100644 --- a/third_party/google_input_tools/src/chrome/os/inputview/_locales/uk/messages.json +++ b/third_party/google_input_tools/src/chrome/os/inputview/_locales/uk/messages.json @@ -1,12 +1,12 @@ { "add_to_dictionary": { - "message": "Add to dictionary" + "message": "\u0414\u043e\u0434\u0430\u0442\u0438 \u0432 \u0441\u043b\u043e\u0432\u043d\u0438\u043a" }, "add_to_personal_dictionary": { "message": "\u0414\u043e\u0434\u0430\u0442\u0438 \u0432 \u043e\u0441\u043e\u0431\u0438\u0441\u0442\u0438\u0439 \u0441\u043b\u043e\u0432\u043d\u0438\u043a" }, "add_word_to_dictionary": { - "message": "Add \"$1\" to dictionary", + "message": "\u0414\u043e\u0434\u0430\u0442\u0438 \u0441\u043b\u043e\u0432\u043e \"$1\" \u0443 \u0441\u043b\u043e\u0432\u043d\u0438\u043a", "placeholders": { "1": { "content": "$1" diff --git a/third_party/google_input_tools/src/chrome/os/inputview/_locales/vi/messages.json b/third_party/google_input_tools/src/chrome/os/inputview/_locales/vi/messages.json index 87e0c14..810d5ab 100644 --- a/third_party/google_input_tools/src/chrome/os/inputview/_locales/vi/messages.json +++ b/third_party/google_input_tools/src/chrome/os/inputview/_locales/vi/messages.json @@ -1,12 +1,12 @@ { "add_to_dictionary": { - "message": "Add to dictionary" + "message": "Th\u00eam v\u00e0o t\u1eeb \u0111i\u1ec3n" }, "add_to_personal_dictionary": { "message": "Th\u00eam v\u00e0o t\u1eeb \u0111i\u1ec3n c\u00e1 nh\u00e2n" }, "add_word_to_dictionary": { - "message": "Add \"$1\" to dictionary", + "message": "Th\u00eam \"$1\" v\u00e0o t\u1eeb \u0111i\u1ec3n", "placeholders": { "1": { "content": "$1" diff --git a/third_party/google_input_tools/src/chrome/os/inputview/_locales/zh_CN/messages.json b/third_party/google_input_tools/src/chrome/os/inputview/_locales/zh_CN/messages.json index fd03bac..21e4318 100644 --- a/third_party/google_input_tools/src/chrome/os/inputview/_locales/zh_CN/messages.json +++ b/third_party/google_input_tools/src/chrome/os/inputview/_locales/zh_CN/messages.json @@ -1,12 +1,12 @@ { "add_to_dictionary": { - "message": "Add to dictionary" + "message": "\u6dfb\u52a0\u5230\u8bcd\u5178" }, "add_to_personal_dictionary": { "message": "\u6dfb\u52a0\u5230\u4e2a\u4eba\u5b57\u5178" }, "add_word_to_dictionary": { - "message": "Add \"$1\" to dictionary", + "message": "\u5c06\u201c$1\u201d\u6dfb\u52a0\u5230\u8bcd\u5178", "placeholders": { "1": { "content": "$1" diff --git a/third_party/google_input_tools/src/chrome/os/inputview/_locales/zh_TW/messages.json b/third_party/google_input_tools/src/chrome/os/inputview/_locales/zh_TW/messages.json index 6267714..a170ac4 100644 --- a/third_party/google_input_tools/src/chrome/os/inputview/_locales/zh_TW/messages.json +++ b/third_party/google_input_tools/src/chrome/os/inputview/_locales/zh_TW/messages.json @@ -1,12 +1,12 @@ { "add_to_dictionary": { - "message": "Add to dictionary" + "message": "\u65b0\u589e\u5230\u5b57\u5178" }, "add_to_personal_dictionary": { "message": "\u52a0\u5165\u500b\u4eba\u5b57\u5178" }, "add_word_to_dictionary": { - "message": "Add \"$1\" to dictionary", + "message": "\u5c07\u300c$1\u300d\u65b0\u589e\u5230\u5b57\u5178", "placeholders": { "1": { "content": "$1" diff --git a/third_party/google_input_tools/src/chrome/os/inputview/adapter.js b/third_party/google_input_tools/src/chrome/os/inputview/adapter.js index 3c3eaaa..e35250c 100644 --- a/third_party/google_input_tools/src/chrome/os/inputview/adapter.js +++ b/third_party/google_input_tools/src/chrome/os/inputview/adapter.js @@ -140,7 +140,7 @@ Adapter.prototype.textBeforeCursor = ''; /** @type {boolean} */ -Adapter.prototype.isQPInputView = false; +Adapter.prototype.isQPInputView = true; /** @@ -458,8 +458,9 @@ Adapter.prototype.onContextFocus_ = function(message) { Adapter.prototype.initBackground_ = function() { chrome.runtime.getBackgroundPage((function() { this.isBgControllerSwitching_ = true; - chrome.runtime.sendMessage( - goog.object.create(Name.TYPE, Type.CONNECT)); + chrome.runtime.sendMessage(goog.object.create( + Name.TYPE, Type.CONNECT, + Name.VISIBILITY, this.isVisible)); }).bind(this)); }; diff --git a/third_party/google_input_tools/src/chrome/os/inputview/common.css b/third_party/google_input_tools/src/chrome/os/inputview/common.css index 584c5f8..0fe6fe3 100644 --- a/third_party/google_input_tools/src/chrome/os/inputview/common.css +++ b/third_party/google_input_tools/src/chrome/os/inputview/common.css @@ -662,23 +662,18 @@ background: no-repeat url('images/error.png'); padding: 0 0 0 50px; position: absolute; - width: 600px; - height: 100px; } .inputview-handwriting-privacy-cover { position: relative; bottom: 0; left: 0; - background-color: white; opacity: 0.5; z-index: 1; } .inputview-handwriting-privacy-info { position: absolute; - width: 600px; - height: 100px; z-index: 2; } diff --git a/third_party/google_input_tools/src/chrome/os/inputview/config/compact_letter_characters.js b/third_party/google_input_tools/src/chrome/os/inputview/config/compact_letter_characters.js index 1b3032b..476086d 100644 --- a/third_party/google_input_tools/src/chrome/os/inputview/config/compact_letter_characters.js +++ b/third_party/google_input_tools/src/chrome/os/inputview/config/compact_letter_characters.js @@ -15,12 +15,13 @@ goog.provide('i18n.input.chrome.inputview.content.compact.letter'); goog.require('i18n.input.chrome.inputview.Css'); goog.require('i18n.input.chrome.inputview.MoreKeysShiftOperation'); -goog.require('i18n.input.chrome.inputview.content.constants'); +goog.require('i18n.input.chrome.inputview.content.Constants'); goog.scope(function() { -var NonLetterKeys = i18n.input.chrome.inputview.content.constants.NonLetterKeys; -var HintTextPlaceHolder = - i18n.input.chrome.inputview.content.constants.HintTextPlaceHolder; +var NON_LETTER_KEYS = + i18n.input.chrome.inputview.content.Constants.NON_LETTER_KEYS; +var HINT_TEXT_PLACE_HOLDER = + i18n.input.chrome.inputview.content.Constants.HINT_TEXT_PLACE_HOLDER; var MoreKeysShiftOperation = i18n.input.chrome.inputview.MoreKeysShiftOperation; var Css = i18n.input.chrome.inputview.Css; @@ -46,17 +47,17 @@ i18n.input.chrome.inputview.content.compact.letter.keyQwertyCharacters = 'characters': ['\u00FA', '\u00FB', '\u00FC', '\u00F9', '\u016B']}}, /* 7 */ { 'text': 'i', 'hintText': '8', 'moreKeys': { - 'characters': ['\u00ED', '\u00EE', '\u00EF', '\u012B', '\u00EC']}}, + 'characters': ['\u00ED', '\u00EE', '\u00EF', '\u012B', '\u00EC']}}, /* 8 */ { 'text': 'o', 'hintText': '9', 'moreKeys': { 'characters': ['\u00F3', '\u00F4', '\u00F6', '\u00F2', '\u0153', - '\u00F8', '\u014D', '\u00F5']}}, + '\u00F8', '\u014D', '\u00F5']}}, /* 9 */ { 'text': 'p', 'hintText': '0' }, - /* 10 */ NonLetterKeys.BACKSPACE, + /* 10 */ NON_LETTER_KEYS.BACKSPACE, /* 11 */ { 'text': 'a', 'marginLeftPercent': 0.33, 'moreKeys': { 'characters': ['\u00E0', '\u00E1', '\u00E2', '\u00E4', '\u00E6', - '\u00E3', '\u00E5', '\u0101']}}, + '\u00E3', '\u00E5', '\u0101']}}, /* 12 */ { 'text': 's', 'moreKeys': {'characters': ['\u00DF']}}, /* 13 */ { 'text': 'd' }, @@ -66,8 +67,8 @@ i18n.input.chrome.inputview.content.compact.letter.keyQwertyCharacters = /* 17 */ { 'text': 'j' }, /* 18 */ { 'text': 'k' }, /* 19 */ { 'text': 'l' }, - /* 20 */ NonLetterKeys.ENTER, - /* 21 */ NonLetterKeys.LEFT_SHIFT, + /* 20 */ NON_LETTER_KEYS.ENTER, + /* 21 */ NON_LETTER_KEYS.LEFT_SHIFT, /* 22 */ { 'text': 'z' }, /* 23 */ { 'text': 'x' }, /* 24 */ { 'text': 'c', @@ -81,24 +82,24 @@ i18n.input.chrome.inputview.content.compact.letter.keyQwertyCharacters = 'moreKeys': {'characters': ['\u00A1']}}, /* 30 */ { 'text': '?', 'moreKeys': {'characters': ['\u00BF']}}, - /* 31 */ NonLetterKeys.RIGHT_SHIFT, - /* 32 */ NonLetterKeys.SWITCHER, - /* 33 */ NonLetterKeys.GLOBE, - /* 34 */ NonLetterKeys.MENU, + /* 31 */ NON_LETTER_KEYS.RIGHT_SHIFT, + /* 32 */ NON_LETTER_KEYS.SWITCHER, + /* 33 */ NON_LETTER_KEYS.GLOBE, + /* 34 */ NON_LETTER_KEYS.MENU, /* 35 */ { 'text': '/', 'isGrey': true, 'onContext': - { 'email' : { 'text' : '@' }}}, - /* 36 */ NonLetterKeys.SPACE, + { 'email' : { 'text' : '@' }}}, + /* 36 */ NON_LETTER_KEYS.SPACE, /* 37 */ { 'text': ',', 'isGrey': true, 'onContext': - { 'email' : {'text' : '.com', 'textCssClass' : Css.FONT_SMALL, + { 'email' : {'text' : '.com', 'textCssClass' : Css.FONT_SMALL, 'moreKeys': {'characters': ['.net', '.org']}}, 'url' : {'text' : '.com', 'textCssClass' : Css.FONT_SMALL, 'moreKeys': {'characters': ['.net', '.org']}}}}, /* 38 */ { 'text': '.', 'isGrey': true, 'moreKeys': { 'characters': [',', '\'', '#', ')', '(', '/', ';', '@', ':', - '-', '"', '+', '%', '&'], + '-', '"', '+', '%', '&'], 'fixedColumnNumber': 7}}, - /* 39 */ NonLetterKeys.HIDE + /* 39 */ NON_LETTER_KEYS.HIDE ]; }; @@ -113,16 +114,16 @@ i18n.input.chrome.inputview.content.compact.letter.keyNederlandCharacters = var data = i18n.input.chrome.inputview.content.compact.letter.keyQwertyCharacters(); data[2]['moreKeys'] = {'characters': ['\u00E9', '\u00EB', '\u00EA', '\u00E8', - '\u0119', '\u0117', '\u0113']}; // e + '\u0119', '\u0117', '\u0113']}; // e data[5]['moreKeys'] = {'characters': ['\u0133']}; // y data[6]['moreKeys'] = {'characters': - ['\u00FA', '\u00FC', '\u00FB', '\u00F9', '\u016B']}; // u + ['\u00FA', '\u00FC', '\u00FB', '\u00F9', '\u016B']}; // u data[7]['moreKeys'] = {'characters': ['\u00ED', '\u00EF', '\u00EC', '\u00EE', - '\u012F', '\u012B', '\u0133']}; // i + '\u012F', '\u012B', '\u0133']}; // i data[8]['moreKeys'] = {'characters': ['\u00F3', '\u00F6', '\u00F4', '\u00F2', - '\u00F5', '\u0153', '\u00F8', '\u014D']}; // o + '\u00F5', '\u0153', '\u00F8', '\u014D']}; // o data[11]['moreKeys'] = {'characters': ['\u00E1', '\u00E4', '\u00E2', '\u00E0', - '\u00E6', '\u00E3', '\u00E5', '\u0101']}; // a + '\u00E6', '\u00E3', '\u00E5', '\u0101']}; // a data[12]['moreKeys'] = undefined; // s data[24]['moreKeys'] = undefined; // c data[27]['moreKeys'] = {'characters': ['\u00F1', '\u0144']}; // n @@ -140,17 +141,17 @@ i18n.input.chrome.inputview.content.compact.letter.keyIcelandicCharacters = var data = i18n.input.chrome.inputview.content.compact.letter.keyQwertyCharacters(); data[2]['moreKeys'] = {'characters': ['\u00E9', '\u00EB', '\u00E8', '\u00EA', - '\u0119', '\u0117', '\u0113']}; // e + '\u0119', '\u0117', '\u0113']}; // e data[4]['moreKeys'] = {'characters': ['\u00FE']}; // t data[5]['moreKeys'] = {'characters': ['\u00FD', '\u00FF']}; // y data[6]['moreKeys'] = {'characters': - ['\u00FA', '\u00FC', '\u00FB', '\u00F9', '\u016B']}; // u + ['\u00FA', '\u00FC', '\u00FB', '\u00F9', '\u016B']}; // u data[7]['moreKeys'] = {'characters': - ['\u00ED', '\u00EF', '\u00EE', '\u00EC', '\u012F', '\u012B']}; // i + ['\u00ED', '\u00EF', '\u00EE', '\u00EC', '\u012F', '\u012B']}; // i data[8]['moreKeys'] = {'characters': ['\u00F3', '\u00F6', '\u00F4', '\u00F2', - '\u00F5', '\u0153', '\u00F8', '\u014D']}; // o + '\u00F5', '\u0153', '\u00F8', '\u014D']}; // o data[11]['moreKeys'] = {'characters': ['\u00E1', '\u00E4', '\u00E6', '\u00E5', - '\u00E0', '\u00E2', '\u00E3', '\u0101']}; // a + '\u00E0', '\u00E2', '\u00E3', '\u0101']}; // a data[12]['moreKeys'] = undefined; // s data[13]['moreKeys'] = {'characters': ['\u00F0']}; // d data[24]['moreKeys'] = undefined; // c @@ -169,17 +170,17 @@ i18n.input.chrome.inputview.content.compact.letter.keyQwertzCharacters = var data = i18n.input.chrome.inputview.content.compact.letter.keyQwertyCharacters(); data[2]['moreKeys'] = {'characters': - ['\u00E9', '\u00E8', '\u00EA', '\u00EB', '\u0117']}; // e + ['\u00E9', '\u00E8', '\u00EA', '\u00EB', '\u0117']}; // e data[6]['moreKeys'] = { - 'characters': ['\u00FC', HintTextPlaceHolder, '\u00FB', '\u00F9', '\u00FA', - '\u016B']}; // u + 'characters': ['\u00FC', HINT_TEXT_PLACE_HOLDER, '\u00FB', '\u00F9', + '\u00FA', '\u016B']}; // u data[7]['moreKeys'] = undefined; // i data[8]['moreKeys'] = { - 'characters': ['\u00F6', HintTextPlaceHolder, '\u00F4', '\u00F2', '\u00F3', - '\u00F5', '\u0153', '\u00F8', '\u014D']}; // o + 'characters': ['\u00F6', HINT_TEXT_PLACE_HOLDER, '\u00F4', '\u00F2', + '\u00F3', '\u00F5', '\u0153', '\u00F8', '\u014D']}; // o data[11]['moreKeys'] = { - 'characters': ['\u00E4', HintTextPlaceHolder, '\u00E2', '\u00E0', '\u00E1', - '\u00E6', '\u00E3', '\u00E5', '\u0101']}; // a + 'characters': ['\u00E4', HINT_TEXT_PLACE_HOLDER, '\u00E2', '\u00E0', + '\u00E1', '\u00E6', '\u00E3', '\u00E5', '\u0101']}; // a data[12]['moreKeys'] = {'characters': ['\u00DF', '\u015B', '\u0161']}; // s data[24]['moreKeys'] = undefined; // c data[27]['moreKeys'] = {'characters': ['\u00F1', '\u0144']}; @@ -200,31 +201,31 @@ i18n.input.chrome.inputview.content.compact.letter.keyAzertyCharacters = return [ /* 0 */ { 'text': 'a', 'hintText': '1', 'moreKeys': { - 'characters': ['\u00E0', '\u00E2', HintTextPlaceHolder, '\u00E6', - '\u00E1', '\u00E4', '\u00E3', '\u00E5', '\u0101', '\u00AA']}}, + 'characters': ['\u00E0', '\u00E2', HINT_TEXT_PLACE_HOLDER, '\u00E6', + '\u00E1', '\u00E4', '\u00E3', '\u00E5', '\u0101', '\u00AA']}}, /* 1 */ { 'text': 'z', 'hintText': '2' }, /* 2 */ { 'text': 'e', 'hintText': '3', 'moreKeys': { 'characters': ['\u00E9', '\u00E8', '\u00EA', '\u00EB', - HintTextPlaceHolder, '\u0119', '\u0117', '\u0113']}}, + HINT_TEXT_PLACE_HOLDER, '\u0119', '\u0117', '\u0113']}}, /* 3 */ { 'text': 'r', 'hintText': '4' }, /* 4 */ { 'text': 't', 'hintText': '5' }, /* 5 */ { 'text': 'y', 'hintText': '6', 'moreKeys': {'characters': ['\u00FF']}}, /* 6 */ { 'text': 'u', 'hintText': '7', 'moreKeys': { - 'characters': ['\u00F9', '\u00FB', HintTextPlaceHolder, '\u00FC', - '\u00FA', '\u016B']}}, + 'characters': ['\u00F9', '\u00FB', HINT_TEXT_PLACE_HOLDER, '\u00FC', + '\u00FA', '\u016B']}}, /* 7 */ { 'text': 'i', 'hintText': '8', 'moreKeys': { - 'characters': ['\u00EE', HintTextPlaceHolder, '\u00EF', '\u00EC', - '\u00ED', '\u012F', '\u012B']}}, + 'characters': ['\u00EE', HINT_TEXT_PLACE_HOLDER, '\u00EF', '\u00EC', + '\u00ED', '\u012F', '\u012B']}}, /* 8 */ { 'text': 'o', 'hintText': '9', 'moreKeys': { - 'characters': ['\u00F4', '\u0153', HintTextPlaceHolder, '\u00F6', - '\u00F2', '\u00F3', '\u00F5', '\u00F8', '\u014D', '\u00BA']}}, + 'characters': ['\u00F4', '\u0153', HINT_TEXT_PLACE_HOLDER, '\u00F6', + '\u00F2', '\u00F3', '\u00F5', '\u00F8', '\u014D', '\u00BA']}}, /* 9 */ { 'text': 'p', 'hintText': '0' }, - /* 10 */ NonLetterKeys.BACKSPACE, + /* 10 */ NON_LETTER_KEYS.BACKSPACE, /* 11 */ { 'text': 'q' }, /* 12 */ { 'text': 's' }, /* 13 */ { 'text': 'd' }, @@ -235,8 +236,8 @@ i18n.input.chrome.inputview.content.compact.letter.keyAzertyCharacters = /* 18 */ { 'text': 'k' }, /* 19 */ { 'text': 'l' }, /* 20 */ { 'text': 'm' }, - /* 21 */ NonLetterKeys.ENTER, - /* 22 */ NonLetterKeys.LEFT_SHIFT, + /* 21 */ NON_LETTER_KEYS.ENTER, + /* 22 */ NON_LETTER_KEYS.LEFT_SHIFT, /* 23 */ { 'text': 'w' }, /* 24 */ { 'text': 'x' }, /* 25 */ { 'text': 'c', @@ -254,19 +255,19 @@ i18n.input.chrome.inputview.content.compact.letter.keyAzertyCharacters = /* 31 */ { 'text': '?', 'moreKeys': { 'characters': ['\u00BF']}}, - /* 32 */ NonLetterKeys.RIGHT_SHIFT, - /* 33 */ NonLetterKeys.SWITCHER, - /* 34 */ NonLetterKeys.GLOBE, - /* 35 */ NonLetterKeys.MENU, + /* 32 */ NON_LETTER_KEYS.RIGHT_SHIFT, + /* 33 */ NON_LETTER_KEYS.SWITCHER, + /* 34 */ NON_LETTER_KEYS.GLOBE, + /* 35 */ NON_LETTER_KEYS.MENU, /* 36 */ { 'text': '/', 'isGrey': true }, - /* 37 */ NonLetterKeys.SPACE, + /* 37 */ NON_LETTER_KEYS.SPACE, /* 38 */ { 'text': ',', 'isGrey': true }, /* 39 */ { 'text': '.', 'isGrey': true, 'moreKeys': { 'characters': [',', '\'', '#', ')', '(', '/', ';', '@', ':', - '-', '"', '+', '%', '&'], + '-', '"', '+', '%', '&'], 'fixedColumnNumber': 7}}, - /* 40 */ NonLetterKeys.HIDE + /* 40 */ NON_LETTER_KEYS.HIDE ]; }; @@ -292,14 +293,14 @@ i18n.input.chrome.inputview.content.compact.letter.keyNordicCharacters = /* 8 */ { 'text': 'o', 'hintText': '9', 'moreKeys': { 'characters': ['\u00F8', '\u00F4', '\u00F2', '\u00F3', '\u00F5', - '\u0153', '\u014D']}}, + '\u0153', '\u014D']}}, /* 9 */ { 'text': 'p', 'hintText': '0' }, /* 10 */ { 'text': '\u00e5' }, - /* 11 */ NonLetterKeys.BACKSPACE, + /* 11 */ NON_LETTER_KEYS.BACKSPACE, /* 12 */ { 'text': 'a', 'moreKeys': { 'characters': ['\u00E6', '\u00E0', '\u00E1', '\u00E2', '\u00E3', - '\u0101']}}, + '\u0101']}}, /* 13 */ { 'text': 's', 'moreKeys': { 'characters': ['\u0161', '\u00DF', '\u015B']}}, @@ -316,8 +317,8 @@ i18n.input.chrome.inputview.content.compact.letter.keyNordicCharacters = /* 22 */ { 'text': '\u00e4', 'moreKeys': { 'characters': ['\u00E6']}}, - /* 23 */ NonLetterKeys.ENTER, - /* 24 */ NonLetterKeys.LEFT_SHIFT, + /* 23 */ NON_LETTER_KEYS.ENTER, + /* 24 */ NON_LETTER_KEYS.LEFT_SHIFT, /* 25 */ { 'text': 'z', 'marginLeftPercent': 0.33, 'moreKeys': { 'characters': ['\u017E', '\u017A', '\u017C']}}, @@ -333,19 +334,19 @@ i18n.input.chrome.inputview.content.compact.letter.keyNordicCharacters = /* 33 */ { 'text': '?', 'marginRightPercent': 0.33, 'moreKeys': { 'characters': ['\u00BF']}}, - /* 34 */ NonLetterKeys.RIGHT_SHIFT, - /* 35 */ NonLetterKeys.SWITCHER, - /* 36 */ NonLetterKeys.GLOBE, - /* 37 */ NonLetterKeys.MENU, + /* 34 */ NON_LETTER_KEYS.RIGHT_SHIFT, + /* 35 */ NON_LETTER_KEYS.SWITCHER, + /* 36 */ NON_LETTER_KEYS.GLOBE, + /* 37 */ NON_LETTER_KEYS.MENU, /* 38 */ { 'text': '/', 'isGrey': true }, - /* 39 */ NonLetterKeys.SPACE, + /* 39 */ NON_LETTER_KEYS.SPACE, /* 40 */ { 'text': ',', 'isGrey': true }, /* 41 */ { 'text': '.', 'isGrey': true, 'moreKeys': { 'characters': [',', '\'', '#', ')', '(', '/', ';', '@', ':', - '-', '"', '+', '%', '&'], + '-', '"', '+', '%', '&'], 'fixedColumnNumber': 7}}, - /* 42 */ NonLetterKeys.HIDE + /* 42 */ NON_LETTER_KEYS.HIDE ]; }; @@ -405,15 +406,15 @@ i18n.input.chrome.inputview.content.compact.letter.keyNorwayCharacters = i18n.input.chrome.inputview.content.compact.letter.keyNordicCharacters(); data[2]['moreKeys'] = { 'characters': ['\u00E9', '\u00E8', '\u00EA', '\u00EB', '\u0119', '\u0117', - '\u0113']}; // e + '\u0113']}; // e data[6]['moreKeys'] = { 'characters': ['\u00FC', '\u00FB', '\u00F9', '\u00FA', '\u016B']}; // u data[8]['moreKeys'] = { 'characters': ['\u00F4', '\u00F2', '\u00F3', '\u00F6', '\u00F5', '\u0153', - '\u014D']}; // o + '\u014D']}; // o data[12]['moreKeys'] = { 'characters': ['\u00E0', '\u00E4', '\u00E1', '\u00E2', '\u00E3', - '\u0101']}; // a + '\u0101']}; // a data[13]['moreKeys'] = undefined; //s data[21]['moreKeys'] = { 'characters': ['\u00F6']}; @@ -447,10 +448,10 @@ i18n.input.chrome.inputview.content.compact.letter.keyDenmarkCharacters = 'characters': ['\u00ED', '\u00EF']}; // i data[8]['moreKeys'] = { 'characters': ['\u00F3', '\u00F4', '\u00F2', '\u00F5', '\u0153', - '\u014D']}; // o + '\u014D']}; // o data[12]['moreKeys'] = { 'characters': ['\u00E1', '\u00E4', '\u00E0', '\u00E2', '\u00E3', - '\u0101']}; // a + '\u0101']}; // a data[13]['moreKeys'] = { 'characters': ['\u00DF', '\u015B', '\u0161']}; // s data[14]['moreKeys'] = { @@ -510,7 +511,7 @@ i18n.input.chrome.inputview.content.compact.letter.keyPinyinCharacters = /* 9 */ { 'text': 'p', 'hintText': '0', 'moreKeys': { 'characters': ['\u0050', '\u0070']}}, - /* 10 */ NonLetterKeys.BACKSPACE, + /* 10 */ NON_LETTER_KEYS.BACKSPACE, /* 11 */ { 'text': 'a', 'hintText': '@', 'marginLeftPercent': 0.33, 'moreKeys': { 'characters': ['\u0041', '\u0061']}}, @@ -538,8 +539,8 @@ i18n.input.chrome.inputview.content.compact.letter.keyPinyinCharacters = /* 19 */ { 'text': 'l', 'hintText': '\uff09', 'moreKeys': { 'characters': ['\u004c', '\u006c']}}, - /* 20 */ NonLetterKeys.ENTER, - /* 21 */ NonLetterKeys.LEFT_SHIFT, + /* 20 */ NON_LETTER_KEYS.ENTER, + /* 21 */ NON_LETTER_KEYS.LEFT_SHIFT, /* 22 */ { 'text': 'z', 'hintText': '\u3001', 'moreKeys': { 'characters': ['\u005a', '\u007a']}}, @@ -567,15 +568,15 @@ i18n.input.chrome.inputview.content.compact.letter.keyPinyinCharacters = /* 30 */ { 'text': '\uff1f', 'hintText': '&', 'moreKeys': { 'characters': ['\u00BF']}}, - /* 31 */ NonLetterKeys.RIGHT_SHIFT, - /* 32 */ NonLetterKeys.SWITCHER, - /* 33 */ NonLetterKeys.GLOBE, - /* 34 */ NonLetterKeys.MENU, + /* 31 */ NON_LETTER_KEYS.RIGHT_SHIFT, + /* 32 */ NON_LETTER_KEYS.SWITCHER, + /* 33 */ NON_LETTER_KEYS.GLOBE, + /* 34 */ NON_LETTER_KEYS.MENU, /* 35 */ { 'text': '\uff0c', 'isGrey': true }, - /* 36 */ NonLetterKeys.SPACE, + /* 36 */ NON_LETTER_KEYS.SPACE, /* 37 */ { 'text': '\u3002', 'isGrey': true }, - /* 38 */ NonLetterKeys.SWITCHER, - /* 39 */ NonLetterKeys.HIDE + /* 38 */ NON_LETTER_KEYS.SWITCHER, + /* 39 */ NON_LETTER_KEYS.HIDE ]; for (var i = 0; i <= 9; i++) { data[i]['moreKeysShiftOperation'] = MoreKeysShiftOperation.TO_LOWER_CASE; @@ -626,6 +627,7 @@ i18n.input.chrome.inputview.content.compact.letter.keyEnCharacters = return data; }; + /** * Zhuyin keyset characters. * @@ -748,19 +750,19 @@ i18n.input.chrome.inputview.content.compact.letter.keyZhuyinCharacters = /* 38 */ { 'text': '\u3121', 'hintText': '\uff01'}, /* 39 */ { 'text': '\u3125', 'hintText': '\uff1f'}, - /* 40 */ NonLetterKeys.BACKSPACE, - /* 41 */ NonLetterKeys.ENTER, - /* 42 */ NonLetterKeys.RIGHT_SHIFT, + /* 40 */ NON_LETTER_KEYS.BACKSPACE, + /* 41 */ NON_LETTER_KEYS.ENTER, + /* 42 */ NON_LETTER_KEYS.RIGHT_SHIFT, - /* 43 */ NonLetterKeys.SWITCHER, - /* 44 */ NonLetterKeys.GLOBE, - /* 45 */ NonLetterKeys.MENU, + /* 43 */ NON_LETTER_KEYS.SWITCHER, + /* 44 */ NON_LETTER_KEYS.GLOBE, + /* 45 */ NON_LETTER_KEYS.MENU, /* 46 */ { 'text': '\uff0c', 'isGrey': true }, - /* 47 */ NonLetterKeys.SPACE, + /* 47 */ NON_LETTER_KEYS.SPACE, /* 48 */ { 'text': '\u3126', 'isGrey': false }, /* 49 */ { 'text': '\u3002', 'isGrey': true }, - /* 50 */ NonLetterKeys.SWITCHER, - /* 51 */ NonLetterKeys.HIDE + /* 50 */ NON_LETTER_KEYS.SWITCHER, + /* 51 */ NON_LETTER_KEYS.HIDE ]; for (var i = 0; i <= 39; i++) { data[i]['moreKeysShiftOperation'] = MoreKeysShiftOperation.TO_LOWER_CASE; diff --git a/third_party/google_input_tools/src/chrome/os/inputview/config/compact_more_characters.js b/third_party/google_input_tools/src/chrome/os/inputview/config/compact_more_characters.js index b19edf5..ac4b755 100644 --- a/third_party/google_input_tools/src/chrome/os/inputview/config/compact_more_characters.js +++ b/third_party/google_input_tools/src/chrome/os/inputview/config/compact_more_characters.js @@ -13,10 +13,11 @@ // goog.provide('i18n.input.chrome.inputview.content.compact.more'); -goog.require('i18n.input.chrome.inputview.content.constants'); +goog.require('i18n.input.chrome.inputview.content.Constants'); goog.scope(function() { -var NonLetterKeys = i18n.input.chrome.inputview.content.constants.NonLetterKeys; +var NON_LETTER_KEYS = + i18n.input.chrome.inputview.content.Constants.NON_LETTER_KEYS; /** @@ -45,7 +46,7 @@ i18n.input.chrome.inputview.content.compact.more.keyNAMoreCharacters = 'moreKeys': { 'characters': ['\u00A7']}}, /* 9 */ { 'text': '\u0394' }, - /* 10 */ NonLetterKeys.BACKSPACE, + /* 10 */ NON_LETTER_KEYS.BACKSPACE, /* 11 */ { 'text': '\u00A3', 'marginLeftPercent': 0.33 }, /* 12 */ { 'text': '\u00A2' }, /* 13 */ { 'text': '\u20AC' }, @@ -64,8 +65,8 @@ i18n.input.chrome.inputview.content.compact.more.keyNAMoreCharacters = 'characters': ['\u2260', '\u2248', '\u221E']}}, /* 18 */ { 'text': '{' }, /* 19 */ { 'text': '}' }, - /* 20 */ NonLetterKeys.ENTER, - /* 21 */ NonLetterKeys.SWITCHER, + /* 20 */ NON_LETTER_KEYS.ENTER, + /* 21 */ NON_LETTER_KEYS.SWITCHER, /* 22 */ { 'text': '\\' }, /* 23 */ { 'text': '\u00A9' }, /* 24 */ { 'text': '\u00AE' }, @@ -75,24 +76,24 @@ i18n.input.chrome.inputview.content.compact.more.keyNAMoreCharacters = /* 28 */ { 'text': ']' }, /* 29 */ { 'text': '\u00A1' }, /* 30 */ { 'text': '\u00BF' }, - /* 31 */ NonLetterKeys.SWITCHER, - /* 32 */ NonLetterKeys.SWITCHER, + /* 31 */ NON_LETTER_KEYS.SWITCHER, + /* 32 */ NON_LETTER_KEYS.SWITCHER, // Keep in sync with row_symbols_shift4.xml in android input tool. /* 33 */ { 'text': '<', 'isGrey': true, 'moreKeys': { 'characters': ['\u2039', '\u2264', '\u00AB']}}, - /* 34 */ NonLetterKeys.MENU, + /* 34 */ NON_LETTER_KEYS.MENU, // Keep in sync with row_symbols_shift4.xml in android input tool. /* 35 */ { 'text': '>', 'isGrey': true, 'moreKeys': { 'characters': ['\u203A', '\u2265', '\u00BB']}}, - /* 36 */ NonLetterKeys.SPACE, + /* 36 */ NON_LETTER_KEYS.SPACE, /* 37 */ { 'text': ',', 'isGrey': true }, // Keep in sync with row_symbols_shift4.xml in android input tool. /* 38 */ { 'text': '.', 'isGrey': true, 'moreKeys': { 'characters': ['\u2026']}}, - /* 39 */ NonLetterKeys.HIDE + /* 39 */ NON_LETTER_KEYS.HIDE ]; }; diff --git a/third_party/google_input_tools/src/chrome/os/inputview/config/compact_numberpad_characters.js b/third_party/google_input_tools/src/chrome/os/inputview/config/compact_numberpad_characters.js index ed020cf..9a5361b 100644 --- a/third_party/google_input_tools/src/chrome/os/inputview/config/compact_numberpad_characters.js +++ b/third_party/google_input_tools/src/chrome/os/inputview/config/compact_numberpad_characters.js @@ -14,12 +14,14 @@ goog.provide('i18n.input.chrome.inputview.content.compact.numberpad'); goog.require('i18n.input.chrome.inputview.Css'); -goog.require('i18n.input.chrome.inputview.content.constants'); +goog.require('i18n.input.chrome.inputview.content.Constants'); goog.scope(function() { -var NonLetterKeys = i18n.input.chrome.inputview.content.constants.NonLetterKeys; +var NON_LETTER_KEYS = + i18n.input.chrome.inputview.content.Constants.NON_LETTER_KEYS; var Css = i18n.input.chrome.inputview.Css; + /** * Generic numberpad keyset characters. * @@ -28,44 +30,45 @@ var Css = i18n.input.chrome.inputview.Css; i18n.input.chrome.inputview.content.compact.numberpad.keyNumberpadCharacters = function() { return [ - /* 0 */ { 'text': '-', - 'isGrey': true}, - /* 1 */ { 'text': '+', - 'isGrey': true}, - /* 2 */ { 'text': '.', - 'isGrey': true}, - /* 3 */ { 'text': '1'}, - /* 4 */ { 'text': '2'}, - /* 5 */ { 'text': '3'}, - /* 6 */ NonLetterKeys.BACKSPACE, - /* 7 */ { 'text': '*', - 'isGrey': true}, - /* 8 */ { 'text': '/', - 'isGrey': true}, - /* 9 */ { 'text': ',', - 'isGrey': true}, - /* 10 */ { 'text': '4'}, - /* 11 */ { 'text': '5'}, - /* 12 */ { 'text': '6'}, - /* 13 */ NonLetterKeys.ENTER, - /* 14 */ { 'text': '(', - 'isGrey': true}, - /* 15 */ { 'text': ')', - 'isGrey': true}, - /* 16 */ { 'text': '=', - 'isGrey': true}, - /* 17 */ { 'text': '7'}, - /* 18 */ { 'text': '8'}, - /* 19 */ { 'text': '9', - 'marginRightPercent': 0.545454}, - /* 20 */ NonLetterKeys.SPACE, - /* 21 */ { 'text': '*'}, - /* 22 */ { 'text': '0'}, - /* 23 */ { 'text': '#'}, - /* 24 */ NonLetterKeys.HIDE + /* 0 */ { 'text': '-', + 'isGrey': true}, + /* 1 */ { 'text': '+', + 'isGrey': true}, + /* 2 */ { 'text': '.', + 'isGrey': true}, + /* 3 */ { 'text': '1'}, + /* 4 */ { 'text': '2'}, + /* 5 */ { 'text': '3'}, + /* 6 */ NON_LETTER_KEYS.BACKSPACE, + /* 7 */ { 'text': '*', + 'isGrey': true}, + /* 8 */ { 'text': '/', + 'isGrey': true}, + /* 9 */ { 'text': ',', + 'isGrey': true}, + /* 10 */ { 'text': '4'}, + /* 11 */ { 'text': '5'}, + /* 12 */ { 'text': '6'}, + /* 13 */ NON_LETTER_KEYS.ENTER, + /* 14 */ { 'text': '(', + 'isGrey': true}, + /* 15 */ { 'text': ')', + 'isGrey': true}, + /* 16 */ { 'text': '=', + 'isGrey': true}, + /* 17 */ { 'text': '7'}, + /* 18 */ { 'text': '8'}, + /* 19 */ { 'text': '9', + 'marginRightPercent': 0.545454}, + /* 20 */ NON_LETTER_KEYS.SPACE, + /* 21 */ { 'text': '*'}, + /* 22 */ { 'text': '0'}, + /* 23 */ { 'text': '#'}, + /* 24 */ NON_LETTER_KEYS.HIDE ]; }; + /** * Phonepad keyset characters. * @@ -75,53 +78,53 @@ i18n.input.chrome.inputview.content.compact.numberpad.keyPhonepadCharacters = function() { return [ - /* 0 */ { 'text': '-', - 'isGrey': true}, - /* 1 */ { 'text': '+', - 'isGrey': true}, - /* 2 */ { 'title' : 'Pause', // i18n_messages.PAUSE - 'text': ',', - 'isGrey': true, - 'textCssClass': Css.FONT_SMALL}, - /* 3 */ { 'text': '1'}, - /* 4 */ { 'text': '2', - 'hintText': 'ABC'}, - /* 5 */ { 'text': '3', - 'hintText': 'DEF'}, - /* 6 */ NonLetterKeys.BACKSPACE, - /* 7 */ { 'text': ',', - 'isGrey': true}, - /* 8 */ { 'text': '.', - 'isGrey': true}, - /* 9 */ { 'title': 'Wait', // i18n_messages.WAIT - 'text': ';', - 'isGrey': true, - 'textCssClass': Css.FONT_SMALL}, - /* 10 */ { 'text': '4', - 'hintText': 'GHI'}, - /* 11 */ { 'text': '5', - 'hintText': 'JKL'}, - /* 12 */ { 'text': '6', - 'hintText': 'MNO'}, - /* 13 */ NonLetterKeys.ENTER, - /* 14 */ { 'text': '(', - 'isGrey': true}, - /* 15 */ { 'text': ')', - 'isGrey': true}, - /* 16 */ { 'text': 'N', - 'isGrey': true}, - /* 17 */ { 'text': '7', - 'hintText': 'PQRS'}, - /* 18 */ { 'text': '8', - 'hintText': 'TUV'}, - /* 19 */ { 'text': '9', - 'hintText': 'WXYZ', - 'marginRightPercent': 0.545454}, - /* 20 */ NonLetterKeys.SPACE, - /* 21 */ { 'text': '*'}, - /* 22 */ { 'text': '0'}, - /* 23 */ { 'text': '#'}, - /* 24 */ NonLetterKeys.HIDE + /* 0 */ { 'text': '-', + 'isGrey': true}, + /* 1 */ { 'text': '+', + 'isGrey': true}, + /* 2 */ { 'title' : 'Pause', // i18n_messages.PAUSE + 'text': ',', + 'isGrey': true, + 'textCssClass': Css.FONT_SMALL}, + /* 3 */ { 'text': '1'}, + /* 4 */ { 'text': '2', + 'hintText': 'ABC'}, + /* 5 */ { 'text': '3', + 'hintText': 'DEF'}, + /* 6 */ NON_LETTER_KEYS.BACKSPACE, + /* 7 */ { 'text': ',', + 'isGrey': true}, + /* 8 */ { 'text': '.', + 'isGrey': true}, + /* 9 */ { 'title': 'Wait', // i18n_messages.WAIT + 'text': ';', + 'isGrey': true, + 'textCssClass': Css.FONT_SMALL}, + /* 10 */ { 'text': '4', + 'hintText': 'GHI'}, + /* 11 */ { 'text': '5', + 'hintText': 'JKL'}, + /* 12 */ { 'text': '6', + 'hintText': 'MNO'}, + /* 13 */ NON_LETTER_KEYS.ENTER, + /* 14 */ { 'text': '(', + 'isGrey': true}, + /* 15 */ { 'text': ')', + 'isGrey': true}, + /* 16 */ { 'text': 'N', + 'isGrey': true}, + /* 17 */ { 'text': '7', + 'hintText': 'PQRS'}, + /* 18 */ { 'text': '8', + 'hintText': 'TUV'}, + /* 19 */ { 'text': '9', + 'hintText': 'WXYZ', + 'marginRightPercent': 0.545454}, + /* 20 */ NON_LETTER_KEYS.SPACE, + /* 21 */ { 'text': '*'}, + /* 22 */ { 'text': '0'}, + /* 23 */ { 'text': '#'}, + /* 24 */ NON_LETTER_KEYS.HIDE ]; }; diff --git a/third_party/google_input_tools/src/chrome/os/inputview/config/compact_symbol_characters.js b/third_party/google_input_tools/src/chrome/os/inputview/config/compact_symbol_characters.js index 3b637e0..6b35d59 100644 --- a/third_party/google_input_tools/src/chrome/os/inputview/config/compact_symbol_characters.js +++ b/third_party/google_input_tools/src/chrome/os/inputview/config/compact_symbol_characters.js @@ -13,10 +13,11 @@ // goog.provide('i18n.input.chrome.inputview.content.compact.symbol'); -goog.require('i18n.input.chrome.inputview.content.constants'); +goog.require('i18n.input.chrome.inputview.content.Constants'); goog.scope(function() { -var NonLetterKeys = i18n.input.chrome.inputview.content.constants.NonLetterKeys; +var NON_LETTER_KEYS = + i18n.input.chrome.inputview.content.Constants.NON_LETTER_KEYS; /** @@ -51,7 +52,7 @@ i18n.input.chrome.inputview.content.compact.symbol.keyNASymbolCharacters = /* 9 */ { 'text': '0', 'moreKeys': { 'characters': ['\u207F', '\u2205']}}, - /* 10 */ NonLetterKeys.BACKSPACE, + /* 10 */ NON_LETTER_KEYS.BACKSPACE, /* 11 */ { 'text': '@', 'marginLeftPercent': 0.33 }, /* 12 */ { 'text': '#' }, /* 13 */ { 'text': '$', @@ -74,8 +75,8 @@ i18n.input.chrome.inputview.content.compact.symbol.keyNASymbolCharacters = /* 19 */ { 'text': ')', 'moreKeys': { 'characters': ['>', '}', ']']}}, - /* 20 */ NonLetterKeys.ENTER, - /* 21 */ NonLetterKeys.SWITCHER, + /* 20 */ NON_LETTER_KEYS.ENTER, + /* 21 */ NON_LETTER_KEYS.SWITCHER, /* 22 */ { 'text': '\\' }, /* 23 */ { 'text': '=' }, /* 24 */ { 'text': '*', @@ -95,18 +96,18 @@ i18n.input.chrome.inputview.content.compact.symbol.keyNASymbolCharacters = /* 30 */ { 'text': '?', 'moreKeys': { 'characters': ['\u00BF']}}, - /* 31 */ NonLetterKeys.SWITCHER, - /* 32 */ NonLetterKeys.SWITCHER, + /* 31 */ NON_LETTER_KEYS.SWITCHER, + /* 32 */ NON_LETTER_KEYS.SWITCHER, /* 33 */ { 'text': '_', 'isGrey': true }, - /* 34 */ NonLetterKeys.MENU, + /* 34 */ NON_LETTER_KEYS.MENU, /* 35 */ { 'text': '/', 'isGrey': true }, - /* 36 */ NonLetterKeys.SPACE, + /* 36 */ NON_LETTER_KEYS.SPACE, /* 37 */ { 'text': ',', 'isGrey': true }, // Keep in sync with row_symbols4.xml in android input tool. /* 38 */ { 'text': '.', 'isGrey': true, 'moreKeys': { 'characters': ['\u2026']}}, - /* 39 */ NonLetterKeys.HIDE + /* 39 */ NON_LETTER_KEYS.HIDE ]; }; diff --git a/third_party/google_input_tools/src/chrome/os/inputview/config/compact_util.js b/third_party/google_input_tools/src/chrome/os/inputview/config/compact_util.js index 3257a04..899ffd4 100644 --- a/third_party/google_input_tools/src/chrome/os/inputview/config/compact_util.js +++ b/third_party/google_input_tools/src/chrome/os/inputview/config/compact_util.js @@ -15,11 +15,13 @@ goog.provide('i18n.input.chrome.inputview.content.compact.util'); goog.provide('i18n.input.chrome.inputview.content.compact.util.CompactKeysetSpec'); goog.require('i18n.input.chrome.inputview.Css'); -goog.require('i18n.input.chrome.inputview.content.constants'); +goog.require('i18n.input.chrome.inputview.content.Constants'); goog.require('i18n.input.chrome.inputview.elements.ElementType'); goog.scope(function() { var util = i18n.input.chrome.inputview.content.compact.util; +var NON_LETTER_KEYS = + i18n.input.chrome.inputview.content.Constants.NON_LETTER_KEYS; var Css = i18n.input.chrome.inputview.Css; @@ -90,8 +92,7 @@ util.createCompactData = function(keysetSpec, viewIdPrefix, keyIdPrefix) { var keysetSpecNode = util.CompactKeysetSpec; for (var i = 0; i < keysetSpec[keysetSpecNode.DATA].length; i++) { var keySpec = keysetSpec[keysetSpecNode.DATA][i]; - if (keySpec == - i18n.input.chrome.inputview.content.constants.NonLetterKeys.MENU) { + if (keySpec == NON_LETTER_KEYS.MENU) { keySpec['toKeyset'] = keysetSpec[keysetSpecNode.ID].split('.')[0]; } var id = keySpec['id'] ? keySpec['id'] : keyIdPrefix + i; @@ -141,8 +142,7 @@ util.createCompactKey = function(id, keySpec) { util.customizeSwitchers = function(keyCharacters, switcherKeys) { var j = 0; for (var i = 0; i < keyCharacters.length; i++) { - if (keyCharacters[i] == - i18n.input.chrome.inputview.content.constants.NonLetterKeys.SWITCHER) { + if (keyCharacters[i] == NON_LETTER_KEYS.SWITCHER) { if (j >= switcherKeys.length) { console.error('The number of switcher key spec is less than' + ' the number of switcher keys in the keyset.'); diff --git a/third_party/google_input_tools/src/chrome/os/inputview/config/constants.js b/third_party/google_input_tools/src/chrome/os/inputview/config/constants.js index 0a91552..d09f3cf 100644 --- a/third_party/google_input_tools/src/chrome/os/inputview/config/constants.js +++ b/third_party/google_input_tools/src/chrome/os/inputview/config/constants.js @@ -11,7 +11,7 @@ // you may not use this file except in compliance with the License. // Licensed under the Apache License, Version 2.0 (the "License"); // -goog.provide('i18n.input.chrome.inputview.content.constants'); +goog.provide('i18n.input.chrome.inputview.content.Constants'); goog.require('i18n.input.chrome.inputview.Css'); goog.require('i18n.input.chrome.inputview.StateType'); @@ -21,59 +21,60 @@ goog.scope(function() { var ElementType = i18n.input.chrome.inputview.elements.ElementType; + /** * The non letter keys. * * @const * @enum {Object} */ -i18n.input.chrome.inputview.content.constants.NonLetterKeys = { +i18n.input.chrome.inputview.content.Constants.NON_LETTER_KEYS = { BACKSPACE: { - 'iconCssClass': i18n.input.chrome.inputview.Css.BACKSPACE_ICON, - 'type': ElementType.BACKSPACE_KEY, - 'id': 'Backspace' + 'iconCssClass': i18n.input.chrome.inputview.Css.BACKSPACE_ICON, + 'type': ElementType.BACKSPACE_KEY, + 'id': 'Backspace' }, ENTER: { - 'iconCssClass': i18n.input.chrome.inputview.Css.ENTER_ICON, - 'type': ElementType.ENTER_KEY, - 'id': 'Enter' + 'iconCssClass': i18n.input.chrome.inputview.Css.ENTER_ICON, + 'type': ElementType.ENTER_KEY, + 'id': 'Enter' }, HIDE: { - 'iconCssClass': i18n.input.chrome.inputview.Css.HIDE_KEYBOARD_ICON, - 'type': ElementType.HIDE_KEYBOARD_KEY, - 'id': 'HideKeyboard' + 'iconCssClass': i18n.input.chrome.inputview.Css.HIDE_KEYBOARD_ICON, + 'type': ElementType.HIDE_KEYBOARD_KEY, + 'id': 'HideKeyboard' }, LEFT_SHIFT: { - 'toState': i18n.input.chrome.inputview.StateType.SHIFT, - 'iconCssClass': i18n.input.chrome.inputview.Css.SHIFT_ICON, - 'type': ElementType.MODIFIER_KEY, - 'id': 'ShiftLeft', - 'supportSticky': true + 'toState': i18n.input.chrome.inputview.StateType.SHIFT, + 'iconCssClass': i18n.input.chrome.inputview.Css.SHIFT_ICON, + 'type': ElementType.MODIFIER_KEY, + 'id': 'ShiftLeft', + 'supportSticky': true }, RIGHT_SHIFT: { - 'toState': i18n.input.chrome.inputview.StateType.SHIFT, - 'iconCssClass': i18n.input.chrome.inputview.Css.SHIFT_ICON, - 'type': ElementType.MODIFIER_KEY, - 'id': 'ShiftRight', - 'supportSticky': true + 'toState': i18n.input.chrome.inputview.StateType.SHIFT, + 'iconCssClass': i18n.input.chrome.inputview.Css.SHIFT_ICON, + 'type': ElementType.MODIFIER_KEY, + 'id': 'ShiftRight', + 'supportSticky': true }, SPACE: { - 'name': ' ', - 'type': ElementType.SPACE_KEY, - 'id': 'Space' + 'name': ' ', + 'type': ElementType.SPACE_KEY, + 'id': 'Space' }, SWITCHER: { - 'type': ElementType.SWITCHER_KEY + 'type': ElementType.SWITCHER_KEY }, MENU: { - 'iconCssClass': i18n.input.chrome.inputview.Css.MENU_ICON, - 'type': ElementType.MENU_KEY, - 'id': 'Menu' + 'iconCssClass': i18n.input.chrome.inputview.Css.MENU_ICON, + 'type': ElementType.MENU_KEY, + 'id': 'Menu' }, GLOBE: { - 'iconCssClass': i18n.input.chrome.inputview.Css.GLOBE_ICON, - 'type': ElementType.GLOBE_KEY, - 'id': 'Globe' + 'iconCssClass': i18n.input.chrome.inputview.Css.GLOBE_ICON, + 'type': ElementType.GLOBE_KEY, + 'id': 'Globe' } }; @@ -84,7 +85,7 @@ i18n.input.chrome.inputview.content.constants.NonLetterKeys = { * @const * @type {string} */ -i18n.input.chrome.inputview.content.constants.HintTextPlaceHolder = +i18n.input.chrome.inputview.content.Constants.HINT_TEXT_PLACE_HOLDER = '%hinttext%'; }); // goog.scope diff --git a/third_party/google_input_tools/src/chrome/os/inputview/config/material/emoji_data.js b/third_party/google_input_tools/src/chrome/os/inputview/config/material/emoji_data.js index a0b6da8..53b1f94 100644 --- a/third_party/google_input_tools/src/chrome/os/inputview/config/material/emoji_data.js +++ b/third_party/google_input_tools/src/chrome/os/inputview/config/material/emoji_data.js @@ -20,14 +20,14 @@ goog.require('i18n.input.chrome.inputview.elements.ElementType'); (function() { var viewIdPrefix = 'emoji-k-'; - var emojiKeyAmount = 27; + var emojiKeysPerPage = 27; var util = i18n.input.chrome.inputview.content.util; var ElementType = i18n.input.chrome.inputview.elements.ElementType; var EmojiType = i18n.input.chrome.inputview.EmojiType; var SpecNodeName = i18n.input.chrome.inputview.SpecNodeName; var Css = i18n.input.chrome.inputview.Css; - var keyCharacters = [ + var emojiGroups = [ // Recent [''], @@ -457,98 +457,72 @@ goog.require('i18n.input.chrome.inputview.elements.ElementType'); ]; var keyList = []; var mapping = {}; + var viewId = 0; keyList.push(util.createTabBarKey('Tabbar0', EmojiType.RECENT, Css.EMOJI_TABBAR_RECENT)); + mapping['Tabbar0'] = viewIdPrefix + viewId++; keyList.push(util.createTabBarKey('Tabbar1', EmojiType.HOT, Css.EMOJI_TABBAR_HOT)); + mapping['Tabbar1'] = viewIdPrefix + viewId++; keyList.push(util.createTabBarKey('Tabbar2', EmojiType.EMOTION, Css.EMOJI_TABBAR_EMOTION)); + mapping['Tabbar2'] = viewIdPrefix + viewId++; keyList.push(util.createTabBarKey('Tabbar3', EmojiType.ITEMS, Css.EMOJI_TABBAR_ITEMS)); + mapping['Tabbar3'] = viewIdPrefix + viewId++; keyList.push(util.createTabBarKey('Tabbar4', EmojiType.NATURE, Css.EMOJI_TABBAR_NATURE)); + mapping['Tabbar4'] = viewIdPrefix + viewId++; keyList.push(util.createTabBarKey('Tabbar5', EmojiType.PLACES_OF_INTERESTS, Css.EMOJI_TABBAR_PLACES_OF_INTERESTS)); + mapping['Tabbar5'] = viewIdPrefix + viewId++; keyList.push(util.createTabBarKey('Tabbar6', EmojiType.SPECIAL_CHARACTERS, Css.EMOJI_TABBAR_SPECIAL_CHARACTERS)); + mapping['Tabbar6'] = viewIdPrefix + viewId++; keyList.push(util.createTabBarKey('Tabbar7', EmojiType.EMOTICON, Css.EMOJI_TABBAR_EMOTICON)); + mapping['Tabbar7'] = viewIdPrefix + viewId++; - var amount = 0; - var acturalLength = 0; - for (var i = 0, len = keyCharacters.length; i < len; i++) { - acturalLength = Math.ceil(keyCharacters[i].length / emojiKeyAmount) * - emojiKeyAmount; - for (var j = 0, lenJ = keyCharacters[i].length; j < lenJ; j++) { + // Tab bar layout has 10 keys but we only need 8 keys here, skip two keys. + viewId += 2; + for (var i = 0, count = 0; i < emojiGroups.length; i++) { + var pages = Math.ceil(emojiGroups[i].length / emojiKeysPerPage); + for (var j = 0; j < pages * emojiKeysPerPage; j++) { var spec = {}; - spec[SpecNodeName.ID] = 'emojikey' + amount; + spec[SpecNodeName.ID] = 'emojikey' + count; spec[SpecNodeName.TYPE] = ElementType.EMOJI_KEY; - spec[SpecNodeName.TEXT] = keyCharacters[i][j]; + spec[SpecNodeName.TEXT] = + j < emojiGroups[i].length ? emojiGroups[i][j] : ''; spec[SpecNodeName.IS_EMOTICON] = (i == EmojiType.EMOTICON); var key = i18n.input.chrome.inputview.content.util.createKey(spec); + mapping[key['spec'][SpecNodeName.ID]] = viewIdPrefix + viewId++; keyList.push(key); - amount++; - } - for (var j = keyCharacters[i].length; j < acturalLength; j++) { - var spec = {}; - spec[SpecNodeName.ID] = 'emojikey' + amount; - spec[SpecNodeName.TYPE] = ElementType.EMOJI_KEY; - spec[SpecNodeName.TEXT] = ''; - spec[SpecNodeName.IS_EMOTICON] = (i == EmojiType.EMOTICON); - var key = i18n.input.chrome.inputview.content.util.createKey(spec); - keyList.push(key); - amount++; - } - } - keyList.push(util.createBackspaceKey()); - keyList.push(util.createEnterKey()); - keyList.push(util.createHideKeyboardKey()); - - var tabbarLength = 1 + keyCharacters.length; - var key = []; - - // Map the tabbars. - for (var i = 0, len = keyCharacters.length; i < len; i++) { - key = keyList[i]; - mapping[key['spec'][SpecNodeName.ID]] = viewIdPrefix + i; - } - - // Map the emoji keys. - amount = 0; - var offset = tabbarLength + 1; - for (var i = 0, len = keyCharacters.length; i < len; i++) { - acturalLength = Math.ceil(keyCharacters[i].length / emojiKeyAmount) * - emojiKeyAmount; - for (var j = 0, lenJ = acturalLength; j < lenJ; j++) { - key = keyList[amount + len]; - mapping[key['spec'][SpecNodeName.ID]] = viewIdPrefix + (amount + - offset); - amount++; + count++; } } + var tmp = util.createBackspaceKey(); + keyList.push(tmp); + mapping[tmp['spec'][SpecNodeName.ID]] = viewIdPrefix + viewId++; + tmp = util.createEnterKey(); + keyList.push(tmp); + mapping[tmp['spec'][SpecNodeName.ID]] = viewIdPrefix + viewId++; + // SideKeys layout has 3 keys but we only need 2 keys here, skip one key. + viewId++; - // Map the side keys - for (var i = 0; i < 3; ++i) { - key = keyList[i + amount + keyCharacters.length]; - mapping[key['spec'][SpecNodeName.ID]] = viewIdPrefix + - (i + amount + offset); - } - - amount = amount + offset + 3; //The space row. - var tmp = util.createBackToKeyboardKey(); + tmp = util.createBackToKeyboardKey(); keyList.push(tmp); - mapping[tmp['spec'][SpecNodeName.ID]] = viewIdPrefix + amount++; + mapping[tmp['spec'][SpecNodeName.ID]] = viewIdPrefix + viewId++; tmp = util.createSpaceKey(); keyList.push(tmp); - mapping[tmp['spec'][SpecNodeName.ID]] = viewIdPrefix + amount++; + mapping[tmp['spec'][SpecNodeName.ID]] = viewIdPrefix + viewId++; tmp = util.createHideKeyboardKey(); keyList.push(tmp); - mapping[tmp['spec'][SpecNodeName.ID]] = viewIdPrefix + amount++; + mapping[tmp['spec'][SpecNodeName.ID]] = viewIdPrefix + viewId++; var result = []; - result[SpecNodeName.TEXT] = keyCharacters; + result[SpecNodeName.TEXT] = emojiGroups; result[SpecNodeName.KEY_LIST] = keyList; result[SpecNodeName.MAPPING] = mapping; result[SpecNodeName.LAYOUT] = 'emoji'; diff --git a/third_party/google_input_tools/src/chrome/os/inputview/config/us-dvp_data.js b/third_party/google_input_tools/src/chrome/os/inputview/config/us-dvp_data.js new file mode 100644 index 0000000..e79000b --- /dev/null +++ b/third_party/google_input_tools/src/chrome/os/inputview/config/us-dvp_data.js @@ -0,0 +1,125 @@ +// Copyright 2015 The ChromeOS IME Authors. All Rights Reserved. +// limitations under the License. +// See the License for the specific language governing permissions and +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// distributed under the License is distributed on an "AS-IS" BASIS, +// Unless required by applicable law or agreed to in writing, software +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// You may obtain a copy of the License at +// you may not use this file except in compliance with the License. +// Licensed under the Apache License, Version 2.0 (the "License"); +// +goog.require('i18n.input.chrome.inputview.content.util'); + +(function() { + var viewIdPrefix_ = '101kbd-k-'; + + var keyCharacters = [ + ['\u0024', '\u007e', '\u0303', '\u0000'], // TLDE + ['\u0026', '\u0025'], // AE01 + ['\u005b', '\u0037', '\u00a4', '\u0000'], // AE02 + ['\u007b', '\u0035', '\u00a2', '\u0000'], // AE03 + ['\u007d', '\u0033', '\u00a5', '\u0000'], // AE04 + ['\u0028', '\u0031', '\u20ac', '\u0000'], // AE05 + ['\u003d', '\u0039', '\u00a3', '\u0000'], // AE06 + ['\u002a', '\u0030'], // AE07 + ['\u0029', '\u0032', '\u00bd', '\u0000'], // AE08 + ['\u002b', '\u0034'], // AE09 + ['\u005d', '\u0036'], // AE10 + ['\u0021', '\u0038', '\u00a1', '\u0000'], // AE11 + ['\u0023', '\u0060', '\u0300', '\u0000'], // AE12 + ['\u003b', '\u003a', '\u0308', '\u0000'], // AD01 + ['\u002c', '\u003c', '\u00ab', '\u0000'], // AD02 + ['\u002e', '\u003e', '\u00bb', '\u0000'], // AD03 + ['\u0070', '\u0050', '\u00b6', '\u00a7'], // AD04 + ['\u0079', '\u0059', '\u00fc', '\u00dc'], // AD05 + ['\u0066', '\u0046'], // AD06 + ['\u0067', '\u0047'], // AD07 + ['\u0063', '\u0043', '\u00e7', '\u00c7'], // AD08 + ['\u0072', '\u0052', '\u00ae', '\u2122'], // AD09 + ['\u006c', '\u004c'], // AD10 + ['\u002f', '\u003f', '\u00bf', '\u0000'], // AD11 + ['\u0040', '\u005e', '\u0302', '\u030c'], // AD12 + ['\u005c', '\u007c'], // BKSL + ['\u0061', '\u0041', '\u00e5', '\u00c5'], // AC01 + ['\u006f', '\u004f', '\u00f8', '\u00d8'], // AC02 + ['\u0065', '\u0045', '\u00e6', '\u00c6'], // AC03 + ['\u0075', '\u0055', '\u00e9', '\u00c9'], // AC04 + ['\u0069', '\u0049'], // AC05 + ['\u0064', '\u0044', '\u00f0', '\u00d0'], // AC06 + ['\u0068', '\u0048', '\u0301', '\u0000'], // AC07 + ['\u0074', '\u0054', '\u00fe', '\u00de'], // AC08 + ['\u006e', '\u004e', '\u00f1', '\u00d1'], // AC09 + ['\u0073', '\u0053', '\u00df', '\u0000'], // AC10 + ['\u002d', '\u005f', '\u2010', '\u0000'], // AC11 + ['\u0027', '\u0022', '\u0301', '\u0000'], // AB01 + ['\u0071', '\u0051'], // AB02 + ['\u006a', '\u004a'], // AB03 + ['\u006b', '\u004b'], // AB04 + ['\u0078', '\u0058'], // AB05 + ['\u0062', '\u0042'], // AB06 + ['\u006d', '\u004d'], // AB07 + ['\u0077', '\u0057'], // AB08 + ['\u0076', '\u0056'], // AB09 + ['\u007a', '\u005a'], // AB10 + ['\u0020', '\u0020'] // SPCE + ]; + + var keyCodes = [ + 0xC0, // TLDE + 0x31, // AE01 + 0x32, // AE02 + 0xDE, // AE03 + 0xBF, // AE04 + 0x35, // AE05 + 0x36, // AE06 + 0x37, // AE07 + 0x38, // AE08 + 0x39, // AE09 + 0x30, // AE10 + 0xBD, // AE11 + 0xBB, // AE12 + 0xBA, // AD01 + 0xBC, // AD02 + 0xBE, // AD03 + 0x50, // AD04 + 0x59, // AD05 + 0x46, // AD06 + 0x47, // AD07 + 0x43, // AD08 + 0x52, // AD09 + 0x4C, // AD10 + 0xBF, // AD11 + 0xDD, // AD12 + 0xDC, // BKSL + 0x41, // AC01 + 0x4F, // AC02 + 0x45, // AC03 + 0x55, // AC04 + 0x49, // AC05 + 0x44, // AC06 + 0x48, // AC07 + 0x54, // AC08 + 0x4E, // AC09 + 0x53, // AC10 + 0xBD, // AC11 + 0x5A, // AB01 + 0x51, // AB02 + 0x4A, // AB03 + 0x4B, // AB04 + 0x58, // AB05 + 0x42, // AB06 + 0x4D, // AB07 + 0x57, // AB08 + 0x56, // AB09 + 0x5A, // AB10 + 0x20 // SPCE + ]; + + var data = i18n.input.chrome.inputview.content.util.createData( + keyCharacters, viewIdPrefix_, false, true, keyCodes); + data['id'] = 'us-dvp'; + google.ime.chrome.inputview.onConfigLoaded(data); +}) (); diff --git a/third_party/google_input_tools/src/chrome/os/inputview/config/zhuyin_data.js b/third_party/google_input_tools/src/chrome/os/inputview/config/zhuyin_data.js index 0fa9065..ab220ef 100644 --- a/third_party/google_input_tools/src/chrome/os/inputview/config/zhuyin_data.js +++ b/third_party/google_input_tools/src/chrome/os/inputview/config/zhuyin_data.js @@ -16,16 +16,80 @@ goog.require('i18n.input.chrome.inputview.content.compact.more'); goog.require('i18n.input.chrome.inputview.content.compact.symbol'); goog.require('i18n.input.chrome.inputview.content.compact.util'); goog.require('i18n.input.chrome.inputview.content.compact.util.CompactKeysetSpec'); +goog.require('i18n.input.chrome.inputview.content.util'); +goog.require('i18n.input.chrome.message.ContextType'); (function() { var keysetSpecNode = i18n.input.chrome.inputview.content.compact.util.CompactKeysetSpec; var letter = i18n.input.chrome.inputview.content.compact.letter; - var symbol = + var symbol = i18n.input.chrome.inputview.content.compact.symbol; var more = i18n.input.chrome.inputview.content.compact.more; + + + var viewIdPrefix_ = '101kbd-k-'; + var ContextType = i18n.input.chrome.message.ContextType; + + var keyCharacters = [ + ['\u0060', '\u007e'], // TLDE + ['\u3105', '\u0021'], // AE01 + ['\u3109', '\u0040'], // AE02 + ['\u02c7', '\u0023'], // AE03 + ['\u02cb', '\u0024'], // AE04 + ['\u3113', '\u0025'], // AE05 + ['\u02ca', '\u005e'], // AE06 + ['\u02d9', '\u0026'], // AE07 + ['\u311a', '\u002a'], // AE08 + ['\u311e', '\u0028'], // AE09 + ['\u3122', '\u0029'], // AE10 + ['\u002d', '\u005f'], // AE11 + ['\u003d', '\u002b'], // AE12 + + ['\u3106', '\u0051'], // AD01 + ['\u310a', '\u0057'], // AD02 + ['\u310d', '\u0045'], // AD03 + ['\u3110', '\u0052'], // AD04 + ['\u3114', '\u0054'], // AD05 + ['\u3117', '\u0059'], // AD06 + ['\u3127', '\u0055'], // AD07 + ['\u311b', '\u0049'], // AD08 + ['\u311f', '\u004f'], // AD09 + ['\u3123', '\u0050'], // AD10 + ['\u005b', '\u007b'], // AD11 + ['\u005d', '\u007d'], // AD12 + ['\u005c', '\u007c'], // BKSL + + ['\u3107', '\u0041'], // AC01 + ['\u310B', '\u0053'], // AC02 + ['\u310e', '\u0044'], // AC03 + ['\u3111', '\u0046'], // AC04 + ['\u3115', '\u0047'], // AC05 + ['\u3118', '\u0048'], // AC06 + ['\u3128', '\u004a'], // AC07 + ['\u311c', '\u004b'], // AC08 + ['\u3120', '\u004c'], // AC09 + ['\u3124', '\u003a'], // AC10 + ['\u0027', '\u0022'], // AC11 + + ['\u3108', '\u005a'], // AB01 + ['\u310c', '\u0058'], // AB02 + ['\u310f', '\u0043'], // AB03 + ['\u3112', '\u0056'], // AB04 + ['\u3116', '\u0042'], // AB05 + ['\u3119', '\u004e'], // AB06 + ['\u3129', '\u004d'], // AB07 + ['\u311d', '\u003c'], // AB08 + ['\u3121', '\u003e'], // AB09 + ['\u3125', '\u003f'], // AB10 + ['\u0020', '\u0020'] // SPCE + ]; + + + + var letterKeysetSpec = {}; letterKeysetSpec[keysetSpecNode.ID] = 'zhuyin.compact.qwerty'; letterKeysetSpec[keysetSpecNode.LAYOUT] = 'compactkbd-zhuyin'; @@ -63,4 +127,10 @@ goog.require('i18n.input.chrome.inputview.content.compact.util.CompactKeysetSpec letterKeysetSpec, enLetterKeysetSpec, symbolKeysetSpec, enSymbolKeysetSpec, moreKeysetSpec, enMoreKeysetSpec, google.ime.chrome.inputview.onConfigLoaded); + + var data = i18n.input.chrome.inputview.content.util.createData( + keyCharacters, viewIdPrefix_, false, false, undefined, + 'zhuyin.compact.qwerty'); + data['id'] = 'zhuyin'; + google.ime.chrome.inputview.onConfigLoaded(data); }) (); diff --git a/third_party/google_input_tools/src/chrome/os/inputview/controller.js b/third_party/google_input_tools/src/chrome/os/inputview/controller.js index 4cd26fb..dbf7a42 100644 --- a/third_party/google_input_tools/src/chrome/os/inputview/controller.js +++ b/third_party/google_input_tools/src/chrome/os/inputview/controller.js @@ -21,6 +21,7 @@ goog.require('goog.dom.classlist'); goog.require('goog.events.Event'); goog.require('goog.events.EventHandler'); goog.require('goog.events.EventType'); +goog.require('goog.events.KeyCodes'); goog.require('goog.i18n.bidi'); goog.require('goog.object'); goog.require('i18n.input.chrome.DataSource'); @@ -40,7 +41,6 @@ goog.require('i18n.input.chrome.inputview.SizeSpec'); goog.require('i18n.input.chrome.inputview.SpecNodeName'); goog.require('i18n.input.chrome.inputview.StateType'); goog.require('i18n.input.chrome.inputview.SwipeDirection'); -goog.require('i18n.input.chrome.inputview.elements.Element'); goog.require('i18n.input.chrome.inputview.elements.ElementType'); goog.require('i18n.input.chrome.inputview.elements.content.Candidate'); goog.require('i18n.input.chrome.inputview.elements.content.CandidateView'); @@ -539,6 +539,7 @@ Controller.prototype.onUpdateSettings_ = function(e) { } if (goog.isDef(e.msg['candidatesNavigation'])) { settings.candidatesNavigation = e.msg['candidatesNavigation']; + this.container_.candidateView.setNavigation(settings.candidatesNavigation); } if (goog.isDef(e.msg[Name.KEYSET])) { this.setDefaultKeyset_(e.msg[Name.KEYSET]); @@ -863,7 +864,7 @@ Controller.prototype.handlePointerAction_ = function(view, e) { Controller.HANDWRITING_VIEW_CODE_, Controller.EMOJI_VIEW_CODE_]; if (goog.array.contains(tabbableKeysets, this.currentKeyset_)) { - this.resetAll_(); + this.resetAll(); this.switchToKeyset(this.container_.currentKeysetView.fromKeyset); } } @@ -941,7 +942,7 @@ Controller.prototype.handlePointerAction_ = function(view, e) { this.executeCommand_.apply(this, view.getCommand()); this.container_.menuView.hide(); this.soundController_.onKeyUp(view.type); - this.resetAll_(); + this.resetAll(); } view.setHighlighted(e.type == EventType.POINTER_DOWN || e.type == EventType.POINTER_OVER); @@ -981,15 +982,6 @@ Controller.prototype.handlePointerAction_ = function(view, e) { Type.VOICE_PRIVACY_GOT_IT)); return; - case ElementType.VOICE_BTN: - if (e.type == EventType.POINTER_UP) { - this.container_.candidateView.switchToIcon( - CandidateView.IconType.VOICE, false); - this.container_.voiceView.start(); - } - return; - - case ElementType.VOICE_VIEW: if (e.type == EventType.POINTER_UP) { this.adapter_.sendVoiceViewStateChange(false); @@ -1067,6 +1059,13 @@ Controller.prototype.handlePointerAction_ = function(view, e) { Controller.prototype.handlePointerEventForSoftKey_ = function(softKey, e) { var key; switch (softKey.type) { + case ElementType.VOICE_BTN: + if (e.type == EventType.POINTER_UP) { + this.container_.candidateView.switchToIcon( + CandidateView.IconType.VOICE, false); + this.container_.voiceView.start(); + } + break; case ElementType.CANDIDATES_PAGE_UP: if (e.type == EventType.POINTER_UP) { this.container_.expandedCandidateView.pageUp(); @@ -1087,8 +1086,10 @@ Controller.prototype.handlePointerEventForSoftKey_ = function(softKey, e) { } else if (e.type == EventType.POINTER_UP) { this.model_.stateManager.triggerChording(); var ch = key.getActiveCharacter(); - this.adapter_.sendKeyDownAndUpEvent(ch, key.id, key.keyCode, - this.getSpatialData_(key, e.x, e.y)); + if (ch) { + this.adapter_.sendKeyDownAndUpEvent(ch, key.id, key.keyCode, + this.getSpatialData_(key, e.x, e.y)); + } this.clearUnstickyState_(); key.flickerredCharacter = ''; } @@ -1221,7 +1222,7 @@ Controller.prototype.handlePointerEventForSoftKey_ = function(softKey, e) { this.updateContextModifierState_(); this.container_.menuView.hide(); } else { - this.resetAll_(); + this.resetAll(); } // Switch to the specific keyboard. this.switchToKeyset(key.toKeyset); @@ -1293,7 +1294,7 @@ Controller.prototype.handlePointerEventForSoftKey_ = function(softKey, e) { this.adapter_.getInputMethods(function(inputMethods) { this.container_.menuView.show(key, defaultFullKeyset, isCompact, enableCompact, this.currentInputMethod_, inputMethods, hasHwt, - enableSettings, hasEmoji); + enableSettings, hasEmoji, this.adapter_.isA11yMode); }.bind(this)); } break; @@ -1302,10 +1303,11 @@ Controller.prototype.handlePointerEventForSoftKey_ = function(softKey, e) { if (e.type == EventType.POINTER_UP) { this.adapter_.clearModifierStates(); this.adapter_.setModifierState( - i18n.input.chrome.inputview.StateType.CTRL, true); - this.adapter_.sendKeyDownAndUpEvent(' ', KeyCodes.SPACE, 0x20); + i18n.input.chrome.inputview.StateType.ALT, true); + this.adapter_.sendKeyDownAndUpEvent( + KeyCodes.SHIFT, KeyCodes.SHIFT_LEFT, goog.events.KeyCodes.SHIFT); this.adapter_.setModifierState( - i18n.input.chrome.inputview.StateType.CTRL, false); + i18n.input.chrome.inputview.StateType.ALT, false); } break; case ElementType.IME_SWITCH: @@ -1393,7 +1395,7 @@ Controller.prototype.onVisibilityChange_ = function() { Math.floor((new Date() - this.showTimeStamp_) / 1000), 4096, 50); this.statsForClosing_ = {}; this.showTimeStamp_ = new Date(); - this.resetAll_(); + this.resetAll(); } }; @@ -1401,10 +1403,8 @@ Controller.prototype.onVisibilityChange_ = function() { /** * Resets the whole keyboard include clearing candidates, * reset modifier state, etc. - * - * @private */ -Controller.prototype.resetAll_ = function() { +Controller.prototype.resetAll = function() { this.clearCandidates_(); this.container_.cleanStroke(); this.model_.stateManager.reset(); @@ -1437,7 +1437,7 @@ Controller.prototype.shouldShowToolBar_ = function() { * @private */ Controller.prototype.onContextFocus_ = function() { - this.resetAll_(); + this.resetAll(); this.model_.stateManager.contextType = this.adapter_.contextType; this.switchToKeyset(this.getActiveKeyset_()); }; @@ -1612,7 +1612,10 @@ Controller.prototype.showCandidates_ = function(source, candidates, this.container_.candidateView.showCandidates(candidates, isThreeCandidates, this.model_.settings.candidatesNavigation && !isHwt); - if (expand) { + // Only sum of candidate is greater than top line count. Need to update + // expand view. + if (expand && this.container_.candidateView.candidateCount < + candidates.length) { expandView.state = state; this.container_.currentKeysetView.setVisible(false); expandView.showCandidates(candidates, @@ -1622,6 +1625,8 @@ Controller.prototype.showCandidates_ = function(source, candidates, } else { expandView.state = ExpandedCandidateView.State.NONE; expandView.setVisible(false); + this.container_.candidateView.switchToIcon(CandidateView.IconType. + SHRINK_CANDIDATES, false); this.container_.currentKeysetView.setVisible(true); } }; @@ -1641,18 +1646,21 @@ Controller.prototype.clearCandidates_ = function() { if (this.container_.currentKeysetView) { this.container_.currentKeysetView.setVisible(true); } - if (!this.adapter_.isQPInputView && - (this.currentKeyset_ == Controller.HANDWRITING_VIEW_CODE_ || - this.currentKeyset_ == Controller.EMOJI_VIEW_CODE_)) { - this.container_.candidateView.switchToIcon( - CandidateView.IconType.BACK, true); - } else if (this.currentKeyset_ != Controller.HANDWRITING_VIEW_CODE_ && - this.currentKeyset_ != Controller.EMOJI_VIEW_CODE_) { - this.container_.candidateView.switchToIcon(CandidateView.IconType.VOICE, - this.adapter_.isVoiceInputEnabled); + + if (this.currentKeyset_ == Controller.HANDWRITING_VIEW_CODE_ || + this.currentKeyset_ == Controller.EMOJI_VIEW_CODE_) { + if (!this.adapter_.isQPInputView) { + this.container_.candidateView.switchToIcon( + CandidateView.IconType.BACK, true); + } else { + this.container_.candidateView.switchToIcon( + CandidateView.IconType.VOICE, false); + this.container_.candidateView.switchToIcon( + CandidateView.IconType.EXPAND_CANDIDATES, false); + } } else { this.container_.candidateView.switchToIcon(CandidateView.IconType.VOICE, - false); + this.adapter_.isVoiceInputEnabled); } }; @@ -1969,7 +1977,10 @@ Controller.prototype.initialize = function(keyset, languageCode, passwordLayout, } this.languageCode_ = languageCode; this.currentInputMethod_ = currentInputMethod; - var keySetMap = this.contextTypeToKeysetMap_[this.currentInputMethod_] = {}; + var keySetMap = this.contextTypeToKeysetMap_[this.currentInputMethod_]; + if (!keySetMap) { + keySetMap = this.contextTypeToKeysetMap_[this.currentInputMethod_] = {}; + } keySetMap[ContextType.PASSWORD] = passwordLayout; keySetMap[ContextType.DEFAULT] = keyset; @@ -2135,7 +2146,7 @@ Controller.prototype.onUpdateToggleLanguateState_ = function(e) { } } if (toKeyset) { - this.resetAll_(); + this.resetAll(); this.switchToKeyset(toKeyset); } } diff --git a/third_party/google_input_tools/src/chrome/os/inputview/css.js b/third_party/google_input_tools/src/chrome/os/inputview/css.js index 6666789..cd04d96 100644 --- a/third_party/google_input_tools/src/chrome/os/inputview/css.js +++ b/third_party/google_input_tools/src/chrome/os/inputview/css.js @@ -21,7 +21,9 @@ goog.provide('i18n.input.chrome.inputview.Css'); */ i18n.input.chrome.inputview.Css = { A11Y: goog.getCssName('inputview-a11y'), + ACCENT_COMPACT_FONT: goog.getCssName('inputview-compact-font'), ACCENT_CONTAINER: goog.getCssName('inputview-accent-container'), + ACCENT_FULL_FONT: goog.getCssName('inputview-full-font'), ACCENT_ROW: goog.getCssName('inputview-accent-row'), ACCENT_EMPTY_KEY: goog.getCssName('inputview-accent-empty-key'), ACCENT_KEY: goog.getCssName('inputview-accent-key'), @@ -47,7 +49,6 @@ i18n.input.chrome.inputview.Css = { 'inputview-candidate-internal-wrapper'), CANDIDATE_SEPARATOR: goog.getCssName('inputview-candidate-separator'), CANDIDATE_VIEW: goog.getCssName('inputview-candidate-view'), - CANDIDATE_VIEW_DISABLED: goog.getCssName('candidate-view-disabled'), CANVAS: goog.getCssName('inputview-canvas'), CANVAS_LEFT_COLUMN: goog.getCssName('inputview-canvas-left-column'), CANVAS_RIGHT_COLUMN: goog.getCssName('inputview-canvas-right-column'), diff --git a/third_party/google_input_tools/src/chrome/os/inputview/elements/content/altdataview.js b/third_party/google_input_tools/src/chrome/os/inputview/elements/content/altdataview.js index dcd6b42..1e1d4bc 100644 --- a/third_party/google_input_tools/src/chrome/os/inputview/elements/content/altdataview.js +++ b/third_party/google_input_tools/src/chrome/os/inputview/elements/content/altdataview.js @@ -21,11 +21,11 @@ goog.require('goog.math.Coordinate'); goog.require('goog.object'); goog.require('goog.style'); goog.require('i18n.input.chrome.inputview.Css'); -goog.require('i18n.input.chrome.inputview.content.constants'); +goog.require('i18n.input.chrome.inputview.content.Constants'); goog.require('i18n.input.chrome.inputview.elements.Element'); goog.require('i18n.input.chrome.inputview.elements.ElementType'); -goog.require('i18n.input.chrome.inputview.util'); goog.require('i18n.input.chrome.inputview.handler.Util'); +goog.require('i18n.input.chrome.inputview.util'); goog.scope(function() { @@ -175,6 +175,15 @@ AltDataView.prototype.identifier = Util.INVALID_EVENT_IDENTIFIER; AltDataView.prototype.useIMEWindow_ = false; +/** + * True if show is called and false if hide is called. + * + * @type {boolean} + * @private + */ +AltDataView.prototype.visible_ = false; + + /** @override */ AltDataView.prototype.createDom = function() { goog.base(this, 'createDom'); @@ -227,7 +236,7 @@ AltDataView.prototype.show = function(key, isRTL, identifier) { fixedColumns = key.getFixedColumns(); if (key.hintText) { var index = goog.array.indexOf(characters, - i18n.input.chrome.inputview.content.constants.HintTextPlaceHolder); + i18n.input.chrome.inputview.content.Constants.HINT_TEXT_PLACE_HOLDER); if (index != -1) { goog.array.splice(characters, index, 1, key.hintText); } else { @@ -239,6 +248,7 @@ AltDataView.prototype.show = function(key, isRTL, identifier) { return; } + this.visible_ = true; goog.style.setElementShown(this.getElement(), true); this.getDomHelper().removeChildren(this.getElement()); @@ -278,7 +288,7 @@ AltDataView.prototype.show = function(key, isRTL, identifier) { var contentWindow = self.altdataWindow_.contentWindow; contentWindow.addEventListener('load', function() { contentWindow.accents.setAccents(characters, numOfColumns, - numOfRows, w, h, startKeyIndex); + numOfRows, w, h, startKeyIndex, isCompact); self.highlightItem( Math.ceil(parentKeyLeftTop.x + w / 2), Math.ceil(parentKeyLeftTop.y + h / 2), @@ -293,7 +303,14 @@ AltDataView.prototype.show = function(key, isRTL, identifier) { outerBounds.width += (marginBox.left + marginBox.right); outerBounds.height += (marginBox.top + marginBox.bottom); self.altdataWindow_.outerBounds = outerBounds; - self.altdataWindow_.show(); + // Function hide maybe called before loading complete. Do not show + // the window in this case. + if (self.visible_) { + self.altdataWindow_.show(); + } else { + self.altdataWindow_.close(); + self.altdataWindow_ = null; + } }); }); } else { @@ -405,6 +422,7 @@ AltDataView.prototype.getOptimizedMaxColumns_ = function(numOfKeys) { * Hides the alt data view. */ AltDataView.prototype.hide = function() { + this.visible_ = false; if (this.useIMEWindow_ && this.altdataWindow_) { this.altdataWindow_.close(); this.altdataWindow_ = null; diff --git a/third_party/google_input_tools/src/chrome/os/inputview/elements/content/candidateview.js b/third_party/google_input_tools/src/chrome/os/inputview/elements/content/candidateview.js index 7cee5f8..1d840b3 100644 --- a/third_party/google_input_tools/src/chrome/os/inputview/elements/content/candidateview.js +++ b/third_party/google_input_tools/src/chrome/os/inputview/elements/content/candidateview.js @@ -227,6 +227,10 @@ CandidateView.HANDWRITING_VIEW_CODE_ = 'hwt'; CandidateView.EMOJI_VIEW_CODE_ = 'emoji'; +/** @private {string} */ +CandidateView.prototype.keyset_ = ''; + + /** * The width of the inter container. * @@ -235,6 +239,14 @@ CandidateView.EMOJI_VIEW_CODE_ = 'emoji'; CandidateView.prototype.interContainerWidth_ = 0; +/** @private {boolean} */ +CandidateView.prototype.navigation_ = false; + + +/** @private {number} */ +CandidateView.prototype.sumOfCandidates_ = 0; + + /** @override */ CandidateView.prototype.createDom = function() { goog.base(this, 'createDom'); @@ -321,6 +333,7 @@ CandidateView.prototype.showNumberRow = function() { CandidateView.prototype.showCandidates = function(candidates, showThreeCandidates, opt_expandable) { this.clearCandidates(); + this.sumOfCandidates_ = candidates.length; if (candidates.length > 0) { if (showThreeCandidates) { this.addThreeCandidates_(candidates); @@ -365,6 +378,7 @@ CandidateView.prototype.addThreeCandidates_ = function(candidates) { * Clears the candidates. */ CandidateView.prototype.clearCandidates = function() { + this.sumOfCandidates_ = 0; if (this.showingCandidates) { this.candidateCount = 0; this.getDomHelper().removeChildren(this.interContainer_); @@ -427,17 +441,16 @@ CandidateView.prototype.setWidthInWeight = function(widthInWeight, /** @override */ CandidateView.prototype.resize = function(width, height) { if (this.backspaceWeight_ > 0) { - var weightArray = []; - var keys = Math.round(this.widthInWeight_ - this.backspaceWeight_); - for (var i = 0; i < keys; i++) { - weightArray.push(1); - } + var weightArray = [Math.round(this.widthInWeight_ - this.backspaceWeight_)]; weightArray.push(this.backspaceWeight_); var values = util.splitValue(weightArray, width); this.iconWidth_ = values[values.length - 1]; } goog.style.setSize(this.getElement(), width, height); - goog.style.setSize(this.interContainer_, (width - this.iconWidth_), height); + if (!goog.dom.classlist.contains(this.getElement(), + i18n.input.chrome.inputview.Css.THREE_CANDIDATES)) { + goog.style.setSize(this.interContainer_, (width - this.iconWidth_), height); + } for (var i = 0; i < this.iconButtons_.length; i++) { var button = this.iconButtons_[i]; button.resize(this.iconWidth_, height); @@ -476,23 +489,21 @@ CandidateView.prototype.resize = function(width, height) { * @param {boolean} visible The visibility of back button. */ CandidateView.prototype.switchToIcon = function(type, visible) { - for (var i = 0; i < this.iconButtons_.length; i++) { - this.iconButtons_[i].setVisible(false); - } - if (visible) { - if (type != IconType.VOICE) { - this.iconButtons_[type].setVisible(true); - } else if (this.adapter_.isVoiceInputEnabled && - this.adapter_.contextType != 'password') { - // Don't enable voice when focus in password box. - this.iconButtons_[type].setVisible(true); + for (var i = 0; i < this.iconButtons_.length; i++) { + if (type != IconType.VOICE) { + this.iconButtons_[i].setVisible(i == type); + } else { + this.iconButtons_[i].setVisible(i == type && + this.needToShowVoiceIcon_()); + } + } + } else { + this.iconButtons_[type].setVisible(false); + // When some icon turn to invisible, need to show voice icon. + if (!visible && type != IconType.VOICE && this.needToShowVoiceIcon_()) { + this.iconButtons_[IconType.VOICE].setVisible(true); } - } else if (this.adapter_.isVoiceInputEnabled && - type != IconType.VOICE && - this.adapter_.contextType != 'password') { - // Default to show voice icon. - this.iconButtons_[IconType.VOICE].setVisible(true); } }; @@ -511,7 +522,8 @@ CandidateView.prototype.setToolbarVisible = function(visible) { /** - * Updates the candidate view by key set changing. + * Updates the candidate view by key set changing. Whether to show voice icon + * or not. * * @param {string} keyset . * @param {boolean} isPasswordBox . @@ -519,17 +531,18 @@ CandidateView.prototype.setToolbarVisible = function(visible) { */ CandidateView.prototype.updateByKeyset = function( keyset, isPasswordBox, isRTL) { - if (!i18n.input.chrome.inputview.GlobalFlags.isQPInputView && ( - keyset == CandidateView.HANDWRITING_VIEW_CODE_ || - keyset == CandidateView.EMOJI_VIEW_CODE_)) { - this.switchToIcon(IconType.BACK, true); - } else if (keyset != CandidateView.HANDWRITING_VIEW_CODE_ && - keyset != CandidateView.EMOJI_VIEW_CODE_) { - this.switchToIcon(IconType.VOICE, - this.adapter_.isVoiceInputEnabled && - this.adapter_.contextType != 'password'); + this.keyset_ = keyset; + if (keyset == CandidateView.HANDWRITING_VIEW_CODE_ || + keyset == CandidateView.EMOJI_VIEW_CODE_) { + // Handwriting and emoji keyset do not allow to show voice icon. + // When it's not material design style, need to show BACK icon. + if (!i18n.input.chrome.inputview.GlobalFlags.isQPInputView) { + this.switchToIcon(IconType.BACK, true); + } else { + this.switchToIcon(IconType.VOICE, false); + } } else { - this.switchToIcon(IconType.VOICE, false); + this.switchToIcon(IconType.VOICE, this.needToShowVoiceIcon_()); } if (isPasswordBox && (keyset.indexOf('compact') != -1 && @@ -549,4 +562,29 @@ CandidateView.prototype.disposeInternal = function() { goog.base(this, 'disposeInternal'); }; + + +/** + * Whether need to show voice icon on candidate view bar. + * + * @return {boolean} + * @private + */ +CandidateView.prototype.needToShowVoiceIcon_ = function() { + return this.adapter_.isVoiceInputEnabled && + this.adapter_.contextType != 'password' && + this.keyset_ != CandidateView.HANDWRITING_VIEW_CODE_ && + this.keyset_ != CandidateView.EMOJI_VIEW_CODE_ && + (!this.navigation_ || this.candidateCount == this.sumOfCandidates_); +}; + + +/** + * Sets the navigation value. + * + * @param {boolean} navigation . + */ +CandidateView.prototype.setNavigation = function(navigation) { + this.navigation_ = navigation; +}; }); // goog.scope diff --git a/third_party/google_input_tools/src/chrome/os/inputview/elements/content/canvasview.js b/third_party/google_input_tools/src/chrome/os/inputview/elements/content/canvasview.js index 33aba38..abcc7b7 100644 --- a/third_party/google_input_tools/src/chrome/os/inputview/elements/content/canvasview.js +++ b/third_party/google_input_tools/src/chrome/os/inputview/elements/content/canvasview.js @@ -17,13 +17,13 @@ goog.require('goog.array'); goog.require('goog.asserts'); goog.require('goog.dom.TagName'); goog.require('goog.dom.classlist'); -goog.require('goog.events.EventType'); goog.require('goog.style'); goog.require('i18n.input.chrome.DataSource'); goog.require('i18n.input.chrome.inputview.Css'); goog.require('i18n.input.chrome.inputview.elements.Element'); goog.require('i18n.input.chrome.inputview.elements.ElementType'); goog.require('i18n.input.chrome.inputview.elements.Weightable'); +goog.require('i18n.input.chrome.inputview.elements.content.SpanElement'); goog.require('i18n.input.chrome.message.Name'); goog.require('i18n.input.chrome.message.Type'); goog.require('i18n.input.hwt.Canvas'); @@ -36,6 +36,7 @@ var Canvas = i18n.input.hwt.Canvas; var Css = i18n.input.chrome.inputview.Css; var ElementType = i18n.input.chrome.inputview.elements.ElementType; var Name = i18n.input.chrome.message.Name; +var SpanElement = i18n.input.chrome.inputview.elements.content.SpanElement; var Type = i18n.input.chrome.message.Type; @@ -129,14 +130,6 @@ CanvasView.prototype.privacyDiv_; /** - * The "got it" confirm span for privacy info. - * - * @private {!Element} - */ -CanvasView.prototype.confirmSpan_; - - -/** * The cover mask element. * * @private {!Element} @@ -173,10 +166,12 @@ CanvasView.prototype.createDom = function() { dom.setTextContent(textSpan, chrome.i18n.getMessage('HANDWRITING_PRIVACY_INFO')); dom.appendChild(this.privacyDiv_, textSpan); - this.confirmSpan_ = dom.createDom(goog.dom.TagName.SPAN, - Css.HANDWRITING_GOT_IT); - dom.setTextContent(this.confirmSpan_, chrome.i18n.getMessage('GOT_IT')); - dom.appendChild(this.privacyDiv_, this.confirmSpan_); + + var spanView = new SpanElement('', ElementType.HWT_PRIVACY_GOT_IT); + spanView.render(this.privacyDiv_); + var spanElement = spanView.getElement(); + goog.dom.classlist.add(spanElement, Css.HANDWRITING_GOT_IT); + dom.setTextContent(spanElement, chrome.i18n.getMessage('GOT_IT')); // Shows or hide the privacy information. if (localStorage.getItem(Name.HWT_PRIVACY_INFO)) { @@ -200,8 +195,7 @@ CanvasView.prototype.enterDocument = function() { [i18n.input.chrome.DataSource.EventType.CANDIDATES_BACK, Type.HWT_NETWORK_ERROR], this.onNetworkState_). - listen(this.confirmSpan_, - [goog.events.EventType.CLICK, goog.events.EventType.TOUCHEND], + listen(this.adapter_, Type.HWT_PRIVACY_GOT_IT, this.onConfirmPrivacyInfo_); }; @@ -231,15 +225,15 @@ CanvasView.prototype.resize = function(width, height) { elem.style.height = this.coverElement_.style.height = height + 'px'; var size = goog.style.getSize(this.networkErrorDiv_); - this.networkErrorDiv_.style.top = + this.networkErrorDiv_.style.top = elem.offsetTop + Math.round((height - size.height) / 2) + 'px'; - this.networkErrorDiv_.style.left = + this.networkErrorDiv_.style.left = elem.offsetLeft + Math.round((width - size.width) / 2) + 'px'; size = goog.style.getSize(this.privacyDiv_); - this.privacyDiv_.style.top = + this.privacyDiv_.style.top = elem.offsetTop + Math.round((height - size.height) / 2) + 'px'; - this.privacyDiv_.style.left = + this.privacyDiv_.style.left = elem.offsetLeft + Math.round((width - size.width) / 2) + 'px'; this.canvas_.setSize(height, width); @@ -312,4 +306,14 @@ CanvasView.prototype.onConfirmPrivacyInfo_ = function() { goog.style.setElementShown(this.coverElement_, false); goog.dom.classlist.add(this.privacyDiv_, Css.HANDWRITING_PRIVACY_INFO_HIDDEN); }; + + +/** + * Sets the privacy info dialog's direction. + * + * @param {string} dir The direction "ltr" or "rtl". + */ +CanvasView.prototype.setPrivacyInfoDirection = function(dir) { + this.getElement().style.direction = dir; +}; }); // goog.scope diff --git a/third_party/google_input_tools/src/chrome/os/inputview/elements/content/characterkey.js b/third_party/google_input_tools/src/chrome/os/inputview/elements/content/characterkey.js index 2c0c5f9..f0bf265 100644 --- a/third_party/google_input_tools/src/chrome/os/inputview/elements/content/characterkey.js +++ b/third_party/google_input_tools/src/chrome/os/inputview/elements/content/characterkey.js @@ -231,8 +231,7 @@ CharacterKey.prototype.getAltCharacters = * * @return {string} The active letter. */ -CharacterKey.prototype.getActiveCharacter = - function() { +CharacterKey.prototype.getActiveCharacter = function() { if (this.flickerredCharacter) { return this.flickerredCharacter; } @@ -244,7 +243,7 @@ CharacterKey.prototype.getActiveCharacter = return child.getContent(); } } - return this.getChildAt(0).getContent(); + return ''; }; diff --git a/third_party/google_input_tools/src/chrome/os/inputview/elements/content/charactermodel.js b/third_party/google_input_tools/src/chrome/os/inputview/elements/content/charactermodel.js index 01479fa..d41c93e 100644 --- a/third_party/google_input_tools/src/chrome/os/inputview/elements/content/charactermodel.js +++ b/third_party/google_input_tools/src/chrome/os/inputview/elements/content/charactermodel.js @@ -157,8 +157,10 @@ CharacterModel.prototype.isVisible = function() { var enableShiftLetter = !this.belongToLetterKey_ || hasShift; var enableDefaultLetter = !this.belongToLetterKey_ || !hasShift; if (this.isQpInputView_) { - enableShiftLetter = this.enableShiftRendering_ || hasShift; - enableDefaultLetter = this.enableShiftRendering_ || !hasShift; + enableShiftLetter = (this.enableShiftRendering_ && + !this.belongToLetterKey_) || hasShift; + enableDefaultLetter = (this.enableShiftRendering_ && + !this.belongToLetterKey_) || !hasShift; } if (this.stateType_ == StateType.DEFAULT) { return !this.stateManager_.hasState(StateType.ALTGR) && enableDefaultLetter; @@ -222,7 +224,7 @@ CharacterModel.prototype.isHorizontalAlignCenter = function() { !this.hasAltGrCharacterInTheKeyset_; } - return false; + return true; }; diff --git a/third_party/google_input_tools/src/chrome/os/inputview/elements/content/emojikey.js b/third_party/google_input_tools/src/chrome/os/inputview/elements/content/emojikey.js index be2f52b..04f0629 100644 --- a/third_party/google_input_tools/src/chrome/os/inputview/elements/content/emojikey.js +++ b/third_party/google_input_tools/src/chrome/os/inputview/elements/content/emojikey.js @@ -18,14 +18,11 @@ goog.require('goog.dom'); goog.require('goog.dom.TagName'); goog.require('goog.dom.classlist'); goog.require('i18n.input.chrome.inputview.Css'); -goog.require('i18n.input.chrome.inputview.elements.content.FunctionalKey'); -goog.require('i18n.input.chrome.message.Name'); -goog.require('i18n.input.chrome.message.Type'); +goog.require('i18n.input.chrome.inputview.elements.content.SoftKey'); goog.scope(function() { -var Type = i18n.input.chrome.message.Type; -var Name = i18n.input.chrome.message.Name; +var EMOJI_KEY_MARGIN = 6; @@ -36,16 +33,22 @@ var Name = i18n.input.chrome.message.Name; * @param {!i18n.input.chrome.inputview.elements.ElementType} type The element * type. * @param {string} text The text. - * @param {string} iconCssClass The css class for the icon. * @param {boolean} isEmoticon Wether it is an emoticon. * @param {goog.events.EventTarget=} opt_eventTarget The event target. * @constructor - * @extends {i18n.input.chrome.inputview.elements.content.FunctionalKey} + * @extends {i18n.input.chrome.inputview.elements.content.SoftKey} */ i18n.input.chrome.inputview.elements.content.EmojiKey = function(id, type, - text, iconCssClass, isEmoticon, opt_eventTarget) { + text, isEmoticon, opt_eventTarget) { i18n.input.chrome.inputview.elements.content.EmojiKey.base( - this, 'constructor', id, type, text, '', opt_eventTarget); + this, 'constructor', id, type, opt_eventTarget); + /** + * The text in the key. + * + * @type {string} + */ + this.text = text; + /** * Wether it is an emoticon. @@ -58,7 +61,7 @@ i18n.input.chrome.inputview.elements.content.EmojiKey = function(id, type, this.pointerConfig.dblClick = true; }; goog.inherits(i18n.input.chrome.inputview.elements.content.EmojiKey, - i18n.input.chrome.inputview.elements.content.FunctionalKey); + i18n.input.chrome.inputview.elements.content.SoftKey); var EmojiKey = i18n.input.chrome.inputview.elements.content.EmojiKey; @@ -70,39 +73,34 @@ EmojiKey.prototype.createDom = function() { if (!this.textElem) { this.textElem = dom.createDom(goog.dom.TagName.DIV, i18n.input.chrome.inputview.Css.SPECIAL_KEY_NAME, this.text); - dom.appendChild(this.tableCell, this.textElem); } - goog.dom.classlist.add(elem, - i18n.input.chrome.inputview.Css.EMOJI_KEY); - var emojiName = this.getLocalizedName(); - if (emojiName) { - goog.a11y.aria.setState(/** @type {!Element} */ (elem), - goog.a11y.aria.State.LABEL, emojiName); - } - + goog.dom.classlist.add(elem, i18n.input.chrome.inputview.Css.EMOJI_KEY); + elem.style.margin = EMOJI_KEY_MARGIN + 'px'; this.updateText(this.text, this.isEmoticon); + dom.appendChild(elem, this.textElem); + // Sets aria label after UI is ready. + setTimeout(this.setAriaLable_.bind(this), 0); }; -/** - * Gets the localized name for the emoji. - * - * @return {string} . - */ -EmojiKey.prototype.getLocalizedName = function() { - if (this.isEmoticon) { - return chrome.i18n.getMessage('smiley'); - } - var lead = this.text.charCodeAt(0); - if (!lead) { - return ''; - } - var trail = this.text.charCodeAt(1); - var msgName = lead.toString(16); - if (!!trail) { - msgName += '_' + trail.toString(16); +/** @override */ +EmojiKey.prototype.resize = function(width, height) { + var elem = this.getElement(); + var w = width - EMOJI_KEY_MARGIN * 2; + var h = height - EMOJI_KEY_MARGIN * 2; + elem.style.width = w + 'px'; + elem.style.height = h + 'px'; + this.availableWidth = w; + this.availableHeight = h; +}; + + +/** @override */ +EmojiKey.prototype.setHighlighted = function(highlight) { + if (this.text == '') { + return; } - return chrome.i18n.getMessage(msgName.toLowerCase()); + goog.base(this, 'setHighlighted', highlight); }; @@ -130,4 +128,29 @@ EmojiKey.prototype.updateText = function(text, isEmoticon) { goog.dom.classlist.remove(elem, i18n.input.chrome.inputview.Css.EMOTICON); } }; + + +/** + * Sets the aria label for this emoji key if any. + * + * @private + */ +EmojiKey.prototype.setAriaLable_ = function() { + var emojiName = ''; + var lead = this.text.charCodeAt(0); + if (this.isEmoticon) { + emojiName = chrome.i18n.getMessage('smiley'); + } else if (lead) { + var trail = this.text.charCodeAt(1); + var msgName = lead.toString(16); + if (!!trail) { + msgName += '_' + trail.toString(16); + } + emojiName = chrome.i18n.getMessage(msgName.toLowerCase()); + } + if (emojiName) { + goog.a11y.aria.setState(/** @type {!Element} */ (this.getElement()), + goog.a11y.aria.State.LABEL, emojiName); + } +}; }); // goog.scope diff --git a/third_party/google_input_tools/src/chrome/os/inputview/elements/content/expandedcandidateview.js b/third_party/google_input_tools/src/chrome/os/inputview/elements/content/expandedcandidateview.js index b8db099..1dffd7df 100644 --- a/third_party/google_input_tools/src/chrome/os/inputview/elements/content/expandedcandidateview.js +++ b/third_party/google_input_tools/src/chrome/os/inputview/elements/content/expandedcandidateview.js @@ -20,7 +20,9 @@ goog.require('i18n.input.chrome.inputview.Css'); goog.require('i18n.input.chrome.inputview.elements.Element'); goog.require('i18n.input.chrome.inputview.elements.ElementType'); goog.require('i18n.input.chrome.inputview.elements.content.Candidate'); +goog.require('i18n.input.chrome.inputview.elements.content.EnterKey'); goog.require('i18n.input.chrome.inputview.elements.content.FunctionalKey'); +goog.require('i18n.input.chrome.inputview.util'); goog.scope(function() { @@ -31,6 +33,8 @@ var Candidate = i18n.input.chrome.inputview.elements.content.Candidate; var Type = i18n.input.chrome.inputview.elements.content.Candidate.Type; var ElementType = i18n.input.chrome.inputview.elements.ElementType; var FunctionalKey = i18n.input.chrome.inputview.elements.content.FunctionalKey; +var EnterKey = i18n.input.chrome.inputview.elements.content.EnterKey; +var util = i18n.input.chrome.inputview.util; @@ -152,6 +156,23 @@ ExpandedCandidateView.prototype.widthPerCell_ = 0; ExpandedCandidateView.prototype.heightPerCell_ = 0; +/** + * The width in weight which stands for the entire row. It is used for the + * alignment of the number row. + * + * @private {number} + */ +ExpandedCandidateView.prototype.widthInWeight_ = 0; + + +/** + * The width in weight of the backspace key. + * + * @private {number} + */ +ExpandedCandidateView.prototype.backspaceWeight_ = 0; + + /** @override */ ExpandedCandidateView.prototype.createDom = function() { goog.base(this, 'createDom'); @@ -194,10 +215,16 @@ ExpandedCandidateView.prototype.createCandidateLine_ = function(isTopLine) { * * @param {ElementType} type . * @param {string} iconCss . + * @return {!i18n.input.chrome.inputview.elements.Element} key. * @private */ ExpandedCandidateView.prototype.createKey_ = function(type, iconCss) { - var key = new FunctionalKey('', type, '', iconCss, this); + var key; + if (type == ElementType.ENTER_KEY) { + key = new EnterKey('', iconCss, this); + } else { + key = new FunctionalKey('', type, '', iconCss, this); + } key.render(this.getElement()); goog.dom.classlist.add(key.getElement(), Css.INLINE_DIV); this.keys_[type] = key; @@ -245,8 +272,7 @@ ExpandedCandidateView.prototype.close = function() { * @param {!Array.<!Object>} candidates . * @param {number} start . */ -ExpandedCandidateView.prototype.showCandidates = function(candidates, - start) { +ExpandedCandidateView.prototype.showCandidates = function(candidates, start) { this.setVisible(true); var dom = this.getDomHelper(); for (var i = 0; i < this.lines_.length; i++) { @@ -326,23 +352,44 @@ ExpandedCandidateView.prototype.showCandidates = function(candidates, }; +/** + * Sets the widthInWeight which equals to a total line in the + * keyset view and it is used for alignment of number row. + * + * @param {number} widthInWeight . + * @param {number} backspaceWeight . + */ +ExpandedCandidateView.prototype.setWidthInWeight = function(widthInWeight, + backspaceWeight) { + this.widthInWeight_ = widthInWeight; + this.backspaceWeight_ = backspaceWeight; +}; + + /** @override */ ExpandedCandidateView.prototype.resize = function(width, height) { goog.base(this, 'resize', width, height); - goog.style.setSize(this.getElement(), width, height); - this.widthPerCell_ = Math.floor((width - ExpandedCandidateView. - RIGHT_KEY_WIDTH_) / ExpandedCandidateView.CELLS_PER_LINE_); - this.heightPerCell_ = height / ExpandedCandidateView.LINES_; + var lastKeyWidth = ExpandedCandidateView.RIGHT_KEY_WIDTH_; + if (this.backspaceWeight_ > 0) { + var weightArray = [Math.round(this.widthInWeight_ - this.backspaceWeight_)]; + weightArray.push(this.backspaceWeight_); + var values = util.splitValue(weightArray, width); + lastKeyWidth = values[values.length - 1]; + } + + var candidatesWidth = Math.floor(width - lastKeyWidth); + this.widthPerCell_ = Math.floor(candidatesWidth / + ExpandedCandidateView.CELLS_PER_LINE_); + this.heightPerCell_ = Math.floor(height / ExpandedCandidateView.LINES_); for (var i = 0; i < this.lines_.length; i++) { var line = this.lines_[i]; - goog.style.setSize(line, Math.floor(width - - ExpandedCandidateView.RIGHT_KEY_WIDTH_), this.heightPerCell_); + goog.style.setSize(line, candidatesWidth, this.heightPerCell_); } for (var type in this.keys_) { type = /** @type {ElementType} */ (Number(type)); var key = this.keys_[type]; - key.resize(ExpandedCandidateView.RIGHT_KEY_WIDTH_, this.heightPerCell_); + key.resize(lastKeyWidth, this.heightPerCell_); } }; diff --git a/third_party/google_input_tools/src/chrome/os/inputview/elements/content/handwritingview.js b/third_party/google_input_tools/src/chrome/os/inputview/elements/content/handwritingview.js index a59efcc..b9789e3 100644 --- a/third_party/google_input_tools/src/chrome/os/inputview/elements/content/handwritingview.js +++ b/third_party/google_input_tools/src/chrome/os/inputview/elements/content/handwritingview.js @@ -14,6 +14,7 @@ goog.provide('i18n.input.chrome.inputview.elements.content.HandwritingView'); goog.require('goog.dom.classlist'); +goog.require('goog.i18n.bidi'); goog.require('i18n.input.chrome.inputview.Css'); goog.require('i18n.input.chrome.inputview.elements.content.KeysetView'); @@ -53,7 +54,6 @@ goog.inherits(HandwritingView, KeysetView); /** @override */ HandwritingView.prototype.activate = function(rawKeyset) { - this.adapter.setController('hwt', this.languageCode); goog.dom.classlist.add(this.getElement().parentElement.parentElement, Css.HANDWRITING); // Clears stroke when switches keyboard. @@ -78,5 +78,8 @@ HandwritingView.prototype.deactivate = function(rawKeyset) { */ HandwritingView.prototype.setLanguagecode = function(languageCode) { this.languageCode = languageCode; + this.adapter.setController('hwt', this.languageCode); + this.canvasView.setPrivacyInfoDirection( + goog.i18n.bidi.isRtlLanguage(languageCode) ? 'rtl' : 'ltr'); }; }); // goog.scope diff --git a/third_party/google_input_tools/src/chrome/os/inputview/elements/content/keysetview.js b/third_party/google_input_tools/src/chrome/os/inputview/elements/content/keysetview.js index 465528a..2ccddcb 100644 --- a/third_party/google_input_tools/src/chrome/os/inputview/elements/content/keysetview.js +++ b/third_party/google_input_tools/src/chrome/os/inputview/elements/content/keysetview.js @@ -278,10 +278,6 @@ KeysetView.prototype.createDom = function() { var elem = this.getElement(); elem.id = this.keyboardCode_.replace(/\./g, '-'); goog.dom.classlist.add(elem, i18n.input.chrome.inputview.Css.VIEW); - if (this.disableCandidateView) { - goog.dom.classlist.add( - elem, i18n.input.chrome.inputview.Css.CANDIDATE_VIEW_DISABLED); - } var children = this.layoutData_['children']; for (var i = 0; i < children.length; i++) { @@ -687,6 +683,11 @@ KeysetView.prototype.createKey_ = function(spec, hasAltGrCharacterInTheKeyset) { compactKeyModel, undefined); break; case ElementType.CHARACTER_KEY: + if (characters.length == 1) { + // If there is no character for shift state, just make the character of + // default state to be that one. + characters.push(characters[0]); + } var isLetterKey = i18n.input.chrome.inputview.util.isLetterKey( characters); var enableShiftRendering = false; @@ -811,11 +812,6 @@ KeysetView.prototype.activate = function(rawKeyset) { } else { goog.dom.classlist.remove(this.getElement(), Css.PINYIN); } - // Switches between compact zhuyin and zhuyin needs to change the controlelr, - // since they use different background controllers. - if (rawKeyset.indexOf('zhuyin') != -1) { - this.adapter.setController(rawKeyset, this.languageCode); - } }; diff --git a/third_party/google_input_tools/src/chrome/os/inputview/elements/content/menuview.js b/third_party/google_input_tools/src/chrome/os/inputview/elements/content/menuview.js index 1ef764e..101fe0c 100644 --- a/third_party/google_input_tools/src/chrome/os/inputview/elements/content/menuview.js +++ b/third_party/google_input_tools/src/chrome/os/inputview/elements/content/menuview.js @@ -77,7 +77,7 @@ MenuView.Command = { * @type {number} * @private */ -MenuView.MAXIMAL_VISIBLE_IMES_ = 4; +MenuView.prototype.visibleItems_ = 4; /** @@ -157,15 +157,17 @@ MenuView.prototype.enterDocument = function() { * @param {boolean} hasHwt Whether to add handwriting button. * @param {boolean} enableSettings Whether to add a link to settings page. * @param {boolean} hasEmoji Whether to enable emoji. + * @param {boolean} isA11y . */ MenuView.prototype.show = function(key, currentKeysetId, isCompact, enableCompactLayout, currentInputMethod, inputMethods, hasHwt, - enableSettings, hasEmoji) { + enableSettings, hasEmoji, isA11y) { if (i18n.input.chrome.inputview.GlobalFlags.isQPInputView) { // Temporary overwrites the value for material design. MenuView.width_ = 259; MenuView.paddingLeft_ = 41; } + this.visibleItems_ = isA11y ? 3 : 4; var ElementType = i18n.input.chrome.inputview.elements.ElementType; var dom = this.getDomHelper(); if (key.type != ElementType.MENU_KEY) { @@ -251,8 +253,8 @@ MenuView.prototype.addInputMethodItems_ = function(currentInputMethod, MenuView.LIST_ITEM_HEIGHT_); } - var containerHeight = inputMethods.length > MenuView.MAXIMAL_VISIBLE_IMES_ ? - MenuView.LIST_ITEM_HEIGHT_ * MenuView.MAXIMAL_VISIBLE_IMES_ : + var containerHeight = inputMethods.length > this.visibleItems_ ? + MenuView.LIST_ITEM_HEIGHT_ * this.visibleItems_ : MenuView.LIST_ITEM_HEIGHT_ * inputMethods.length; goog.style.setSize(container, MenuView.width_ + MenuView.paddingLeft_, containerHeight); diff --git a/third_party/google_input_tools/src/chrome/os/inputview/elements/content/modifierkey.js b/third_party/google_input_tools/src/chrome/os/inputview/elements/content/modifierkey.js index c79d906..337aec6 100644 --- a/third_party/google_input_tools/src/chrome/os/inputview/elements/content/modifierkey.js +++ b/third_party/google_input_tools/src/chrome/os/inputview/elements/content/modifierkey.js @@ -102,8 +102,7 @@ ModifierKey.prototype.isDoubleClicking = false; ModifierKey.prototype.createDom = function() { goog.base(this, 'createDom'); - if (this.toState == i18n.input.chrome.inputview.StateType.CAPSLOCK || - this.supportSticky) { + if (this.toState == i18n.input.chrome.inputview.StateType.CAPSLOCK) { var dom = this.getDomHelper(); this.dotIcon_ = dom.createDom(goog.dom.TagName.DIV, Css.CAPSLOCK_DOT); dom.appendChild(this.tableCell, this.dotIcon_); diff --git a/third_party/google_input_tools/src/chrome/os/inputview/elements/content/softkey.js b/third_party/google_input_tools/src/chrome/os/inputview/elements/content/softkey.js index 8debbc4..266c9b7 100644 --- a/third_party/google_input_tools/src/chrome/os/inputview/elements/content/softkey.js +++ b/third_party/google_input_tools/src/chrome/os/inputview/elements/content/softkey.js @@ -100,8 +100,7 @@ SoftKey.prototype.createDom = function() { /** @override */ -SoftKey.prototype.resize = function(width, - height) { +SoftKey.prototype.resize = function(width, height) { goog.base(this, 'resize', width, height); var elem = this.getElement(); diff --git a/third_party/google_input_tools/src/chrome/os/inputview/elements/content/spanelement.js b/third_party/google_input_tools/src/chrome/os/inputview/elements/content/spanelement.js new file mode 100644 index 0000000..85330c5 --- /dev/null +++ b/third_party/google_input_tools/src/chrome/os/inputview/elements/content/spanelement.js @@ -0,0 +1,53 @@ +// Copyright 2015 The ChromeOS IME Authors. All Rights Reserved. +// limitations under the License. +// See the License for the specific language governing permissions and +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// distributed under the License is distributed on an "AS-IS" BASIS, +// Unless required by applicable law or agreed to in writing, software +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// You may obtain a copy of the License at +// you may not use this file except in compliance with the License. +// Licensed under the Apache License, Version 2.0 (the "License"); +// +goog.provide('i18n.input.chrome.inputview.elements.content.SpanElement'); + +goog.require('goog.dom.TagName'); +goog.require('i18n.input.chrome.inputview.elements.Element'); + + + +goog.scope(function() { + + + +/** + * The wrappered span element. + * + * @param {string} id The id. + * @param {!i18n.input.chrome.inputview.elements.ElementType} type The element + * type. + * @param {goog.events.EventTarget=} opt_eventTarget The event target. + * @constructor + * @extends {i18n.input.chrome.inputview.elements.Element} + */ +i18n.input.chrome.inputview.elements.content.SpanElement = function(id, type, + opt_eventTarget) { + i18n.input.chrome.inputview.elements.content.SpanElement.base( + this, 'constructor', id, type, opt_eventTarget); +}; +var SpanElement = i18n.input.chrome.inputview.elements.content.SpanElement; +goog.inherits(SpanElement, i18n.input.chrome.inputview.elements.Element); + + +/** @override */ +SpanElement.prototype.createDom = function() { + var elem = this.getDomHelper().createDom(goog.dom.TagName.SPAN); + this.setElementInternal(elem); + elem.id = this.id; + elem['view'] = this; +}; +}); // goog.scope + + diff --git a/third_party/google_input_tools/src/chrome/os/inputview/elements/content/swipeview.js b/third_party/google_input_tools/src/chrome/os/inputview/elements/content/swipeview.js index 69408c6..e341c6e 100644 --- a/third_party/google_input_tools/src/chrome/os/inputview/elements/content/swipeview.js +++ b/third_party/google_input_tools/src/chrome/os/inputview/elements/content/swipeview.js @@ -338,9 +338,8 @@ SwipeView.prototype.swipeToDelete_ = function(e) { /** - * Handles swipe actions on the selection track. Swipes cause an alternatation - * between selecting a word and moving the cursor to the next blank space in the - * direction of the swipe. + * Handles swipe actions on the selection track. Swipes cause the cursor to move + * to the next blank space in the direction of the swipe. * * @param {!i18n.input.chrome.inputview.events.SwipeEvent} e The swipe event. * @private @@ -358,9 +357,8 @@ SwipeView.prototype.swipeToSelect_ = function(e) { console.error('Invalid track index.'); return; } - // Alternate between selecting a word if the element index is odd, and - // navigating to the next blank space if it's even. - var selectWord = index % 2 == 1; + // TODO: Set selectWord to true if the shift key is currently pressed. + var selectWord = false; var direction = e.direction; var code; if (direction & i18n.input.chrome.inputview.SwipeDirection.LEFT) { @@ -370,18 +368,9 @@ SwipeView.prototype.swipeToSelect_ = function(e) { } else { return; } - // If anchor == focus we are either at the end or the start of the word - // and no selection is in place. - if (this.surroundingTextAnchor_ == this.surroundingTextFocus_) { - // Do not move carat at all, as this will either have no effect or cause - // us to splice the word. - if (!selectWord) { - return; - } - } this.adapter_.sendKeyDownAndUpEvent( '', code, undefined, undefined, { - ctrl: selectWord, + ctrl: true, shift: selectWord }); }; @@ -416,7 +405,9 @@ SwipeView.prototype.handleSwipeAction_ = function(e) { if (e.direction & i18n.input.chrome.inputview.SwipeDirection.LEFT) { var key = /** @type {!content.FunctionalKey} */ (e.view); // Equivalent to a longpress. - this.showDeletionTrack(key); + if (this.adapter_.isGestureDeletionEnabled()) { + this.showDeletionTrack(key); + } } return; } @@ -447,9 +438,9 @@ SwipeView.prototype.handlePointerAction_ = function(e) { this.armed_ = false; } } else if (e.type == EventType.LONG_PRESS) { - if (this.adapter_.isGestureDeletionEnabled()) { - this.showDeletionTrack(key); - } + if (this.adapter_.isGestureDeletionEnabled()) { + this.showDeletionTrack(key); + } } break; case ElementType.SWIPE_VIEW: @@ -654,13 +645,14 @@ SwipeView.prototype.showDeletionTrack = function(key) { * @param {number} y */ SwipeView.prototype.showSelectionTrack = function(x, y) { - var ltr = x <= (screen.width / 2); + var ltr = (x <= (screen.width / 2)); + var halfWidth = SwipeView.SEGMENT_WIDTH_ / 2; // Center track on finger but force containment. - var width = Math.max(y - (SwipeView.SEGMENT_WIDTH_ / 2), - SwipeView.SEGMENT_WIDTH_ / 2); + var trackY = Math.max(y - halfWidth, halfWidth); + trackY = Math.min(trackY, window.innerHeight - 3 * halfWidth); this.showSelectionTrack_( ltr ? 0 : screen.width, - width, + trackY, SwipeView.SEGMENT_WIDTH_, SwipeView.SEGMENT_WIDTH_, x > (screen.width / 2) ? '<' : '>'); diff --git a/third_party/google_input_tools/src/chrome/os/inputview/elements/content/voiceview.js b/third_party/google_input_tools/src/chrome/os/inputview/elements/content/voiceview.js index 4a36a98..ba237a3 100644 --- a/third_party/google_input_tools/src/chrome/os/inputview/elements/content/voiceview.js +++ b/third_party/google_input_tools/src/chrome/os/inputview/elements/content/voiceview.js @@ -18,12 +18,13 @@ goog.require('goog.asserts'); goog.require('goog.async.Delay'); goog.require('goog.dom.TagName'); goog.require('goog.dom.classlist'); -goog.require('goog.events.EventType'); goog.require('goog.style'); goog.require('i18n.input.chrome.inputview.Css'); goog.require('i18n.input.chrome.inputview.elements.Element'); goog.require('i18n.input.chrome.inputview.elements.ElementType'); +goog.require('i18n.input.chrome.inputview.elements.content.SpanElement'); goog.require('i18n.input.chrome.message.Name'); +goog.require('i18n.input.chrome.message.Type'); goog.require('i18n.input.chrome.sounds.Sounds'); @@ -33,6 +34,7 @@ var ElementType = i18n.input.chrome.inputview.elements.ElementType; var FunctionalKey = i18n.input.chrome.inputview.elements.content.FunctionalKey; var Name = i18n.input.chrome.message.Name; var Sounds = i18n.input.chrome.sounds.Sounds; +var SpanElement = i18n.input.chrome.inputview.elements.content.SpanElement; var TagName = goog.dom.TagName; var Type = i18n.input.chrome.message.Type; @@ -106,12 +108,8 @@ VoiceView.prototype.voicePanel_ = null; VoiceView.prototype.privacyDiv_; -/** - * The "got it" confirm span for privacy info. - * - * @private {!Element} - */ -VoiceView.prototype.confirmSpan_; +/** @private {boolean} */ +VoiceView.prototype.visible_ = false; /** @override */ @@ -140,10 +138,11 @@ VoiceView.prototype.createDom = function() { dom.setTextContent(textDiv, chrome.i18n.getMessage('VOICE_PRIVACY_INFO')); dom.appendChild(this.privacyDiv_, textDiv); - this.confirmSpan_ = dom.createDom(goog.dom.TagName.SPAN, - Css.VOICE_GOT_IT); - dom.setTextContent(this.confirmSpan_, chrome.i18n.getMessage('GOT_IT')); - dom.appendChild(this.privacyDiv_, this.confirmSpan_); + var spanView = new SpanElement('', ElementType.VOICE_PRIVACY_GOT_IT); + spanView.render(this.privacyDiv_); + var spanElement = spanView.getElement(); + goog.dom.classlist.add(spanElement, Css.VOICE_GOT_IT); + dom.setTextContent(spanElement, chrome.i18n.getMessage('GOT_IT')); dom.appendChild(elem, this.privacyDiv_); // Shows or hides the privacy information. @@ -159,8 +158,7 @@ VoiceView.prototype.createDom = function() { /** @override */ VoiceView.prototype.enterDocument = function() { goog.base(this, 'enterDocument'); - this.getHandler().listen(this.confirmSpan_, - [goog.events.EventType.CLICK, goog.events.EventType.TOUCHEND], + this.getHandler().listen(this.adapter_, Type.VOICE_PRIVACY_GOT_IT, this.onConfirmPrivacyInfo_); }; @@ -185,12 +183,6 @@ VoiceView.prototype.start = function() { * Stop recognition. */ VoiceView.prototype.stop = function() { - // TODO(wuyingbing) This is a hack. Since "got it" link is a raw element. - // Click it will fire touch event then pass to controller to call stop. - // So stop it here. In future, should wrap "got it" link as content.Element. - if (!this.isPrivacyAllowed_) { - return; - } // invisible -> visible if (this.isVisible()) { this.soundController_.playSound(Sounds.VOICE_RECOG_END, true); @@ -203,6 +195,7 @@ VoiceView.prototype.stop = function() { /** @override */ VoiceView.prototype.setVisible = function(visible) { VoiceView.base(this, 'setVisible', visible); + this.visible_ = visible; var elem = this.getElement(); goog.style.setElementShown(elem, true); elem.style.visibility = visible ? 'visible' : 'hidden'; @@ -233,10 +226,11 @@ VoiceView.prototype.resize = function(width, height) { VoiceView.base(this, 'resize', width, height); this.voicePanel_.style.left = (width - VoiceView.WIDTH_) + 'px'; + var elem = this.getElement(); var size = goog.style.getSize(this.privacyDiv_); - this.privacyDiv_.style.top = + this.privacyDiv_.style.top = elem.offsetTop + Math.round((height - size.height) / 2) + 'px'; - this.privacyDiv_.style.left = + this.privacyDiv_.style.left = elem.offsetLeft + Math.round((width - size.width) / 2) + 'px'; }; @@ -273,4 +267,11 @@ VoiceView.prototype.onConfirmPrivacyInfo_ = function() { goog.dom.classlist.add(this.privacyDiv_, Css.HANDWRITING_PRIVACY_INFO_HIDDEN); goog.dom.classlist.remove(this.maskElem_, Css.VOICE_OPACITY_NONE); }; + + + +/** @override */ +VoiceView.prototype.isVisible = function() { + return this.visible_; +}; }); // goog.scope diff --git a/third_party/google_input_tools/src/chrome/os/inputview/events/keycodes.js b/third_party/google_input_tools/src/chrome/os/inputview/events/keycodes.js index fc05ac6..63d7e2d 100644 --- a/third_party/google_input_tools/src/chrome/os/inputview/events/keycodes.js +++ b/third_party/google_input_tools/src/chrome/os/inputview/events/keycodes.js @@ -80,6 +80,8 @@ i18n.input.chrome.inputview.events.KeyCodes = { NUM_LOCK: 'NumLock', O_S: 'OS', SHIFT: 'Shift', + SHIFT_LEFT: 'ShiftLeft', + SHIFT_RIGHT: 'ShiftRight', SUPER: 'Super', SYMBOL: 'Symbol', SYMBOL_LOCK: 'SymbolLock', diff --git a/third_party/google_input_tools/src/chrome/os/inputview/globalflags.js b/third_party/google_input_tools/src/chrome/os/inputview/globalflags.js index b6e5876..26fa468 100644 --- a/third_party/google_input_tools/src/chrome/os/inputview/globalflags.js +++ b/third_party/google_input_tools/src/chrome/os/inputview/globalflags.js @@ -19,4 +19,4 @@ goog.provide('i18n.input.chrome.inputview.GlobalFlags'); * * @type {boolean} */ -i18n.input.chrome.inputview.GlobalFlags.isQPInputView = false; +i18n.input.chrome.inputview.GlobalFlags.isQPInputView = true; diff --git a/third_party/google_input_tools/src/chrome/os/inputview/images/material/backspace.png b/third_party/google_input_tools/src/chrome/os/inputview/images/material/backspace.png Binary files differindex 9b66086..bee6530 100644 --- a/third_party/google_input_tools/src/chrome/os/inputview/images/material/backspace.png +++ b/third_party/google_input_tools/src/chrome/os/inputview/images/material/backspace.png diff --git a/third_party/google_input_tools/src/chrome/os/inputview/images/material/enter.png b/third_party/google_input_tools/src/chrome/os/inputview/images/material/enter.png Binary files differindex e81e690..ef3ac73 100644 --- a/third_party/google_input_tools/src/chrome/os/inputview/images/material/enter.png +++ b/third_party/google_input_tools/src/chrome/os/inputview/images/material/enter.png diff --git a/third_party/google_input_tools/src/chrome/os/inputview/images/material/enter_pressed.png b/third_party/google_input_tools/src/chrome/os/inputview/images/material/enter_pressed.png Binary files differindex 6152e43..943ef06 100644 --- a/third_party/google_input_tools/src/chrome/os/inputview/images/material/enter_pressed.png +++ b/third_party/google_input_tools/src/chrome/os/inputview/images/material/enter_pressed.png diff --git a/third_party/google_input_tools/src/chrome/os/inputview/images/material/handwriting_access.png b/third_party/google_input_tools/src/chrome/os/inputview/images/material/handwriting_access.png Binary files differindex bf93193..f97a6f8 100644 --- a/third_party/google_input_tools/src/chrome/os/inputview/images/material/handwriting_access.png +++ b/third_party/google_input_tools/src/chrome/os/inputview/images/material/handwriting_access.png diff --git a/third_party/google_input_tools/src/chrome/os/inputview/images/material/hidekeyboard.png b/third_party/google_input_tools/src/chrome/os/inputview/images/material/hidekeyboard.png Binary files differindex bbcfdc6..45acaff 100644 --- a/third_party/google_input_tools/src/chrome/os/inputview/images/material/hidekeyboard.png +++ b/third_party/google_input_tools/src/chrome/os/inputview/images/material/hidekeyboard.png diff --git a/third_party/google_input_tools/src/chrome/os/inputview/images/material/shift-press-hold.png b/third_party/google_input_tools/src/chrome/os/inputview/images/material/shift-press-hold.png Binary files differindex 32d2a95..5256f89 100644 --- a/third_party/google_input_tools/src/chrome/os/inputview/images/material/shift-press-hold.png +++ b/third_party/google_input_tools/src/chrome/os/inputview/images/material/shift-press-hold.png diff --git a/third_party/google_input_tools/src/chrome/os/inputview/images/material/shift-pressed.png b/third_party/google_input_tools/src/chrome/os/inputview/images/material/shift-pressed.png Binary files differindex 6407fdd..8d4d8e6 100644 --- a/third_party/google_input_tools/src/chrome/os/inputview/images/material/shift-pressed.png +++ b/third_party/google_input_tools/src/chrome/os/inputview/images/material/shift-pressed.png diff --git a/third_party/google_input_tools/src/chrome/os/inputview/images/material/shift.png b/third_party/google_input_tools/src/chrome/os/inputview/images/material/shift.png Binary files differindex e7b8eee..eac0008 100644 --- a/third_party/google_input_tools/src/chrome/os/inputview/images/material/shift.png +++ b/third_party/google_input_tools/src/chrome/os/inputview/images/material/shift.png diff --git a/third_party/google_input_tools/src/chrome/os/inputview/imewindows/accents.js b/third_party/google_input_tools/src/chrome/os/inputview/imewindows/accents.js index f9ecf80..686c279 100644 --- a/third_party/google_input_tools/src/chrome/os/inputview/imewindows/accents.js +++ b/third_party/google_input_tools/src/chrome/os/inputview/imewindows/accents.js @@ -123,10 +123,12 @@ Accents.getHighlightedItem_ = function(x, y, offset) { * @param {number} width The width of accent key. * @param {number} height The height of accent key. * @param {number} startKeyIndex The index of the start key in bottom row. + * @param {boolean} isCompact True if this accents window is for compact + * keyboard. * @private */ Accents.setAccents_ = function(accents, numOfColumns, numOfRows, width, - height, startKeyIndex) { + height, startKeyIndex, isCompact) { var TagName = goog.dom.TagName; var dom = goog.dom.getDomHelper(); var container = dom.createDom(TagName.DIV, Css.ACCENT_CONTAINER); @@ -145,7 +147,7 @@ Accents.setAccents_ = function(accents, numOfColumns, numOfRows, width, textDiv.textContent = text; // If accent is a word use a smaller font size. goog.dom.classlist.add(textDiv, text.length > 1 ? Css.FONT_SMALL : - Css.FONT); + (isCompact ? Css.ACCENT_COMPACT_FONT : Css.ACCENT_FULL_FONT)); goog.style.setStyle(textDiv, 'lineHeight', height + 'px'); dom.appendChild(keyElem, textDiv); diff --git a/third_party/google_input_tools/src/chrome/os/inputview/inputtoolcode.js b/third_party/google_input_tools/src/chrome/os/inputview/inputtoolcode.js index 3c20fc9..acf9b81 100644 --- a/third_party/google_input_tools/src/chrome/os/inputview/inputtoolcode.js +++ b/third_party/google_input_tools/src/chrome/os/inputview/inputtoolcode.js @@ -228,6 +228,7 @@ i18n.input.lang.InputToolCode = { HANDWRIT_AZERBAIJANI: 'az-t-i0-handwrit', HANDWRIT_BASQUE: 'eu-t-i0-handwrit', HANDWRIT_BELARUSIAN: 'be-t-i0-handwrit', + HANDWRIT_BENGALI: 'bn-t-i0-handwrit', HANDWRIT_BOSNIAN: 'bs-t-i0-handwrit', HANDWRIT_BULGARIAN: 'bg-t-i0-handwrit', HANDWRIT_CANTONESE: 'zh-yue-t-i0-handwrit', @@ -273,6 +274,7 @@ i18n.input.lang.InputToolCode = { HANDWRIT_MACEDONIAN: 'mk-t-i0-handwrit', HANDWRIT_MALAGASY: 'mg-t-i0-handwrit', HANDWRIT_MALAY: 'ms-t-i0-handwrit', + HANDWRIT_MALAYALAM: 'ml-t-i0-handwrit', HANDWRIT_MALTESE: 'mt-t-i0-handwrit', HANDWRIT_MAORI: 'mi-t-i0-handwrit', HANDWRIT_MARATHI: 'mr-t-i0-handwrit', @@ -293,6 +295,7 @@ i18n.input.lang.InputToolCode = { HANDWRIT_ROMANIAN: 'ro-t-i0-handwrit', HANDWRIT_RUSSIAN: 'ru-t-i0-handwrit', HANDWRIT_SERBIAN: 'sr-t-i0-handwrit', + HANDWRIT_SINHALA: 'si-t-i0-handwrit', HANDWRIT_SLOVAK: 'sk-t-i0-handwrit', HANDWRIT_SLOVENIAN: 'sl-t-i0-handwrit', HANDWRIT_SOMALI: 'so-t-i0-handwrit', diff --git a/third_party/google_input_tools/src/chrome/os/inputview/keyboardcontainer.js b/third_party/google_input_tools/src/chrome/os/inputview/keyboardcontainer.js index 923e35c..94f028a 100644 --- a/third_party/google_input_tools/src/chrome/os/inputview/keyboardcontainer.js +++ b/third_party/google_input_tools/src/chrome/os/inputview/keyboardcontainer.js @@ -294,6 +294,8 @@ KeyboardContainer.prototype.setContainerSize = function(width, height, this.candidateView.setWidthInWeight( this.currentKeysetView.getWidthInWeight(), backspaceWeight); this.candidateView.resize(w, candidateViewHeight); + this.expandedCandidateView.setWidthInWeight( + this.currentKeysetView.getWidthInWeight(), backspaceWeight); this.expandedCandidateView.resize(w, h); if (i18n.input.chrome.inputview.GlobalFlags.isQPInputView) { var candidateElem = this.candidateView.getElement(); diff --git a/third_party/google_input_tools/src/chrome/os/inputview/layouts/material/jpkbd_layout.js b/third_party/google_input_tools/src/chrome/os/inputview/layouts/material/jpkbd_layout.js index 962dfb4..3534b32 100644 --- a/third_party/google_input_tools/src/chrome/os/inputview/layouts/material/jpkbd_layout.js +++ b/third_party/google_input_tools/src/chrome/os/inputview/layouts/material/jpkbd_layout.js @@ -12,17 +12,17 @@ // Licensed under the Apache License, Version 2.0 (the "License"); // goog.require('i18n.input.chrome.inputview.ConditionName'); -goog.require('i18n.input.chrome.inputview.layouts.RowsOfJP'); -goog.require('i18n.input.chrome.inputview.layouts.util'); +goog.require('i18n.input.chrome.inputview.layouts.material.util'); +goog.require('i18n.input.chrome.inputview.layouts.material.RowsOfJP'); (function() { var ConditionName = i18n.input.chrome.inputview.ConditionName; - var util = i18n.input.chrome.inputview.layouts.util; - i18n.input.chrome.inputview.layouts.util.setPrefix('jpkbd-k-'); - - var topFourRows = i18n.input.chrome.inputview.layouts.RowsOfJP.create(); + var util = i18n.input.chrome.inputview.layouts.material.util; + var RowsOfJP = i18n.input.chrome.inputview.layouts.material.RowsOfJP; + util.setPrefix('jpkbd-k-'); + var topFourRows = RowsOfJP.create(); // Creates the space row. var globeKey = util.createKey({ 'condition': ConditionName.SHOW_GLOBE_OR_SYMBOL, @@ -39,6 +39,7 @@ goog.require('i18n.input.chrome.inputview.layouts.util'); 'widthInWeight': 1 }); + var leftIMEKey = util.createKey({'widthInWeight': 1}); var spaceKey = util.createKey({'widthInWeight': 6}); var rightIMEKey = util.createKey({'widthInWeight': 1}); @@ -58,10 +59,10 @@ goog.require('i18n.input.chrome.inputview.layouts.util'); }); var keys = [ - globeKey, - menuKey, ctrlKey, altKey, + globeKey, + menuKey, leftIMEKey, spaceKey, rightIMEKey, @@ -77,18 +78,17 @@ goog.require('i18n.input.chrome.inputview.layouts.util'); // Keyboard view. - var keyboardView = i18n.input.chrome.inputview.layouts.util.createLayoutView({ + var keyboardView = util.createLayoutView({ 'id': 'keyboardView', 'children': [topFourRows, spaceRow], 'widthPercent': 100, 'heightPercent': 100 }); - var keyboardContainer = i18n.input.chrome.inputview.layouts.util. - createLinearLayout({ - 'id': 'keyboardContainer', - 'children': [keyboardView] - }); + var keyboardContainer = util.createLinearLayout({ + 'id': 'keyboardContainer', + 'children': [keyboardView] + }); var data = { 'layoutID': 'm-jpkbd', diff --git a/third_party/google_input_tools/src/chrome/os/inputview/layouts/material/kokbd_layout.js b/third_party/google_input_tools/src/chrome/os/inputview/layouts/material/kokbd_layout.js index 24869c4..3110541 100644 --- a/third_party/google_input_tools/src/chrome/os/inputview/layouts/material/kokbd_layout.js +++ b/third_party/google_input_tools/src/chrome/os/inputview/layouts/material/kokbd_layout.js @@ -11,15 +11,15 @@ // you may not use this file except in compliance with the License. // Licensed under the Apache License, Version 2.0 (the "License"); // - goog.require('i18n.input.chrome.inputview.ConditionName'); -goog.require('i18n.input.chrome.inputview.layouts.RowsOf101'); -goog.require('i18n.input.chrome.inputview.layouts.util'); +goog.require('i18n.input.chrome.inputview.layouts.material.RowsOf101'); +goog.require('i18n.input.chrome.inputview.layouts.material.util'); (function() { var ConditionName = i18n.input.chrome.inputview.ConditionName; - var util = i18n.input.chrome.inputview.layouts.util; + var RowsOf101 = i18n.input.chrome.inputview.layouts.material.RowsOf101; + var util = i18n.input.chrome.inputview.layouts.material.util; util.setPrefix('kokbd-k-'); @@ -76,14 +76,14 @@ goog.require('i18n.input.chrome.inputview.layouts.util'); }); var spaceKeyRow = util.createLinearLayout({ 'id': 'spaceKeyrow', - 'children': [globeKey, menuKey, ctrlKey, altKey, hangjaSwitcher, + 'children': [ctrlKey, altKey, globeKey, menuKey, hangjaSwitcher, spaceKey, enSwitcher, altGrKey, leftKey, rightKey, hideKeyboardKey] }); return spaceKeyRow; }; - var topFourRows = i18n.input.chrome.inputview.layouts.RowsOf101.create(); + var topFourRows = RowsOf101.create(); var spaceRow = createSpaceRow(); // Keyboard view. diff --git a/third_party/google_input_tools/src/chrome/os/inputview/layouts/material/rowsofjp.js b/third_party/google_input_tools/src/chrome/os/inputview/layouts/material/rowsofjp.js new file mode 100644 index 0000000..45088d1 --- /dev/null +++ b/third_party/google_input_tools/src/chrome/os/inputview/layouts/material/rowsofjp.js @@ -0,0 +1,109 @@ +// Copyright 2015 The ChromeOS IME Authors. All Rights Reserved. +// limitations under the License. +// See the License for the specific language governing permissions and +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// distributed under the License is distributed on an "AS-IS" BASIS, +// Unless required by applicable law or agreed to in writing, software +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// You may obtain a copy of the License at +// you may not use this file except in compliance with the License. +// Licensed under the Apache License, Version 2.0 (the "License"); +// +goog.provide('i18n.input.chrome.inputview.layouts.material.RowsOfJP'); + +goog.require('i18n.input.chrome.inputview.layouts.material.util'); + + + +goog.scope(function() { +var util = i18n.input.chrome.inputview.layouts.material.util; + + +/** + * Creates the top four rows for Japanese keyboard. + * + * @return {!Array.<!Object>} The rows. + */ +i18n.input.chrome.inputview.layouts.material.RowsOfJP.create = function() { + var baseKeySpec = { + 'widthInWeight': 1, + 'heightInWeight': 1 + }; + + // Row1 + var keySequenceOf15 = util.createKeySequence(baseKeySpec, 15); + var row1 = util.createLinearLayout({ + 'id': 'row1', + 'children': [keySequenceOf15] + }); + + + // Row2 and row3 + + // First linear layout at the left of the enter. + var tabKey = util.createKey({ + 'widthInWeight': 1.5 + }); + var keySequenceOf11 = util. + createKeySequence(baseKeySpec, 11); + var slashKey = util.createKey({ + 'widthInWeight': 1.25 + }); + var row2 = util.createLinearLayout({ + 'id': 'row2', + 'children': [tabKey, keySequenceOf11, slashKey] + }); + + // Second linear layout at the right of the enter. + var capslockKey = util.createKey({ + 'widthInWeight': 1.75 + }); + var keySequenceOf12 = util. + createKeySequence(baseKeySpec, 12); + var row3 = util.createLinearLayout({ + 'id': 'row3', + 'children': [capslockKey, keySequenceOf12] + }); + + // Vertical layout contains the two rows at the left of the enter. + var vLayout = util.createVerticalLayout({ + 'id': 'row2-3-left', + 'children': [row2, row3] + }); + + // Vertical layout contains enter key. + var enterKey = util.createKey({ + 'widthInWeight': 1.25, + 'heightInWeight': 2 + }); + var enterLayout = util. + createVerticalLayout({ + 'id': 'row2-3-right', + 'children': [enterKey] + }); + + // Linear layout contains the two vertical layout. + var row2and3 = util.createLinearLayout({ + 'id': 'row2-3', + 'children': [vLayout, enterLayout] + }); + + // Row4 + var shiftLeft = util.createKey({ + 'widthInWeight': 2.25 + }); + keySequenceOf11 = util.createKeySequence( + baseKeySpec, 11); + var shiftRight = util.createKey({ + 'widthInWeight': 1.75 + }); + var row4 = util.createLinearLayout({ + 'id': 'row4', + 'children': [shiftLeft, keySequenceOf11, shiftRight] + }); + + return [row1, row2and3, row4]; +}; +}); // goog.scope diff --git a/third_party/google_input_tools/src/chrome/os/inputview/util.js b/third_party/google_input_tools/src/chrome/os/inputview/util.js index 84b04d8..c8ee4bd 100644 --- a/third_party/google_input_tools/src/chrome/os/inputview/util.js +++ b/third_party/google_input_tools/src/chrome/os/inputview/util.js @@ -65,8 +65,7 @@ util.KEYSETS_USE_US = [ 'pinyin-zh-TW', 'quick', 't13n', - 'wubi', - 'zhuyin' + 'wubi' ]; @@ -282,10 +281,6 @@ util.getVisibleCharacter = function(invisibleCharacter) { * @return {boolean} True if this is a letter key. */ util.isLetterKey = function(characters) { - if (characters[0] == characters[1]) { - return false; - } - if (characters[1] == util.toUpper( characters[0]) || characters[1] == util. toLower(characters[0])) { diff --git a/third_party/google_input_tools/src/chrome/os/sounds/KeypressDelete.wav b/third_party/google_input_tools/src/chrome/os/sounds/KeypressDelete.wav Binary files differnew file mode 100644 index 0000000..374c540 --- /dev/null +++ b/third_party/google_input_tools/src/chrome/os/sounds/KeypressDelete.wav diff --git a/third_party/google_input_tools/src/chrome/os/sounds/KeypressReturn.wav b/third_party/google_input_tools/src/chrome/os/sounds/KeypressReturn.wav Binary files differnew file mode 100644 index 0000000..5369ece --- /dev/null +++ b/third_party/google_input_tools/src/chrome/os/sounds/KeypressReturn.wav diff --git a/third_party/google_input_tools/src/chrome/os/sounds/KeypressSpacebar.wav b/third_party/google_input_tools/src/chrome/os/sounds/KeypressSpacebar.wav Binary files differnew file mode 100644 index 0000000..1c56711 --- /dev/null +++ b/third_party/google_input_tools/src/chrome/os/sounds/KeypressSpacebar.wav diff --git a/third_party/google_input_tools/src/chrome/os/sounds/KeypressStandard.wav b/third_party/google_input_tools/src/chrome/os/sounds/KeypressStandard.wav Binary files differnew file mode 100644 index 0000000..24859a9 --- /dev/null +++ b/third_party/google_input_tools/src/chrome/os/sounds/KeypressStandard.wav diff --git a/third_party/google_input_tools/src/chrome/os/sounds/audio_end.wav b/third_party/google_input_tools/src/chrome/os/sounds/audio_end.wav Binary files differnew file mode 100644 index 0000000..a4564dc --- /dev/null +++ b/third_party/google_input_tools/src/chrome/os/sounds/audio_end.wav diff --git a/third_party/google_input_tools/src/chrome/os/sounds/audio_initiate.wav b/third_party/google_input_tools/src/chrome/os/sounds/audio_initiate.wav Binary files differnew file mode 100644 index 0000000..e717b43 --- /dev/null +++ b/third_party/google_input_tools/src/chrome/os/sounds/audio_initiate.wav diff --git a/third_party/google_input_tools/src/chrome/os/sounds/keypress-delete.wav b/third_party/google_input_tools/src/chrome/os/sounds/keypress-delete.wav Binary files differdeleted file mode 100644 index fb8b018..0000000 --- a/third_party/google_input_tools/src/chrome/os/sounds/keypress-delete.wav +++ /dev/null diff --git a/third_party/google_input_tools/src/chrome/os/sounds/keypress-return.wav b/third_party/google_input_tools/src/chrome/os/sounds/keypress-return.wav Binary files differdeleted file mode 100644 index 491333b..0000000 --- a/third_party/google_input_tools/src/chrome/os/sounds/keypress-return.wav +++ /dev/null diff --git a/third_party/google_input_tools/src/chrome/os/sounds/keypress-spacebar.wav b/third_party/google_input_tools/src/chrome/os/sounds/keypress-spacebar.wav Binary files differdeleted file mode 100644 index 2d58c6d..0000000 --- a/third_party/google_input_tools/src/chrome/os/sounds/keypress-spacebar.wav +++ /dev/null diff --git a/third_party/google_input_tools/src/chrome/os/sounds/keypress-standard.wav b/third_party/google_input_tools/src/chrome/os/sounds/keypress-standard.wav Binary files differdeleted file mode 100644 index aa54b4c..0000000 --- a/third_party/google_input_tools/src/chrome/os/sounds/keypress-standard.wav +++ /dev/null diff --git a/third_party/google_input_tools/src/chrome/os/sounds/sounds.js b/third_party/google_input_tools/src/chrome/os/sounds/sounds.js index 8b1c7ef..cef48f7 100644 --- a/third_party/google_input_tools/src/chrome/os/sounds/sounds.js +++ b/third_party/google_input_tools/src/chrome/os/sounds/sounds.js @@ -20,13 +20,13 @@ goog.provide('i18n.input.chrome.sounds.Sounds'); * @enum {string} */ i18n.input.chrome.sounds.Sounds = { - DELETE: 'keypress-delete', - RETURN: 'keypress-return', - SPACEBAR: 'keypress-spacebar', - STANDARD: 'keypress-standard', + DELETE: 'KeypressDelete', + RETURN: 'KeypressReturn', + SPACEBAR: 'KeypressSpacebar', + STANDARD: 'KeypressStandard', NONE: 'none', - VOICE_RECOG_START: 'voice_recog_start', - VOICE_RECOG_END: 'voice_recog_end', - AUTO_CORRECTION: 'auto_correction' + VOICE_RECOG_START: 'audio_initiate', + VOICE_RECOG_END: 'audio_end', + AUTO_CORRECTION: 'KeypressStandard' }; diff --git a/third_party/google_input_tools/src/chrome/os/sounds/voice_recog_end.wav b/third_party/google_input_tools/src/chrome/os/sounds/voice_recog_end.wav Binary files differdeleted file mode 100644 index aa54b4c..0000000 --- a/third_party/google_input_tools/src/chrome/os/sounds/voice_recog_end.wav +++ /dev/null diff --git a/third_party/google_input_tools/src/chrome/os/sounds/voice_recog_start.wav b/third_party/google_input_tools/src/chrome/os/sounds/voice_recog_start.wav Binary files differdeleted file mode 100644 index aa54b4c..0000000 --- a/third_party/google_input_tools/src/chrome/os/sounds/voice_recog_start.wav +++ /dev/null diff --git a/third_party/google_input_tools/update.py b/third_party/google_input_tools/update.py index 652e658..8d6df8e 100755 --- a/third_party/google_input_tools/update.py +++ b/third_party/google_input_tools/update.py @@ -260,12 +260,12 @@ def copy_dir(input_path, sub_dir): input_path: Path to the google-input-tools-sandbox. sub_dir: Subdirectory to copy within google-input-tools sandbox. """ - source_dir = os.path.join(input_path, 'chrome', 'os', 'inputview', sub_dir) + source_dir = os.path.join(input_path, 'chrome', 'os', sub_dir) for (root, _, files) in os.walk(source_dir): for name in files: filename = os.path.join(root, name) relative_path = filename[len(source_dir) + 1:] - target = os.path.join('src', 'chrome', 'os', 'inputview', sub_dir, + target = os.path.join('src', 'chrome', 'os', sub_dir, relative_path) copy_file(filename, target) @@ -315,10 +315,10 @@ def main(): generate_build_file(target_files) # Copy resources - copy_dir(input_path, '_locales') - copy_dir(input_path, 'images') - copy_dir(input_path, 'config') - copy_dir(input_path, 'layouts') + copy_dir(input_path, 'inputview/_locales') + copy_dir(input_path, 'inputview/images') + copy_dir(input_path, 'inputview/config') + copy_dir(input_path, 'inputview/layouts') copy_dir(input_path, 'sounds') # Copy extra support files. |