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 """Generates .h and .rc files for installer strings. Run "python | 6 """Generates .h and .rc files for installer strings. Run "python |
7 create_string_rc.py" for usage details. | 7 create_string_rc.py" for usage details. |
8 | 8 |
9 This script generates an rc file and header (NAME.{rc,h}) to be included in | 9 This script generates an rc file and header (NAME.{rc,h}) to be included in |
10 setup.exe. The rc file includes translations for strings pulled from the given | 10 setup.exe. The rc file includes translations for strings pulled from the given |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
71 'IDS_OEM_MAIN_SHORTCUT_NAME', | 71 'IDS_OEM_MAIN_SHORTCUT_NAME', |
72 'IDS_SHORTCUT_TOOLTIP', | 72 'IDS_SHORTCUT_TOOLTIP', |
73 'IDS_SHORTCUT_NEW_WINDOW', | 73 'IDS_SHORTCUT_NEW_WINDOW', |
74 'IDS_APP_LAUNCHER_PRODUCT_DESCRIPTION', | 74 'IDS_APP_LAUNCHER_PRODUCT_DESCRIPTION', |
75 'IDS_APP_LAUNCHER_SHORTCUT_TOOLTIP', | 75 'IDS_APP_LAUNCHER_SHORTCUT_TOOLTIP', |
76 'IDS_UNINSTALL_APP_LAUNCHER', | 76 'IDS_UNINSTALL_APP_LAUNCHER', |
77 'IDS_APP_LIST_SHORTCUT_NAME', | 77 'IDS_APP_LIST_SHORTCUT_NAME', |
78 'IDS_APP_LIST_SHORTCUT_NAME_CANARY', | 78 'IDS_APP_LIST_SHORTCUT_NAME_CANARY', |
79 'IDS_APP_SHORTCUTS_SUBDIR_NAME', | 79 'IDS_APP_SHORTCUTS_SUBDIR_NAME', |
80 'IDS_APP_SHORTCUTS_SUBDIR_NAME_CANARY', | 80 'IDS_APP_SHORTCUTS_SUBDIR_NAME_CANARY', |
| 81 'IDS_INBOUND_UDP_RULE_NAME', |
| 82 'IDS_INBOUND_UDP_RULE_NAME_SXS', |
| 83 'IDS_INBOUND_UDP_RULE_DESCRIPTION', |
| 84 'IDS_INBOUND_UDP_RULE_DESCRIPTION_SXS', |
81 ] | 85 ] |
82 | 86 |
83 # The ID of the first resource string. | 87 # The ID of the first resource string. |
84 FIRST_RESOURCE_ID = 1600 | 88 FIRST_RESOURCE_ID = 1600 |
85 | 89 |
86 | 90 |
87 class GrdHandler(sax.handler.ContentHandler): | 91 class GrdHandler(sax.handler.ContentHandler): |
88 """Extracts selected strings from a .grd file. | 92 """Extracts selected strings from a .grd file. |
89 | 93 |
90 Attributes: | 94 Attributes: |
(...skipping 330 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
421 | 425 |
422 | 426 |
423 def main(): | 427 def main(): |
424 args = ParseCommandLine() | 428 args = ParseCommandLine() |
425 StringRcMaker(args.name, args.inputs, args.outdir).MakeFiles() | 429 StringRcMaker(args.name, args.inputs, args.outdir).MakeFiles() |
426 return 0 | 430 return 0 |
427 | 431 |
428 | 432 |
429 if '__main__' == __name__: | 433 if '__main__' == __name__: |
430 sys.exit(main()) | 434 sys.exit(main()) |
OLD | NEW |