Detect intl library successful loading
svn: r1401
This commit is contained in:
parent
42b49c4c49
commit
0979947abb
@ -326,6 +326,7 @@ class EditPerson:
|
||||
self.redraw_addr_list()
|
||||
self.redraw_name_list()
|
||||
self.redraw_url_list()
|
||||
self.get_widget("notebook").set_current_page(0)
|
||||
self.given.grab_focus()
|
||||
self.window.show()
|
||||
|
||||
|
@ -57,7 +57,8 @@ import Utils
|
||||
import GrampsCfg
|
||||
import Errors
|
||||
|
||||
from intl import gettext as _
|
||||
import intl
|
||||
_ = intl.gettext
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
@ -278,6 +279,9 @@ class PluginStatus:
|
||||
|
||||
info = cStringIO.StringIO()
|
||||
|
||||
if intl.status:
|
||||
_expect.append(('intl:py','GRAMPS was built without internationalization support'))
|
||||
|
||||
if len(_expect) + len(_failmsg) == 0:
|
||||
window.get_buffer().set_text(_('All modules were successfully loaded.'))
|
||||
else:
|
||||
|
@ -86,7 +86,7 @@
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkNotebook" id="notebook2">
|
||||
<widget class="GtkNotebook" id="notebook">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="show_tabs">True</property>
|
||||
|
16
src/intl.py
16
src/intl.py
@ -27,16 +27,12 @@ import sys
|
||||
ver = sys.version[0:3]
|
||||
|
||||
try:
|
||||
if ver == "1.5":
|
||||
from intl15 import *
|
||||
elif ver == "2.0":
|
||||
from intl20 import *
|
||||
elif ver == "2.1":
|
||||
from intl21 import *
|
||||
elif ver == "2.2":
|
||||
if ver == "2.2":
|
||||
from intl22 import *
|
||||
status = None
|
||||
else:
|
||||
print 'Internationalization library could be loaded'
|
||||
status = 'Internationalization library could not be loaded'
|
||||
print status
|
||||
|
||||
def gettext(s):
|
||||
return s
|
||||
@ -50,8 +46,8 @@ try:
|
||||
def bind_textdomain_codeset(s,x):
|
||||
return
|
||||
except:
|
||||
import traceback
|
||||
traceback.print_exc()
|
||||
status = 'Internationalization library could not be loaded'
|
||||
print status
|
||||
|
||||
def gettext(s):
|
||||
return s
|
||||
|
Loading…
Reference in New Issue
Block a user