diff options
-rw-r--r-- | chrome/installer/installer.gyp | 5 | ||||
-rwxr-xr-x | chrome/installer/util/prebuild/create_string_rc.py | 19 |
2 files changed, 7 insertions, 17 deletions
diff --git a/chrome/installer/installer.gyp b/chrome/installer/installer.gyp index c75c7db..28b46826 100644 --- a/chrome/installer/installer.gyp +++ b/chrome/installer/installer.gyp @@ -124,13 +124,12 @@ ], 'action': ['python', 'util/prebuild/create_string_rc.py', - '<(SHARED_INTERMEDIATE_DIR)/installer_util_strings', - '<(branding)',], + '<(SHARED_INTERMEDIATE_DIR)/installer_util_strings'], 'message': 'Generating resources from <(RULE_INPUT_PATH)', }, ], 'sources': [ - '../app/chromium_strings.grd', + '../app/generated_resources.grd', ], 'direct_dependent_settings': { 'include_dirs': [ 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) |