summaryrefslogtreecommitdiffstats
path: root/chrome/installer/util/prebuild/create_string_rc.py
diff options
context:
space:
mode:
authorkuchhal@chromium.org <kuchhal@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-01-20 18:31:25 +0000
committerkuchhal@chromium.org <kuchhal@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-01-20 18:31:25 +0000
commitd7534d5e16158e750ccb23792bc6855d49c6e2d2 (patch)
tree2c0893107fc0d785a41177b95ccef6fe17802742 /chrome/installer/util/prebuild/create_string_rc.py
parenta1db3d453bb9a10f5a9c13bc2de1917e5324f1d6 (diff)
downloadchromium_src-d7534d5e16158e750ccb23792bc6855d49c6e2d2.zip
chromium_src-d7534d5e16158e750ccb23792bc6855d49c6e2d2.tar.gz
chromium_src-d7534d5e16158e750ccb23792bc6855d49c6e2d2.tar.bz2
Revert r36640 "Choose right installer strings based on branding."
This reverts commit 4a533e019a51b12a0b027243a06da6ee6b2bc49a. Review URL: http://codereview.chromium.org/548089 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@36643 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/installer/util/prebuild/create_string_rc.py')
-rwxr-xr-xchrome/installer/util/prebuild/create_string_rc.py19
1 files changed, 5 insertions, 14 deletions
diff --git a/chrome/installer/util/prebuild/create_string_rc.py b/chrome/installer/util/prebuild/create_string_rc.py
index 0e0cc68..5433029 100755
--- a/chrome/installer/util/prebuild/create_string_rc.py
+++ b/chrome/installer/util/prebuild/create_string_rc.py
@@ -79,21 +79,16 @@ class TranslationStruct:
return cmp(self.resource_id_str, other.resource_id_str)
-def CollectTranslatedStrings(branding):
+def CollectTranslatedStrings():
"""Collects all the translations for all the strings specified by kStringIds.
Returns a list of tuples of (string_id, language, translated string). The
list is sorted by language codes."""
- strings_file = 'app/chromium_strings.grd'
- translation_files = 'chromium_strings*.xtb'
- if branding == 'Chrome':
- strings_file = 'app/google_chrome_strings.grd'
- translation_files = 'google_chrome_strings*.xtb'
kGeneratedResourcesPath = os.path.join(path_utils.ScriptDir(), '..', '..',
- '..', strings_file)
+ '..', 'app/google_chrome_strings.grd')
kTranslationDirectory = os.path.join(path_utils.ScriptDir(), '..', '..',
'..', 'app', 'resources')
kTranslationFiles = glob.glob(os.path.join(kTranslationDirectory,
- translation_files))
+ 'google_chrome_strings*.xtb'))
# Get the strings out of generated_resources.grd.
dom = minidom.parse(kGeneratedResourcesPath)
@@ -198,17 +193,13 @@ def WriteHeaderFile(translated_strings, out_filename):
outfile.close()
def main(argv):
- branding = ''
- if (argv > 2):
- branding = argv[2]
- translated_strings = CollectTranslatedStrings(branding)
+ translated_strings = CollectTranslatedStrings()
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:
- print 'Usage:\n %s <output_directory> [branding]' % sys.argv[0]
+ print 'Usage:\n %s <output_directory>' % sys.argv[0]
sys.exit(1)
- # Use optparse to parse command line flags.
main(sys.argv)