add missing gettext import

This commit is contained in:
steffen123 2010-08-15 23:38:13 +02:00
parent 027afaa5e1
commit 4696c7afaf

View File

@ -31,6 +31,18 @@ from optparse import OptionParser
import Configuration import Configuration
import string 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): class GuiAutoImport (threading.Thread):
def __init__(self, settings, config, sql, parent): def __init__(self, settings, config, sql, parent):
self.importtimer = 0 self.importtimer = 0