diff options
author | rahulk@google.com <rahulk@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-08-19 18:04:51 +0000 |
---|---|---|
committer | rahulk@google.com <rahulk@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-08-19 18:04:51 +0000 |
commit | 4880adb3346faa91feea9d8ecfecc4ef499bf7fc (patch) | |
tree | 8b8e1247c6b3d825727cf567fc1883a1a8036064 /chrome/installer/util/prebuild | |
parent | 5e30856836aa02569377f43f6f62af7badb1cee7 (diff) | |
download | chromium_src-4880adb3346faa91feea9d8ecfecc4ef499bf7fc.zip chromium_src-4880adb3346faa91feea9d8ecfecc4ef499bf7fc.tar.gz chromium_src-4880adb3346faa91feea9d8ecfecc4ef499bf7fc.tar.bz2 |
Refactor localized strings used in installer for Chromium/Google Chrome separation (see other change out for review - chromium_1).
- Rename resources files as util_strings.* as they will be used by classes in util project.
- Instead of directly accessing resource, chrome.dll and setup.exe will get the resource from helper class in util project. Remove references to header file from projects.
- The resources still need be bundled in the binary so directly include util_strings.rc in resource file.
- Add another string "Google Inc" in resource file to use as Publisher name.
- Remove uninstall URL from resource file. This URL is not going to be localized, we are manually appending language parameter to it.
BUG=1296800
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1044 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/installer/util/prebuild')
-rw-r--r-- | chrome/installer/util/prebuild/create_string_rc.py | 15 | ||||
-rw-r--r-- | chrome/installer/util/prebuild/using_util_prebuild.vsprops (renamed from chrome/installer/util/prebuild/util_prebuild.vsprops) | 0 | ||||
-rw-r--r-- | chrome/installer/util/prebuild/util_prebuild.vcproj | 4 |
3 files changed, 10 insertions, 9 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: diff --git a/chrome/installer/util/prebuild/util_prebuild.vsprops b/chrome/installer/util/prebuild/using_util_prebuild.vsprops index 2fa7bc5..2fa7bc5 100644 --- a/chrome/installer/util/prebuild/util_prebuild.vsprops +++ b/chrome/installer/util/prebuild/using_util_prebuild.vsprops diff --git a/chrome/installer/util/prebuild/util_prebuild.vcproj b/chrome/installer/util/prebuild/util_prebuild.vcproj index d3efe6d..6432f2c 100644 --- a/chrome/installer/util/prebuild/util_prebuild.vcproj +++ b/chrome/installer/util/prebuild/util_prebuild.vcproj @@ -26,7 +26,7 @@ Name="VCCustomBuildTool" CommandLine="create_string_rc.bat $(IntDir)" AdditionalDependencies="create_string_rc.py;$(SolutionDir)\app\generated_resources.grd" - Outputs="$(IntDir)\setup_strings.rc;$(IntDir)\setup_strings.h" + Outputs="$(IntDir)\installer_util_strings.rc;$(IntDir)\installer_util_strings.h" /> <Tool Name="VCMIDLTool" @@ -47,7 +47,7 @@ Name="VCCustomBuildTool" CommandLine="create_string_rc.bat $(IntDir)" AdditionalDependencies="create_string_rc.py;$(SolutionDir)\app\generated_resources.grd" - Outputs="$(IntDir)\setup_strings.rc;$(IntDir)\setup_strings.h" + Outputs="$(IntDir)\installer_util_strings.rc;$(IntDir)\installer_util_strings.h" /> <Tool Name="VCMIDLTool" |