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

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

Issue 15650018: Remove verify-translations.py (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 7 months 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 | « no previous file | no next file » | 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
deleted file mode 100755
index c6ffe3abcefd9807270d5f083e9f746be5ced426..0000000000000000000000000000000000000000
--- a/remoting/webapp/verify-translations.py
+++ /dev/null
@@ -1,53 +0,0 @@
-#!/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.
-"""
-
-import json
-import sys
-import string
-
-def CheckTranslation(filename, translation, messages):
- """Check |messages| for missing Ids in |translation|, and similarly for unused
- Ids. If there are missing/unused Ids then report them and return failure.
- """
- message_tags = set(map(string.lower, messages.keys()))
- translation_tags = set(map(string.lower, translation.keys()))
- if message_tags == translation_tags:
- return True
-
- undefined_tags = message_tags - translation_tags
- if undefined_tags:
- print '%s: Missing: %s' % (filename, ", ".join(undefined_tags))
-
- unused_tags = translation_tags - message_tags
- if unused_tags:
- print '%s: Unused: %s' % (filename, ", ".join(unused_tags))
-
- return False
-
-
-def main():
- if len(sys.argv) < 3:
- print 'Usage: verify-translations.py <messages> <translation-files...>'
- return 1
-
- en_messages = json.load(open(sys.argv[1], 'r'))
- exit_code = 0
- for f in sys.argv[2:]:
- translation = json.load(open(f, 'r'))
- if not CheckTranslation(f, translation, en_messages):
- exit_code = 1
-
- return exit_code
-
-
-if __name__ == '__main__':
- sys.exit(main())
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698