Merge branch 'testing'

This commit is contained in:
Chris Moore 2011-02-06 11:06:00 -08:00
commit 4f87bc7e9e
3 changed files with 9 additions and 39 deletions

View File

@ -15,6 +15,9 @@
#along with this program. If not, see <http://www.gnu.org/licenses/>. #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. #In the "official" distribution you can find the license in agpl-3.0.txt.
import L10n
_ = L10n.get_translation()
import threading import threading
import pygtk import pygtk
pygtk.require('2.0') pygtk.require('2.0')
@ -22,18 +25,6 @@ import gtk
import os import os
from time import time, strftime from time import time, strftime
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 fpdb_import import fpdb_import
import Database import Database
import Filters import Filters

View File

@ -15,6 +15,9 @@
#along with this program. If not, see <http://www.gnu.org/licenses/>. #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. #In the "official" distribution you can find the license in agpl-3.0.txt.
import L10n
_ = L10n.get_translation()
import xml.dom.minidom import xml.dom.minidom
from xml.dom.minidom import Node from xml.dom.minidom import Node
@ -23,18 +26,6 @@ pygtk.require('2.0')
import gtk import gtk
import gobject import gobject
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 Configuration
rewrite = { 'general' : 'General', 'supported_databases' : 'Databases' rewrite = { 'general' : 'General', 'supported_databases' : 'Databases'

View File

@ -23,6 +23,9 @@
Main for FreePokerTools HUD. Main for FreePokerTools HUD.
""" """
import L10n
_ = L10n.get_translation()
# Standard Library modules # Standard Library modules
import sys import sys
import os import os
@ -51,21 +54,6 @@ elif sys.platform == 'darwin':
else: # This is bad--figure out the values for the various windows flavors else: # This is bad--figure out the values for the various windows flavors
import WinTables as Tables import WinTables as Tables
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 # get config and set up logger
c = Configuration.Config(file=options.config, dbname=options.dbname) 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') log = Configuration.get_logger("logging.conf", "hud", log_dir=c.dir_log, log_file='HUD-log.txt')