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 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
68 'IDS_INSTALL_NO_PRODUCTS_TO_UPDATE', | 68 'IDS_INSTALL_NO_PRODUCTS_TO_UPDATE', |
69 'IDS_UNINSTALL_COMPLETE', | 69 'IDS_UNINSTALL_COMPLETE', |
70 'IDS_INSTALL_DIR_IN_USE', | 70 'IDS_INSTALL_DIR_IN_USE', |
71 'IDS_INSTALL_NON_MULTI_INSTALLATION_EXISTS', | 71 'IDS_INSTALL_NON_MULTI_INSTALLATION_EXISTS', |
72 'IDS_INSTALL_MULTI_INSTALLATION_EXISTS', | 72 'IDS_INSTALL_MULTI_INSTALLATION_EXISTS', |
73 'IDS_INSTALL_READY_MODE_REQUIRES_CHROME', | 73 'IDS_INSTALL_READY_MODE_REQUIRES_CHROME', |
74 'IDS_INSTALL_INCONSISTENT_UPDATE_POLICY', | 74 'IDS_INSTALL_INCONSISTENT_UPDATE_POLICY', |
75 'IDS_OEM_MAIN_SHORTCUT_NAME', | 75 'IDS_OEM_MAIN_SHORTCUT_NAME', |
76 'IDS_SHORTCUT_TOOLTIP', | 76 'IDS_SHORTCUT_TOOLTIP', |
77 'IDS_SHORTCUT_NEW_WINDOW', | 77 'IDS_SHORTCUT_NEW_WINDOW', |
| 78 'IDS_APP_LAUNCHER_PRODUCT_DESCRIPTION', |
| 79 'IDS_APP_LAUNCHER_SHORTCUT_TOOLTIP', |
78 ] | 80 ] |
79 | 81 |
80 # The ID of the first resource string. | 82 # The ID of the first resource string. |
81 kFirstResourceID = 1600 | 83 kFirstResourceID = 1600 |
82 | 84 |
83 | 85 |
84 class TranslationStruct: | 86 class TranslationStruct: |
85 """A helper struct that holds information about a single translation.""" | 87 """A helper struct that holds information about a single translation.""" |
86 def __init__(self, resource_id_str, language, translation): | 88 def __init__(self, resource_id_str, language, translation): |
87 self.resource_id_str = resource_id_str | 89 self.resource_id_str = resource_id_str |
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
241 branding = argv[2] | 243 branding = argv[2] |
242 translated_strings = CollectTranslatedStrings(branding) | 244 translated_strings = CollectTranslatedStrings(branding) |
243 kFilebase = os.path.join(argv[1], 'installer_util_strings') | 245 kFilebase = os.path.join(argv[1], 'installer_util_strings') |
244 WriteRCFile(translated_strings, kFilebase) | 246 WriteRCFile(translated_strings, kFilebase) |
245 WriteHeaderFile(translated_strings, kFilebase + '.h') | 247 WriteHeaderFile(translated_strings, kFilebase + '.h') |
246 return 0 | 248 return 0 |
247 | 249 |
248 | 250 |
249 if '__main__' == __name__: | 251 if '__main__' == __name__: |
250 sys.exit(main(sys.argv)) | 252 sys.exit(main(sys.argv)) |
OLD | NEW |