6867: warn on gtk translation missing

Give a dev-oriented warning on console and pop up a UI
warning dialog for the user, when an inconsistent
translation configuration is detected between gramps and gtk
(happens when a langpack is missing on Ubuntu systems, e.g.)

svn: r22683
This commit is contained in:
Vassilii Khachaturov 2013-07-16 11:10:24 +00:00
parent 0617629e9d
commit 6fdae2e29c

View File

@ -253,9 +253,22 @@ class Gramps(object):
from .viewmanager import ViewManager
from gramps.cli.arghandler import ArgHandler
from .tipofday import TipOfDay
from .dialog import WarningDialog
import gettext
register_stock_icons()
if glocale.lang != 'C' and not gettext.find('gtk30'):
LOG.warn("GTK translations missing, GUI will be broken, especially for RTL languages!")
WarningDialog(
_("Gramps detected an incomplete GTK installation"),
_("""GTK translations for the current language (%s) are missing.
<b>Gramps</b> will proceed nevertheless.
The GUI will likely be broken as a result, especially for RTL languages!
See the Gramps README documentation for installation prerequisites,
typically located in /usr/share/doc/gramps.""") % glocale.lang)
dbstate = DbState()
self.vm = ViewManager(dbstate, config.get("interface.view-categories"))
self.vm.init_interface()