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

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

Issue 507067: Add some licensing comments under chrome/. (Closed)
Patch Set: Created 11 years 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
OLDNEW
1 #!/usr/bin/python 1 #!/usr/bin/python
2 # Copyright 2009 Google Inc. All rights reserved. 2 # Copyright (c) 2009 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file.
3 5
4 """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
5 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
6 from generated_resource.grd and the localized .xtb files. 8 from generated_resource.grd and the localized .xtb files.
7 9
8 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
9 getting a string based on a language offset. For example, the header file 11 getting a string based on a language offset. For example, the header file
10 looks like this: 12 looks like this:
11 13
12 #define IDS_L10N_OFFSET_AR 0 14 #define IDS_L10N_OFFSET_AR 0
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
192 translated_strings = CollectTranslatedStrings() 194 translated_strings = CollectTranslatedStrings()
193 kFilebase = os.path.join(argv[1], 'installer_util_strings') 195 kFilebase = os.path.join(argv[1], 'installer_util_strings')
194 WriteRCFile(translated_strings, kFilebase) 196 WriteRCFile(translated_strings, kFilebase)
195 WriteHeaderFile(translated_strings, kFilebase) 197 WriteHeaderFile(translated_strings, kFilebase)
196 198
197 if '__main__' == __name__: 199 if '__main__' == __name__:
198 if len(sys.argv) < 2: 200 if len(sys.argv) < 2:
199 print 'Usage:\n %s <output_directory>' % sys.argv[0] 201 print 'Usage:\n %s <output_directory>' % sys.argv[0]
200 sys.exit(1) 202 sys.exit(1)
201 main(sys.argv) 203 main(sys.argv)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698