From 6fdae2e29c3a7693ace13134c51fe2286797338d Mon Sep 17 00:00:00 2001 From: Vassilii Khachaturov Date: Tue, 16 Jul 2013 11:10:24 +0000 Subject: [PATCH] 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 --- gramps/gui/grampsgui.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/gramps/gui/grampsgui.py b/gramps/gui/grampsgui.py index a63399bff..a0ea5fe8d 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()