6932: Check for broken GTK install on linux only
Fix as proposed by jralls. Also, move the 'gtk30' translation domain name to gramps consts. svn: r22717
This commit is contained in:
parent
9148eaf18f
commit
8b1f6d7def
@ -194,6 +194,7 @@ LICENSE_FILE = os.path.join(_resources.doc_dir, 'COPYING')
|
|||||||
from gramps.gen.utils.grampslocale import GrampsLocale
|
from gramps.gen.utils.grampslocale import GrampsLocale
|
||||||
GRAMPS_LOCALE = GrampsLocale(localedir=_resources.locale_dir)
|
GRAMPS_LOCALE = GrampsLocale(localedir=_resources.locale_dir)
|
||||||
_ = GRAMPS_LOCALE.translation.sgettext
|
_ = GRAMPS_LOCALE.translation.sgettext
|
||||||
|
GTK_GETTEXT_DOMAIN = 'gtk30'
|
||||||
|
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
|
@ -39,8 +39,8 @@ LOG = logging.getLogger(".grampsgui")
|
|||||||
#
|
#
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
from gramps.gen.config import config
|
from gramps.gen.config import config
|
||||||
from gramps.gen.const import DATA_DIR, IMAGE_DIR
|
from gramps.gen.const import DATA_DIR, IMAGE_DIR, GTK_GETTEXT_DOMAIN
|
||||||
from gramps.gen.constfunc import has_display, win
|
from gramps.gen.constfunc import has_display, win, lin
|
||||||
from gramps.gen.const import GRAMPS_LOCALE as glocale
|
from gramps.gen.const import GRAMPS_LOCALE as glocale
|
||||||
_ = glocale.translation.gettext
|
_ = glocale.translation.gettext
|
||||||
|
|
||||||
@ -258,8 +258,10 @@ class Gramps(object):
|
|||||||
|
|
||||||
register_stock_icons()
|
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!")
|
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(
|
WarningDialog(
|
||||||
_("Gramps detected an incomplete GTK installation"),
|
_("Gramps detected an incomplete GTK installation"),
|
||||||
_("""GTK translations for the current language (%s) are missing.
|
_("""GTK translations for the current language (%s) are missing.
|
||||||
|
Loading…
Reference in New Issue
Block a user