Chromium Code Reviews| 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): |