summaryrefslogtreecommitdiffstats
path: root/remoting/webapp
diff options
context:
space:
mode:
authorsergeyu@chromium.org <sergeyu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-05-29 23:45:06 +0000
committersergeyu@chromium.org <sergeyu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-05-29 23:45:06 +0000
commit435a0b66fce2f83f23e2c4c1bc2ca5c768a05510 (patch)
tree64d2660290f097a8a6b4c814b0a5cc50d47ed487 /remoting/webapp
parentd8d5913722a67d0516ad716fa94618b372a7f21b (diff)
downloadchromium_src-435a0b66fce2f83f23e2c4c1bc2ca5c768a05510.zip
chromium_src-435a0b66fce2f83f23e2c4c1bc2ca5c768a05510.tar.gz
chromium_src-435a0b66fce2f83f23e2c4c1bc2ca5c768a05510.tar.bz2
Remove verify-translations.py
verify-translations.py script is not longer necessary because grit is now used to generate message.js files. R=jamiewalch@chromium.org Review URL: https://codereview.chromium.org/15650018 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@203007 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting/webapp')
-rwxr-xr-xremoting/webapp/verify-translations.py53
1 files changed, 0 insertions, 53 deletions
diff --git a/remoting/webapp/verify-translations.py b/remoting/webapp/verify-translations.py
deleted file mode 100755
index c6ffe3a..0000000
--- 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())