From 88092e89eb44f250f83c4c555c11b60f547473b8 Mon Sep 17 00:00:00 2001 From: Vassilii Khachaturov Date: Mon, 22 Jul 2013 12:00:31 +0000 Subject: [PATCH] 6932: check for broken GTK install on linux only svn: r22716 --- gramps/gen/const.py | 1 + gramps/gui/grampsgui.py | 8 +++++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/gramps/gen/const.py b/gramps/gen/const.py index 485be18b2..9c817d132 100644 --- a/gramps/gen/const.py +++ b/gramps/gen/const.py @@ -194,6 +194,7 @@ LICENSE_FILE = os.path.join(_resources.doc_dir, 'COPYING') from gramps.gen.utils.grampslocale import GrampsLocale GRAMPS_LOCALE = GrampsLocale(localedir=_resources.locale_dir) _ = GRAMPS_LOCALE.translation.sgettext +GTK_GETTEXT_DOMAIN = 'gtk30' #------------------------------------------------------------------------- # diff --git a/gramps/gui/grampsgui.py b/gramps/gui/grampsgui.py index bffe6a1b8..e2eeef0de 100644 --- a/gramps/gui/grampsgui.py +++ b/gramps/gui/grampsgui.py @@ -39,8 +39,8 @@ LOG = logging.getLogger(".grampsgui") # #------------------------------------------------------------------------- from gramps.gen.config import config -from gramps.gen.const import DATA_DIR, IMAGE_DIR -from gramps.gen.constfunc import has_display, win +from gramps.gen.const import DATA_DIR, IMAGE_DIR, GTK_GETTEXT_DOMAIN +from gramps.gen.constfunc import has_display, win, lin from gramps.gen.const import GRAMPS_LOCALE as glocale _ = glocale.translation.gettext @@ -258,8 +258,10 @@ class Gramps(object): register_stock_icons() - if glocale.lang != 'C' and not gettext.find('gtk30'): + if lin() and glocale.lang != 'C' and not gettext.find(GTK_GETTEXT_DOMAIN): LOG.warn("GTK translations missing, GUI will be broken, especially for RTL languages!") + # Note: the warning dialog below will likely have wrong stock icons! + # Translators: the current language will be the one you translate into. WarningDialog( _("Gramps detected an incomplete GTK installation"), _("""GTK translations for the current language (%s) are missing.