L10n: Remaining files

This commit is contained in:
Worros 2010-09-23 14:31:16 +08:00
parent dee17e8001
commit 235a8baa5f
15 changed files with 44 additions and 156 deletions

View File

@ -18,6 +18,9 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
########################################################################
import L10n
_ = L10n.get_translation()
import sys
import exceptions
@ -30,18 +33,6 @@ import Configuration
from HandHistoryConverter import *
from decimal import Decimal
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
# OnGame HH Format
class OnGame(HandHistoryConverter):

View File

@ -15,22 +15,13 @@
#along with this program. If not, see <http://www.gnu.org/licenses/>.
#In the "official" distribution you can find the license in agpl-3.0.txt.
import L10n
_ = L10n.get_translation()
import sys
from optparse import OptionParser
# http://docs.python.org/library/optparse.html
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
def fpdb_options():
"""Process command line options for fpdb and HUD_main."""

View File

@ -18,21 +18,12 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
########################################################################
import L10n
_ = L10n.get_translation()
import sys
from collections import defaultdict
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
from Exceptions import FpdbParseError
from HandHistoryConverter import *

View File

@ -18,22 +18,12 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
########################################################################
import L10n
_ = L10n.get_translation()
import sys
from HandHistoryConverter 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 Pkr(HandHistoryConverter):

View File

@ -17,6 +17,9 @@
"""pokerstars-specific summary parsing code"""
import L10n
_ = L10n.get_translation()
from decimal import Decimal
import datetime
@ -25,18 +28,6 @@ from HandHistoryConverter import *
import PokerStarsToFpdb
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):
limits = { 'No Limit':'nl', 'Pot Limit':'pl', 'Limit':'fl', 'LIMIT':'fl' }
games = { # base, category

View File

@ -18,24 +18,15 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
########################################################################
import L10n
_ = L10n.get_translation()
# TODO: straighten out discards for draw games
import sys
from HandHistoryConverter import *
from decimal import Decimal
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
# PokerStars HH Format
class PokerStars(HandHistoryConverter):

View File

@ -47,6 +47,9 @@
# other stuff.
# 6 For each stat you make add a line to the __main__ function to test it.
import L10n
_ = L10n.get_translation()
# Standard Library modules
import sys
@ -55,18 +58,6 @@ import pygtk
import gtk
import re
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
# FreePokerTools modules
import Configuration
import Database

View File

@ -22,6 +22,9 @@ Main program module to test/demo the Tables subclasses.
########################################################################
import L10n
_ = L10n.get_translation()
# Standard Library modules
import sys
import os
@ -33,18 +36,6 @@ import gobject
# fpdb/free poker tools modules
import Configuration
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
# get the correct module for the current os
if os.name == 'posix':
import XTables as Tables

View File

@ -21,6 +21,9 @@
########################################################################
import L10n
_ = L10n.get_translation()
# to do allow window resizing
# to do hud to echo, but ignore non numbers
# to do no stat window for hero
@ -34,18 +37,6 @@ import traceback
(options, argv) = Options.fpdb_options()
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
if not options.errorsToConsole:
print _("Note: error output is being diverted to fpdb-error-log.txt and HUD-error.txt. Any major error will be reported there _only_.")
errorFile = open('tourneyerror.txt', 'w', 0)

View File

@ -15,6 +15,9 @@
#along with this program. If not, see <http://www.gnu.org/licenses/>.
#In the "official" distribution you can find the license in agpl-3.0.txt.
import L10n
_ = L10n.get_translation()
import threading
import pygtk
pygtk.require('2.0')
@ -29,18 +32,6 @@ from time import gmtime, mktime, strftime, strptime
import logging #logging has been set up in fpdb.py or HUD_main.py, use their settings:
log = logging.getLogger("filter")
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
#import Configuration
#import Database
#import SQL

View File

@ -17,6 +17,9 @@
"""parses and stores summary sections from e.g. eMail or summary files"""
import L10n
_ = L10n.get_translation()
# TODO: check to keep only the needed modules
import re
@ -31,18 +34,6 @@ import time,datetime
from copy import deepcopy
from Exceptions 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
import pprint
import DerivedStats
import Card

View File

@ -18,6 +18,9 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
########################################################################
import L10n
_ = L10n.get_translation()
import sys
from HandHistoryConverter import *

View File

@ -18,22 +18,13 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
########################################################################
import L10n
_ = L10n.get_translation()
import sys
import datetime
from HandHistoryConverter 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
# Win2day HH Format
class Win2day(HandHistoryConverter):

View File

@ -20,6 +20,9 @@
########################################################################
import L10n
_ = L10n.get_translation()
# Standard Library modules
import re
@ -38,18 +41,6 @@ import win32api
import win32con
import win32security
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
# FreePokerTools modules
from TableWindow import Table_Window

View File

@ -20,6 +20,9 @@
########################################################################
import L10n
_ = L10n.get_translation()
# Standard Library modules
import re
import os