assertnotproblems,"Found %d problems in %s, details in .prob file"%(len(problems),filename)
log.error(" {0} problems in {1}, details in .prob file".format(len(problems),filename))
else:
log.info(" No problems found in {0}".format(filename))
defparse_args(argv):
"""
Parse command line arguments, returning a dict of
valid options:
{
'empty': BOOLEAN,
'verbose': BOOLEAN,
'language': str
}
where 'language' is a language code, eg "fr"
"""
parser=argparse.ArgumentParser(description="Automatically finds translation errors in all edx-platform *.po files, for all languages, unless one or more language(s) is specified to check.")
parser.add_argument(
'-l','--language',
type=str,
nargs='*',
help="Specify one or more specific language code(s) to check (eg 'ko_KR')."
)
parser.add_argument(
'-e','--empty',
action='store_true',
help="Includes empty translation strings in .prob files."