Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(523)

Side by Side Diff: chrome/installer/util/prebuild/create_string_rc.py

Issue 11267023: Implementing --app-launcher install/uninstall flow. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Nits; added localized string for App Launcher uninstall shortcut. Created 8 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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',
80 'IDS_UNINSTALL_APP_LAUNCHER',
78 ] 81 ]
79 82
80 # The ID of the first resource string. 83 # The ID of the first resource string.
81 kFirstResourceID = 1600 84 kFirstResourceID = 1600
82 85
83 86
84 class TranslationStruct: 87 class TranslationStruct:
85 """A helper struct that holds information about a single translation.""" 88 """A helper struct that holds information about a single translation."""
86 def __init__(self, resource_id_str, language, translation): 89 def __init__(self, resource_id_str, language, translation):
87 self.resource_id_str = resource_id_str 90 self.resource_id_str = resource_id_str
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
241 branding = argv[2] 244 branding = argv[2]
242 translated_strings = CollectTranslatedStrings(branding) 245 translated_strings = CollectTranslatedStrings(branding)
243 kFilebase = os.path.join(argv[1], 'installer_util_strings') 246 kFilebase = os.path.join(argv[1], 'installer_util_strings')
244 WriteRCFile(translated_strings, kFilebase) 247 WriteRCFile(translated_strings, kFilebase)
245 WriteHeaderFile(translated_strings, kFilebase + '.h') 248 WriteHeaderFile(translated_strings, kFilebase + '.h')
246 return 0 249 return 0
247 250
248 251
249 if '__main__' == __name__: 252 if '__main__' == __name__:
250 sys.exit(main(sys.argv)) 253 sys.exit(main(sys.argv))
OLDNEW
« no previous file with comments | « chrome/installer/util/master_preferences_constants.cc ('k') | chrome/installer/util/util_constants.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698