diff options
Diffstat (limited to 'chrome/installer/util/prebuild/create_string_rc.py')
-rw-r--r-- | chrome/installer/util/prebuild/create_string_rc.py | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/chrome/installer/util/prebuild/create_string_rc.py b/chrome/installer/util/prebuild/create_string_rc.py index ca4fd09..3eb56e4 100644 --- a/chrome/installer/util/prebuild/create_string_rc.py +++ b/chrome/installer/util/prebuild/create_string_rc.py @@ -38,6 +38,7 @@ import FP kStringIds = [ 'IDS_PRODUCT_NAME', 'IDS_UNINSTALL_CHROME', + 'IDS_ABOUT_VERSION_COMPANY_NAME', ] # The ID of the first resource string. @@ -116,10 +117,10 @@ def WriteRCFile(translated_strings, out_filename): """Writes a resource (rc) file with all the language strings provided in |translated_strings|.""" kHeaderText = ( - u'#include "setup_strings.h"\n\n' + u'#include "%s.h"\n\n' u'STRINGTABLE\n' u'BEGIN\n' - ) + ) % os.path.basename(out_filename) kFooterText = ( u'END\n' ) @@ -128,7 +129,7 @@ def WriteRCFile(translated_strings, out_filename): lines.append(u' %s "%s"\n' % (translation_struct.resource_id_str, translation_struct.translation)) lines.append(kFooterText) - outfile = open(out_filename, 'wb') + outfile = open(out_filename + '.rc', 'wb') outfile.write(''.join(lines).encode('utf-16')) outfile.close() @@ -162,16 +163,16 @@ def WriteHeaderFile(translated_strings, out_filename): string_id, translated_strings[0].language)) - outfile = open(out_filename, 'wb') + outfile = open(out_filename + '.h', 'wb') outfile.write('\n'.join(lines)) outfile.write('\n') # .rc files must end in a new line outfile.close() def main(argv): translated_strings = CollectTranslatedStrings() - kFilebase = os.path.join(argv[1], 'setup_strings') - WriteRCFile(translated_strings, kFilebase + '.rc') - WriteHeaderFile(translated_strings, kFilebase + '.h') + kFilebase = os.path.join(argv[1], 'installer_util_strings') + WriteRCFile(translated_strings, kFilebase) + WriteHeaderFile(translated_strings, kFilebase) if '__main__' == __name__: if len(sys.argv) < 2: |