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

@ -30,6 +30,7 @@ from distutils.version import LooseVersion
import logging
import copy
from . import _
from . import common
from . import metadata
from .exception import VCSException, FDroidException, MetaDataException
@ -509,15 +510,15 @@ def main():
# Parse command line...
parser = ArgumentParser(usage="%(prog)s [options] [APPID [APPID ...]]")
common.setup_global_opts(parser)
parser.add_argument("appid", nargs='*', help="app-id to check for updates")
parser.add_argument("appid", nargs='*', help=_("app-id to check for updates"))
parser.add_argument("--auto", action="store_true", default=False,
help="Process auto-updates")
help=_("Process auto-updates"))
parser.add_argument("--autoonly", action="store_true", default=False,
help="Only process apps with auto-updates")
help=_("Only process apps with auto-updates"))
parser.add_argument("--commit", action="store_true", default=False,
help="Commit changes")
help=_("Commit changes"))
parser.add_argument("--gplay", action="store_true", default=False,
help="Only print differences with the Play Store")
help=_("Only print differences with the Play Store"))
metadata.add_metadata_arguments(parser)
options = parser.parse_args()
metadata.warnings_action = options.W
@ -567,7 +568,7 @@ def main():
except Exception as e:
logging.error("...checkupdate failed for {0} : {1}".format(appid, e))
logging.info("Finished.")
logging.info(_("Finished"))
if __name__ == "__main__":