Index: build.py |
diff --git a/build.py b/build.py |
index aa3c2035eea5688fcbbd9468ccafa250757f161c..4e42f3bd9f561d74c66a6204f5b8c99487134143 100644 |
--- a/build.py |
+++ b/build.py |
@@ -382,6 +382,16 @@ def updatePSL(baseDir, scriptName, opts, args, type): |
publicSuffixListUpdater.updatePSL(baseDir) |
+def check_translations(baseDir, scriptName, opts, args, type): |
+ from buildtools.packager import readMetadata |
+ metadata = readMetadata(baseDir, type) |
+ |
+ localeConfig = readLocaleConfig(baseDir, type, metadata) |
+ |
+ import buildtools.localeTools as localetools |
+ localetools.check_translations(localeConfig) |
+ |
+ |
with addCommand(lambda baseDir, scriptName, opts, args, type: usage(scriptName, type), ('help', '-h', '--help')) as command: |
command.shortDescription = 'Show this message' |
@@ -440,6 +450,10 @@ with addCommand(updatePSL, 'updatepsl') as command: |
command.description = 'Downloads Public Suffix List (see http://publicsuffix.org/) and generates lib/publicSuffixList.js from it.' |
command.supportedTypes = {'chrome'} |
+with addCommand(check_translations, 'checktranslations') as command: |
+ command.shortDescription = 'Perform translation checks.' |
+ command.description = 'Checks translations files for structure and for overlong translations.' |
+ |
def getType(baseDir, scriptName, args): |
# Look for an explicit type parameter (has to be the first parameter) |