Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(106)

Unified Diff: remoting/webapp/verify-translations.py

Issue 8665013: Fix many* python scripts in src/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Removed chrome_frame/tools/test/page_cycler/cf_cycler.py Created 9 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « remoting/webapp/build-webapp.py ('k') | remoting/webapp/verify-webapp.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/webapp/verify-translations.py
diff --git a/remoting/webapp/verify-translations.py b/remoting/webapp/verify-translations.py
index 65b253b002a6c3a74b4bcef2d6c63bc70450508f..c6ffe3abcefd9807270d5f083e9f746be5ced426 100755
--- a/remoting/webapp/verify-translations.py
+++ b/remoting/webapp/verify-translations.py
@@ -1,11 +1,13 @@
-#!/usr/bin/python
+#!/usr/bin/env python
# Copyright (c) 2011 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Verifies that the message tags in the 2nd and subsequent JSON message files
-match those specified in the first. This is typically run when the
-translations are updated before a release, to check that nothing got missed.
+match those specified in the first.
+
+This is typically run when the translations are updated before a release, to
+check that nothing got missed.
"""
import json
@@ -31,10 +33,11 @@ def CheckTranslation(filename, translation, messages):
return False
+
def main():
if len(sys.argv) < 3:
print 'Usage: verify-translations.py <messages> <translation-files...>'
- sys.exit(1)
+ return 1
en_messages = json.load(open(sys.argv[1], 'r'))
exit_code = 0
@@ -43,7 +46,8 @@ def main():
if not CheckTranslation(f, translation, en_messages):
exit_code = 1
- sys.exit(exit_code)
+ return exit_code
+
if __name__ == '__main__':
- main()
+ sys.exit(main())
« no previous file with comments | « remoting/webapp/build-webapp.py ('k') | remoting/webapp/verify-webapp.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698