OLD | NEW |
1 // Copyright 2014 The ChromeOS IME Authors. All Rights Reserved. | 1 // Copyright 2014 The ChromeOS IME Authors. All Rights Reserved. |
2 // limitations under the License. | 2 // limitations under the License. |
3 // See the License for the specific language governing permissions and | 3 // See the License for the specific language governing permissions and |
4 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | 4 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
5 // distributed under the License is distributed on an "AS-IS" BASIS, | 5 // distributed under the License is distributed on an "AS-IS" BASIS, |
6 // Unless required by applicable law or agreed to in writing, software | 6 // Unless required by applicable law or agreed to in writing, software |
7 // | 7 // |
8 // http://www.apache.org/licenses/LICENSE-2.0 | 8 // http://www.apache.org/licenses/LICENSE-2.0 |
9 // | 9 // |
10 // You may obtain a copy of the License at | 10 // You may obtain a copy of the License at |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
71 | 71 |
72 | 72 |
73 /** | 73 /** |
74 * The keysets that have en switcher key. | 74 * The keysets that have en switcher key. |
75 * | 75 * |
76 * @type {!Array.<string>} | 76 * @type {!Array.<string>} |
77 */ | 77 */ |
78 util.KEYSETS_HAVE_EN_SWTICHER = [ | 78 util.KEYSETS_HAVE_EN_SWTICHER = [ |
79 // When other keysets that use us add the enswitcher key, | 79 // When other keysets that use us add the enswitcher key, |
80 // should move them to this array. | 80 // should move them to this array. |
81 'pinyin-zh-CN' | 81 'array', |
| 82 'cangjie', |
| 83 'dayi', |
| 84 'pinyin-zh-CN', |
| 85 'pinyin-zh-TW', |
| 86 'quick', |
| 87 'wubi', |
| 88 'zhuyin' |
82 ]; | 89 ]; |
83 | 90 |
84 | 91 |
| 92 /** |
| 93 * The keysets that have compact keyset. |
| 94 * |
| 95 * @type {!Array.<string>} |
| 96 */ |
| 97 util.KEYSETS_HAVE_COMPACT = [ |
| 98 'be', |
| 99 'ca', |
| 100 'ca-eng', |
| 101 'de', |
| 102 'dk', |
| 103 'fi', |
| 104 'fr', |
| 105 'gb-extd', |
| 106 'ie', |
| 107 'is', |
| 108 'no', |
| 109 'pinyin-zh-CN', |
| 110 'se', |
| 111 'us', |
| 112 'zhuyin' |
| 113 ]; |
| 114 |
| 115 |
85 /** | 116 /** |
86 * A regular expression for the end of a sentence. | 117 * A regular expression for the end of a sentence. |
87 * | 118 * |
88 * @private {!RegExp} | 119 * @private {!RegExp} |
89 */ | 120 */ |
90 util.END_SENTENCE_REGEX_ = /[\.\?!] +$/; | 121 util.END_SENTENCE_REGEX_ = /[\.\?!] +$/; |
91 | 122 |
92 | 123 |
93 /** | 124 /** |
94 * The regex of characters support dead key. | 125 * The regex of characters support dead key. |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
178 | 209 |
179 | 210 |
180 /** | 211 /** |
181 * To upper case. | 212 * To upper case. |
182 * | 213 * |
183 * @param {string} character The character. | 214 * @param {string} character The character. |
184 * @return {string} The uppercase of the character. | 215 * @return {string} The uppercase of the character. |
185 */ | 216 */ |
186 util.toUpper = function(character) { | 217 util.toUpper = function(character) { |
187 if (character == '\u00b5') { | 218 if (character == '\u00b5') { |
188 return '\u005b5'; | 219 return '\u00b5'; |
189 } else { | 220 } else { |
190 return character.toUpperCase(); | 221 return character.toUpperCase(); |
191 } | 222 } |
192 }; | 223 }; |
193 | 224 |
194 | 225 |
195 /** | 226 /** |
196 * To lower case. | 227 * To lower case. |
197 * | 228 * |
198 * @param {string} character The character. | 229 * @param {string} character The character. |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
287 * | 318 * |
288 * @param {string} keyboardCode The keyboard code. | 319 * @param {string} keyboardCode The keyboard code. |
289 * @return {string} The config file name which contains the keyset. | 320 * @return {string} The config file name which contains the keyset. |
290 */ | 321 */ |
291 util.getConfigName = function(keyboardCode) { | 322 util.getConfigName = function(keyboardCode) { |
292 // Strips out all the suffixes in the keyboard code. | 323 // Strips out all the suffixes in the keyboard code. |
293 return keyboardCode.replace(/\..*$/, ''); | 324 return keyboardCode.replace(/\..*$/, ''); |
294 }; | 325 }; |
295 | 326 |
296 }); // goog.scope | 327 }); // goog.scope |
OLD | NEW |