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

Unified Diff: chrome/installer/util/prebuild/create_string_rc.py

Issue 4139010: The UI language rather than the locale is now used to pick Chrome's language ... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 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 side-by-side diff with in-line comments
Download patch
Index: chrome/installer/util/prebuild/create_string_rc.py
===================================================================
--- chrome/installer/util/prebuild/create_string_rc.py (revision 65433)
+++ chrome/installer/util/prebuild/create_string_rc.py (working copy)
@@ -175,6 +175,7 @@
"""Writes a .h file with resource ids. This file can be included by the
executable to refer to identifiers."""
lines = []
+ do_languages_lines = [u'#define DO_LANGUAGES']
# Write the values for how the languages ids are offset.
seen_languages = set()
@@ -184,6 +185,8 @@
if lang not in seen_languages:
seen_languages.add(lang)
lines.append(u'#define IDS_L10N_OFFSET_%s %s' % (lang, offset_id))
+ do_languages_lines.append(u' HANDLE_LANGUAGE(%s, IDS_L10N_OFFSET_%s)'
+ % (lang.replace('_', '-').lower(), lang))
robertshield 2010/11/11 14:42:18 why are these strings unicode strings, but not the
grt (UTC plus 2) 2010/11/11 15:23:57 Your guess is as good as mine. erikwright@chromiu
robertshield 2010/11/11 16:18:53 They should be consistent. Inconsistencies like th
grt (UTC plus 2) 2010/11/11 16:29:27 Done.
offset_id += 1
else:
break
@@ -203,7 +206,10 @@
outfile = open(out_filename + '.h', 'wb')
outfile.write('\n'.join(lines))
- outfile.write('\n') # .rc files must end in a new line
+ outfile.write('\n#ifndef RC_INVOKED\n')
+ outfile.write(' \\\n'.join(do_languages_lines))
+ # .rc files must end in a new line
+ outfile.write('\n#endif // ndef RC_INVOKED\n')
outfile.close()
def main(argv):

Powered by Google App Engine
This is Rietveld 408576698