Merge branch 'master' of git://git.assembla.com/fpdb-eric

This commit is contained in:
Worros 2010-10-07 22:12:08 +08:00
commit d8e3c1418e
5 changed files with 26 additions and 12 deletions

View File

@ -66,13 +66,16 @@ class Everleaf(HandHistoryConverter):
self.re_SitsOut = re.compile(ur"^%s sits out" % player_re, re.MULTILINE) self.re_SitsOut = re.compile(ur"^%s sits out" % player_re, re.MULTILINE)
def readSupportedGames(self): def readSupportedGames(self):
return [["ring", "hold", "nl"], return [
["ring", "hold", "nl"],
["ring", "hold", "pl"], ["ring", "hold", "pl"],
["ring", "hold", "fl"], ["ring", "hold", "fl"],
["ring", "studhi", "fl"], ["ring", "stud", "fl"],
["ring", "omahahi", "pl"], #["ring", "omahahi", "pl"],
["ring", "omahahilo", "pl"], #["ring", "omahahilo", "pl"],
["tour", "hold", "nl"] ["tour", "hold", "nl"],
["tour", "hold", "fl"],
["tour", "hold", "pl"]
] ]
def determineGameType(self, handText): def determineGameType(self, handText):

View File

@ -353,7 +353,7 @@ if __name__== "__main__":
settings.update(config.get_default_paths()) settings.update(config.get_default_paths())
if(options.gui == True): if(options.gui == True):
i = GuiAutoImport(settings, config) i = GuiAutoImport(settings, config, None, None)
main_window = gtk.Window() main_window = gtk.Window()
main_window.connect('destroy', destroy) main_window.connect('destroy', destroy)
main_window.add(i.mainVBox) main_window.add(i.mainVBox)

View File

@ -23,10 +23,6 @@
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
@ -64,6 +60,21 @@ 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')
@ -134,7 +145,7 @@ class HUD_main(object):
print _("hud_main: Client resized") print _("hud_main: Client resized")
print hud, hud.table.name, hud.table.x, hud.table.y print hud, hud.table.name, hud.table.x, hud.table.y
def client_destroyed(self, widget, hud): # call back for terminating the main eventloop def client_destroyed(self, widget, hud): # call back for terminating the main eventloop
print _("hud_main: Client destroyed") print _("hud_main: Client destroyed")
self.kill_hud(None, hud.table.name) self.kill_hud(None, hud.table.name)

View File

@ -5,7 +5,7 @@
msgid "" msgid ""
msgstr "" msgstr ""
"Project-Id-Version: PACKAGE VERSION\n" "Project-Id-Version: PACKAGE VERSION\n"
"POT-Creation-Date: 2010-10-02 13:52+CEST\n" "POT-Creation-Date: 2010-10-03 09:59+CEST\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n" "Language-Team: LANGUAGE <LL@li.org>\n"

Binary file not shown.