gettext import for guiprefs
This commit is contained in:
parent
c203136877
commit
e8d0c42566
|
@ -23,8 +23,19 @@ pygtk.require('2.0')
|
||||||
import gtk
|
import gtk
|
||||||
import gobject
|
import gobject
|
||||||
|
|
||||||
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
|
||||||
|
|
||||||
|
import Configuration
|
||||||
|
|
||||||
rewrite = { 'general' : 'General', 'supported_databases' : 'Databases'
|
rewrite = { 'general' : 'General', 'supported_databases' : 'Databases'
|
||||||
, 'import' : 'Import', 'hud_ui' : 'HUD'
|
, 'import' : 'Import', 'hud_ui' : 'HUD'
|
||||||
|
|
Loading…
Reference in New Issue
Block a user