From 1f2070602da5211486df4b9358a8320733a83e7e Mon Sep 17 00:00:00 2001 From: "brian m. carlson" Date: Wed, 22 Oct 2014 01:52:26 +0000 Subject: [PATCH] Localize help output. Signed-off-by: brian m. carlson --- lib/newfol/main.py | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/lib/newfol/main.py b/lib/newfol/main.py index 83a624e..c646b52 100644 --- a/lib/newfol/main.py +++ b/lib/newfol/main.py @@ -1140,54 +1140,54 @@ def parse_args(args): confhome = os.environ.get('XDG_CONFIG_HOME', os.path.expanduser('~/.config')) conf = '%s/newfol/defaults' % confhome - parser = argparse.ArgumentParser(description="store and manipulate fol") + parser = argparse.ArgumentParser(description=_("store and manipulate fol")) parser.add_argument("--import", dest="cmd", action="store_const", - const="import", help="import a table") + const="import", help=_("import a table")) parser.add_argument("--test", dest="cmd", action="store_const", - const="test", help="test this program") + const="test", help=_("test this program")) parser.add_argument("--version", dest="cmd", action="store_const", const="version", - help="print newfol and database versions") + help=_("print newfol and database versions")) parser.add_argument("--validate", dest="cmd", action="store_const", - const="validate", help="validate the database") + const="validate", help=_("validate the database")) parser.add_argument("--repair", dest="cmd", action="store_const", const="repair", - help="repair the database automatically") + help=_("repair the database automatically")) parser.add_argument("--export", "--extract", dest="cmd", action="store_const", const="export", - help="export a table") + help=_("export a table")) parser.add_argument("--dbname", dest="dbname", action="store", - help="table name (obsolescent)") + help=_("table name (obsolescent)")) parser.add_argument("--table", dest="table", action="store", - help="table name") + help=_("table name")) parser.add_argument("--upgrade", dest="cmd", action="store_const", - const="upgrade", help="upgrade data files") + const="upgrade", help=_("upgrade data files")) parser.add_argument("--strict", dest="strict", action="store_true", - help="enable strict checking") + help=_("enable strict checking")) parser.add_argument("--identity", dest="identity", action="store_true", - help="use identity mapping when importing") + help=_("use identity mapping when importing")) parser.add_argument("--curses", dest="cmd", action="store_const", - const="curses", help="start the curses interface") + const="curses", help=_("start the curses interface")) parser.add_argument("--homedir", dest="homedir", action="store", default=os.path.expanduser("~/.newfol"), - help="specify the location of database files") + help=_("specify the location of database files")) parser.add_argument("--minfields", dest="minfields", action="store", type=int, default=0, - help="minimum number of fields per record") + help=_("minimum number of fields per record")) parser.add_argument("--txntype", dest="txntype", action="append", - default=None, help="type of transactional helper") + default=None, help=_("type of transactional helper")) parser.add_argument("--from-txntype", dest="from_txntype", action="append", default=None, - help="current type of transactional helper on upgrade") + help=_("current type of transactional helper")) parser.add_argument("--dbtype", dest="dbtype", action="store", default="csv", help="type of data for import/export") parser.add_argument('--no-config', dest='config', action='store_const', const=[], default=[conf], - help=('do not load the configuration file %s' % conf)) + help=_('do not load the configuration file %s') % conf) parser.add_argument("--upgrade-version", dest="upgrade_version", action="store", default=DatabaseVersion.preferred(), type=int, - help="version of database to upgrade to (advanced)") + help=_("version of database to upgrade to (advanced)")) argobj = parser.parse_args(args) if argobj.cmd is None: argobj.cmd = "curses"