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

Unified Diff: build.py

Issue 29690867: Issue 104 - Added translation checking Base URL: https://hg.adblockplus.org/buildtools/file/097b8d9c43a8
Patch Set: Created Feb. 6, 2018, 2:22 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') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build.py
diff --git a/build.py b/build.py
index 335988bc4e9238db2c732cb324ee8a127b456025..b7233f995ecd402def1c085704c0f5e3236d608e 100644
--- a/build.py
+++ b/build.py
@@ -375,6 +375,21 @@ def updatepsl(base_dir, **kwargs):
publicSuffixListUpdater.updatePSL(base_dir)
+@argparse_command()
+def checktranslations(base_dir, platform, **kwargs):
+ """Perform translation checks.
+
+ Checks translations files for structure and for overlong translations.
+ """
+ from buildtools.packager import readMetadata
+ metadata = readMetadata(base_dir, platform)
+
+ locale_config = read_locale_config(base_dir, platform, metadata)
+
+ import buildtools.localeTools as localetools
+ localetools.check_translations(locale_config)
+
+
def process_args(base_dir, *args):
if build_available_subcommands(base_dir):
MAIN_PARSER.set_defaults(base_dir=base_dir)
« no previous file with comments | « no previous file | localeTools.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld