| 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 """This script generates an rc file and header (setup_strings.{rc,h}) to be | 6 """This script generates an rc file and header (setup_strings.{rc,h}) to be |
| 7 included in setup.exe. The rc file includes translations for strings pulled | 7 included in setup.exe. The rc file includes translations for strings pulled |
| 8 from generated_resource.grd and the localized .xtb files. | 8 from generated_resource.grd and the localized .xtb files. |
| 9 | 9 |
| 10 The header file includes IDs for each string, but also has values to allow | 10 The header file includes IDs for each string, but also has values to allow |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 45 'IDS_PRODUCT_NAME', | 45 'IDS_PRODUCT_NAME', |
| 46 'IDS_SXS_SHORTCUT_NAME', | 46 'IDS_SXS_SHORTCUT_NAME', |
| 47 'IDS_PRODUCT_APP_LAUNCHER_NAME', | 47 'IDS_PRODUCT_APP_LAUNCHER_NAME', |
| 48 'IDS_PRODUCT_BINARIES_NAME', | 48 'IDS_PRODUCT_BINARIES_NAME', |
| 49 'IDS_PRODUCT_DESCRIPTION', | 49 'IDS_PRODUCT_DESCRIPTION', |
| 50 'IDS_PRODUCT_FRAME_NAME', | 50 'IDS_PRODUCT_FRAME_NAME', |
| 51 'IDS_UNINSTALL_CHROME', | 51 'IDS_UNINSTALL_CHROME', |
| 52 'IDS_ABOUT_VERSION_COMPANY_NAME', | 52 'IDS_ABOUT_VERSION_COMPANY_NAME', |
| 53 'IDS_INSTALL_HIGHER_VERSION', | 53 'IDS_INSTALL_HIGHER_VERSION', |
| 54 'IDS_INSTALL_HIGHER_VERSION_APP_LAUNCHER', | 54 'IDS_INSTALL_HIGHER_VERSION_APP_LAUNCHER', |
| 55 'IDS_INSTALL_HIGHER_VERSION_CF', |
| 56 'IDS_INSTALL_HIGHER_VERSION_CB_CF', |
| 55 'IDS_INSTALL_SYSTEM_LEVEL_EXISTS', | 57 'IDS_INSTALL_SYSTEM_LEVEL_EXISTS', |
| 56 'IDS_INSTALL_FAILED', | 58 'IDS_INSTALL_FAILED', |
| 57 'IDS_SAME_VERSION_REPAIR_FAILED', | 59 'IDS_SAME_VERSION_REPAIR_FAILED', |
| 60 'IDS_SAME_VERSION_REPAIR_FAILED_CF', |
| 58 'IDS_SETUP_PATCH_FAILED', | 61 'IDS_SETUP_PATCH_FAILED', |
| 59 'IDS_INSTALL_OS_NOT_SUPPORTED', | 62 'IDS_INSTALL_OS_NOT_SUPPORTED', |
| 60 'IDS_INSTALL_OS_ERROR', | 63 'IDS_INSTALL_OS_ERROR', |
| 61 'IDS_INSTALL_TEMP_DIR_FAILED', | 64 'IDS_INSTALL_TEMP_DIR_FAILED', |
| 62 'IDS_INSTALL_UNCOMPRESSION_FAILED', | 65 'IDS_INSTALL_UNCOMPRESSION_FAILED', |
| 63 'IDS_INSTALL_INVALID_ARCHIVE', | 66 'IDS_INSTALL_INVALID_ARCHIVE', |
| 64 'IDS_INSTALL_INSUFFICIENT_RIGHTS', | 67 'IDS_INSTALL_INSUFFICIENT_RIGHTS', |
| 65 'IDS_INSTALL_NO_PRODUCTS_TO_UPDATE', | 68 'IDS_INSTALL_NO_PRODUCTS_TO_UPDATE', |
| 66 'IDS_UNINSTALL_COMPLETE', | 69 'IDS_UNINSTALL_COMPLETE', |
| 67 'IDS_INSTALL_DIR_IN_USE', | 70 'IDS_INSTALL_DIR_IN_USE', |
| (...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 245 branding = argv[2] | 248 branding = argv[2] |
| 246 translated_strings = CollectTranslatedStrings(branding) | 249 translated_strings = CollectTranslatedStrings(branding) |
| 247 kFilebase = os.path.join(argv[1], 'installer_util_strings') | 250 kFilebase = os.path.join(argv[1], 'installer_util_strings') |
| 248 WriteRCFile(translated_strings, kFilebase) | 251 WriteRCFile(translated_strings, kFilebase) |
| 249 WriteHeaderFile(translated_strings, kFilebase + '.h') | 252 WriteHeaderFile(translated_strings, kFilebase + '.h') |
| 250 return 0 | 253 return 0 |
| 251 | 254 |
| 252 | 255 |
| 253 if '__main__' == __name__: | 256 if '__main__' == __name__: |
| 254 sys.exit(main(sys.argv)) | 257 sys.exit(main(sys.argv)) |
| OLD | NEW |