| 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 '''Support for formatting an RC file for compilation. | 6 '''Support for formatting an RC file for compilation. |
| 7 ''' | 7 ''' |
| 8 | 8 |
| 9 import os | 9 import os |
| 10 import types | 10 import types |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 91 'ca' : '040304e4', | 91 'ca' : '040304e4', |
| 92 'de' : '040704e4', | 92 'de' : '040704e4', |
| 93 'lt' : '042704e9', | 93 'lt' : '042704e9', |
| 94 # Do not use! This is only around for backwards | 94 # Do not use! This is only around for backwards |
| 95 # compatibility and will be removed - use fil instead | 95 # compatibility and will be removed - use fil instead |
| 96 'tl' : '0c0004b0', | 96 'tl' : '0c0004b0', |
| 97 'zh-CN' : '080403a8', | 97 'zh-CN' : '080403a8', |
| 98 'zh-TW' : '040403b6', | 98 'zh-TW' : '040403b6', |
| 99 'zh-HK' : '0c0403b6', | 99 'zh-HK' : '0c0403b6', |
| 100 'el' : '040804e5', | 100 'el' : '040804e5', |
| 101 'no' : '041404e4', | 101 'no' : '001404e4', |
| 102 'nb' : '041404e4', |
| 103 'nn' : '081404e4', |
| 102 'th' : '041e036a', | 104 'th' : '041e036a', |
| 103 'he' : '040d04e7', | 105 'he' : '040d04e7', |
| 104 'iw' : '040d04e7', | 106 'iw' : '040d04e7', |
| 105 'pl' : '041504e2', | 107 'pl' : '041504e2', |
| 106 'tr' : '041f04e6', | 108 'tr' : '041f04e6', |
| 107 'hr' : '041a04e4', | 109 'hr' : '041a04e4', |
| 108 # No codepage for Hindi, use unicode(1200). | 110 # No codepage for Hindi, use unicode(1200). |
| 109 'hi' : '043904b0', | 111 'hi' : '043904b0', |
| 110 'pt-PT' : '081604e4', | 112 'pt-PT' : '081604e4', |
| 111 'pt-BR' : '041604e4', | 113 'pt-BR' : '041604e4', |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 185 'ca' : 'LANG_CATALAN, SUBLANG_DEFAULT', | 187 'ca' : 'LANG_CATALAN, SUBLANG_DEFAULT', |
| 186 'de' : 'LANG_GERMAN, SUBLANG_GERMAN', | 188 'de' : 'LANG_GERMAN, SUBLANG_GERMAN', |
| 187 'lt' : 'LANG_LITHUANIAN, SUBLANG_LITHUANIAN', | 189 'lt' : 'LANG_LITHUANIAN, SUBLANG_LITHUANIAN', |
| 188 # Do not use! See above. | 190 # Do not use! See above. |
| 189 'tl' : 'LANG_NEUTRAL, SUBLANG_DEFAULT', | 191 'tl' : 'LANG_NEUTRAL, SUBLANG_DEFAULT', |
| 190 'zh-CN' : 'LANG_CHINESE, SUBLANG_CHINESE_SIMPLIFIED', | 192 'zh-CN' : 'LANG_CHINESE, SUBLANG_CHINESE_SIMPLIFIED', |
| 191 'zh-TW' : 'LANG_CHINESE, SUBLANG_CHINESE_TRADITIONAL', | 193 'zh-TW' : 'LANG_CHINESE, SUBLANG_CHINESE_TRADITIONAL', |
| 192 'zh-HK' : 'LANG_CHINESE, SUBLANG_CHINESE_HONGKONG', | 194 'zh-HK' : 'LANG_CHINESE, SUBLANG_CHINESE_HONGKONG', |
| 193 'el' : 'LANG_GREEK, SUBLANG_DEFAULT', | 195 'el' : 'LANG_GREEK, SUBLANG_DEFAULT', |
| 194 'no' : 'LANG_NORWEGIAN, SUBLANG_DEFAULT', | 196 'no' : 'LANG_NORWEGIAN, SUBLANG_DEFAULT', |
| 197 'nb' : 'LANG_NORWEGIAN, SUBLANG_NORWEGIAN_BOKMAL', |
| 198 'nn' : 'LANG_NORWEGIAN, SUBLANG_NORWEGIAN_NYNORSK', |
| 195 'th' : 'LANG_THAI, SUBLANG_DEFAULT', | 199 'th' : 'LANG_THAI, SUBLANG_DEFAULT', |
| 196 'he' : 'LANG_HEBREW, SUBLANG_DEFAULT', | 200 'he' : 'LANG_HEBREW, SUBLANG_DEFAULT', |
| 197 'iw' : 'LANG_HEBREW, SUBLANG_DEFAULT', | 201 'iw' : 'LANG_HEBREW, SUBLANG_DEFAULT', |
| 198 'pl' : 'LANG_POLISH, SUBLANG_DEFAULT', | 202 'pl' : 'LANG_POLISH, SUBLANG_DEFAULT', |
| 199 'tr' : 'LANG_TURKISH, SUBLANG_DEFAULT', | 203 'tr' : 'LANG_TURKISH, SUBLANG_DEFAULT', |
| 200 'hr' : 'LANG_CROATIAN, SUBLANG_DEFAULT', | 204 'hr' : 'LANG_CROATIAN, SUBLANG_DEFAULT', |
| 201 'hi' : 'LANG_HINDI, SUBLANG_DEFAULT', | 205 'hi' : 'LANG_HINDI, SUBLANG_DEFAULT', |
| 202 'pt-PT' : 'LANG_PORTUGUESE, SUBLANG_PORTUGUESE', | 206 'pt-PT' : 'LANG_PORTUGUESE, SUBLANG_PORTUGUESE', |
| 203 'pt-BR' : 'LANG_PORTUGUESE, SUBLANG_DEFAULT', | 207 'pt-BR' : 'LANG_PORTUGUESE, SUBLANG_DEFAULT', |
| 204 'uk' : 'LANG_UKRAINIAN, SUBLANG_DEFAULT', | 208 'uk' : 'LANG_UKRAINIAN, SUBLANG_DEFAULT', |
| (...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 464 'muppet' : partial(FormatInclude, type='XML'), | 468 'muppet' : partial(FormatInclude, type='XML'), |
| 465 'tr_html' : partial(FormatInclude, type='HTML'), | 469 'tr_html' : partial(FormatInclude, type='HTML'), |
| 466 'txt' : partial(FormatInclude, type='TXT'), | 470 'txt' : partial(FormatInclude, type='TXT'), |
| 467 'policy_template_metafile': _DoNotFormat, | 471 'policy_template_metafile': _DoNotFormat, |
| 468 } | 472 } |
| 469 | 473 |
| 470 | 474 |
| 471 def FormatStructure(item, lang, output_dir): | 475 def FormatStructure(item, lang, output_dir): |
| 472 formatter = _STRUCTURE_FORMATTERS[item.attrs['type']] | 476 formatter = _STRUCTURE_FORMATTERS[item.attrs['type']] |
| 473 return formatter(item, lang, output_dir) | 477 return formatter(item, lang, output_dir) |
| OLD | NEW |