HUD_main: Fix L10n.
Appears to have been missed or reverted since the transition
This commit is contained in:
parent
b493d54371
commit
3e098e221f
|
@ -23,6 +23,9 @@
|
||||||
|
|
||||||
Main for FreePokerTools HUD.
|
Main for FreePokerTools HUD.
|
||||||
"""
|
"""
|
||||||
|
import L10n
|
||||||
|
_ = L10n.get_translation()
|
||||||
|
|
||||||
# Standard Library modules
|
# Standard Library modules
|
||||||
import sys
|
import sys
|
||||||
import os
|
import os
|
||||||
|
@ -51,21 +54,6 @@ elif sys.platform == 'darwin':
|
||||||
else: # This is bad--figure out the values for the various windows flavors
|
else: # This is bad--figure out the values for the various windows flavors
|
||||||
import WinTables as Tables
|
import WinTables as Tables
|
||||||
|
|
||||||
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')
|
||||||
|
|
Loading…
Reference in New Issue
Block a user