6867: warn on gtk translation missing

Merge the fix from trunk:
    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.)

    git-svn-id: svn+ssh://svn.code.sf.net/p/gramps/code/trunk@22683 4ae1f11a-8b86-4847-b8af-ab372f36d1fd

svn: r22685
This commit is contained in:
Vassilii Khachaturov 2013-07-16 11:20:56 +00:00
parent b5c3cf70ea
commit 6e895bacf4

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()