From f62201c8e9481b97a6c9f251489b07baff9df06f Mon Sep 17 00:00:00 2001 From: Worros Date: Tue, 28 Sep 2010 11:59:10 +0800 Subject: [PATCH] HUD_main: L10n update --- pyfpdb/HUD_main.pyw | 19 ++++--------------- 1 file changed, 4 insertions(+), 15 deletions(-) diff --git a/pyfpdb/HUD_main.pyw b/pyfpdb/HUD_main.pyw index 750b4bdb..a32665f1 100755 --- a/pyfpdb/HUD_main.pyw +++ b/pyfpdb/HUD_main.pyw @@ -23,6 +23,10 @@ Main for FreePokerTools HUD. """ + +import L10n +_ = L10n.get_translation() + # TODO allow window resizing # TODO hud to echo, but ignore non numbers # TODO no stat window for hero @@ -60,21 +64,6 @@ elif os.name == 'nt': #import Tables import Hud -import locale -lang = locale.getdefaultlocale()[0][0:2] -print "lang:", lang -if lang == "en": - def _(string): - return string -else: - import gettext - try: - trans = gettext.translation("fpdb", localedir="locale", languages=[lang]) - trans.install() - except IOError: - def _(string): - return string - # get config and set up logger c = Configuration.Config(file=options.config, dbname=options.dbname) log = Configuration.get_logger("logging.conf", "hud", log_dir=c.dir_log, log_file='HUD-log.txt')