From 6e895bacf4e2c493dde349fc68f08f2c78db9ec1 Mon Sep 17 00:00:00 2001 From: Vassilii Khachaturov Date: Tue, 16 Jul 2013 11:20:56 +0000 Subject: [PATCH] 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 --- gramps/gui/grampsgui.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/gramps/gui/grampsgui.py b/gramps/gui/grampsgui.py index 67babee88..bffe6a1b8 100644 --- a/gramps/gui/grampsgui.py +++ b/gramps/gui/grampsgui.py @@ -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. +Gramps 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()