summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authortony@chromium.org <tony@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-04-08 00:38:36 +0000
committertony@chromium.org <tony@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-04-08 00:38:36 +0000
commit59b11e1bccc9e67ace4b97c4bbf4c120030ac191 (patch)
tree0978b7b7eafe3b5150d21dbfb840438a9ac4a15a /tools
parent5c05552f31b735d42f92d39094725e4544afa0ae (diff)
downloadchromium_src-59b11e1bccc9e67ace4b97c4bbf4c120030ac191.zip
chromium_src-59b11e1bccc9e67ace4b97c4bbf4c120030ac191.tar.gz
chromium_src-59b11e1bccc9e67ace4b97c4bbf4c120030ac191.tar.bz2
Remove a bunch of output generated by grit during the build. For
a chromium build, this should produce no output. For official builds, we print warnings about untranslated strings. This is the first step in trying to have grit produce useful warning messages. BUG=39417 Review URL: http://codereview.chromium.org/1518018 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@43900 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'tools')
-rwxr-xr-xtools/grit/grit/format/html_inline.py1
-rw-r--r--tools/grit/grit/format/rc.py13
-rw-r--r--tools/grit/grit/tool/build.py4
3 files changed, 10 insertions, 8 deletions
diff --git a/tools/grit/grit/format/html_inline.py b/tools/grit/grit/format/html_inline.py
index e5bb2f4..625ef26 100755
--- a/tools/grit/grit/format/html_inline.py
+++ b/tools/grit/grit/format/html_inline.py
@@ -78,7 +78,6 @@ def InlineFile(input_filename, output_filename):
input_filename: name of file to read in
output_filename: name of file to be written to
"""
- print "inlining %s to %s" % (input_filename, output_filename)
input_filepath = os.path.dirname(input_filename)
distribution = DIST_DEFAULT
diff --git a/tools/grit/grit/format/rc.py b/tools/grit/grit/format/rc.py
index d7656a0..5d60bd6 100644
--- a/tools/grit/grit/format/rc.py
+++ b/tools/grit/grit/format/rc.py
@@ -378,11 +378,14 @@ class RcSection(interface.ItemFormatter):
# Replace the language expand_variables in version rc info.
unified_lang_code = GetUnifiedLangCode(lang)
- text = text.replace('[GRITVERLANGCHARSETHEX]',
- GetLangCharsetPair(unified_lang_code))
- text = text.replace('[GRITVERLANGID]', GetLangIdHex(unified_lang_code))
- text = text.replace('[GRITVERCHARSETID]',
- GetCharsetIdDecimal(unified_lang_code))
+ if text.find('[GRITVERLANGCHARSETHEX]') != -1:
+ text = text.replace('[GRITVERLANGCHARSETHEX]',
+ GetLangCharsetPair(unified_lang_code))
+ if text.find('[GRITVERLANGID]') != -1:
+ text = text.replace('[GRITVERLANGID]', GetLangIdHex(unified_lang_code))
+ if text.find('[GRITVERCHARSETID]') != -1:
+ text = text.replace('[GRITVERCHARSETID]',
+ GetCharsetIdDecimal(unified_lang_code))
return text
diff --git a/tools/grit/grit/tool/build.py b/tools/grit/grit/tool/build.py
index 1ba1b59..2b7fa70 100644
--- a/tools/grit/grit/tool/build.py
+++ b/tools/grit/grit/tool/build.py
@@ -229,10 +229,10 @@ are exported to translation interchange files (e.g. XMB files), etc.
# Print out any fallback warnings, and missing translation errors, and
# exit with an error code if there are missing translations in a non-pseudo
- # build
+ # and non-official build.
warnings = (self.res.UberClique().MissingTranslationsReport().
encode('ascii', 'replace'))
- if warnings:
+ if warnings and self.defines.get('_google_chrome', False):
print warnings
if self.res.UberClique().HasMissingTranslations():
sys.exit(-1)