StarsSummary: Fix gettextify problem

This commit is contained in:
Worros 2010-09-04 13:08:36 +08:00
parent 7731e830f7
commit c0eb686971

View File

@ -25,6 +25,20 @@ from HandHistoryConverter import *
import PokerStarsToFpdb import PokerStarsToFpdb
from TourneySummary import * from TourneySummary import *
import locale
lang=locale.getdefaultlocale()[0][0:2]
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
class PokerStarsSummary(TourneySummary): class PokerStarsSummary(TourneySummary):
limits = { 'No Limit':'nl', 'Pot Limit':'pl', 'Limit':'fl', 'LIMIT':'fl' } limits = { 'No Limit':'nl', 'Pot Limit':'pl', 'Limit':'fl', 'LIMIT':'fl' }
games = { # base, category games = { # base, category