diff options
Diffstat (limited to 'tools')
-rw-r--r-- | tools/grit/grit/grit_runner.py | 5 | ||||
-rw-r--r-- | tools/grit/grit/tool/build.py | 10 |
2 files changed, 10 insertions, 5 deletions
diff --git a/tools/grit/grit/grit_runner.py b/tools/grit/grit/grit_runner.py index d1ff9be..c0edef9 100644 --- a/tools/grit/grit/grit_runner.py +++ b/tools/grit/grit/grit_runner.py @@ -31,7 +31,7 @@ import grit.tool.unit # Copyright notice -_COPYRIGHT = ''' +_COPYRIGHT = '''\ GRIT - the Google Resource and Internationalization Tool Copyright (c) Google Inc. %d ''' % util.GetCurrentYear() @@ -62,6 +62,8 @@ _TOOLS = [ def PrintUsage(): + print _COPYRIGHT + tool_list = '' for (tool, info) in _TOOLS: if not _HIDDEN in info.keys(): @@ -153,7 +155,6 @@ def _GetToolInfo(tool): def Main(args): '''Parses arguments and does the appropriate thing.''' util.ChangeStdoutEncoding() - print _COPYRIGHT if not len(args) or len(args) == 1 and args[0] == 'help': PrintUsage() diff --git a/tools/grit/grit/tool/build.py b/tools/grit/grit/tool/build.py index 5fe2348..7e274ee 100644 --- a/tools/grit/grit/tool/build.py +++ b/tools/grit/grit/tool/build.py @@ -208,14 +208,18 @@ are exported to translation interchange files (e.g. XMB files), etc. self.VerboseOut(' done.\n') # Print warnings if there are any duplicate shortcuts. - print '\n'.join(shortcuts.GenerateDuplicateShortcutsWarnings( - self.res.UberClique(), self.res.GetTcProject())) + warnings = shortcuts.GenerateDuplicateShortcutsWarnings( + self.res.UberClique(), self.res.GetTcProject()) + if warnings: + print '\n'.join(warnings) # 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 - print (self.res.UberClique().MissingTranslationsReport(). + warnings = (self.res.UberClique().MissingTranslationsReport(). encode('ascii', 'replace')) + if warnings: + print warnings if self.res.UberClique().HasMissingTranslations(): sys.exit(-1) |