Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: build.py

Issue 29587910: Issue 104 - added checktranslations function
Patch Set: Created Oct. 24, 2017, 11:36 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | localeTools.py » ('j') | localeTools.py » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build.py
diff --git a/build.py b/build.py
index aa3c2035eea5688fcbbd9468ccafa250757f161c..37791a5fbc1b885a1d3ebfb666c944f07de2a370 100644
--- a/build.py
+++ b/build.py
@@ -382,6 +382,11 @@ def updatePSL(baseDir, scriptName, opts, args, type):
publicSuffixListUpdater.updatePSL(baseDir)
+def check_translations(baseDir, scriptName, opts, args, type):
+ import buildtools.localeTools as localetools
+ localetools.check_translations(baseDir)
+
+
with addCommand(lambda baseDir, scriptName, opts, args, type: usage(scriptName, type), ('help', '-h', '--help')) as command:
command.shortDescription = 'Show this message'
@@ -440,6 +445,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 = 'Checks translation files for overlong, missing and structure'
tlucas 2017/10/25 15:09:23 nit: this line exceeds 79 characters nit: "Checks
erick 2017/10/29 03:45:54 Acknowledged.
+ command.description = 'JSON files translations will be checked by this functionality'
tlucas 2017/10/25 15:09:23 nit: this line exceeds 79 characters nit: descript
erick 2017/10/29 03:45:54 Acknowledged.
+
def getType(baseDir, scriptName, args):
# Look for an explicit type parameter (has to be the first parameter)
« no previous file with comments | « no previous file | localeTools.py » ('j') | localeTools.py » ('J')

Powered by Google App Engine
This is Rietveld