| 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 27 matching lines...) Expand all Loading... |
| 38 sys.path.append(os.path.abspath('../../tools/grit/grit/extern')) | 38 sys.path.append(os.path.abspath('../../tools/grit/grit/extern')) |
| 39 sys.path.append(os.path.abspath('../tools/grit/grit/extern')) | 39 sys.path.append(os.path.abspath('../tools/grit/grit/extern')) |
| 40 import FP | 40 import FP |
| 41 | 41 |
| 42 # The IDs of strings we want to import from generated_resources.grd and include | 42 # The IDs of strings we want to import from generated_resources.grd and include |
| 43 # in setup.exe's resources. | 43 # in setup.exe's resources. |
| 44 kStringIds = [ | 44 kStringIds = [ |
| 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_APP_LIST_SHORTCUT_NAME', |
| 49 'IDS_APP_LIST_SHORTCUT_NAME_CANARY', |
| 50 'IDS_APP_SHORTCUTS_SUBDIR_NAME', |
| 51 'IDS_APP_SHORTCUTS_SUBDIR_NAME_CANARY', |
| 48 'IDS_PRODUCT_BINARIES_NAME', | 52 'IDS_PRODUCT_BINARIES_NAME', |
| 49 'IDS_PRODUCT_DESCRIPTION', | 53 'IDS_PRODUCT_DESCRIPTION', |
| 50 'IDS_PRODUCT_FRAME_NAME', | 54 'IDS_PRODUCT_FRAME_NAME', |
| 51 'IDS_UNINSTALL_CHROME', | 55 'IDS_UNINSTALL_CHROME', |
| 52 'IDS_ABOUT_VERSION_COMPANY_NAME', | 56 'IDS_ABOUT_VERSION_COMPANY_NAME', |
| 53 'IDS_INSTALL_HIGHER_VERSION', | 57 'IDS_INSTALL_HIGHER_VERSION', |
| 54 'IDS_INSTALL_HIGHER_VERSION_APP_LAUNCHER', | 58 'IDS_INSTALL_HIGHER_VERSION_APP_LAUNCHER', |
| 55 'IDS_INSTALL_HIGHER_VERSION_CF', | 59 'IDS_INSTALL_HIGHER_VERSION_CF', |
| 56 'IDS_INSTALL_HIGHER_VERSION_CB_CF', | 60 'IDS_INSTALL_HIGHER_VERSION_CB_CF', |
| 57 'IDS_INSTALL_SYSTEM_LEVEL_EXISTS', | 61 'IDS_INSTALL_SYSTEM_LEVEL_EXISTS', |
| (...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 244 branding = argv[2] | 248 branding = argv[2] |
| 245 translated_strings = CollectTranslatedStrings(branding) | 249 translated_strings = CollectTranslatedStrings(branding) |
| 246 kFilebase = os.path.join(argv[1], 'installer_util_strings') | 250 kFilebase = os.path.join(argv[1], 'installer_util_strings') |
| 247 WriteRCFile(translated_strings, kFilebase) | 251 WriteRCFile(translated_strings, kFilebase) |
| 248 WriteHeaderFile(translated_strings, kFilebase + '.h') | 252 WriteHeaderFile(translated_strings, kFilebase + '.h') |
| 249 return 0 | 253 return 0 |
| 250 | 254 |
| 251 | 255 |
| 252 if '__main__' == __name__: | 256 if '__main__' == __name__: |
| 253 sys.exit(main(sys.argv)) | 257 sys.exit(main(sys.argv)) |
| OLD | NEW |