diff --git a/pyfpdb/AbsoluteToFpdb.py b/pyfpdb/AbsoluteToFpdb.py index 26e0a564..8969459d 100755 --- a/pyfpdb/AbsoluteToFpdb.py +++ b/pyfpdb/AbsoluteToFpdb.py @@ -138,7 +138,7 @@ class Absolute(HandHistoryConverter): if not m: tmp = handText[0:100] log.error(_("Unable to recognise gametype from: '%s'") % tmp) - log.error(_("determineGameType: Raising FpdbParseError")) + log.error("determineGameType: " + _("Raising FpdbParseError")) raise FpdbParseError(_("Unable to recognise gametype from: '%s'") % tmp) @@ -349,7 +349,7 @@ class Absolute(HandHistoryConverter): bet = action.group('BET').replace(',', '') hand.addComplete( street, action.group('PNAME'), bet) else: - logging.debug(_("Unimplemented readAction: '%s' '%s'") % (action.group('PNAME'),action.group('ATYPE'))) + logging.debug(_("Unimplemented readAction: '%s' '%s'") % (action.group('PNAME'), action.group('ATYPE'))) def readShowdownActions(self, hand): diff --git a/pyfpdb/BetfairToFpdb.py b/pyfpdb/BetfairToFpdb.py index 446bbbee..2ef533da 100755 --- a/pyfpdb/BetfairToFpdb.py +++ b/pyfpdb/BetfairToFpdb.py @@ -74,7 +74,7 @@ class Betfair(HandHistoryConverter): if not m: tmp = handText[0:100] log.error(_("Unable to recognise gametype from: '%s'") % tmp) - log.error(_("determineGameType: Raising FpdbParseError")) + log.error("determineGameType: " + _("Raising FpdbParseError")) raise FpdbParseError(_("Unable to recognise gametype from: '%s'") % tmp) mg = m.groupdict() @@ -196,7 +196,7 @@ class Betfair(HandHistoryConverter): elif action.group('ATYPE') == 'checks': hand.addCheck( street, action.group('PNAME')) else: - sys.stderr.write(_("DEBUG: ") + _("Unimplemented readAction: '%s' '%s'") % (action.group('PNAME'),action.group('ATYPE'))) + sys.stderr.write(_("DEBUG: ") + _("Unimplemented readAction: '%s' '%s'") % (action.group('PNAME'), action.group('ATYPE'))) def readShowdownActions(self, hand): diff --git a/pyfpdb/CarbonToFpdb.py b/pyfpdb/CarbonToFpdb.py index 0f0822bf..e5b94f96 100644 --- a/pyfpdb/CarbonToFpdb.py +++ b/pyfpdb/CarbonToFpdb.py @@ -128,7 +128,7 @@ or None if we fail to get the info """ except AttributeError: tmp = handText[0:100] log.error(_("Unable to recognise gametype from: '%s'") % tmp) - log.error(_("determineGameType: Raising FpdbParseError")) + log.error("determineGameType: " + _("Raising FpdbParseError")) raise FpdbParseError(_("Unable to recognise gametype from: '%s'") % tmp) self.info = {} @@ -264,7 +264,7 @@ or None if we fail to get the info """ elif action.group('ATYPE') == 'ALL_IN': hand.addAllIn(street, player, action.group('BET')) else: - logging.debug(_("Unimplemented readAction: '%s' '%s'") % (action.group('PSEAT'),action.group('ATYPE'))) + logging.debug(_("Unimplemented readAction: '%s' '%s'") % (action.group('PSEAT'), action.group('ATYPE'))) def readShowdownActions(self, hand): for shows in self.re_ShowdownAction.finditer(hand.handText): diff --git a/pyfpdb/EverestToFpdb.py b/pyfpdb/EverestToFpdb.py index 662d2889..ee7e2135 100644 --- a/pyfpdb/EverestToFpdb.py +++ b/pyfpdb/EverestToFpdb.py @@ -99,12 +99,12 @@ class Everest(HandHistoryConverter): except AttributeError: tmp = handText[0:100] log.error(_("Unable to recognise gametype from: '%s'") % tmp) - log.error(_("determineGameType: Raising FpdbParseError")) + log.error("determineGameType: " + _("Raising FpdbParseError")) raise FpdbParseError(_("Unable to recognise gametype from: '%s'") % tmp) if not m2: tmp = handText[0:100] - log.error(_("determineGameType: Raising FpdbParseError")) + log.error("determineGameType: " + _("Raising FpdbParseError")) raise FpdbParseError(_("Unable to recognise handinfo from: '%s'") % tmp) self.info = {} @@ -231,8 +231,8 @@ class Everest(HandHistoryConverter): elif action.group('ATYPE') in ('FOLD', 'SIT_OUT'): hand.addFold(street, player) else: - print (_("Unimplemented readAction: '%s' '%s'") % (action.group('PSEAT'),action.group('ATYPE'))) - logging.debug(_("Unimplemented readAction: '%s' '%s'") % (action.group('PSEAT'),action.group('ATYPE'))) + print (_("Unimplemented readAction: '%s' '%s'") % (action.group('PSEAT'), action.group('ATYPE'))) + logging.debug(_("Unimplemented readAction: '%s' '%s'") % (action.group('PSEAT'), action.group('ATYPE'))) def readShowdownActions(self, hand): for shows in self.re_ShowdownAction.finditer(hand.handText): diff --git a/pyfpdb/EverleafToFpdb.py b/pyfpdb/EverleafToFpdb.py index 6882335e..c5525e36 100755 --- a/pyfpdb/EverleafToFpdb.py +++ b/pyfpdb/EverleafToFpdb.py @@ -111,7 +111,7 @@ or None if we fail to get the info """ if not m: tmp = handText[0:100] log.error(_("Unable to recognise gametype from: '%s'") % tmp) - log.error(_("determineGameType: Raising FpdbParseError")) + log.error("determineGameType: " + _("Raising FpdbParseError")) raise FpdbParseError(_("Unable to recognise gametype from: '%s'") % tmp) mg = m.groupdict() @@ -280,7 +280,7 @@ or None if we fail to get the info """ elif action.group('ATYPE') == ' complete to': hand.addComplete( street, action.group('PNAME'), action.group('BET')) else: - logging.debug(_("Unimplemented readAction: %s %s") % (action.group('PNAME'),action.group('ATYPE'))) + logging.debug(_("Unimplemented readAction: '%s' '%s'") % (action.group('PNAME'), action.group('ATYPE'))) def readShowdownActions(self, hand): diff --git a/pyfpdb/FullTiltPokerSummary.py b/pyfpdb/FullTiltPokerSummary.py index ab7ff266..cb02b9c9 100644 --- a/pyfpdb/FullTiltPokerSummary.py +++ b/pyfpdb/FullTiltPokerSummary.py @@ -89,8 +89,8 @@ class FullTiltPokerSummary(TourneySummary): m = self.re_TourneyInfo.search(self.summaryText[:2000]) if m == None: tmp = self.summaryText[0:200] - log.error(_("parseSummary: Unable to recognise Tourney Info: '%s'") % tmp) - log.error(_("parseSummary: Raising FpdbParseError")) + log.error("parseSummary: " + _("Unable to recognise Tourney Info: '%s'") % tmp) + log.error("parseSummary: " + _("Raising FpdbParseError")) raise FpdbParseError(_("Unable to recognise Tourney Info: '%s'") % tmp) #print "DEBUG: m.groupdict(): %s" % m.groupdict() @@ -115,8 +115,8 @@ class FullTiltPokerSummary(TourneySummary): m = self.re_Currency.search(self.summaryText) if m == None: - log.error(_("parseSummary: Unable to locate currency")) - log.error(_("parseSummary: Raising FpdbParseError")) + log.error("parseSummary: " + _("Unable to locate currency")) + log.error("parseSummary: " + _("Raising FpdbParseError")) raise FpdbParseError(_("Unable to locate currency")) #print "DEBUG: m.groupdict(): %s" % m.groupdict() diff --git a/pyfpdb/FulltiltToFpdb.py b/pyfpdb/FulltiltToFpdb.py index 328ae4fa..e3e0db09 100755 --- a/pyfpdb/FulltiltToFpdb.py +++ b/pyfpdb/FulltiltToFpdb.py @@ -206,7 +206,7 @@ class Fulltilt(HandHistoryConverter): if not m: tmp = handText[0:100] log.error(_("Unable to recognise gametype from: '%s'") % tmp) - log.error(_("determineGameType: Raising FpdbParseError for file '%s'") % self.in_path) + log.error("determineGameType: " + _("Raising FpdbParseError for file '%s'") % self.in_path) raise FpdbParseError(_("Unable to recognise gametype from: '%s'") % tmp) mg = m.groupdict() @@ -249,7 +249,7 @@ class Fulltilt(HandHistoryConverter): info['bb'] = self.Lim_Blinds[bb][1] except KeyError: log.error(_("Lim_Blinds has no lookup for '%s'") % mg['BB']) - log.error(_("determineGameType: Raising FpdbParseError")) + log.error("determineGameType: " + _("Raising FpdbParseError")) raise FpdbParseError(_("Lim_Blinds has no lookup for '%s'") % mg['BB']) if mg['GAME'] is not None: @@ -366,7 +366,7 @@ class Fulltilt(HandHistoryConverter): if plist == {}: #No players! The hand is either missing stacks or everyone is sitting out - raise FpdbParseError(_("FTP: readPlayerStacks: No players detected (hand #%s)") % hand.handid) + raise FpdbParseError(_("readPlayerStacks: No players detected (hand #%s)") % hand.handid) def markStreets(self, hand): @@ -433,7 +433,7 @@ class Fulltilt(HandHistoryConverter): hand.buttonpos = int(self.re_Button.search(hand.handText).group('BUTTON')) except AttributeError, e: # FTP has no indication that a hand is cancelled. - raise FpdbParseError(_("FTP: readButton: Failed to detect button (hand #%s cancelled?)") % hand.handid) + raise FpdbParseError(_("readButton: Failed to detect button (hand #%s cancelled?)") % hand.handid) def readHeroCards(self, hand): # streets PREFLOP, PREDRAW, and THIRD are special cases beacause @@ -491,7 +491,7 @@ class Fulltilt(HandHistoryConverter): elif action.group('ATYPE') == ' stands pat': hand.addStandsPat( street, action.group('PNAME'), action.group('CARDS')) else: - print _("FullTilt: DEBUG: unimplemented readAction: '%s' '%s'") %(action.group('PNAME'),action.group('ATYPE'),) + print (_("DEBUG: ") + " " + _("Unimplemented readAction: '%s' '%s'") % (action.group('PNAME'), action.group('ATYPE'))) def readShowdownActions(self, hand): @@ -768,7 +768,7 @@ class Fulltilt(HandHistoryConverter): tourney.addPlayer(rank, a.group('PNAME'), winnings, "USD", 0, 0, 0) #TODO: make it store actual winnings currency else: - print (_("FullTilt: Player finishing stats unreadable : %s") % a) + print (_("Player finishing stats unreadable : %s") % a) # Find Hero n = self.re_TourneyHeroFinishingP.search(playersText) @@ -777,9 +777,9 @@ class Fulltilt(HandHistoryConverter): tourney.hero = heroName # Is this really useful ? if heroName not in tourney.ranks: - print (_("FullTilt: %s not found in tourney.ranks ...") % heroName) + print (_("%s not found in tourney.ranks ...") % heroName) elif (tourney.ranks[heroName] != Decimal(n.group('HERO_FINISHING_POS'))): - print (_("FullTilt: Bad parsing : finish position incoherent : %s / %s") % (tourney.ranks[heroName], n.group('HERO_FINISHING_POS'))) + print (_("Bad parsing : finish position incoherent : %s / %s") % (tourney.ranks[heroName], n.group('HERO_FINISHING_POS'))) return True diff --git a/pyfpdb/GuiImapFetcher.py b/pyfpdb/GuiImapFetcher.py index c50d44e4..b738b139 100644 --- a/pyfpdb/GuiImapFetcher.py +++ b/pyfpdb/GuiImapFetcher.py @@ -107,7 +107,7 @@ class GuiImapFetcher (threading.Thread): def displayConfig(self): box=gtk.HBox(homogeneous=True) - for text in (_("Site"), _("Fetch Type"), _("Mailserver"), _("Username"), _("Password"), _("Mail Folder"), _("Use SSL")): + for text in (_("Site"), _("Fetch Type"), _("Mail Server"), _("Username"), _("Password"), _("Mail Folder"), _("Use SSL")): label=gtk.Label(text) box.add(label) self.mainVBox.pack_start(box, expand=False) diff --git a/pyfpdb/OnGameToFpdb.py b/pyfpdb/OnGameToFpdb.py index a75d3456..1606438b 100755 --- a/pyfpdb/OnGameToFpdb.py +++ b/pyfpdb/OnGameToFpdb.py @@ -161,7 +161,7 @@ class OnGame(HandHistoryConverter): if not m: tmp = handText[0:100] log.error(_("Unable to recognise gametype from: '%s'") % tmp) - log.error(_("determineGameType: Raising FpdbParseError")) + log.error("determineGameType: " + _("Raising FpdbParseError")) raise FpdbParseError(_("Unable to recognise gametype from: '%s'") % tmp) mg = m.groupdict() @@ -180,7 +180,7 @@ class OnGame(HandHistoryConverter): else: tmp = handText[0:100] log.error(_("limit not found in self.limits(%s). hand: '%s'") % (str(mg),tmp)) - log.error(_("determineGameType: Raising FpdbParseError")) + log.error("determineGameType: " + _("Raising FpdbParseError")) raise FpdbParseError(_("limit not found in self.limits(%s). hand: '%s'") % (str(mg),tmp)) if 'GAME' in mg: (info['base'], info['category']) = self.games[mg['GAME']] diff --git a/pyfpdb/PacificPokerToFpdb.py b/pyfpdb/PacificPokerToFpdb.py index 3989eea4..b9c1b6f1 100644 --- a/pyfpdb/PacificPokerToFpdb.py +++ b/pyfpdb/PacificPokerToFpdb.py @@ -171,7 +171,7 @@ class PacificPoker(HandHistoryConverter): if not m: tmp = handText[0:120] log.error(_("Unable to recognise gametype from: '%s'") % tmp) - log.error(_("determineGameType: Raising FpdbParseError")) + log.error("determineGameType: " + _("Raising FpdbParseError")) raise FpdbParseError(_("Unable to recognise gametype from: '%s'") % tmp) mg = m.groupdict() @@ -202,7 +202,7 @@ class PacificPoker(HandHistoryConverter): info['bb'] = self.Lim_Blinds[mg['BB']][1] except KeyError: log.error(_("Lim_Blinds has no lookup for '%s'") % mg['BB']) - log.error(_("determineGameType: Raising FpdbParseError")) + log.error("determineGameType: " + _("Raising FpdbParseError")) raise FpdbParseError(_("Lim_Blinds has no lookup for '%s'") % mg['BB']) return info @@ -255,7 +255,7 @@ class PacificPoker(HandHistoryConverter): hand.buyinCurrency="PSFP" else: #FIXME: handle other currencies, FPP, play money - raise FpdbParseError(_("Failed to detect currency. Hand ID: %s: '%s'") % (hand.handid, info[key])) + raise FpdbParseError(_("Failed to detect currency.") + " " + _("Hand ID: %s: '%s'") % (hand.handid, info[key])) info['BIAMT'] = info['BIAMT'].strip(u'$€FPP') @@ -426,7 +426,7 @@ class PacificPoker(HandHistoryConverter): elif action.group('ATYPE') == ' stands pat': hand.addStandsPat( street, action.group('PNAME')) else: - print _("DEBUG: unimplemented readAction: '%s' '%s'") %(action.group('PNAME'),action.group('ATYPE'),) + print (_("DEBUG: ") + _("Unimplemented readAction: '%s' '%s'") % (action.group('PNAME'), action.group('ATYPE'))) def readShowdownActions(self, hand): diff --git a/pyfpdb/PartyPokerToFpdb.py b/pyfpdb/PartyPokerToFpdb.py index a2f708a1..20a0418c 100755 --- a/pyfpdb/PartyPokerToFpdb.py +++ b/pyfpdb/PartyPokerToFpdb.py @@ -195,7 +195,7 @@ class PartyPoker(HandHistoryConverter): if m is None: tmp = handText[0:100] log.error(_("Unable to recognise gametype from: '%s'") % tmp) - log.error(_("determineGameType: Raising FpdbParseError")) + log.error("determineGameType: " + _("Raising FpdbParseError")) raise FpdbParseError(_("Unable to recognise gametype from: '%s'") % tmp) mg = m.groupdict() @@ -345,7 +345,7 @@ class PartyPoker(HandHistoryConverter): elif info[key].find(u"€")!=-1: hand.buyinCurrency="EUR" else: - raise FpdbParseError(_("Failed to detect currency. Hand ID: %s: '%s'") % (hand.handid, info[key])) + raise FpdbParseError(_("Failed to detect currency.") + " " + _("Hand ID: %s: '%s'") % (hand.handid, info[key])) info[key] = info[key].strip(u'$€') hand.buyin = int(100*Decimal(info[key])) if key == 'LEVEL': @@ -532,9 +532,7 @@ class PartyPoker(HandHistoryConverter): elif actionType == 'checks': hand.addCheck( street, playerName ) else: - raise FpdbParseError( - _("Unimplemented readAction: '%s' '%s'") % (playerName,actionType,), - hid = hand.hid, ) + raise FpdbParseError(_("Unimplemented readAction: '%s' '%s'") % (playerName,actionType), hid = hand.hid) def readShowdownActions(self, hand): # all action in readShownCards diff --git a/pyfpdb/PkrToFpdb.py b/pyfpdb/PkrToFpdb.py index 93050e84..731f877c 100755 --- a/pyfpdb/PkrToFpdb.py +++ b/pyfpdb/PkrToFpdb.py @@ -126,7 +126,7 @@ class Pkr(HandHistoryConverter): if not m: tmp = handText[0:100] log.error(_("Unable to recognise gametype from: '%s'") % tmp) - log.error(_("determineGameType: Raising FpdbParseError")) + log.error("determineGameType: " + _("Raising FpdbParseError")) raise FpdbParseError(_("Unable to recognise gametype from: '%s'") % tmp) mg = m.groupdict() @@ -151,7 +151,7 @@ class Pkr(HandHistoryConverter): info['bb'] = self.Lim_Blinds[mg['BB']][1] except KeyError: log.error(_("Lim_Blinds has no lookup for '%s'") % mg['BB']) - log.error(_("determineGameType: Raising FpdbParseError")) + log.error("determineGameType: " + _("Raising FpdbParseError")) raise FpdbParseError(_("Lim_Blinds has no lookup for '%s'") % mg['BB']) return info @@ -348,7 +348,7 @@ class Pkr(HandHistoryConverter): elif action.group('ATYPE') == ' stands pat': hand.addStandsPat( street, action.group('PNAME')) else: - print "DEBUG: unimplemented readAction: '%s' '%s'" %(action.group('PNAME'),action.group('ATYPE'),) + print (_("DEBUG: ") + _("Unimplemented readAction: '%s' '%s'") % (action.group('PNAME'), action.group('ATYPE'))) def readShowdownActions(self, hand): diff --git a/pyfpdb/PokerStarsSummary.py b/pyfpdb/PokerStarsSummary.py index b1d31a26..8b318094 100644 --- a/pyfpdb/PokerStarsSummary.py +++ b/pyfpdb/PokerStarsSummary.py @@ -78,8 +78,8 @@ class PokerStarsSummary(TourneySummary): m = self.re_TourneyInfo.search(self.summaryText) if m == None: tmp = self.summaryText[0:200] - log.error(_("parseSummary: Unable to recognise Tourney Info: '%s'") % tmp) - log.error(_("parseSummary: Raising FpdbParseError")) + log.error("parseSummary: " + _("Unable to recognise Tourney Info: '%s'") % tmp) + log.error("parseSummary: " + _("Raising FpdbParseError")) raise FpdbParseError(_("Unable to recognise Tourney Info: '%s'") % tmp) #print "DEBUG: m.groupdict(): %s" % m.groupdict() @@ -104,8 +104,8 @@ class PokerStarsSummary(TourneySummary): m = self.re_Currency.search(self.summaryText) if m == None: - log.error(_("parseSummary: Unable to locate currency")) - log.error(_("parseSummary: Raising FpdbParseError")) + log.error("parseSummary: " + _("Unable to locate currency")) + log.error("parseSummary: " + _("Raising FpdbParseError")) raise FpdbParseError(_("Unable to locate currency")) #print "DEBUG: m.groupdict(): %s" % m.groupdict() diff --git a/pyfpdb/PokerStarsToFpdb.py b/pyfpdb/PokerStarsToFpdb.py index d9f19c78..21d7f48e 100644 --- a/pyfpdb/PokerStarsToFpdb.py +++ b/pyfpdb/PokerStarsToFpdb.py @@ -184,7 +184,7 @@ class PokerStars(HandHistoryConverter): if not m: tmp = handText[0:100] log.error(_("Unable to recognise gametype from: '%s'") % tmp) - log.error(_("determineGameType: Raising FpdbParseError")) + log.error("determineGameType: " + _("Raising FpdbParseError")) raise FpdbParseError(_("Unable to recognise gametype from: '%s'") % tmp) mg = m.groupdict() @@ -210,7 +210,7 @@ class PokerStars(HandHistoryConverter): info['bb'] = self.Lim_Blinds[mg['BB']][1] except KeyError: log.error(_("Lim_Blinds has no lookup for '%s'") % mg['BB']) - log.error(_("determineGameType: Raising FpdbParseError")) + log.error("determineGameType: " + _("Raising FpdbParseError")) raise FpdbParseError(_("Lim_Blinds has no lookup for '%s'") % mg['BB']) return info @@ -263,7 +263,7 @@ class PokerStars(HandHistoryConverter): hand.buyinCurrency="PSFP" else: #FIXME: handle other currencies, play money - raise FpdbParseError(_("Failed to detect currency. Hand ID: %s: '%s'") % (hand.handid, info[key])) + raise FpdbParseError(_("Failed to detect currency.") + " " + _("Hand ID: %s: '%s'") % (hand.handid, info[key])) info['BIAMT'] = info['BIAMT'].strip(u'$€FPP') @@ -437,7 +437,7 @@ class PokerStars(HandHistoryConverter): elif action.group('ATYPE') == ' stands pat': hand.addStandsPat( street, action.group('PNAME'), action.group('CARDS')) else: - print (_("DEBUG: ") + _("Unimplemented readAction: '%s' '%s'") % (action.group('PNAME'),action.group('ATYPE'))) + print (_("DEBUG: ") + _("Unimplemented readAction: '%s' '%s'") % (action.group('PNAME'), action.group('ATYPE'))) def readShowdownActions(self, hand): diff --git a/pyfpdb/SitenameSummary.py b/pyfpdb/SitenameSummary.py index 06015e14..8e33cc65 100644 --- a/pyfpdb/SitenameSummary.py +++ b/pyfpdb/SitenameSummary.py @@ -78,8 +78,8 @@ class Sitename(TourneySummary): m = self.re_TourneyInfo.search(self.summaryText) if m == None: tmp = self.summaryText[0:200] - log.error(_("parseSummary: Unable to recognise Tourney Info: '%s'") % tmp) - log.error(_("parseSummary: Raising FpdbParseError")) + log.error("parseSummary: " + _("Unable to recognise Tourney Info: '%s'") % tmp) + log.error("parseSummary: " + _("Raising FpdbParseError")) raise FpdbParseError(_("Unable to recognise Tourney Info: '%s'") % tmp) print "DEBUG: m.groupdict(): %s" % m.groupdict() diff --git a/pyfpdb/Win2dayToFpdb.py b/pyfpdb/Win2dayToFpdb.py index 4ee21aee..8e27afe1 100755 --- a/pyfpdb/Win2dayToFpdb.py +++ b/pyfpdb/Win2dayToFpdb.py @@ -99,7 +99,7 @@ class Win2day(HandHistoryConverter): if not m: tmp = handText[0:1000] log.error(_("Unable to recognise gametype from: '%s'") % tmp) - log.error(_("determineGameType: Raising FpdbParseError")) + log.error("determineGameType: " + _("Raising FpdbParseError")) raise FpdbParseError(_("Unable to recognise gametype from: '%s'") % tmp) mg = m.groupdict() @@ -345,7 +345,7 @@ class Win2day(HandHistoryConverter): elif action.group('ATYPE') == 'ACTION_STAND': hand.addStandsPat( street, action.group('PNAME')) else: - print (_("DEBUG: ") + _("unimplemented readAction: '%s' '%s'") % (action.group('PNAME'), action.group('ATYPE'))) + print (_("DEBUG: ") + _("Unimplemented readAction: '%s' '%s'") % (action.group('PNAME'), action.group('ATYPE'))) def readShowdownActions(self, hand): diff --git a/pyfpdb/WinamaxToFpdb.py b/pyfpdb/WinamaxToFpdb.py index e3aafe4d..9ec03656 100644 --- a/pyfpdb/WinamaxToFpdb.py +++ b/pyfpdb/WinamaxToFpdb.py @@ -170,7 +170,7 @@ class Winamax(HandHistoryConverter): if not m: tmp = handText[0:100] log.error(_("Unable to recognise gametype from: '%s'") % tmp) - log.error(_("determineGameType: Raising FpdbParseError")) + log.error("determineGameType: " + _("Raising FpdbParseError")) raise FpdbParseError(_("Unable to recognise gametype from: '%s'") % tmp) mg = m.groupdict() @@ -188,7 +188,7 @@ class Winamax(HandHistoryConverter): else: tmp = handText[0:100] log.error(_("limit not found in self.limits(%s). hand: '%s'") % (str(mg),tmp)) - log.error(_("determineGameType: Raising FpdbParseError")) + log.error("determineGameType: " + _("Raising FpdbParseError")) raise FpdbParseError(_("limit not found in self.limits(%s). hand: '%s'") % (str(mg),tmp)) if 'GAME' in mg: (info['base'], info['category']) = self.games[mg['GAME']] @@ -260,7 +260,7 @@ class Winamax(HandHistoryConverter): hand.buyinCurrency="PSFP" else: #FIXME: handle other currencies (are there other currencies?) - raise FpdbParseError(_("Failed to detect currency. Hand ID: %s: '%s'") % (hand.handid, info[key])) + raise FpdbParseError(_("Failed to detect currency.") + " " + _("Hand ID: %s: '%s'") % (hand.handid, info[key])) info['BIAMT'] = info['BIAMT'].strip(u'$€FPP') @@ -403,7 +403,7 @@ class Winamax(HandHistoryConverter): elif action.group('ATYPE') == ' stands pat': hand.addStandsPat( street, action.group('PNAME')) else: - log.fatal(_("DEBUG: ") + _("unimplemented readAction: '%s' '%s'") % (action.group('PNAME'),action.group('ATYPE'))) + log.fatal(_("DEBUG: ") + _("Unimplemented readAction: '%s' '%s'") % (action.group('PNAME'), action.group('ATYPE'))) # print "Processed %s"%acts # print "committed=",hand.pot.committed diff --git a/pyfpdb/iPokerToFpdb.py b/pyfpdb/iPokerToFpdb.py index 7fd5d6ac..3878bd8e 100644 --- a/pyfpdb/iPokerToFpdb.py +++ b/pyfpdb/iPokerToFpdb.py @@ -120,7 +120,7 @@ or None if we fail to get the info """ except AttributeError: tmp = handText[0:100] log.error(_("Unable to recognise gametype from: '%s'") % tmp) - log.error(_("determineGameType: Raising FpdbParseError")) + log.error("determineGameType: " + _("Raising FpdbParseError")) raise FpdbParseError(_("Unable to recognise gametype from: '%s'") % tmp) self.info = {} @@ -258,7 +258,7 @@ or None if we fail to get the info """ #print "DEBUG: addBringIn(%s, %s)" %(action.group('PNAME'), action.group('BET')) hand.addBringIn(action.group('PNAME'), action.group('BET')) else: - logging.error(_("Unimplemented readAction: %s") % (ag)) + logging.error(_("DEBUG: ") + _("Unimplemented readAction: '%s' '%s'") % (action.group('PNAME'), action.group('ATYPE'))) def readShowdownActions(self, hand): for shows in self.re_ShowdownAction.finditer(hand.handText):