implement gettext localization

This allows all the text to be localized via Weblate.  This is a quick
overview of all the strings, but there are certainly some that were left
out.

closes #342
This commit is contained in:
Hans-Christoph Steiner 2017-09-13 18:03:57 +02:00
parent e4ca82d80c
commit 278d67d960
24 changed files with 285 additions and 235 deletions

View file

@ -22,6 +22,7 @@ import traceback
from argparse import ArgumentParser
import logging
from . import _
from . import common
from . import metadata
from .exception import BuildException, VCSException
@ -256,7 +257,7 @@ def main():
# Parse command line...
parser = ArgumentParser(usage="%(prog)s [options] [APPID[:VERCODE] [APPID[:VERCODE] ...]]")
common.setup_global_opts(parser)
parser.add_argument("appid", nargs='*', help="app-id with optional versionCode in the form APPID[:VERCODE]")
parser.add_argument("appid", nargs='*', help=_("app-id with optional versionCode in the form APPID[:VERCODE]"))
metadata.add_metadata_arguments(parser)
options = parser.parse_args()
metadata.warnings_action = options.W
@ -329,8 +330,8 @@ def main():
appid, traceback.format_exc()))
probcount += 1
logging.info("Finished:")
print("%d problems found" % probcount)
logging.info(_("Finished"))
print(_("%d problems found") % probcount)
if __name__ == "__main__":