L10n update: Gui*

This commit is contained in:
Worros 2010-09-23 13:11:06 +08:00
parent eefad4a486
commit 016172f78d
10 changed files with 30 additions and 121 deletions

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 subprocess
import traceback
@ -37,18 +40,6 @@ from optparse import OptionParser
import Configuration
import string
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 GuiAutoImport (threading.Thread):
def __init__(self, settings, config, sql, parent):
self.importtimer = 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 os
import sys
import traceback
@ -31,24 +34,11 @@ import logging
# logging has been set up in fpdb.py or HUD_main.py, use their settings:
log = logging.getLogger("maintdbs")
import Exceptions
import Configuration
import Database
import SQL
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 GuiDatabase:
# columns in liststore:

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')
@ -26,18 +29,6 @@ from time import *
from datetime import datetime
#import pokereval
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 Database
import Filters

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')
@ -22,18 +25,6 @@ import gtk
from imaplib import IMAP4
from socket import gaierror
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 ImapFetcher
class GuiImapFetcher (threading.Thread):

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 os
import Queue
@ -30,18 +33,6 @@ import logging
# logging has been set up in fpdb.py or HUD_main.py, use their settings:
log = logging.getLogger("logview")
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
MAX_LINES = 100000 # max lines to display in window
EST_CHARS_PER_LINE = 150 # used to guesstimate number of lines in log file
LOGFILES = [ [ 'Fpdb Errors', 'fpdb-errors.txt', False ] # label, filename, start value

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 traceback
import threading
import pygtk
@ -24,18 +27,6 @@ import os
import sys
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 Card
import fpdb_import
import Database

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 sys
import threading
import pygtk
@ -41,18 +44,6 @@ except ImportError, inst:
print _("""Failed to load numpy and/or matplotlib in Session Viewer""")
print _("ImportError: %s") % inst.args
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 Card
import fpdb_import
import Database

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')
@ -26,18 +29,6 @@ from time import *
from datetime import datetime
#import pokereval
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 Database
import Filters

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 traceback
import threading
import pygtk
@ -24,18 +27,6 @@ import gtk
#import sys
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 Card
#import fpdb_import
#import Database

View File

@ -15,23 +15,14 @@
#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')
import gtk
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 GuiTourneyViewer (threading.Thread):
def __init__(self, config, db, sql, mainwin, debug=True):
self.db = db