diff --git a/pyfpdb/EverleafToFpdb.py b/pyfpdb/EverleafToFpdb.py index 22977a26..26875070 100755 --- a/pyfpdb/EverleafToFpdb.py +++ b/pyfpdb/EverleafToFpdb.py @@ -66,13 +66,16 @@ class Everleaf(HandHistoryConverter): self.re_SitsOut = re.compile(ur"^%s sits out" % player_re, re.MULTILINE) def readSupportedGames(self): - return [["ring", "hold", "nl"], + return [ + ["ring", "hold", "nl"], ["ring", "hold", "pl"], ["ring", "hold", "fl"], - ["ring", "studhi", "fl"], - ["ring", "omahahi", "pl"], - ["ring", "omahahilo", "pl"], - ["tour", "hold", "nl"] + ["ring", "stud", "fl"], + #["ring", "omahahi", "pl"], + #["ring", "omahahilo", "pl"], + ["tour", "hold", "nl"], + ["tour", "hold", "fl"], + ["tour", "hold", "pl"] ] def determineGameType(self, handText): diff --git a/pyfpdb/GuiAutoImport.py b/pyfpdb/GuiAutoImport.py index 8cbe8d19..0121509d 100755 --- a/pyfpdb/GuiAutoImport.py +++ b/pyfpdb/GuiAutoImport.py @@ -353,7 +353,7 @@ if __name__== "__main__": settings.update(config.get_default_paths()) if(options.gui == True): - i = GuiAutoImport(settings, config) + i = GuiAutoImport(settings, config, None, None) main_window = gtk.Window() main_window.connect('destroy', destroy) main_window.add(i.mainVBox) diff --git a/pyfpdb/HUD_main.pyw b/pyfpdb/HUD_main.pyw index 4852e930..7d433a1c 100644 --- a/pyfpdb/HUD_main.pyw +++ b/pyfpdb/HUD_main.pyw @@ -23,10 +23,6 @@ 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 @@ -64,6 +60,21 @@ 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') @@ -134,7 +145,7 @@ class HUD_main(object): print _("hud_main: Client resized") 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") self.kill_hud(None, hud.table.name) diff --git a/pyfpdb/locale/fpdb-en_GB.pot b/pyfpdb/locale/fpdb-en_GB.pot index e1c192b3..22fcfe32 100644 --- a/pyfpdb/locale/fpdb-en_GB.pot +++ b/pyfpdb/locale/fpdb-en_GB.pot @@ -5,7 +5,7 @@ msgid "" msgstr "" "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" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/pyfpdb/locale/hu/LC_MESSAGES/fpdb.mo b/pyfpdb/locale/hu/LC_MESSAGES/fpdb.mo index a40340c0..14676316 100644 Binary files a/pyfpdb/locale/hu/LC_MESSAGES/fpdb.mo and b/pyfpdb/locale/hu/LC_MESSAGES/fpdb.mo differ