| 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 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 209 'cs' : 'LANG_CZECH, SUBLANG_DEFAULT', | 209 'cs' : 'LANG_CZECH, SUBLANG_DEFAULT', |
| 210 'hu' : 'LANG_HUNGARIAN, SUBLANG_DEFAULT', | 210 'hu' : 'LANG_HUNGARIAN, SUBLANG_DEFAULT', |
| 211 'ro' : 'LANG_ROMANIAN, SUBLANG_DEFAULT', | 211 'ro' : 'LANG_ROMANIAN, SUBLANG_DEFAULT', |
| 212 'ur' : 'LANG_URDU, SUBLANG_DEFAULT', | 212 'ur' : 'LANG_URDU, SUBLANG_DEFAULT', |
| 213 'da' : 'LANG_DANISH, SUBLANG_DEFAULT', | 213 'da' : 'LANG_DANISH, SUBLANG_DEFAULT', |
| 214 'is' : 'LANG_ICELANDIC, SUBLANG_DEFAULT', | 214 'is' : 'LANG_ICELANDIC, SUBLANG_DEFAULT', |
| 215 'ru' : 'LANG_RUSSIAN, SUBLANG_DEFAULT', | 215 'ru' : 'LANG_RUSSIAN, SUBLANG_DEFAULT', |
| 216 'vi' : 'LANG_VIETNAMESE, SUBLANG_DEFAULT', | 216 'vi' : 'LANG_VIETNAMESE, SUBLANG_DEFAULT', |
| 217 'nl' : 'LANG_DUTCH, SUBLANG_DEFAULT', | 217 'nl' : 'LANG_DUTCH, SUBLANG_DEFAULT', |
| 218 'id' : 'LANG_INDONESIAN, SUBLANG_DEFAULT', | 218 'id' : 'LANG_INDONESIAN, SUBLANG_DEFAULT', |
| 219 'sr' : 'LANG_SERBIAN, SUBLANG_SERBIAN_CYRILLIC', | 219 'sr' : 'LANG_SERBIAN, SUBLANG_SERBIAN_LATIN', |
| 220 'en-GB' : 'LANG_ENGLISH, SUBLANG_ENGLISH_UK', | 220 'en-GB' : 'LANG_ENGLISH, SUBLANG_ENGLISH_UK', |
| 221 'it' : 'LANG_ITALIAN, SUBLANG_DEFAULT', | 221 'it' : 'LANG_ITALIAN, SUBLANG_DEFAULT', |
| 222 'sk' : 'LANG_SLOVAK, SUBLANG_DEFAULT', | 222 'sk' : 'LANG_SLOVAK, SUBLANG_DEFAULT', |
| 223 'et' : 'LANG_ESTONIAN, SUBLANG_DEFAULT', | 223 'et' : 'LANG_ESTONIAN, SUBLANG_DEFAULT', |
| 224 'ja' : 'LANG_JAPANESE, SUBLANG_DEFAULT', | 224 'ja' : 'LANG_JAPANESE, SUBLANG_DEFAULT', |
| 225 'sl' : 'LANG_SLOVENIAN, SUBLANG_DEFAULT', | 225 'sl' : 'LANG_SLOVENIAN, SUBLANG_DEFAULT', |
| 226 'en' : 'LANG_ENGLISH, SUBLANG_ENGLISH_US', | 226 'en' : 'LANG_ENGLISH, SUBLANG_ENGLISH_US', |
| 227 # No L.A. sublang exists. | 227 # No L.A. sublang exists. |
| 228 'es-419' : 'LANG_SPANISH, SUBLANG_SPANISH_MEXICAN', | 228 'es-419' : 'LANG_SPANISH, SUBLANG_SPANISH_MEXICAN', |
| 229 'bn' : 'LANG_BENGALI, SUBLANG_DEFAULT', | 229 'bn' : 'LANG_BENGALI, SUBLANG_DEFAULT', |
| (...skipping 238 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 |