From b1724437acd1afb4f0799d04f37741957c7d47bf Mon Sep 17 00:00:00 2001 From: steffen123 Date: Fri, 13 Aug 2010 06:03:15 +0200 Subject: [PATCH] gettext-ify Anonymise --- pyfpdb/Anonymise.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/pyfpdb/Anonymise.py b/pyfpdb/Anonymise.py index 6b7e7352..a4d72339 100755 --- a/pyfpdb/Anonymise.py +++ b/pyfpdb/Anonymise.py @@ -23,6 +23,10 @@ import HandHistoryConverter import Configuration import sys +import gettext +trans = gettext.translation("fpdb", localedir="locale", languages=["de_DE"]) +trans.install() + (options, argv) = Options.fpdb_options() config = Configuration.Config() @@ -40,13 +44,13 @@ if os.path.exists(options.infile): filecontents = in_fh.read() in_fh.close() else: - print "Could not find file %s" % options.infile + print _("Could not find file %s") % options.infile exit(1) m = hhc.re_PlayerInfo.finditer(filecontents) outfile = options.infile+".anon" -print "Output being written to", outfile +print _("Output being written to"), outfile savestdout = sys.stdout fsock = open(outfile,"w")