From 33257f5a3f97d4d66b99f4925e8dd4bfb4475dcc Mon Sep 17 00:00:00 2001 From: steffen123 Date: Sun, 15 Aug 2010 18:43:30 +0200 Subject: [PATCH 1/5] gettextify pyfpdb/GuiLogView.py --- pyfpdb/GuiLogView.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/pyfpdb/GuiLogView.py b/pyfpdb/GuiLogView.py index bb7992b4..af8c3d34 100755 --- a/pyfpdb/GuiLogView.py +++ b/pyfpdb/GuiLogView.py @@ -30,6 +30,9 @@ import logging # logging has been set up in fpdb.py or HUD_main.py, use their settings: log = logging.getLogger("logview") +import gettext +trans = gettext.translation("fpdb", localedir="locale", languages=["de_DE"]) +trans.install() MAX_LINES = 100000 # max lines to display in window EST_CHARS_PER_LINE = 150 # used to guesstimate number of lines in log file @@ -47,7 +50,7 @@ class GuiLogView: self.closeq = closeq self.logfile = os.path.join(self.config.dir_log, LOGFILES[1][1]) - self.dia = gtk.Dialog(title="Log Messages" + self.dia = gtk.Dialog(title=_("Log Messages") ,parent=None ,flags=gtk.DIALOG_DESTROY_WITH_PARENT ,buttons=(gtk.STOCK_CLOSE,gtk.RESPONSE_OK)) @@ -82,7 +85,7 @@ class GuiLogView: rb.set_active(logf[2]) rb.connect('clicked', self.__set_logfile, logf[0]) hb.pack_start(rb, False, False, 3) - refreshbutton = gtk.Button("Refresh") + refreshbutton = gtk.Button(_("Refresh")) refreshbutton.connect("clicked", self.refresh, None) hb.pack_start(refreshbutton, False, False, 3) refreshbutton.show() @@ -186,7 +189,7 @@ class GuiLogView: # to turn indicator off for other cols except: err = traceback.extract_tb(sys.exc_info()[2]) - print "***sortCols error: " + str(sys.exc_info()[1]) + print _("***sortCols error: ") + str(sys.exc_info()[1]) print "\n".join( [e[0]+':'+str(e[1])+" "+e[2] for e in err] ) def refresh(self, widget, data): @@ -199,12 +202,12 @@ if __name__=="__main__": config = Configuration.Config() win = gtk.Window(gtk.WINDOW_TOPLEVEL) - win.set_title("Test Log Viewer") + win.set_title(_("Test Log Viewer")) win.set_border_width(1) win.set_default_size(600, 500) win.set_resizable(True) - dia = gtk.Dialog("Log Viewer", + dia = gtk.Dialog(_("Log Viewer"), win, gtk.DIALOG_MODAL | gtk.DIALOG_DESTROY_WITH_PARENT, (gtk.STOCK_CLOSE, gtk.RESPONSE_OK)) From 9ba2c5cdc4305a1e2651531cfc704d0c20ae9956 Mon Sep 17 00:00:00 2001 From: steffen123 Date: Sun, 15 Aug 2010 19:08:28 +0200 Subject: [PATCH 2/5] add example file for microgaming --- .../microgaming/GameHistory.dat | Bin 0 -> 128000 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 pyfpdb/regression-test-files/unsupported-sites/microgaming/GameHistory.dat diff --git a/pyfpdb/regression-test-files/unsupported-sites/microgaming/GameHistory.dat b/pyfpdb/regression-test-files/unsupported-sites/microgaming/GameHistory.dat new file mode 100644 index 0000000000000000000000000000000000000000..b5e221006889f728d64f56e0cf6de001abee4c13 GIT binary patch literal 128000 zcmeHwYmjBvRo>}o^N@o{jN?22+wF$f7Di)rPe0``Fs&Jn#(LN@BgvLzVP<;Tnnv@Y zZ;wRFGOlv+Cq*jx6Tl7<6mlG@VpCw=g(<3HD&->O0;(uis3Q51AN&k|Nq!~Yw^#2u zd!N15J^P$Keeb#5_iFCd>F#s)*^jl>Uf;LY-uv>!$F_I3=01IU=jN5&xl_fPikX?> zC+6mgqIf6X;cEsz@a)q??Gym$!ZgHi! zTHGkMibrsDtGI^$Zx@4Nx42#G6nn;RPdr>)D$W&WiYM_ohtD&`M)8=t){B`d-gmF4 z3&mM{=R)y>`}TQ!>k@wc7(Oo)kE5hZ#WVQ%QT+ay;zx1iOFWAT?xLc6-nrrv_~c(d zj^7T7%lN(g^%{N`m(9CAfs!A?bMF>6i#wGPp2Rn$3!cE$&EyH^_ka5&y5mmr*Yexx z-{*?^i|@c_ynXgzj>%_d|9Y4-Kme?R;4v!9>c zo4qsp!t77ZJ~jK8++IJ7(>ta;a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0RL5bq>6{1Dz?3GhB+#US&2ghy+}8?bo#m{Z>1uy_N=`p@9~ z5_1&U)5jZ$dp^R#EQ?^Z{CaS0*3+=+N-p?P{)6 zPd*aQZK-(K{XyH!ck#*1pzTkVo`!};g~Y{Pj|YjjL*WbY6c8)4biXnHphT(S|8eU^{J^;X%aHXn&M#mo6fyeVEzk+^-1n5H$1VcU^|7(tg~ zkY<8d_@DBjSyHRyGz+BP_&>C^eaivpcK@GWEoOd|mSFnoSr5GS5n%DZewkSO56-Dr zT()011#nV>#g~Bcc)E>fVGb5wLiC>dMDVC1u`g3Beppz195Hyv`dz$VdBw%}Q?4cU zd!KRfz(K(iGj8Ma3f>zyFWmq9Y;h4kGk!SiG?WlU+YzJqu7gL-#*f28d~LUzd6>lE za)yyMw`wfIq~dUi9kTYhEuBP+%@b4lyGt(g|1%5F*t0IiKd;90<2`VONiQcOzoTyM zm`*;%4qMtE9Iav5QQ>H@NRx!4Q>;7K=ftnM>=^n#;W+2zjrU=f9HM*e++(q&(EnGv z7^kCwuPvn86uIYPXkD&s9wWujR-K!obHBbQjHTPFOsrYk!v5NNE}xt7VaVt0;tn*d zX%337^DvHzW6@l5Wdy@=tGt@deR*EZ;?%SnS4*}=uI*Y9*&QQZ-Q&-xhW=yDC;Q`9 zyJ@zYOp@)x*kdkb#S%5l8pW2V?Nd`0(MwwU)pzM?mg=Zk8qt2#Qk&{W?eIn{pUrH_ zz;cHG`j??J)boEl3n|?R) Date: Sun, 15 Aug 2010 19:46:10 +0200 Subject: [PATCH 3/5] gettextify PS Summary, add note about py2exe --- pyfpdb/PokerStarsSummary.py | 4 ++-- pyfpdb/py2exe_setup.py | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/pyfpdb/PokerStarsSummary.py b/pyfpdb/PokerStarsSummary.py index 347536a9..30421ea2 100644 --- a/pyfpdb/PokerStarsSummary.py +++ b/pyfpdb/PokerStarsSummary.py @@ -69,7 +69,7 @@ class PokerStarsSummary(TourneySummary): elif lines[1].find("FPP")!=-1: self.currency="PSFP" else: - raise FpdbParseError("didn't recognise buyin currency in:"+lines[1]) + raise FpdbParseError(_("didn't recognise buyin currency in:")+lines[1]) if self.currency=="USD" or self.currency=="EUR": result=self.re_BuyInFee.search(lines[1]) @@ -109,7 +109,7 @@ class PokerStarsSummary(TourneySummary): useET=False result=self.re_DateTime.search(lines[currentLine]) if not result: - print "in not result starttime" + print _("in not result starttime") useET=True result=self.re_DateTimeET.search(lines[currentLine]) result=result.groupdict() diff --git a/pyfpdb/py2exe_setup.py b/pyfpdb/py2exe_setup.py index a836ed76..9dbda8dd 100644 --- a/pyfpdb/py2exe_setup.py +++ b/pyfpdb/py2exe_setup.py @@ -69,6 +69,7 @@ Py2exe script for fpdb. # See walkthrough in packaging directory for versions used # Updates to this script have broken python 2.5 compatibility (gio module, msvcr71 references now msvcp90) +# steffeN: Doesnt seem necessary to gettext-ify this, but feel free to if you disagree import os import sys From a0f9d0ddee18486d4564727e487e4e9e2e9d8de4 Mon Sep 17 00:00:00 2001 From: steffen123 Date: Sun, 15 Aug 2010 19:55:51 +0200 Subject: [PATCH 4/5] remove useless ongametofpdb file --- pyfpdb/OnGameToFpdb.py | 242 ----------------------------------------- 1 file changed, 242 deletions(-) delete mode 100755 pyfpdb/OnGameToFpdb.py diff --git a/pyfpdb/OnGameToFpdb.py b/pyfpdb/OnGameToFpdb.py deleted file mode 100755 index 80d8d646..00000000 --- a/pyfpdb/OnGameToFpdb.py +++ /dev/null @@ -1,242 +0,0 @@ -#!/usr/bin/env python -# -*- coding: utf-8 -*- - -# Copyright 2008-2010, Carl Gherardi -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -######################################################################## - -import sys -import Configuration -from HandHistoryConverter import * - -# OnGame HH Format - -#Texas Hold'em $.5-$1 NL (real money), hand #P4-76915775-797 -#Table Kuopio, 20 Sep 2008 11:59 PM - -#Seat 1: .Lucchess ($4.17 in chips) -#Seat 3: Gloff1 ($108 in chips) -#Seat 4: far a ($13.54 in chips) -#Seat 5: helander2222 ($49.77 in chips) -#Seat 6: lopllopl ($62.06 in chips) -#Seat 7: crazyhorse6 ($101.91 in chips) -#Seat 8: peeci ($25.02 in chips) -#Seat 9: Manuelhertz ($49 in chips) -#Seat 10: Eurolll ($58.25 in chips) -#ANTES/BLINDS -#helander2222 posts blind ($0.25), lopllopl posts blind ($0.50). - -#PRE-FLOP -#crazyhorse6 folds, peeci folds, Manuelhertz folds, Eurolll calls $0.50, .Lucchess calls $0.50, Gloff1 folds, far a folds, helander2222 folds, lopllopl checks. - -#FLOP [board cards AH,8H,KH ] -#lopllopl checks, Eurolll checks, .Lucchess checks. - -#TURN [board cards AH,8H,KH,6S ] -#lopllopl checks, Eurolll checks, .Lucchess checks. - -#RIVER [board cards AH,8H,KH,6S,8S ] -#lopllopl checks, Eurolll bets $1.25, .Lucchess folds, lopllopl folds. - -#SHOWDOWN -#Eurolll wins $2.92. - -#SUMMARY -#Dealer: far a -#Pot: $3, (including rake: $0.08) -#.Lucchess, loses $0.50 -#Gloff1, loses $0 -#far a, loses $0 -#helander2222, loses $0.25 -#lopllopl, loses $0.50 -#crazyhorse6, loses $0 -#peeci, loses $0 -#Manuelhertz, loses $0 -#Eurolll, bets $1.75, collects $2.92, net $1.17 - - -class OnGame(HandHistoryConverter): - def __init__(self, config, file): - print "Initialising OnGame converter class" - HandHistoryConverter.__init__(self, config, file, sitename="OnGame") # Call super class init. - self.sitename = "OnGame" - self.setFileType("text", "cp1252") - self.siteId = 5 # Needs to match id entry in Sites database - #self.rexx.setGameInfoRegex('.*Blinds \$?(?P[.0-9]+)/\$?(?P[.0-9]+)') - self.rexx.setSplitHandRegex('\n\n\n+') - - #Texas Hold'em $.5-$1 NL (real money), hand #P4-76915775-797 - #Table Kuopio, 20 Sep 2008 11:59 PM - self.rexx.setHandInfoRegex(r"Texas Hold'em \$?(?P[.0-9]+)-\$?(?P[.0-9]+) NL \(real money\), hand #(?P[-A-Z\d]+)\nTable\ (?P[\' \w]+), (?P\d\d \w+ \d\d\d\d \d\d:\d\d (AM|PM))") - # SB BB HID TABLE DAY MON YEAR HR12 MIN AMPM - - self.rexx.button_re = re.compile('#SUMMARY\nDealer: (?P.*)\n') - - #Seat 1: .Lucchess ($4.17 in chips) - self.rexx.setPlayerInfoRegex('Seat (?P[0-9]+): (?P.*) \((\$(?P[.0-9]+) in chips)\)') - - #ANTES/BLINDS - #helander2222 posts blind ($0.25), lopllopl posts blind ($0.50). - self.rexx.setPostSbRegex('(?P.*) posts blind \(\$?(?P[.0-9]+)\), ') - self.rexx.setPostBbRegex('\), (?P.*) posts blind \(\$?(?P[.0-9]+)\).') - self.rexx.setPostBothRegex('.*\n(?P.*): posts small \& big blinds \[\$? (?P[.0-9]+)') - self.rexx.setHeroCardsRegex('.*\nDealt\sto\s(?P.*)\s\[ (?P.*) \]') - - #lopllopl checks, Eurolll checks, .Lucchess checks. - self.rexx.setActionStepRegex('(, )?(?P.*?)(?P bets| checks| raises| calls| folds)( \$(?P\d*\.?\d*))?( and is all-in)?') - - #Uchilka shows [ KC,JD ] - self.rexx.setShowdownActionRegex('(?P.*) shows \[ (?P.+) \]') - - # TODO: read SUMMARY correctly for collected pot stuff. - #Uchilka, bets $11.75, collects $23.04, net $11.29 - self.rexx.setCollectPotRegex('(?P.*), bets.+, collects \$(?P\d*\.?\d*), net.* ') - self.rexx.sits_out_re = re.compile('(?P.*) sits out') - self.rexx.compileRegexes() - - def readSupportedGames(self): - pass - - def determineGameType(self): - # Cheating with this regex, only support nlhe at the moment - gametype = ["ring", "hold", "nl"] - - m = self.rexx.hand_info_re.search(self.obs) - gametype = gametype + [m.group('SB')] - gametype = gametype + [m.group('BB')] - - return gametype - - def readHandInfo(self, hand): - m = self.rexx.hand_info_re.search(hand.string) - hand.handid = m.group('HID') - hand.tablename = m.group('TABLE') - #hand.buttonpos = self.rexx.button_re.search(hand.string).group('BUTTONPNAME') -# These work, but the info is already in the Hand class - should be used for tourneys though. -# m.group('SB') -# m.group('BB') -# m.group('GAMETYPE') - -# Believe Everleaf time is GMT/UTC, no transation necessary -# Stars format (Nov 10 2008): 2008/11/07 12:38:49 CET [2008/11/07 7:38:49 ET] -# or : 2008/11/07 12:38:49 ET -# Not getting it in my HH files yet, so using -# 2008/11/10 3:58:52 ET -#TODO: Do conversion from GMT to ET -#TODO: Need some date functions to convert to different timezones (Date::Manip for perl rocked for this) - - hand.startTime = time.strptime(m.group('DATETIME'), "%d %b %Y %I:%M %p") - #hand.starttime = "%d/%02d/%02d %d:%02d:%02d ET" %(int(m.group('YEAR')), int(m.group('MON')), int(m.group('DAY')), - #int(m.group('HR')), int(m.group('MIN')), int(m.group('SEC'))) - - def readPlayerStacks(self, hand): - m = self.rexx.player_info_re.finditer(hand.string) - players = [] - for a in m: - hand.addPlayer(int(a.group('SEAT')), a.group('PNAME'), a.group('CASH')) - - def markStreets(self, hand): - # PREFLOP = ** Dealing down cards ** - # This re fails if, say, river is missing; then we don't get the ** that starts the river. - #m = re.search('(\*\* Dealing down cards \*\*\n)(?P.*?\n\*\*)?( Dealing Flop \*\* \[ (?P\S\S), (?P\S\S), (?P\S\S) \])?(?P.*?\*\*)?( Dealing Turn \*\* \[ (?P\S\S) \])?(?P.*?\*\*)?( Dealing River \*\* \[ (?P\S\S) \])?(?P.*)', hand.string,re.DOTALL) - - m = re.search(r"PRE-FLOP(?P.+(?=FLOP)|.+(?=SHOWDOWN))" - r"(FLOP (?P\[board cards .+ \].+(?=TURN)|.+(?=SHOWDOWN)))?" - r"(TURN (?P\[board cards .+ \].+(?=RIVER)|.+(?=SHOWDOWN)))?" - r"(RIVER (?P\[board cards .+ \].+(?=SHOWDOWN)))?", hand.string,re.DOTALL) - - hand.addStreets(m) - - - def readCommunityCards(self, hand, street): - self.rexx.board_re = re.compile(r"\[board cards (?P.+) \]") - print hand.streets.group(street) - if street in ('FLOP','TURN','RIVER'): # a list of streets which get dealt community cards (i.e. all but PREFLOP) - m = self.rexx.board_re.search(hand.streets.group(street)) - hand.setCommunityCards(street, m.group('CARDS').split(',')) - - def readBlinds(self, hand): - try: - m = self.rexx.small_blind_re.search(hand.string) - hand.addBlind(m.group('PNAME'), 'small blind', m.group('SB')) - except: # no small blind - hand.addBlind(None, None, None) - for a in self.rexx.big_blind_re.finditer(hand.string): - hand.addBlind(a.group('PNAME'), 'big blind', a.group('BB')) - for a in self.rexx.both_blinds_re.finditer(hand.string): - hand.addBlind(a.group('PNAME'), 'small & big blinds', a.group('SBBB')) - - def readHeroCards(self, hand): - m = self.rexx.hero_cards_re.search(hand.string) - if(m == None): - #Not involved in hand - hand.involved = False - else: - hand.hero = m.group('PNAME') - # "2c, qh" -> set(["2c","qc"]) - # Also works with Omaha hands. - cards = m.group('CARDS') - cards = set(cards.split(',')) - hand.addHoleCards(cards, m.group('PNAME')) - - def readAction(self, hand, street): - m = self.rexx.action_re.finditer(hand.streets.group(street)) - for action in m: - if action.group('ATYPE') == ' raises': - hand.addRaiseTo( street, action.group('PNAME'), action.group('BET') ) - elif action.group('ATYPE') == ' calls': - hand.addCall( street, action.group('PNAME'), action.group('BET') ) - elif action.group('ATYPE') == ' bets': - hand.addBet( street, action.group('PNAME'), action.group('BET') ) - elif action.group('ATYPE') == ' folds': - hand.addFold( street, action.group('PNAME')) - elif action.group('ATYPE') == ' checks': - hand.addCheck( street, action.group('PNAME')) - else: - print "DEBUG: unimplemented readAction: %s %s" %(action.group('PNAME'),action.group('ATYPE'),) - #hand.actions[street] += [[action.group('PNAME'), action.group('ATYPE')]] - # TODO: Everleaf does not record uncalled bets. - - def readShowdownActions(self, hand): - for shows in self.rexx.showdown_action_re.finditer(hand.string): - cards = shows.group('CARDS') - cards = set(cards.split(',')) - hand.addShownCards(cards, shows.group('PNAME')) - - def readCollectPot(self,hand): - for m in self.rexx.collect_pot_re.finditer(hand.string): - hand.addCollectPot(player=m.group('PNAME'),pot=m.group('POT')) - - def readShownCards(self,hand): - return - #for m in self.rexx.collect_pot_re.finditer(hand.string): - #if m.group('CARDS') is not None: - #cards = m.group('CARDS') - #cards = set(cards.split(',')) - #hand.addShownCards(cards=None, player=m.group('PNAME'), holeandboard=cards) - - - - -if __name__ == "__main__": - c = Configuration.Config() - if len(sys.argv) == 1: - testfile = "regression-test-files/ongame/nlhe/ong NLH handhq_0.txt" - else: - testfile = sys.argv[1] - e = OnGame(c, testfile) - e.processFile() - print str(e) From 787ea15c01aebd9d5e649cf7768630ec54a98084 Mon Sep 17 00:00:00 2001 From: steffen123 Date: Sun, 15 Aug 2010 20:06:30 +0200 Subject: [PATCH 5/5] gettextify GuiDatabase --- pyfpdb/GuiDatabase.py | 57 ++++++++++++++++++++++--------------------- 1 file changed, 29 insertions(+), 28 deletions(-) diff --git a/pyfpdb/GuiDatabase.py b/pyfpdb/GuiDatabase.py index a808c7df..2529643b 100755 --- a/pyfpdb/GuiDatabase.py +++ b/pyfpdb/GuiDatabase.py @@ -35,6 +35,9 @@ import Exceptions import Database import SQL +import gettext +trans = gettext.translation("fpdb", localedir="locale", languages=["de_DE"]) +trans.install() class GuiDatabase: @@ -92,19 +95,19 @@ class GuiDatabase: self.scrolledwindow.add(self.listview) self.vbox.pack_start(self.scrolledwindow, expand=True, fill=True, padding=0) - refreshbutton = gtk.Button("Refresh") + refreshbutton = gtk.Button(_("Refresh")) refreshbutton.connect("clicked", self.refresh, None) self.vbox.pack_start(refreshbutton, False, False, 3) refreshbutton.show() - col = self.addTextColumn("Type", 0, False) - col = self.addTextColumn("Name", 1, False) - col = self.addTextColumn("Description", 2, True) - col = self.addTextColumn("Username", 3, True) - col = self.addTextColumn("Password", 4, True) - col = self.addTextColumn("Host", 5, True) - col = self.addTextObjColumn("Default", 6, 6) - col = self.addTextObjColumn("Status", 7, 8) + col = self.addTextColumn(_("Type"), 0, False) + col = self.addTextColumn(_("Name"), 1, False) + col = self.addTextColumn(_("Description"), 2, True) + col = self.addTextColumn(_("Username"), 3, True) + col = self.addTextColumn(_("Password"), 4, True) + col = self.addTextColumn(_("Host"), 5, True) + col = self.addTextObjColumn(_("Default"), 6, 6) + col = self.addTextObjColumn(_("Status"), 7, 8) #self.listview.get_selection().set_mode(gtk.SELECTION_SINGLE) #self.listview.get_selection().connect("changed", self.on_selection_changed) @@ -237,7 +240,7 @@ class GuiDatabase: self.liststore.clear() #self.listcols = [] - dia = self.info_box2(None, 'Testing database connections ... ', "", False, False) + dia = self.info_box2(None, _('Testing database connections ... '), "", False, False) while gtk.events_pending(): gtk.mainiteration() @@ -267,49 +270,47 @@ class GuiDatabase: try: # is creating empty db for sqlite ... mod db.py further? # add noDbTables flag to db.py? - log.debug("loaddbs: trying to connect to: %s/%s, %s, %s/%s" % (str(dbms_num),dbms,name,user,passwd)) + log.debug(_("loaddbs: trying to connect to: %s/%s, %s, %s/%s") % (str(dbms_num),dbms,name,user,passwd)) db.connect(backend=dbms_num, host=host, database=name, user=user, password=passwd, create=False) if db.connected: - log.debug(" connected ok") + log.debug(_(" connected ok")) status = 'ok' icon = gtk.STOCK_APPLY if db.wrongDbVersion: status = 'old' icon = gtk.STOCK_INFO else: - log.debug(" not connected but no exception") + log.debug(_(" not connected but no exception")) except Exceptions.FpdbMySQLAccessDenied: - err_msg = "MySQL Server reports: Access denied. Are your permissions set correctly?" + err_msg = _("MySQL Server reports: Access denied. Are your permissions set correctly?") status = "failed" icon = gtk.STOCK_CANCEL except Exceptions.FpdbMySQLNoDatabase: - err_msg = "MySQL client reports: 2002 or 2003 error. Unable to connect - " \ - + "Please check that the MySQL service has been started" + err_msg = _("MySQL client reports: 2002 or 2003 error. Unable to connect - Please check that the MySQL service has been started") status = "failed" icon = gtk.STOCK_CANCEL except Exceptions.FpdbPostgresqlAccessDenied: - err_msg = "Postgres Server reports: Access denied. Are your permissions set correctly?" + err_msg = _("Postgres Server reports: Access denied. Are your permissions set correctly?") status = "failed" except Exceptions.FpdbPostgresqlNoDatabase: - err_msg = "Postgres client reports: Unable to connect - " \ - + "Please check that the Postgres service has been started" + err_msg = _("Postgres client reports: Unable to connect - Please check that the Postgres service has been started") status = "failed" icon = gtk.STOCK_CANCEL except: err = traceback.extract_tb(sys.exc_info()[2])[-1] log.info( 'db connection to '+str(dbms_num)+','+host+','+name+','+user+','+passwd+' failed: ' - + err[2] + "(" + str(err[1]) + "): " + str(sys.exc_info()[1]) ) + + err[2] + "(" + str(err[1]) + "): " + str(sys.exc_info()[1]) )#TODO Gettextify status = "failed" icon = gtk.STOCK_CANCEL if err_msg: log.info( 'db connection to '+str(dbms_num)+','+host+','+name+','+user+','+passwd+' failed: ' - + err_msg ) + + err_msg )#TODO Gettextify b = gtk.Button(name) b.show() iter = self.liststore.append( (dbms, name, comment, user, passwd, host, "", default_icon, status, icon) ) - self.info_box2(dia[0], "finished.", "", False, True) + self.info_box2(dia[0], _("finished."), "", False, True) self.listview.show() self.scrolledwindow.show() self.vbox.show() @@ -319,7 +320,7 @@ class GuiDatabase: self.dia.show() except: err = traceback.extract_tb(sys.exc_info()[2])[-1] - print 'loaddbs error: '+str(dbms_num)+','+host+','+name+','+user+','+passwd+' failed: ' \ + print _('loaddbs error: ')+str(dbms_num)+','+host+','+name+','+user+','+passwd+' failed: ' \ + err[2] + "(" + str(err[1]) + "): " + str(sys.exc_info()[1]) def sortCols(self, col, n): @@ -340,9 +341,9 @@ class GuiDatabase: # to turn indicator off for other cols except: err = traceback.extract_tb(sys.exc_info()[2]) - print "***sortCols error: " + str(sys.exc_info()[1]) + print _("***sortCols error: ") + str(sys.exc_info()[1]) print "\n".join( [e[0]+':'+str(e[1])+" "+e[2] for e in err] ) - log.info('sortCols error: ' + str(sys.exc_info()) ) + log.info(_('sortCols error: ') + str(sys.exc_info()) ) def refresh(self, widget, data): self.loadDbs() @@ -363,7 +364,7 @@ class GuiDatabase: for d in c.get_children(): log.info('child: '+str(d)+' is a '+str(d.__class__)) if isinstance(d, gtk.Button): - log.info('removing button '+str(d)) + log.info(_('removing button %s'% str(d))) c.remove(d) if str2: dia.format_secondary_text(str2) @@ -412,12 +413,12 @@ if __name__=="__main__": config = Configuration.Config() win = gtk.Window(gtk.WINDOW_TOPLEVEL) - win.set_title("Test Log Viewer") + win.set_title(_("Test Log Viewer")) win.set_border_width(1) win.set_default_size(600, 500) win.set_resizable(True) - dia = gtk.Dialog("Log Viewer", + dia = gtk.Dialog(_("Log Viewer"), win, gtk.DIALOG_MODAL | gtk.DIALOG_DESTROY_WITH_PARENT, (gtk.STOCK_CLOSE, gtk.RESPONSE_OK))