diff options
Diffstat (limited to 'src/args.py')
-rw-r--r-- | src/args.py | 27 |
1 files changed, 18 insertions, 9 deletions
diff --git a/src/args.py b/src/args.py index 05281fa0..6b0108f0 100644 --- a/src/args.py +++ b/src/args.py @@ -3,6 +3,7 @@ Module related to the argument parsing There is a fallback to the deprecated optparse if argparse is not found """ +from gettext import gettext as _ from os import path def parse_args(CONFIG_PATH=''): @@ -15,20 +16,28 @@ def parse_args(CONFIG_PATH=''): from optparse import OptionParser from optparse import SUPPRESS_HELP as SUPPRESS parser = OptionParser() - parser.add_option("-f", "--file", dest="filename", default=path.join(CONFIG_PATH, 'poezio.cfg'), - help="The config file you want to use", metavar="CONFIG_FILE") + parser.add_option("-f", "--file", dest="filename", + default=path.join(CONFIG_PATH, 'poezio.cfg'), + help=_("The config file you want to use"), + metavar="CONFIG_FILE") parser.add_option("-d", "--debug", dest="debug", - help="The file where debug will be written", metavar="DEBUG_FILE") + help=_("The file where debug will be written"), + metavar="DEBUG_FILE") parser.add_option("-v", "--version", dest="version", - help=SUPPRESS, metavar="VERSION", default="0.8.3-dev") - (options, _) = parser.parse_args() + help=SUPPRESS, metavar="VERSION", + default="0.8.3-dev") + (options, __) = parser.parse_args() else: parser = ArgumentParser() - parser.add_argument("-f", "--file", dest="filename", default=path.join(CONFIG_PATH, 'poezio.cfg'), - help="The config file you want to use", metavar="CONFIG_FILE") + parser.add_argument("-f", "--file", dest="filename", + default=path.join(CONFIG_PATH, 'poezio.cfg'), + help=_("The config file you want to use"), + metavar="CONFIG_FILE") parser.add_argument("-d", "--debug", dest="debug", - help="The file where debug will be written", metavar="DEBUG_FILE") + help=_("The file where debug will be written"), + metavar="DEBUG_FILE") parser.add_argument("-v", "--version", dest="version", - help=SUPPRESS, metavar="VERSION", default="0.8-dev") + help=SUPPRESS, metavar="VERSION", + default="0.8.3-dev") options = parser.parse_args() return options |