Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
| 2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 3 # Use of this source code is governed by a BSD-style license that can be | 3 # Use of this source code is governed by a BSD-style license that can be |
| 4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
| 5 | 5 |
| 6 """Generate keyboard layout and hotkey data for the keyboard overlay. | 6 """Generate keyboard layout and hotkey data for the keyboard overlay. |
| 7 | 7 |
| 8 This script fetches data from the keyboard layout and hotkey data spreadsheet, | 8 This script fetches data from the keyboard layout and hotkey data spreadsheet, |
| 9 and output the data depending on the option. | 9 and output the data depending on the option. |
| 10 | 10 |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 77 'glyph_search': 'search', | 77 'glyph_search': 'search', |
| 78 'glyph_shift': 'shift', | 78 'glyph_shift': 'shift', |
| 79 'glyph_tab': 'tab', | 79 'glyph_tab': 'tab', |
| 80 'glyph_tools': 'tools', | 80 'glyph_tools': 'tools', |
| 81 'glyph_volume_down': 'vol. down', | 81 'glyph_volume_down': 'vol. down', |
| 82 'glyph_volume_mute': 'mute', | 82 'glyph_volume_mute': 'mute', |
| 83 'glyph_volume_up': 'vol. up', | 83 'glyph_volume_up': 'vol. up', |
| 84 }; | 84 }; |
| 85 | 85 |
| 86 INPUT_METHOD_ID_TO_OVERLAY_ID = { | 86 INPUT_METHOD_ID_TO_OVERLAY_ID = { |
| 87 'm17n:ar:kbd': 'ar', | |
| 88 'm17n:fa:isiri': 'ar', | |
| 89 'm17n:hi:itrans': 'hi', | |
| 90 'm17n:th:kesmanee': 'th', | |
| 91 'm17n:th:pattachote': 'th', | |
| 92 'm17n:th:tis820': 'th', | |
| 93 'm17n:vi:tcvn': 'vi', | |
| 94 'm17n:vi:telex': 'vi', | |
| 95 'm17n:vi:viqr': 'vi', | |
| 96 'm17n:vi:vni': 'vi', | |
| 97 'm17n:zh:cangjie': 'zh_TW', | |
| 98 'm17n:zh:quick': 'zh_TW', | |
| 99 'mozc': 'en_US', | |
| 100 'mozc-chewing': 'zh_TW', | |
| 101 'mozc-dv': 'en_US_dvorak', | |
| 102 'mozc-hangul': 'ko', | |
| 103 'mozc-jp': 'ja', | |
| 104 'pinyin': 'zh_CN', | |
| 105 'pinyin-dv': 'en_US_dvorak', | |
|
satorux1
2014/06/02 03:29:49
please mention that obsolete input methods are del
Shu Chen
2014/06/02 03:33:27
Done.
| |
| 106 'xkb:be::fra': 'fr', | 87 'xkb:be::fra': 'fr', |
| 107 'xkb:be::ger': 'de', | 88 'xkb:be::ger': 'de', |
| 108 'xkb:be::nld': 'nl', | 89 'xkb:be::nld': 'nl', |
| 109 'xkb:bg::bul': 'bg', | 90 'xkb:bg::bul': 'bg', |
| 110 'xkb:bg:phonetic:bul': 'bg', | 91 'xkb:bg:phonetic:bul': 'bg', |
| 111 'xkb:br::por': 'pt_BR', | 92 'xkb:br::por': 'pt_BR', |
| 112 'xkb:ca::fra': 'fr_CA', | 93 'xkb:ca::fra': 'fr_CA', |
| 113 'xkb:ca:eng:eng': 'ca', | 94 'xkb:ca:eng:eng': 'ca', |
| 114 'xkb:ch::ger': 'de', | 95 'xkb:ch::ger': 'de', |
| 115 'xkb:ch:fr:fra': 'fr', | 96 'xkb:ch:fr:fra': 'fr', |
| 116 'xkb:cz::cze': 'cs', | 97 'xkb:cz::cze': 'cs', |
| 117 'xkb:de::ger': 'de', | 98 'xkb:de::ger': 'de', |
| 118 'xkb:de:neo:ger': 'de_neo', | 99 'xkb:de:neo:ger': 'de_neo', |
| 119 'xkb:dk::dan': 'da', | 100 'xkb:dk::dan': 'da', |
| 120 'xkb:ee::est': 'et', | 101 'xkb:ee::est': 'et', |
| 121 'xkb:es::spa': 'es', | 102 'xkb:es::spa': 'es', |
| 122 'xkb:es:cat:cat': 'ca', | 103 'xkb:es:cat:cat': 'ca', |
| 123 'xkb:fi::fin': 'fi', | 104 'xkb:fi::fin': 'fi', |
| 124 'xkb:fr::fra': 'fr', | 105 'xkb:fr::fra': 'fr', |
| 125 'xkb:gb:dvorak:eng': 'en_GB_dvorak', | 106 'xkb:gb:dvorak:eng': 'en_GB_dvorak', |
| 126 'xkb:gb:extd:eng': 'en_GB', | 107 'xkb:gb:extd:eng': 'en_GB', |
| 127 'xkb:gr::gre': 'el', | 108 'xkb:gr::gre': 'el', |
| 128 'xkb:hr::scr': 'hr', | 109 'xkb:hr::scr': 'hr', |
| 129 'xkb:hu::hun': 'hu', | 110 'xkb:hu::hun': 'hu', |
| 130 'xkb:il::heb': 'iw', | 111 'xkb:il::heb': 'iw', |
| 131 'xkb:it::ita': 'it', | 112 'xkb:it::ita': 'it', |
| 132 'xkb:jp::jpn': 'ja', | 113 'xkb:jp::jpn': 'ja', |
| 133 'xkb:kr:kr104:kor': 'ko', | |
| 134 'xkb:latam::spa': 'es_419', | 114 'xkb:latam::spa': 'es_419', |
| 135 'xkb:lt::lit': 'lt', | 115 'xkb:lt::lit': 'lt', |
| 136 'xkb:lv:apostrophe:lav': 'lv', | 116 'xkb:lv:apostrophe:lav': 'lv', |
| 137 'xkb:no::nob': 'no', | 117 'xkb:no::nob': 'no', |
| 138 'xkb:pl::pol': 'pl', | 118 'xkb:pl::pol': 'pl', |
| 139 'xkb:pt::por': 'pt_PT', | 119 'xkb:pt::por': 'pt_PT', |
| 140 'xkb:ro::rum': 'ro', | 120 'xkb:ro::rum': 'ro', |
| 141 'xkb:rs::srp': 'sr', | 121 'xkb:rs::srp': 'sr', |
| 142 'xkb:ru::rus': 'ru', | 122 'xkb:ru::rus': 'ru', |
| 143 'xkb:ru:phonetic:rus': 'ru', | 123 'xkb:ru:phonetic:rus': 'ru', |
| 144 'xkb:se::swe': 'sv', | 124 'xkb:se::swe': 'sv', |
| 145 'xkb:si::slv': 'sl', | 125 'xkb:si::slv': 'sl', |
| 146 'xkb:sk::slo': 'sk', | 126 'xkb:sk::slo': 'sk', |
| 147 'xkb:tr::tur': 'tr', | 127 'xkb:tr::tur': 'tr', |
| 148 'xkb:ua::ukr': 'uk', | 128 'xkb:ua::ukr': 'uk', |
| 149 'xkb:us::eng': 'en_US', | 129 'xkb:us::eng': 'en_US', |
| 150 'xkb:us:altgr-intl:eng': 'en_US_altgr_intl', | 130 'xkb:us:altgr-intl:eng': 'en_US_altgr_intl', |
| 151 'xkb:us:colemak:eng': 'en_US_colemak', | 131 'xkb:us:colemak:eng': 'en_US_colemak', |
| 152 'xkb:us:dvorak:eng': 'en_US_dvorak', | 132 'xkb:us:dvorak:eng': 'en_US_dvorak', |
| 153 'xkb:us:intl:eng': 'en_US_intl', | 133 'xkb:us:intl:eng': 'en_US_intl', |
| 154 'zinnia-japanese': 'ja', | 134 'xkb:us::ind': 'en_US', |
| 135 'xkb:us::fil': 'en_US', | |
| 136 'xkb:us::msa': 'en_US', | |
| 137 'xkb:us:intl:nld': 'en_US_intl', | |
|
satorux1
2014/06/02 03:29:49
the list is not sorted? how about sorting the list
Shu Chen
2014/06/02 03:33:27
Done.
| |
| 138 'xkb:us:intl:por': 'en_US_intl' | |
| 155 } | 139 } |
| 156 | 140 |
| 157 # The file was first generated in 2012 and we have a policy of not updating | 141 # The file was first generated in 2012 and we have a policy of not updating |
| 158 # copyright dates. | 142 # copyright dates. |
| 159 COPYRIGHT_HEADER=\ | 143 COPYRIGHT_HEADER=\ |
| 160 """// Copyright (c) 2012 The Chromium Authors. All rights reserved. | 144 """// Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 161 // Use of this source code is governed by a BSD-style license that can be | 145 // Use of this source code is governed by a BSD-style license that can be |
| 162 // found in the LICENSE file. | 146 // found in the LICENSE file. |
| 163 | 147 |
| 164 // This is a generated file but may contain local modifications. See | 148 // This is a generated file but may contain local modifications. See |
| (...skipping 355 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 520 OutputJson(keyboard_glyph_data, hotkey_data, layouts, 'keyboardOverlayData', | 504 OutputJson(keyboard_glyph_data, hotkey_data, layouts, 'keyboardOverlayData', |
| 521 options.outdir) | 505 options.outdir) |
| 522 if options.grd: | 506 if options.grd: |
| 523 OutputGrd(hotkey_data, options.outdir) | 507 OutputGrd(hotkey_data, options.outdir) |
| 524 if options.cc: | 508 if options.cc: |
| 525 OutputCC(hotkey_data, options.outdir) | 509 OutputCC(hotkey_data, options.outdir) |
| 526 | 510 |
| 527 | 511 |
| 528 if __name__ == '__main__': | 512 if __name__ == '__main__': |
| 529 main() | 513 main() |
| OLD | NEW |