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 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
74 ''' | 74 ''' |
75 | 75 |
76 _LANGUAGE_CHARSET_PAIR = { | 76 _LANGUAGE_CHARSET_PAIR = { |
77 # Language neutral LCID, unicode(1200) code page. | 77 # Language neutral LCID, unicode(1200) code page. |
78 'neutral' : '000004b0', | 78 'neutral' : '000004b0', |
79 # LANG_USER_DEFAULT LCID, unicode(1200) code page. | 79 # LANG_USER_DEFAULT LCID, unicode(1200) code page. |
80 'userdefault' : '040004b0', | 80 'userdefault' : '040004b0', |
81 'ar' : '040104e8', | 81 'ar' : '040104e8', |
82 'fi' : '040b04e4', | 82 'fi' : '040b04e4', |
83 'ko' : '041203b5', | 83 'ko' : '041203b5', |
84 'es' : '040a04e4', | 84 'es' : '0c0a04e4', |
85 'bg' : '040204e3', | 85 'bg' : '040204e3', |
86 # No codepage for filipino, use unicode(1200). | 86 # No codepage for filipino, use unicode(1200). |
87 'fil' : '046404e4', | 87 'fil' : '046404e4', |
88 'fr' : '040c04e4', | 88 'fr' : '040c04e4', |
89 'lv' : '042604e9', | 89 'lv' : '042604e9', |
90 'sv' : '041d04e4', | 90 'sv' : '041d04e4', |
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 |
(...skipping 373 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
468 'muppet' : partial(FormatInclude, type='XML'), | 468 'muppet' : partial(FormatInclude, type='XML'), |
469 'tr_html' : partial(FormatInclude, type='HTML'), | 469 'tr_html' : partial(FormatInclude, type='HTML'), |
470 'txt' : partial(FormatInclude, type='TXT'), | 470 'txt' : partial(FormatInclude, type='TXT'), |
471 'policy_template_metafile': _DoNotFormat, | 471 'policy_template_metafile': _DoNotFormat, |
472 } | 472 } |
473 | 473 |
474 | 474 |
475 def FormatStructure(item, lang, output_dir): | 475 def FormatStructure(item, lang, output_dir): |
476 formatter = _STRUCTURE_FORMATTERS[item.attrs['type']] | 476 formatter = _STRUCTURE_FORMATTERS[item.attrs['type']] |
477 return formatter(item, lang, output_dir) | 477 return formatter(item, lang, output_dir) |
OLD | NEW |