Merge branch 'testing'
This commit is contained in:
commit
4f87bc7e9e
|
@ -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
|
||||||
|
|
|
@ -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'
|
||||||
|
|
|
@ -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')
|
||||||
|
|
Loading…
Reference in New Issue
Block a user