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