HUD_main: L10n update

This commit is contained in:
Worros 2010-09-28 11:59:10 +08:00
parent d299a19abc
commit f62201c8e9

View File

@ -23,6 +23,10 @@
Main for FreePokerTools HUD. Main for FreePokerTools HUD.
""" """
import L10n
_ = L10n.get_translation()
# TODO allow window resizing # TODO allow window resizing
# TODO hud to echo, but ignore non numbers # TODO hud to echo, but ignore non numbers
# TODO no stat window for hero # TODO no stat window for hero
@ -60,21 +64,6 @@ elif os.name == 'nt':
#import Tables #import Tables
import Hud 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 # get config and set up logger
c = Configuration.Config(file=options.config, dbname=options.dbname) 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') log = Configuration.get_logger("logging.conf", "hud", log_dir=c.dir_log, log_file='HUD-log.txt')