From 04638a9dcb148ad8bcc4be8c2816de2f042faa78 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Rapinat?= Date: Sat, 12 Oct 2013 10:10:25 +0000 Subject: [PATCH] update "gettext" environment svn: r23313 --- gramps/gen/filters/rules/place/_haslocation.py | 10 +++------- gramps/gui/selectors/selectlocation.py | 3 ++- gramps/gui/views/treemodels/locationmodel.py | 3 ++- gramps/gui/widgets/locationentry.py | 3 ++- gramps/plugins/view/locationview.py | 4 +++- 5 files changed, 12 insertions(+), 11 deletions(-) diff --git a/gramps/gen/filters/rules/place/_haslocation.py b/gramps/gen/filters/rules/place/_haslocation.py index cd8859098..6b1b21c9c 100644 --- a/gramps/gen/filters/rules/place/_haslocation.py +++ b/gramps/gen/filters/rules/place/_haslocation.py @@ -20,13 +20,6 @@ # $Id$ -#------------------------------------------------------------------------- -# -# Standard Python modules -# -#------------------------------------------------------------------------- -from ....ggettext import gettext as _ - #------------------------------------------------------------------------- # # GRAMPS modules @@ -34,6 +27,9 @@ from ....ggettext import gettext as _ #------------------------------------------------------------------------- from .. import Rule +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext + #------------------------------------------------------------------------- # # HasLocation diff --git a/gramps/gui/selectors/selectlocation.py b/gramps/gui/selectors/selectlocation.py index 73aa06bf9..a26585cd8 100644 --- a/gramps/gui/selectors/selectlocation.py +++ b/gramps/gui/selectors/selectlocation.py @@ -27,7 +27,8 @@ # internationalization # #------------------------------------------------------------------------- -from gramps.gen.ggettext import gettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gui/views/treemodels/locationmodel.py b/gramps/gui/views/treemodels/locationmodel.py index 587a6650d..06106cbcc 100644 --- a/gramps/gui/views/treemodels/locationmodel.py +++ b/gramps/gui/views/treemodels/locationmodel.py @@ -56,7 +56,8 @@ from .treebasemodel import TreeBaseModel # internationalization # #------------------------------------------------------------------------- -from gramps.gen.ggettext import gettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gui/widgets/locationentry.py b/gramps/gui/widgets/locationentry.py index 89931ecb1..7bdca38b2 100644 --- a/gramps/gui/widgets/locationentry.py +++ b/gramps/gui/widgets/locationentry.py @@ -31,7 +31,8 @@ from gi.repository import Gtk # Gramps modules # #------------------------------------------------------------------------- -from gramps.gen.ggettext import gettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/plugins/view/locationview.py b/gramps/plugins/view/locationview.py index 98cae37af..0d74d71ab 100644 --- a/gramps/plugins/view/locationview.py +++ b/gramps/plugins/view/locationview.py @@ -30,7 +30,6 @@ Provide the location view. # Standard python modules # #------------------------------------------------------------------------- -from gramps.gen.ggettext import gettext as _ import logging _LOG = logging.getLogger(".plugins.locationview") @@ -50,6 +49,9 @@ from gramps.gui.dialog import ErrorDialog from gramps.gui.editors import EditLocation from gramps.gen.plug import CATEGORY_QR_PLACE +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext + #------------------------------------------------------------------------- # # LocationView