| 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 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 64 'IDS_INSTALL_NO_PRODUCTS_TO_UPDATE', | 64 'IDS_INSTALL_NO_PRODUCTS_TO_UPDATE', |
| 65 'IDS_INSTALL_MULTI_INSTALLATION_EXISTS', | 65 'IDS_INSTALL_MULTI_INSTALLATION_EXISTS', |
| 66 'IDS_SHORTCUT_TOOLTIP', | 66 'IDS_SHORTCUT_TOOLTIP', |
| 67 'IDS_SHORTCUT_NEW_WINDOW', | 67 'IDS_SHORTCUT_NEW_WINDOW', |
| 68 'IDS_APP_SHORTCUTS_SUBDIR_NAME', | 68 'IDS_APP_SHORTCUTS_SUBDIR_NAME', |
| 69 'IDS_APP_SHORTCUTS_SUBDIR_NAME_CANARY', | 69 'IDS_APP_SHORTCUTS_SUBDIR_NAME_CANARY', |
| 70 'IDS_INBOUND_MDNS_RULE_NAME', | 70 'IDS_INBOUND_MDNS_RULE_NAME', |
| 71 'IDS_INBOUND_MDNS_RULE_NAME_CANARY', | 71 'IDS_INBOUND_MDNS_RULE_NAME_CANARY', |
| 72 'IDS_INBOUND_MDNS_RULE_DESCRIPTION', | 72 'IDS_INBOUND_MDNS_RULE_DESCRIPTION', |
| 73 'IDS_INBOUND_MDNS_RULE_DESCRIPTION_CANARY', | 73 'IDS_INBOUND_MDNS_RULE_DESCRIPTION_CANARY', |
| 74 'IDS_INSTALL_EXISTING_VERSION_LAUNCHED', |
| 74 ] | 75 ] |
| 75 | 76 |
| 76 # The ID of the first resource string. | 77 # The ID of the first resource string. |
| 77 FIRST_RESOURCE_ID = 1600 | 78 FIRST_RESOURCE_ID = 1600 |
| 78 | 79 |
| 79 | 80 |
| 80 class GrdHandler(sax.handler.ContentHandler): | 81 class GrdHandler(sax.handler.ContentHandler): |
| 81 """Extracts selected strings from a .grd file. | 82 """Extracts selected strings from a .grd file. |
| 82 | 83 |
| 83 Attributes: | 84 Attributes: |
| (...skipping 334 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 418 | 419 |
| 419 | 420 |
| 420 def main(): | 421 def main(): |
| 421 args = ParseCommandLine() | 422 args = ParseCommandLine() |
| 422 StringRcMaker(args.name, args.inputs, args.outdir).MakeFiles() | 423 StringRcMaker(args.name, args.inputs, args.outdir).MakeFiles() |
| 423 return 0 | 424 return 0 |
| 424 | 425 |
| 425 | 426 |
| 426 if '__main__' == __name__: | 427 if '__main__' == __name__: |
| 427 sys.exit(main()) | 428 sys.exit(main()) |
| OLD | NEW |