diff --git a/gramps/cli/arghandler.py b/gramps/cli/arghandler.py index a95d363fc..0ceb74e77 100644 --- a/gramps/cli/arghandler.py +++ b/gramps/cli/arghandler.py @@ -56,7 +56,7 @@ from gramps.gen.plug.report import CATEGORY_BOOK, CATEGORY_CODE, BookList from .plug import cl_report, cl_book from .user import User from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/cli/argparser.py b/gramps/cli/argparser.py index 579cf717b..49f7dee86 100644 --- a/gramps/cli/argparser.py +++ b/gramps/cli/argparser.py @@ -51,7 +51,7 @@ from gramps.gen.config import config from gramps.gen.utils.configmanager import safe_eval from gramps.gen.utils.file import get_unicode_path_from_env_var from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext # Note: Make sure to edit const.py.in POPT_TABLE too! _HELP = _(""" diff --git a/gramps/cli/clidbman.py b/gramps/cli/clidbman.py index e1a3fbfae..c1855a29a 100644 --- a/gramps/cli/clidbman.py +++ b/gramps/cli/clidbman.py @@ -60,7 +60,7 @@ _LOG = logging.getLogger(DBLOGNAME) # #------------------------------------------------------------------------- from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext from gramps.gen.db import DbBsddb from gramps.gen.plug import BasePluginManager from gramps.gen.config import config diff --git a/gramps/cli/grampscli.py b/gramps/cli/grampscli.py index 8987bb357..562f031d3 100644 --- a/gramps/cli/grampscli.py +++ b/gramps/cli/grampscli.py @@ -36,7 +36,7 @@ Provides also two small base classes: CLIDbLoader, CLIManager from __future__ import print_function from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext import os import sys diff --git a/gramps/cli/plug/__init__.py b/gramps/cli/plug/__init__.py index 9c395bfd9..0e0b4b5a0 100644 --- a/gramps/cli/plug/__init__.py +++ b/gramps/cli/plug/__init__.py @@ -65,7 +65,7 @@ from gramps.gen.constfunc import STRTYPE, conv_to_unicode_direct from ..grampscli import CLIManager from ..user import User from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------ # diff --git a/gramps/cli/user.py b/gramps/cli/user.py index 2896de4d3..518a38dcf 100644 --- a/gramps/cli/user.py +++ b/gramps/cli/user.py @@ -39,7 +39,7 @@ import sys # #------------------------------------------------------------------------ from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext from gramps.gen.user import User #------------------------------------------------------------------------ diff --git a/gramps/gen/config.py b/gramps/gen/config.py index b7753cb1d..11fe37a7e 100644 --- a/gramps/gen/config.py +++ b/gramps/gen/config.py @@ -42,7 +42,7 @@ import logging # #--------------------------------------------------------------- from .const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext from .const import HOME_DIR, USER_HOME, VERSION_DIR from .utils.configmanager import ConfigManager diff --git a/gramps/gen/const.py b/gramps/gen/const.py index cb7676982..5b67fba57 100644 --- a/gramps/gen/const.py +++ b/gramps/gen/const.py @@ -195,7 +195,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.get_translation().sgettext +_ = GRAMPS_LOCALE.translation.sgettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/datehandler/__init__.py b/gramps/gen/datehandler/__init__.py index 84fca6713..74338a496 100644 --- a/gramps/gen/datehandler/__init__.py +++ b/gramps/gen/datehandler/__init__.py @@ -32,7 +32,7 @@ Class handling language-specific selection for date parser and displayer. import logging from ..const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().sgettext +_ = glocale.translation.sgettext # import prerequisites for localized handlers from ._datehandler import (LANG, LANG_SHORT, LANG_TO_PARSER, LANG_TO_DISPLAY, register_datehandler) diff --git a/gramps/gen/db/base.py b/gramps/gen/db/base.py index a282fc511..09b700e07 100644 --- a/gramps/gen/db/base.py +++ b/gramps/gen/db/base.py @@ -33,7 +33,7 @@ from this class. # #------------------------------------------------------------------------- from ..const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/db/exceptions.py b/gramps/gen/db/exceptions.py index f83efb5e5..22c0bc87b 100644 --- a/gramps/gen/db/exceptions.py +++ b/gramps/gen/db/exceptions.py @@ -28,7 +28,7 @@ # #------------------------------------------------------------------------- from ..const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext class DbException(Exception): diff --git a/gramps/gen/db/read.py b/gramps/gen/db/read.py index bd43de967..b7f8ff4f3 100644 --- a/gramps/gen/db/read.py +++ b/gramps/gen/db/read.py @@ -49,7 +49,7 @@ if config.get('preferences.use-bsddb3') or sys.version_info[0] >= 3: else: from bsddb import db from ..const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext import re import logging diff --git a/gramps/gen/db/undoredo.py b/gramps/gen/db/undoredo.py index 078f3297c..c6e07eae0 100644 --- a/gramps/gen/db/undoredo.py +++ b/gramps/gen/db/undoredo.py @@ -47,7 +47,7 @@ if config.get('preferences.use-bsddb3') or sys.version_info[0] >= 3: else: from bsddb import db from ..const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/db/upgrade.py b/gramps/gen/db/upgrade.py index ef0b1eb8a..9b7e7f38e 100644 --- a/gramps/gen/db/upgrade.py +++ b/gramps/gen/db/upgrade.py @@ -31,7 +31,7 @@ import logging LOG = logging.getLogger(".citation") from ..const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext from ..constfunc import cuni """ diff --git a/gramps/gen/db/write.py b/gramps/gen/db/write.py index 7f9a36486..bcbf2fb5f 100644 --- a/gramps/gen/db/write.py +++ b/gramps/gen/db/write.py @@ -81,7 +81,7 @@ from ..updatecallback import UpdateCallback from ..errors import DbError from ..constfunc import win, conv_to_unicode, cuni, UNITYPE, handle2internal from ..const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext _LOG = logging.getLogger(DBLOGNAME) LOG = logging.getLogger(".citation") diff --git a/gramps/gen/display/name.py b/gramps/gen/display/name.py index a199926ac..1f641eea6 100644 --- a/gramps/gen/display/name.py +++ b/gramps/gen/display/name.py @@ -54,7 +54,7 @@ Specific symbols for parts of a name are defined: # #------------------------------------------------------------------------- from ..const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().sgettext +_ = glocale.translation.sgettext import re import logging LOG = logging.getLogger(".gramps.gen") diff --git a/gramps/gen/filters/_filterparser.py b/gramps/gen/filters/_filterparser.py index 3370284d0..4a116aaf7 100644 --- a/gramps/gen/filters/_filterparser.py +++ b/gramps/gen/filters/_filterparser.py @@ -29,7 +29,7 @@ from __future__ import print_function, unicode_literals from xml.sax import handler from ..const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/_changedsincebase.py b/gramps/gen/filters/rules/_changedsincebase.py index f052f584b..7ae8d8217 100644 --- a/gramps/gen/filters/rules/_changedsincebase.py +++ b/gramps/gen/filters/rules/_changedsincebase.py @@ -27,7 +27,7 @@ # #------------------------------------------------------------------------- from ...const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext import re import time diff --git a/gramps/gen/filters/rules/_everything.py b/gramps/gen/filters/rules/_everything.py index 5b0ad50d2..fa4caed6d 100644 --- a/gramps/gen/filters/rules/_everything.py +++ b/gramps/gen/filters/rules/_everything.py @@ -26,7 +26,7 @@ # #------------------------------------------------------------------------- from ...const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/_hasattributebase.py b/gramps/gen/filters/rules/_hasattributebase.py index 0b189caf0..8bd8d7c56 100644 --- a/gramps/gen/filters/rules/_hasattributebase.py +++ b/gramps/gen/filters/rules/_hasattributebase.py @@ -26,7 +26,7 @@ # #------------------------------------------------------------------------- from ...const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/_hascitationbase.py b/gramps/gen/filters/rules/_hascitationbase.py index 71a6f8b88..ea70016aa 100644 --- a/gramps/gen/filters/rules/_hascitationbase.py +++ b/gramps/gen/filters/rules/_hascitationbase.py @@ -27,7 +27,7 @@ # #------------------------------------------------------------------------- from ...const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/_haseventbase.py b/gramps/gen/filters/rules/_haseventbase.py index d7ab4719b..b93cfadd8 100644 --- a/gramps/gen/filters/rules/_haseventbase.py +++ b/gramps/gen/filters/rules/_haseventbase.py @@ -26,7 +26,7 @@ # #------------------------------------------------------------------------- from ...const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/_hasgallerybase.py b/gramps/gen/filters/rules/_hasgallerybase.py index 19fe804db..5c5799e41 100755 --- a/gramps/gen/filters/rules/_hasgallerybase.py +++ b/gramps/gen/filters/rules/_hasgallerybase.py @@ -29,7 +29,7 @@ # #------------------------------------------------------------------------- from ...const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/_hasgrampsid.py b/gramps/gen/filters/rules/_hasgrampsid.py index 115d62542..105d5de1c 100644 --- a/gramps/gen/filters/rules/_hasgrampsid.py +++ b/gramps/gen/filters/rules/_hasgrampsid.py @@ -27,7 +27,7 @@ # #------------------------------------------------------------------------- from ...const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/_hasldsbase.py b/gramps/gen/filters/rules/_hasldsbase.py index 9def6f1b8..062a28a48 100755 --- a/gramps/gen/filters/rules/_hasldsbase.py +++ b/gramps/gen/filters/rules/_hasldsbase.py @@ -29,7 +29,7 @@ # #------------------------------------------------------------------------- from ...const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/_hasnotebase.py b/gramps/gen/filters/rules/_hasnotebase.py index 91acdf7f0..4a4c811a2 100755 --- a/gramps/gen/filters/rules/_hasnotebase.py +++ b/gramps/gen/filters/rules/_hasnotebase.py @@ -30,7 +30,7 @@ # #------------------------------------------------------------------------- from ...const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/_hasnoteregexbase.py b/gramps/gen/filters/rules/_hasnoteregexbase.py index 975f343ab..87954fed3 100644 --- a/gramps/gen/filters/rules/_hasnoteregexbase.py +++ b/gramps/gen/filters/rules/_hasnoteregexbase.py @@ -27,7 +27,7 @@ #------------------------------------------------------------------------- import re from ...const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/_hasnotesubstrbase.py b/gramps/gen/filters/rules/_hasnotesubstrbase.py index 1a7427445..6bc211ebe 100644 --- a/gramps/gen/filters/rules/_hasnotesubstrbase.py +++ b/gramps/gen/filters/rules/_hasnotesubstrbase.py @@ -26,7 +26,7 @@ # #------------------------------------------------------------------------- from ...const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/_hasreferencecountbase.py b/gramps/gen/filters/rules/_hasreferencecountbase.py index 6cee7b745..d784386e4 100644 --- a/gramps/gen/filters/rules/_hasreferencecountbase.py +++ b/gramps/gen/filters/rules/_hasreferencecountbase.py @@ -26,7 +26,7 @@ # #------------------------------------------------------------------------- from ...const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/_hassourcebase.py b/gramps/gen/filters/rules/_hassourcebase.py index cbe26e3b6..9a95c61a4 100644 --- a/gramps/gen/filters/rules/_hassourcebase.py +++ b/gramps/gen/filters/rules/_hassourcebase.py @@ -27,7 +27,7 @@ # #------------------------------------------------------------------------- from ...const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/_hassourcecountbase.py b/gramps/gen/filters/rules/_hassourcecountbase.py index 61cbad48c..afce0c32b 100755 --- a/gramps/gen/filters/rules/_hassourcecountbase.py +++ b/gramps/gen/filters/rules/_hassourcecountbase.py @@ -29,7 +29,7 @@ # #------------------------------------------------------------------------- from ...const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/_hassourceofbase.py b/gramps/gen/filters/rules/_hassourceofbase.py index 728f2d1d4..7096b0450 100644 --- a/gramps/gen/filters/rules/_hassourceofbase.py +++ b/gramps/gen/filters/rules/_hassourceofbase.py @@ -27,7 +27,7 @@ # #------------------------------------------------------------------------- from ...const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/_hastagbase.py b/gramps/gen/filters/rules/_hastagbase.py index 6837d1e61..87ccabee8 100644 --- a/gramps/gen/filters/rules/_hastagbase.py +++ b/gramps/gen/filters/rules/_hastagbase.py @@ -28,7 +28,7 @@ Rule that checks for an object with a particular tag. # #------------------------------------------------------------------------- from ...const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/_hastextmatchingsubstringof.py b/gramps/gen/filters/rules/_hastextmatchingsubstringof.py index 50bae9cd3..f52268f5c 100644 --- a/gramps/gen/filters/rules/_hastextmatchingsubstringof.py +++ b/gramps/gen/filters/rules/_hastextmatchingsubstringof.py @@ -26,7 +26,7 @@ # #------------------------------------------------------------------------- from ...const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/_isprivate.py b/gramps/gen/filters/rules/_isprivate.py index 85db6af6b..62b934488 100644 --- a/gramps/gen/filters/rules/_isprivate.py +++ b/gramps/gen/filters/rules/_isprivate.py @@ -24,7 +24,7 @@ # #------------------------------------------------------------------------- from ...const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/_ispublic.py b/gramps/gen/filters/rules/_ispublic.py index 07cca589a..cd6a92cff 100644 --- a/gramps/gen/filters/rules/_ispublic.py +++ b/gramps/gen/filters/rules/_ispublic.py @@ -27,7 +27,7 @@ # #------------------------------------------------------------------------- from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext from . import Rule #------------------------------------------------------------------------- diff --git a/gramps/gen/filters/rules/_matcheseventfilterbase.py b/gramps/gen/filters/rules/_matcheseventfilterbase.py index a2addbab0..4a5f2af2d 100644 --- a/gramps/gen/filters/rules/_matcheseventfilterbase.py +++ b/gramps/gen/filters/rules/_matcheseventfilterbase.py @@ -26,7 +26,7 @@ # #------------------------------------------------------------------------- from ...const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/_matchesfilterbase.py b/gramps/gen/filters/rules/_matchesfilterbase.py index 98c25ba77..7e16bd884 100644 --- a/gramps/gen/filters/rules/_matchesfilterbase.py +++ b/gramps/gen/filters/rules/_matchesfilterbase.py @@ -36,7 +36,7 @@ LOG = logging.getLogger(".filter") # we need global variableCustomFilters, so we need to query gramps.gen.filters # when we need this variable, not import it at the start! from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext import gramps.gen.filters from . import Rule diff --git a/gramps/gen/filters/rules/_matchessourceconfidencebase.py b/gramps/gen/filters/rules/_matchessourceconfidencebase.py index f346b02d8..713c1be88 100644 --- a/gramps/gen/filters/rules/_matchessourceconfidencebase.py +++ b/gramps/gen/filters/rules/_matchessourceconfidencebase.py @@ -30,7 +30,7 @@ # #------------------------------------------------------------------------- from ...const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/_matchessourcefilterbase.py b/gramps/gen/filters/rules/_matchessourcefilterbase.py index 250bcc348..1ccae4c7f 100644 --- a/gramps/gen/filters/rules/_matchessourcefilterbase.py +++ b/gramps/gen/filters/rules/_matchessourcefilterbase.py @@ -27,7 +27,7 @@ # #------------------------------------------------------------------------- from ...const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/_regexpidbase.py b/gramps/gen/filters/rules/_regexpidbase.py index a3fdf32e0..63ad796d0 100644 --- a/gramps/gen/filters/rules/_regexpidbase.py +++ b/gramps/gen/filters/rules/_regexpidbase.py @@ -27,7 +27,7 @@ #------------------------------------------------------------------------- import re from ...const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/_rule.py b/gramps/gen/filters/rules/_rule.py index 0113119b6..c2f1f3b63 100644 --- a/gramps/gen/filters/rules/_rule.py +++ b/gramps/gen/filters/rules/_rule.py @@ -31,7 +31,7 @@ Base class for filter rules. # #------------------------------------------------------------------------- from ...const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext import re #------------------------------------------------------------------------- diff --git a/gramps/gen/filters/rules/citation/_allcitations.py b/gramps/gen/filters/rules/citation/_allcitations.py index 1f7de3bf0..aa659029b 100644 --- a/gramps/gen/filters/rules/citation/_allcitations.py +++ b/gramps/gen/filters/rules/citation/_allcitations.py @@ -27,7 +27,7 @@ # #------------------------------------------------------------------------- from ....const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/citation/_changedsince.py b/gramps/gen/filters/rules/citation/_changedsince.py index ee43f6cea..cf4603e0a 100644 --- a/gramps/gen/filters/rules/citation/_changedsince.py +++ b/gramps/gen/filters/rules/citation/_changedsince.py @@ -27,7 +27,7 @@ # #------------------------------------------------------------------------- from ....const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/citation/_citationprivate.py b/gramps/gen/filters/rules/citation/_citationprivate.py index b92b9b22d..de17e0ef6 100644 --- a/gramps/gen/filters/rules/citation/_citationprivate.py +++ b/gramps/gen/filters/rules/citation/_citationprivate.py @@ -27,7 +27,7 @@ # #------------------------------------------------------------------------- from ....const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/citation/_hascitation.py b/gramps/gen/filters/rules/citation/_hascitation.py index 9b3f6616c..ef0d875c7 100644 --- a/gramps/gen/filters/rules/citation/_hascitation.py +++ b/gramps/gen/filters/rules/citation/_hascitation.py @@ -29,7 +29,7 @@ Filter rule to match citation data. # #------------------------------------------------------------------------- from ....const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/citation/_hasgallery.py b/gramps/gen/filters/rules/citation/_hasgallery.py index 82c99da84..38717aa8d 100755 --- a/gramps/gen/filters/rules/citation/_hasgallery.py +++ b/gramps/gen/filters/rules/citation/_hasgallery.py @@ -29,7 +29,7 @@ # #------------------------------------------------------------------------- from ....const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/citation/_hasidof.py b/gramps/gen/filters/rules/citation/_hasidof.py index f773b9e78..6ab8ae581 100644 --- a/gramps/gen/filters/rules/citation/_hasidof.py +++ b/gramps/gen/filters/rules/citation/_hasidof.py @@ -27,7 +27,7 @@ # #------------------------------------------------------------------------- from ....const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/citation/_hasnote.py b/gramps/gen/filters/rules/citation/_hasnote.py index 650c280f2..31668b5a8 100755 --- a/gramps/gen/filters/rules/citation/_hasnote.py +++ b/gramps/gen/filters/rules/citation/_hasnote.py @@ -30,7 +30,7 @@ # #------------------------------------------------------------------------- from ....const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/citation/_hasnotematchingsubstringof.py b/gramps/gen/filters/rules/citation/_hasnotematchingsubstringof.py index a28b691cf..a5d2ac3ec 100644 --- a/gramps/gen/filters/rules/citation/_hasnotematchingsubstringof.py +++ b/gramps/gen/filters/rules/citation/_hasnotematchingsubstringof.py @@ -27,7 +27,7 @@ # #------------------------------------------------------------------------- from ....const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/citation/_hasnoteregexp.py b/gramps/gen/filters/rules/citation/_hasnoteregexp.py index 1d6217bbe..574eea080 100644 --- a/gramps/gen/filters/rules/citation/_hasnoteregexp.py +++ b/gramps/gen/filters/rules/citation/_hasnoteregexp.py @@ -27,7 +27,7 @@ # #------------------------------------------------------------------------- from ....const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/citation/_hasreferencecountof.py b/gramps/gen/filters/rules/citation/_hasreferencecountof.py index c6e5cc306..aaede70f4 100644 --- a/gramps/gen/filters/rules/citation/_hasreferencecountof.py +++ b/gramps/gen/filters/rules/citation/_hasreferencecountof.py @@ -27,7 +27,7 @@ # #------------------------------------------------------------------------- from ....const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/citation/_hassource.py b/gramps/gen/filters/rules/citation/_hassource.py index a8635e51a..6bbe3b6e1 100644 --- a/gramps/gen/filters/rules/citation/_hassource.py +++ b/gramps/gen/filters/rules/citation/_hassource.py @@ -30,7 +30,7 @@ Filter rule to match citation with a particular source. # #------------------------------------------------------------------------- from ....const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/citation/_hastag.py b/gramps/gen/filters/rules/citation/_hastag.py index a5c1ddf22..9bd08020d 100644 --- a/gramps/gen/filters/rules/citation/_hastag.py +++ b/gramps/gen/filters/rules/citation/_hastag.py @@ -28,7 +28,7 @@ Rule that checks for a citation with a particular tag. # #------------------------------------------------------------------------- from ....const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/citation/_matchesfilter.py b/gramps/gen/filters/rules/citation/_matchesfilter.py index ec15e9f85..23b87dc06 100644 --- a/gramps/gen/filters/rules/citation/_matchesfilter.py +++ b/gramps/gen/filters/rules/citation/_matchesfilter.py @@ -27,7 +27,7 @@ # #------------------------------------------------------------------------- from ....const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/citation/_matchespagesubstringof.py b/gramps/gen/filters/rules/citation/_matchespagesubstringof.py index 09bd9ec4d..aabe8910d 100644 --- a/gramps/gen/filters/rules/citation/_matchespagesubstringof.py +++ b/gramps/gen/filters/rules/citation/_matchespagesubstringof.py @@ -26,7 +26,7 @@ # #------------------------------------------------------------------------- from ....const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/citation/_matchesrepositoryfilter.py b/gramps/gen/filters/rules/citation/_matchesrepositoryfilter.py index be63a2924..c0c94b011 100644 --- a/gramps/gen/filters/rules/citation/_matchesrepositoryfilter.py +++ b/gramps/gen/filters/rules/citation/_matchesrepositoryfilter.py @@ -29,7 +29,7 @@ import logging LOG = logging.getLogger(".citation") from ....const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/citation/_matchessourcefilter.py b/gramps/gen/filters/rules/citation/_matchessourcefilter.py index f8bf6cfdd..a6e376109 100644 --- a/gramps/gen/filters/rules/citation/_matchessourcefilter.py +++ b/gramps/gen/filters/rules/citation/_matchessourcefilter.py @@ -28,7 +28,7 @@ # #------------------------------------------------------------------------- from ....const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/citation/_regexpidof.py b/gramps/gen/filters/rules/citation/_regexpidof.py index ce3a3c2b9..7122704e1 100644 --- a/gramps/gen/filters/rules/citation/_regexpidof.py +++ b/gramps/gen/filters/rules/citation/_regexpidof.py @@ -27,7 +27,7 @@ # #------------------------------------------------------------------------- from ....const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/event/_allevents.py b/gramps/gen/filters/rules/event/_allevents.py index d1d4ae5ee..07dadfa87 100644 --- a/gramps/gen/filters/rules/event/_allevents.py +++ b/gramps/gen/filters/rules/event/_allevents.py @@ -26,7 +26,7 @@ # #------------------------------------------------------------------------- from ....const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/event/_changedsince.py b/gramps/gen/filters/rules/event/_changedsince.py index a49179d9a..ec175a0d5 100644 --- a/gramps/gen/filters/rules/event/_changedsince.py +++ b/gramps/gen/filters/rules/event/_changedsince.py @@ -27,7 +27,7 @@ # #------------------------------------------------------------------------- from ....const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/event/_eventprivate.py b/gramps/gen/filters/rules/event/_eventprivate.py index 05952357a..9c4e148d4 100644 --- a/gramps/gen/filters/rules/event/_eventprivate.py +++ b/gramps/gen/filters/rules/event/_eventprivate.py @@ -26,7 +26,7 @@ # #------------------------------------------------------------------------- from ....const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/event/_hasattribute.py b/gramps/gen/filters/rules/event/_hasattribute.py index bf5bf0b61..ea2f5267d 100644 --- a/gramps/gen/filters/rules/event/_hasattribute.py +++ b/gramps/gen/filters/rules/event/_hasattribute.py @@ -26,7 +26,7 @@ # #------------------------------------------------------------------------- from ....const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/event/_hascitation.py b/gramps/gen/filters/rules/event/_hascitation.py index de69708bd..e4ed276a0 100644 --- a/gramps/gen/filters/rules/event/_hascitation.py +++ b/gramps/gen/filters/rules/event/_hascitation.py @@ -30,7 +30,7 @@ Filter rule to match event with a particular citation. # #------------------------------------------------------------------------- from ....const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/event/_hasdata.py b/gramps/gen/filters/rules/event/_hasdata.py index 44e601cbd..67c98e7ee 100644 --- a/gramps/gen/filters/rules/event/_hasdata.py +++ b/gramps/gen/filters/rules/event/_hasdata.py @@ -26,7 +26,7 @@ # #------------------------------------------------------------------------- from ....const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/event/_hasgallery.py b/gramps/gen/filters/rules/event/_hasgallery.py index a267e8bad..ae6b23231 100755 --- a/gramps/gen/filters/rules/event/_hasgallery.py +++ b/gramps/gen/filters/rules/event/_hasgallery.py @@ -29,7 +29,7 @@ # #------------------------------------------------------------------------- from ....const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/event/_hasidof.py b/gramps/gen/filters/rules/event/_hasidof.py index 4c094a047..998d2809c 100644 --- a/gramps/gen/filters/rules/event/_hasidof.py +++ b/gramps/gen/filters/rules/event/_hasidof.py @@ -26,7 +26,7 @@ # #------------------------------------------------------------------------- from ....const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/event/_hasnote.py b/gramps/gen/filters/rules/event/_hasnote.py index 1cc979ac4..d3e14b3f4 100755 --- a/gramps/gen/filters/rules/event/_hasnote.py +++ b/gramps/gen/filters/rules/event/_hasnote.py @@ -29,7 +29,7 @@ # #------------------------------------------------------------------------- from ....const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/event/_hasnotematchingsubstringof.py b/gramps/gen/filters/rules/event/_hasnotematchingsubstringof.py index f706aa9c8..f74d6ae2f 100644 --- a/gramps/gen/filters/rules/event/_hasnotematchingsubstringof.py +++ b/gramps/gen/filters/rules/event/_hasnotematchingsubstringof.py @@ -26,7 +26,7 @@ # #------------------------------------------------------------------------- from ....const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/event/_hasnoteregexp.py b/gramps/gen/filters/rules/event/_hasnoteregexp.py index 8f0500b81..1eb1f54f3 100644 --- a/gramps/gen/filters/rules/event/_hasnoteregexp.py +++ b/gramps/gen/filters/rules/event/_hasnoteregexp.py @@ -26,7 +26,7 @@ # #------------------------------------------------------------------------- from ....const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/event/_hasreferencecountof.py b/gramps/gen/filters/rules/event/_hasreferencecountof.py index c361499c2..1f5f6b1be 100644 --- a/gramps/gen/filters/rules/event/_hasreferencecountof.py +++ b/gramps/gen/filters/rules/event/_hasreferencecountof.py @@ -26,7 +26,7 @@ # #------------------------------------------------------------------------- from ....const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/event/_hassourcecount.py b/gramps/gen/filters/rules/event/_hassourcecount.py index bec77fd27..59581cea5 100644 --- a/gramps/gen/filters/rules/event/_hassourcecount.py +++ b/gramps/gen/filters/rules/event/_hassourcecount.py @@ -28,7 +28,7 @@ # #------------------------------------------------------------------------- from ....const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/event/_hastag.py b/gramps/gen/filters/rules/event/_hastag.py index ebcf9fe8f..6cf8bf66a 100644 --- a/gramps/gen/filters/rules/event/_hastag.py +++ b/gramps/gen/filters/rules/event/_hastag.py @@ -28,7 +28,7 @@ Rule that checks for an event with a particular tag. # #------------------------------------------------------------------------- from ....const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/event/_hastype.py b/gramps/gen/filters/rules/event/_hastype.py index 780548dff..156b338a1 100644 --- a/gramps/gen/filters/rules/event/_hastype.py +++ b/gramps/gen/filters/rules/event/_hastype.py @@ -26,7 +26,7 @@ # #------------------------------------------------------------------------- from ....const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/event/_matchesfilter.py b/gramps/gen/filters/rules/event/_matchesfilter.py index 1c87b36f8..aa353df84 100644 --- a/gramps/gen/filters/rules/event/_matchesfilter.py +++ b/gramps/gen/filters/rules/event/_matchesfilter.py @@ -26,7 +26,7 @@ # #------------------------------------------------------------------------- from ....const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/event/_matchespersonfilter.py b/gramps/gen/filters/rules/event/_matchespersonfilter.py index 4ecbd73e2..231f7abd7 100644 --- a/gramps/gen/filters/rules/event/_matchespersonfilter.py +++ b/gramps/gen/filters/rules/event/_matchespersonfilter.py @@ -26,7 +26,7 @@ # #------------------------------------------------------------------------- from ....const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/event/_matchessourceconfidence.py b/gramps/gen/filters/rules/event/_matchessourceconfidence.py index 5d040d9ed..b5c74fd26 100644 --- a/gramps/gen/filters/rules/event/_matchessourceconfidence.py +++ b/gramps/gen/filters/rules/event/_matchessourceconfidence.py @@ -27,7 +27,7 @@ # #------------------------------------------------------------------------- from ....const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().sgettext +_ = glocale.translation.sgettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/event/_matchessourcefilter.py b/gramps/gen/filters/rules/event/_matchessourcefilter.py index 7cb61501d..b487e1b46 100644 --- a/gramps/gen/filters/rules/event/_matchessourcefilter.py +++ b/gramps/gen/filters/rules/event/_matchessourcefilter.py @@ -28,7 +28,7 @@ # #------------------------------------------------------------------------- from ....const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/event/_regexpidof.py b/gramps/gen/filters/rules/event/_regexpidof.py index a6adc0f1a..00365ead1 100644 --- a/gramps/gen/filters/rules/event/_regexpidof.py +++ b/gramps/gen/filters/rules/event/_regexpidof.py @@ -26,7 +26,7 @@ # #------------------------------------------------------------------------- from ....const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/family/_allfamilies.py b/gramps/gen/filters/rules/family/_allfamilies.py index c11dd9625..b76504d3c 100644 --- a/gramps/gen/filters/rules/family/_allfamilies.py +++ b/gramps/gen/filters/rules/family/_allfamilies.py @@ -26,7 +26,7 @@ # #------------------------------------------------------------------------- from ....const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/family/_changedsince.py b/gramps/gen/filters/rules/family/_changedsince.py index 172ed76cc..b25b339d9 100644 --- a/gramps/gen/filters/rules/family/_changedsince.py +++ b/gramps/gen/filters/rules/family/_changedsince.py @@ -27,7 +27,7 @@ # #------------------------------------------------------------------------- from ....const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/family/_childhasidof.py b/gramps/gen/filters/rules/family/_childhasidof.py index b68198b89..948306923 100644 --- a/gramps/gen/filters/rules/family/_childhasidof.py +++ b/gramps/gen/filters/rules/family/_childhasidof.py @@ -26,7 +26,7 @@ # #------------------------------------------------------------------------- from ....const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/family/_childhasnameof.py b/gramps/gen/filters/rules/family/_childhasnameof.py index 8a4c7efca..bda109e08 100644 --- a/gramps/gen/filters/rules/family/_childhasnameof.py +++ b/gramps/gen/filters/rules/family/_childhasnameof.py @@ -26,7 +26,7 @@ # #------------------------------------------------------------------------- from ....const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/family/_familyprivate.py b/gramps/gen/filters/rules/family/_familyprivate.py index 775bce695..056b01279 100644 --- a/gramps/gen/filters/rules/family/_familyprivate.py +++ b/gramps/gen/filters/rules/family/_familyprivate.py @@ -26,7 +26,7 @@ # #------------------------------------------------------------------------- from ....const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/family/_fatherhasidof.py b/gramps/gen/filters/rules/family/_fatherhasidof.py index 3e73fc31d..590a49dc8 100644 --- a/gramps/gen/filters/rules/family/_fatherhasidof.py +++ b/gramps/gen/filters/rules/family/_fatherhasidof.py @@ -26,7 +26,7 @@ # #------------------------------------------------------------------------- from ....const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/family/_fatherhasnameof.py b/gramps/gen/filters/rules/family/_fatherhasnameof.py index 7f443917b..b61551ea6 100644 --- a/gramps/gen/filters/rules/family/_fatherhasnameof.py +++ b/gramps/gen/filters/rules/family/_fatherhasnameof.py @@ -26,7 +26,7 @@ # #------------------------------------------------------------------------- from ....const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/family/_hasattribute.py b/gramps/gen/filters/rules/family/_hasattribute.py index 6a1acda43..475dcbf9b 100644 --- a/gramps/gen/filters/rules/family/_hasattribute.py +++ b/gramps/gen/filters/rules/family/_hasattribute.py @@ -26,7 +26,7 @@ # #------------------------------------------------------------------------- from ....const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/family/_hascitation.py b/gramps/gen/filters/rules/family/_hascitation.py index 426989a8c..73990aa67 100644 --- a/gramps/gen/filters/rules/family/_hascitation.py +++ b/gramps/gen/filters/rules/family/_hascitation.py @@ -30,7 +30,7 @@ Filter rule to match family with a particular citation. # #------------------------------------------------------------------------- from ....const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/family/_hasevent.py b/gramps/gen/filters/rules/family/_hasevent.py index 90a9d2289..fcb0a9568 100644 --- a/gramps/gen/filters/rules/family/_hasevent.py +++ b/gramps/gen/filters/rules/family/_hasevent.py @@ -29,7 +29,7 @@ Filter rule to match families with a particular event. # #------------------------------------------------------------------------- from ....const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/family/_hasgallery.py b/gramps/gen/filters/rules/family/_hasgallery.py index e91b05284..136a2d477 100755 --- a/gramps/gen/filters/rules/family/_hasgallery.py +++ b/gramps/gen/filters/rules/family/_hasgallery.py @@ -29,7 +29,7 @@ # #------------------------------------------------------------------------- from ....const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/family/_hasidof.py b/gramps/gen/filters/rules/family/_hasidof.py index 80d1e0a9e..beda34169 100644 --- a/gramps/gen/filters/rules/family/_hasidof.py +++ b/gramps/gen/filters/rules/family/_hasidof.py @@ -26,7 +26,7 @@ # #------------------------------------------------------------------------- from ....const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/family/_haslds.py b/gramps/gen/filters/rules/family/_haslds.py index ada984ccf..e9c6a9015 100755 --- a/gramps/gen/filters/rules/family/_haslds.py +++ b/gramps/gen/filters/rules/family/_haslds.py @@ -29,7 +29,7 @@ # #------------------------------------------------------------------------- from ....const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/family/_hasnote.py b/gramps/gen/filters/rules/family/_hasnote.py index b129a1839..0fa2fc014 100755 --- a/gramps/gen/filters/rules/family/_hasnote.py +++ b/gramps/gen/filters/rules/family/_hasnote.py @@ -29,7 +29,7 @@ # #------------------------------------------------------------------------- from ....const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/family/_hasnotematchingsubstringof.py b/gramps/gen/filters/rules/family/_hasnotematchingsubstringof.py index 055fd1ac7..d911c6c74 100644 --- a/gramps/gen/filters/rules/family/_hasnotematchingsubstringof.py +++ b/gramps/gen/filters/rules/family/_hasnotematchingsubstringof.py @@ -26,7 +26,7 @@ # #------------------------------------------------------------------------- from ....const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/family/_hasnoteregexp.py b/gramps/gen/filters/rules/family/_hasnoteregexp.py index ec9ca1744..9ed08b5b8 100644 --- a/gramps/gen/filters/rules/family/_hasnoteregexp.py +++ b/gramps/gen/filters/rules/family/_hasnoteregexp.py @@ -26,7 +26,7 @@ # #------------------------------------------------------------------------- from ....const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/family/_hasreferencecountof.py b/gramps/gen/filters/rules/family/_hasreferencecountof.py index ad612653e..7a4809999 100644 --- a/gramps/gen/filters/rules/family/_hasreferencecountof.py +++ b/gramps/gen/filters/rules/family/_hasreferencecountof.py @@ -26,7 +26,7 @@ # #------------------------------------------------------------------------- from ....const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/family/_hasreltype.py b/gramps/gen/filters/rules/family/_hasreltype.py index 5fc0e5490..d67f49c0a 100644 --- a/gramps/gen/filters/rules/family/_hasreltype.py +++ b/gramps/gen/filters/rules/family/_hasreltype.py @@ -26,7 +26,7 @@ # #------------------------------------------------------------------------- from ....const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/family/_hassourcecount.py b/gramps/gen/filters/rules/family/_hassourcecount.py index 4ef925a9d..4fdc45a9f 100755 --- a/gramps/gen/filters/rules/family/_hassourcecount.py +++ b/gramps/gen/filters/rules/family/_hassourcecount.py @@ -29,7 +29,7 @@ # #------------------------------------------------------------------------- from ....const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/family/_hassourceof.py b/gramps/gen/filters/rules/family/_hassourceof.py index 7e2161471..ae447a2ea 100644 --- a/gramps/gen/filters/rules/family/_hassourceof.py +++ b/gramps/gen/filters/rules/family/_hassourceof.py @@ -27,7 +27,7 @@ # #------------------------------------------------------------------------- from ....const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/family/_hastag.py b/gramps/gen/filters/rules/family/_hastag.py index 423346ad8..3150ad214 100644 --- a/gramps/gen/filters/rules/family/_hastag.py +++ b/gramps/gen/filters/rules/family/_hastag.py @@ -28,7 +28,7 @@ Rule that checks for a family with a particular tag. # #------------------------------------------------------------------------- from ....const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/family/_hastwins.py b/gramps/gen/filters/rules/family/_hastwins.py index 3aa384e60..83b7c9fb6 100644 --- a/gramps/gen/filters/rules/family/_hastwins.py +++ b/gramps/gen/filters/rules/family/_hastwins.py @@ -33,7 +33,7 @@ #------------------------------------------------------------------------- from .. import Rule from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext from ....lib.childreftype import ChildRefType #------------------------------------------------------------------------- diff --git a/gramps/gen/filters/rules/family/_isbookmarked.py b/gramps/gen/filters/rules/family/_isbookmarked.py index 9dd1a7b77..cf6cb9bd3 100644 --- a/gramps/gen/filters/rules/family/_isbookmarked.py +++ b/gramps/gen/filters/rules/family/_isbookmarked.py @@ -26,7 +26,7 @@ # #------------------------------------------------------------------------- from ....const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/family/_matchesfilter.py b/gramps/gen/filters/rules/family/_matchesfilter.py index bd2e635d0..75097cdee 100644 --- a/gramps/gen/filters/rules/family/_matchesfilter.py +++ b/gramps/gen/filters/rules/family/_matchesfilter.py @@ -26,7 +26,7 @@ # #------------------------------------------------------------------------- from ....const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/family/_matchessourceconfidence.py b/gramps/gen/filters/rules/family/_matchessourceconfidence.py index 5dd8ce413..4b2197986 100644 --- a/gramps/gen/filters/rules/family/_matchessourceconfidence.py +++ b/gramps/gen/filters/rules/family/_matchessourceconfidence.py @@ -27,7 +27,7 @@ # #------------------------------------------------------------------------- from ....const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().sgettext +_ = glocale.translation.sgettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/family/_motherhasidof.py b/gramps/gen/filters/rules/family/_motherhasidof.py index 841d76790..3d1b24578 100644 --- a/gramps/gen/filters/rules/family/_motherhasidof.py +++ b/gramps/gen/filters/rules/family/_motherhasidof.py @@ -26,7 +26,7 @@ # #------------------------------------------------------------------------- from ....const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/family/_motherhasnameof.py b/gramps/gen/filters/rules/family/_motherhasnameof.py index f42e30279..95ec1d816 100644 --- a/gramps/gen/filters/rules/family/_motherhasnameof.py +++ b/gramps/gen/filters/rules/family/_motherhasnameof.py @@ -26,7 +26,7 @@ # #------------------------------------------------------------------------- from ....const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/family/_regexpchildname.py b/gramps/gen/filters/rules/family/_regexpchildname.py index a353421e7..4fbc266b1 100644 --- a/gramps/gen/filters/rules/family/_regexpchildname.py +++ b/gramps/gen/filters/rules/family/_regexpchildname.py @@ -26,7 +26,7 @@ # #------------------------------------------------------------------------- from ....const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/family/_regexpfathername.py b/gramps/gen/filters/rules/family/_regexpfathername.py index 18c92f773..d9ec5b2f3 100644 --- a/gramps/gen/filters/rules/family/_regexpfathername.py +++ b/gramps/gen/filters/rules/family/_regexpfathername.py @@ -26,7 +26,7 @@ # #------------------------------------------------------------------------- from ....const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/family/_regexpidof.py b/gramps/gen/filters/rules/family/_regexpidof.py index 0c501d76c..c9f4b1be6 100644 --- a/gramps/gen/filters/rules/family/_regexpidof.py +++ b/gramps/gen/filters/rules/family/_regexpidof.py @@ -26,7 +26,7 @@ # #------------------------------------------------------------------------- from ....const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/family/_regexpmothername.py b/gramps/gen/filters/rules/family/_regexpmothername.py index ef6ea928f..bb02d3c84 100644 --- a/gramps/gen/filters/rules/family/_regexpmothername.py +++ b/gramps/gen/filters/rules/family/_regexpmothername.py @@ -26,7 +26,7 @@ # #------------------------------------------------------------------------- from ....const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/family/_searchchildname.py b/gramps/gen/filters/rules/family/_searchchildname.py index e653103a9..4305c9a8e 100644 --- a/gramps/gen/filters/rules/family/_searchchildname.py +++ b/gramps/gen/filters/rules/family/_searchchildname.py @@ -26,7 +26,7 @@ # #------------------------------------------------------------------------- from ....const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/family/_searchfathername.py b/gramps/gen/filters/rules/family/_searchfathername.py index 83f4c9000..700638044 100644 --- a/gramps/gen/filters/rules/family/_searchfathername.py +++ b/gramps/gen/filters/rules/family/_searchfathername.py @@ -26,7 +26,7 @@ # #------------------------------------------------------------------------- from ....const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/family/_searchmothername.py b/gramps/gen/filters/rules/family/_searchmothername.py index ee0ebeb83..5597fac87 100644 --- a/gramps/gen/filters/rules/family/_searchmothername.py +++ b/gramps/gen/filters/rules/family/_searchmothername.py @@ -26,7 +26,7 @@ # #------------------------------------------------------------------------- from ....const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/media/_allmedia.py b/gramps/gen/filters/rules/media/_allmedia.py index 4ef9eff29..30ee123cc 100644 --- a/gramps/gen/filters/rules/media/_allmedia.py +++ b/gramps/gen/filters/rules/media/_allmedia.py @@ -26,7 +26,7 @@ # #------------------------------------------------------------------------- from ....const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/media/_changedsince.py b/gramps/gen/filters/rules/media/_changedsince.py index 14110d7f8..84de0bc68 100644 --- a/gramps/gen/filters/rules/media/_changedsince.py +++ b/gramps/gen/filters/rules/media/_changedsince.py @@ -26,7 +26,7 @@ # #------------------------------------------------------------------------- from ....const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/media/_hasattribute.py b/gramps/gen/filters/rules/media/_hasattribute.py index 6e5d7eded..7fbd02e6e 100644 --- a/gramps/gen/filters/rules/media/_hasattribute.py +++ b/gramps/gen/filters/rules/media/_hasattribute.py @@ -26,7 +26,7 @@ # #------------------------------------------------------------------------- from ....const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/media/_hascitation.py b/gramps/gen/filters/rules/media/_hascitation.py index 07c8a44e7..2188731df 100644 --- a/gramps/gen/filters/rules/media/_hascitation.py +++ b/gramps/gen/filters/rules/media/_hascitation.py @@ -29,7 +29,7 @@ Filter rule to match persons with a particular citation. # #------------------------------------------------------------------------- from ....const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/media/_hasidof.py b/gramps/gen/filters/rules/media/_hasidof.py index eb9f64311..ef7477385 100644 --- a/gramps/gen/filters/rules/media/_hasidof.py +++ b/gramps/gen/filters/rules/media/_hasidof.py @@ -26,7 +26,7 @@ # #------------------------------------------------------------------------- from ....const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/media/_hasmedia.py b/gramps/gen/filters/rules/media/_hasmedia.py index 0462465ec..24ae79c89 100644 --- a/gramps/gen/filters/rules/media/_hasmedia.py +++ b/gramps/gen/filters/rules/media/_hasmedia.py @@ -26,7 +26,7 @@ # #------------------------------------------------------------------------- from ....const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/media/_hasnotematchingsubstringof.py b/gramps/gen/filters/rules/media/_hasnotematchingsubstringof.py index 5fd6c489a..782356954 100644 --- a/gramps/gen/filters/rules/media/_hasnotematchingsubstringof.py +++ b/gramps/gen/filters/rules/media/_hasnotematchingsubstringof.py @@ -26,7 +26,7 @@ # #------------------------------------------------------------------------- from ....const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/media/_hasnoteregexp.py b/gramps/gen/filters/rules/media/_hasnoteregexp.py index ce262f154..da94b4406 100644 --- a/gramps/gen/filters/rules/media/_hasnoteregexp.py +++ b/gramps/gen/filters/rules/media/_hasnoteregexp.py @@ -26,7 +26,7 @@ # #------------------------------------------------------------------------- from ....const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/media/_hasreferencecountof.py b/gramps/gen/filters/rules/media/_hasreferencecountof.py index eaba932a6..2afa9e27c 100644 --- a/gramps/gen/filters/rules/media/_hasreferencecountof.py +++ b/gramps/gen/filters/rules/media/_hasreferencecountof.py @@ -26,7 +26,7 @@ # #------------------------------------------------------------------------- from ....const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/media/_hassourcecount.py b/gramps/gen/filters/rules/media/_hassourcecount.py index 5f79fa301..1c2303adc 100644 --- a/gramps/gen/filters/rules/media/_hassourcecount.py +++ b/gramps/gen/filters/rules/media/_hassourcecount.py @@ -29,7 +29,7 @@ # #------------------------------------------------------------------------- from ....const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/media/_hassourceof.py b/gramps/gen/filters/rules/media/_hassourceof.py index f59cac150..aebd38fc8 100644 --- a/gramps/gen/filters/rules/media/_hassourceof.py +++ b/gramps/gen/filters/rules/media/_hassourceof.py @@ -27,7 +27,7 @@ # #------------------------------------------------------------------------- from ....const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/media/_hastag.py b/gramps/gen/filters/rules/media/_hastag.py index 7a831eb49..e484a44d1 100644 --- a/gramps/gen/filters/rules/media/_hastag.py +++ b/gramps/gen/filters/rules/media/_hastag.py @@ -28,7 +28,7 @@ Rule that checks for a media object with a particular tag. # #------------------------------------------------------------------------- from ....const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/media/_matchesfilter.py b/gramps/gen/filters/rules/media/_matchesfilter.py index d24c76534..6381b4244 100644 --- a/gramps/gen/filters/rules/media/_matchesfilter.py +++ b/gramps/gen/filters/rules/media/_matchesfilter.py @@ -26,7 +26,7 @@ # #------------------------------------------------------------------------- from ....const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/media/_matchessourceconfidence.py b/gramps/gen/filters/rules/media/_matchessourceconfidence.py index d6aa8568b..3fb36597d 100644 --- a/gramps/gen/filters/rules/media/_matchessourceconfidence.py +++ b/gramps/gen/filters/rules/media/_matchessourceconfidence.py @@ -27,7 +27,7 @@ # #------------------------------------------------------------------------- from ....const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().sgettext +_ = glocale.translation.sgettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/media/_mediaprivate.py b/gramps/gen/filters/rules/media/_mediaprivate.py index 8c91b01ea..2a332e8f8 100644 --- a/gramps/gen/filters/rules/media/_mediaprivate.py +++ b/gramps/gen/filters/rules/media/_mediaprivate.py @@ -26,7 +26,7 @@ # #------------------------------------------------------------------------- from ....const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/media/_regexpidof.py b/gramps/gen/filters/rules/media/_regexpidof.py index aff710a50..4cf5debce 100644 --- a/gramps/gen/filters/rules/media/_regexpidof.py +++ b/gramps/gen/filters/rules/media/_regexpidof.py @@ -26,7 +26,7 @@ # #------------------------------------------------------------------------- from ....const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/note/_allnotes.py b/gramps/gen/filters/rules/note/_allnotes.py index 129945e8a..e7b66cd23 100644 --- a/gramps/gen/filters/rules/note/_allnotes.py +++ b/gramps/gen/filters/rules/note/_allnotes.py @@ -26,7 +26,7 @@ # #------------------------------------------------------------------------- from ....const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/note/_changedsince.py b/gramps/gen/filters/rules/note/_changedsince.py index 075ebb3e2..7896de09d 100644 --- a/gramps/gen/filters/rules/note/_changedsince.py +++ b/gramps/gen/filters/rules/note/_changedsince.py @@ -27,7 +27,7 @@ # #------------------------------------------------------------------------- from ....const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/note/_hasidof.py b/gramps/gen/filters/rules/note/_hasidof.py index 8f0104ac7..fc879dd34 100644 --- a/gramps/gen/filters/rules/note/_hasidof.py +++ b/gramps/gen/filters/rules/note/_hasidof.py @@ -26,7 +26,7 @@ # #------------------------------------------------------------------------- from ....const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/note/_hasnote.py b/gramps/gen/filters/rules/note/_hasnote.py index 5a0809359..c49731eb0 100644 --- a/gramps/gen/filters/rules/note/_hasnote.py +++ b/gramps/gen/filters/rules/note/_hasnote.py @@ -26,7 +26,7 @@ # #------------------------------------------------------------------------- from ....const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/note/_hasreferencecountof.py b/gramps/gen/filters/rules/note/_hasreferencecountof.py index 43a6d75e4..5a188f730 100644 --- a/gramps/gen/filters/rules/note/_hasreferencecountof.py +++ b/gramps/gen/filters/rules/note/_hasreferencecountof.py @@ -26,7 +26,7 @@ # #------------------------------------------------------------------------- from ....const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/note/_hastag.py b/gramps/gen/filters/rules/note/_hastag.py index 3bb325f51..190f6f551 100644 --- a/gramps/gen/filters/rules/note/_hastag.py +++ b/gramps/gen/filters/rules/note/_hastag.py @@ -28,7 +28,7 @@ Rule that checks for a note with a particular tag. # #------------------------------------------------------------------------- from ....const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/note/_hastype.py b/gramps/gen/filters/rules/note/_hastype.py index d8a5a21ad..7039d8a03 100644 --- a/gramps/gen/filters/rules/note/_hastype.py +++ b/gramps/gen/filters/rules/note/_hastype.py @@ -34,7 +34,7 @@ from ....lib.notetype import NoteType from .. import Rule from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/note/_matchesfilter.py b/gramps/gen/filters/rules/note/_matchesfilter.py index f27afe02e..b2a998419 100644 --- a/gramps/gen/filters/rules/note/_matchesfilter.py +++ b/gramps/gen/filters/rules/note/_matchesfilter.py @@ -26,7 +26,7 @@ # #------------------------------------------------------------------------- from ....const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/note/_matchesregexpof.py b/gramps/gen/filters/rules/note/_matchesregexpof.py index c07ec01f6..96c02d804 100644 --- a/gramps/gen/filters/rules/note/_matchesregexpof.py +++ b/gramps/gen/filters/rules/note/_matchesregexpof.py @@ -28,7 +28,7 @@ #------------------------------------------------------------------------- import re from ....const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/note/_matchessubstringof.py b/gramps/gen/filters/rules/note/_matchessubstringof.py index d824b89a1..ba5471be8 100644 --- a/gramps/gen/filters/rules/note/_matchessubstringof.py +++ b/gramps/gen/filters/rules/note/_matchessubstringof.py @@ -27,7 +27,7 @@ # #------------------------------------------------------------------------- from ....const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/note/_noteprivate.py b/gramps/gen/filters/rules/note/_noteprivate.py index 5c77c9adc..0a4d32e8e 100644 --- a/gramps/gen/filters/rules/note/_noteprivate.py +++ b/gramps/gen/filters/rules/note/_noteprivate.py @@ -26,7 +26,7 @@ # #------------------------------------------------------------------------- from ....const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/note/_regexpidof.py b/gramps/gen/filters/rules/note/_regexpidof.py index 863a8923b..4144a2dd2 100644 --- a/gramps/gen/filters/rules/note/_regexpidof.py +++ b/gramps/gen/filters/rules/note/_regexpidof.py @@ -26,7 +26,7 @@ # #------------------------------------------------------------------------- from ....const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/person/_changedsince.py b/gramps/gen/filters/rules/person/_changedsince.py index d33b83260..6a07c55e1 100644 --- a/gramps/gen/filters/rules/person/_changedsince.py +++ b/gramps/gen/filters/rules/person/_changedsince.py @@ -27,7 +27,7 @@ # #------------------------------------------------------------------------- from ....const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/person/_deeprelationshippathbetween.py b/gramps/gen/filters/rules/person/_deeprelationshippathbetween.py index e9a0486fb..b03ac50ed 100644 --- a/gramps/gen/filters/rules/person/_deeprelationshippathbetween.py +++ b/gramps/gen/filters/rules/person/_deeprelationshippathbetween.py @@ -27,7 +27,7 @@ # #------------------------------------------------------------------------- from ....const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/person/_disconnected.py b/gramps/gen/filters/rules/person/_disconnected.py index 03816123f..6aad33859 100644 --- a/gramps/gen/filters/rules/person/_disconnected.py +++ b/gramps/gen/filters/rules/person/_disconnected.py @@ -26,7 +26,7 @@ # #------------------------------------------------------------------------- from ....const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/person/_everyone.py b/gramps/gen/filters/rules/person/_everyone.py index fc5b15900..4e925a42f 100644 --- a/gramps/gen/filters/rules/person/_everyone.py +++ b/gramps/gen/filters/rules/person/_everyone.py @@ -26,7 +26,7 @@ # #------------------------------------------------------------------------- from ....const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/person/_familywithincompleteevent.py b/gramps/gen/filters/rules/person/_familywithincompleteevent.py index f81b5ea14..d8fbec2ef 100644 --- a/gramps/gen/filters/rules/person/_familywithincompleteevent.py +++ b/gramps/gen/filters/rules/person/_familywithincompleteevent.py @@ -26,7 +26,7 @@ # #------------------------------------------------------------------------- from ....const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/person/_hasaddress.py b/gramps/gen/filters/rules/person/_hasaddress.py index 61e8765ca..83f5e6dbb 100755 --- a/gramps/gen/filters/rules/person/_hasaddress.py +++ b/gramps/gen/filters/rules/person/_hasaddress.py @@ -29,7 +29,7 @@ # #------------------------------------------------------------------------- from ....const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/person/_hasalternatename.py b/gramps/gen/filters/rules/person/_hasalternatename.py index 1c19295e6..103ef860d 100644 --- a/gramps/gen/filters/rules/person/_hasalternatename.py +++ b/gramps/gen/filters/rules/person/_hasalternatename.py @@ -27,7 +27,7 @@ # #------------------------------------------------------------------------- from ....const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/person/_hasassociation.py b/gramps/gen/filters/rules/person/_hasassociation.py index 84aba02b6..9e427663a 100755 --- a/gramps/gen/filters/rules/person/_hasassociation.py +++ b/gramps/gen/filters/rules/person/_hasassociation.py @@ -29,7 +29,7 @@ # #------------------------------------------------------------------------- from ....const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/person/_hasattribute.py b/gramps/gen/filters/rules/person/_hasattribute.py index 99fcf9e62..f102d4106 100644 --- a/gramps/gen/filters/rules/person/_hasattribute.py +++ b/gramps/gen/filters/rules/person/_hasattribute.py @@ -26,7 +26,7 @@ # #------------------------------------------------------------------------- from ....const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/person/_hasbirth.py b/gramps/gen/filters/rules/person/_hasbirth.py index 5f0b6e163..078571f77 100644 --- a/gramps/gen/filters/rules/person/_hasbirth.py +++ b/gramps/gen/filters/rules/person/_hasbirth.py @@ -26,7 +26,7 @@ # #------------------------------------------------------------------------- from ....const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/person/_hascitation.py b/gramps/gen/filters/rules/person/_hascitation.py index 7fe5c24ae..7a85bf598 100644 --- a/gramps/gen/filters/rules/person/_hascitation.py +++ b/gramps/gen/filters/rules/person/_hascitation.py @@ -29,7 +29,7 @@ Filter rule to match persons with a particular citation. # #------------------------------------------------------------------------- from ....const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/person/_hascommonancestorwith.py b/gramps/gen/filters/rules/person/_hascommonancestorwith.py index bb21790af..d41ba95ab 100644 --- a/gramps/gen/filters/rules/person/_hascommonancestorwith.py +++ b/gramps/gen/filters/rules/person/_hascommonancestorwith.py @@ -26,7 +26,7 @@ # #------------------------------------------------------------------------- from ....const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/person/_hascommonancestorwithfiltermatch.py b/gramps/gen/filters/rules/person/_hascommonancestorwithfiltermatch.py index c1ba028e6..2affa6fa0 100644 --- a/gramps/gen/filters/rules/person/_hascommonancestorwithfiltermatch.py +++ b/gramps/gen/filters/rules/person/_hascommonancestorwithfiltermatch.py @@ -26,7 +26,7 @@ # #------------------------------------------------------------------------- from ....const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/person/_hasdeath.py b/gramps/gen/filters/rules/person/_hasdeath.py index 96e84ca7d..d77e4186f 100644 --- a/gramps/gen/filters/rules/person/_hasdeath.py +++ b/gramps/gen/filters/rules/person/_hasdeath.py @@ -26,7 +26,7 @@ # #------------------------------------------------------------------------- from ....const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/person/_hasevent.py b/gramps/gen/filters/rules/person/_hasevent.py index 7462968ab..703a71b0a 100644 --- a/gramps/gen/filters/rules/person/_hasevent.py +++ b/gramps/gen/filters/rules/person/_hasevent.py @@ -29,7 +29,7 @@ Filter rule to match persons with a particular event. # #------------------------------------------------------------------------- from ....const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/person/_hasfamilyattribute.py b/gramps/gen/filters/rules/person/_hasfamilyattribute.py index fc45da3d5..c17c96c81 100644 --- a/gramps/gen/filters/rules/person/_hasfamilyattribute.py +++ b/gramps/gen/filters/rules/person/_hasfamilyattribute.py @@ -26,7 +26,7 @@ # #------------------------------------------------------------------------- from ....const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/person/_hasfamilyevent.py b/gramps/gen/filters/rules/person/_hasfamilyevent.py index aff4089f8..6a4a7fc9c 100644 --- a/gramps/gen/filters/rules/person/_hasfamilyevent.py +++ b/gramps/gen/filters/rules/person/_hasfamilyevent.py @@ -26,7 +26,7 @@ # #------------------------------------------------------------------------- from ....const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/person/_hasgallery.py b/gramps/gen/filters/rules/person/_hasgallery.py index 2e5c463a8..1667c73b3 100644 --- a/gramps/gen/filters/rules/person/_hasgallery.py +++ b/gramps/gen/filters/rules/person/_hasgallery.py @@ -26,7 +26,7 @@ # #------------------------------------------------------------------------- from ....const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/person/_hasidof.py b/gramps/gen/filters/rules/person/_hasidof.py index 82661fca5..33a61dab2 100644 --- a/gramps/gen/filters/rules/person/_hasidof.py +++ b/gramps/gen/filters/rules/person/_hasidof.py @@ -26,7 +26,7 @@ # #------------------------------------------------------------------------- from ....const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/person/_haslds.py b/gramps/gen/filters/rules/person/_haslds.py index 5a9a73f06..3c40a45e5 100755 --- a/gramps/gen/filters/rules/person/_haslds.py +++ b/gramps/gen/filters/rules/person/_haslds.py @@ -29,7 +29,7 @@ # #------------------------------------------------------------------------- from ....const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/person/_hasnameof.py b/gramps/gen/filters/rules/person/_hasnameof.py index f42f0062d..c965c5952 100644 --- a/gramps/gen/filters/rules/person/_hasnameof.py +++ b/gramps/gen/filters/rules/person/_hasnameof.py @@ -27,7 +27,7 @@ # #------------------------------------------------------------------------- from ....const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().sgettext +_ = glocale.translation.sgettext import re #------------------------------------------------------------------------- diff --git a/gramps/gen/filters/rules/person/_hasnameorigintype.py b/gramps/gen/filters/rules/person/_hasnameorigintype.py index c8fb041f8..07773b4d7 100644 --- a/gramps/gen/filters/rules/person/_hasnameorigintype.py +++ b/gramps/gen/filters/rules/person/_hasnameorigintype.py @@ -27,7 +27,7 @@ # #------------------------------------------------------------------------- from ....const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/person/_hasnametype.py b/gramps/gen/filters/rules/person/_hasnametype.py index 0d105d9c6..4e6553b71 100644 --- a/gramps/gen/filters/rules/person/_hasnametype.py +++ b/gramps/gen/filters/rules/person/_hasnametype.py @@ -27,7 +27,7 @@ # #------------------------------------------------------------------------- from ....const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/person/_hasnickname.py b/gramps/gen/filters/rules/person/_hasnickname.py index 3637f5bc0..01cf73c65 100644 --- a/gramps/gen/filters/rules/person/_hasnickname.py +++ b/gramps/gen/filters/rules/person/_hasnickname.py @@ -27,7 +27,7 @@ # #------------------------------------------------------------------------- from ....const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/person/_hasnote.py b/gramps/gen/filters/rules/person/_hasnote.py index 13293bb60..616d6b3de 100644 --- a/gramps/gen/filters/rules/person/_hasnote.py +++ b/gramps/gen/filters/rules/person/_hasnote.py @@ -29,7 +29,7 @@ # #------------------------------------------------------------------------- from ....const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/person/_hasnotematchingsubstringof.py b/gramps/gen/filters/rules/person/_hasnotematchingsubstringof.py index 9c07adb07..753ecb056 100644 --- a/gramps/gen/filters/rules/person/_hasnotematchingsubstringof.py +++ b/gramps/gen/filters/rules/person/_hasnotematchingsubstringof.py @@ -26,7 +26,7 @@ # #------------------------------------------------------------------------- from ....const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/person/_hasnoteregexp.py b/gramps/gen/filters/rules/person/_hasnoteregexp.py index ed03e4785..3eb944610 100644 --- a/gramps/gen/filters/rules/person/_hasnoteregexp.py +++ b/gramps/gen/filters/rules/person/_hasnoteregexp.py @@ -26,7 +26,7 @@ # #------------------------------------------------------------------------- from ....const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/person/_hasrelationship.py b/gramps/gen/filters/rules/person/_hasrelationship.py index 24bf62570..5633d58dc 100644 --- a/gramps/gen/filters/rules/person/_hasrelationship.py +++ b/gramps/gen/filters/rules/person/_hasrelationship.py @@ -26,7 +26,7 @@ # #------------------------------------------------------------------------- from ....const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/person/_hassourcecount.py b/gramps/gen/filters/rules/person/_hassourcecount.py index 2df5c0d3d..ffef70282 100755 --- a/gramps/gen/filters/rules/person/_hassourcecount.py +++ b/gramps/gen/filters/rules/person/_hassourcecount.py @@ -29,7 +29,7 @@ # #------------------------------------------------------------------------- from ....const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/person/_hassourceof.py b/gramps/gen/filters/rules/person/_hassourceof.py index 079a392e4..c549d729f 100644 --- a/gramps/gen/filters/rules/person/_hassourceof.py +++ b/gramps/gen/filters/rules/person/_hassourceof.py @@ -27,7 +27,7 @@ # #------------------------------------------------------------------------- from ....const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/person/_hastag.py b/gramps/gen/filters/rules/person/_hastag.py index fe3910823..b4fe5bd6b 100644 --- a/gramps/gen/filters/rules/person/_hastag.py +++ b/gramps/gen/filters/rules/person/_hastag.py @@ -28,7 +28,7 @@ Rule that checks for a person with a particular tag. # #------------------------------------------------------------------------- from ....const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/person/_hastextmatchingsubstringof.py b/gramps/gen/filters/rules/person/_hastextmatchingsubstringof.py index 79731cce4..b26aa7b8a 100644 --- a/gramps/gen/filters/rules/person/_hastextmatchingsubstringof.py +++ b/gramps/gen/filters/rules/person/_hastextmatchingsubstringof.py @@ -27,7 +27,7 @@ # #------------------------------------------------------------------------- from ....const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext import logging LOG = logging.getLogger(".citationfilter") diff --git a/gramps/gen/filters/rules/person/_hasunknowngender.py b/gramps/gen/filters/rules/person/_hasunknowngender.py index ab4c5380d..6fbd18ca7 100644 --- a/gramps/gen/filters/rules/person/_hasunknowngender.py +++ b/gramps/gen/filters/rules/person/_hasunknowngender.py @@ -26,7 +26,7 @@ # #------------------------------------------------------------------------- from ....const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/person/_havealtfamilies.py b/gramps/gen/filters/rules/person/_havealtfamilies.py index 5e86ad7bc..d14da743f 100644 --- a/gramps/gen/filters/rules/person/_havealtfamilies.py +++ b/gramps/gen/filters/rules/person/_havealtfamilies.py @@ -26,7 +26,7 @@ # #------------------------------------------------------------------------- from ....const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/person/_havechildren.py b/gramps/gen/filters/rules/person/_havechildren.py index 9d8559338..f8ea852a9 100644 --- a/gramps/gen/filters/rules/person/_havechildren.py +++ b/gramps/gen/filters/rules/person/_havechildren.py @@ -26,7 +26,7 @@ # #------------------------------------------------------------------------- from ....const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/person/_incompletenames.py b/gramps/gen/filters/rules/person/_incompletenames.py index 992324e36..e16ef54f5 100644 --- a/gramps/gen/filters/rules/person/_incompletenames.py +++ b/gramps/gen/filters/rules/person/_incompletenames.py @@ -26,7 +26,7 @@ # #------------------------------------------------------------------------- from ....const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/person/_isancestorof.py b/gramps/gen/filters/rules/person/_isancestorof.py index b605d7e31..6c970dfb1 100644 --- a/gramps/gen/filters/rules/person/_isancestorof.py +++ b/gramps/gen/filters/rules/person/_isancestorof.py @@ -26,7 +26,7 @@ # #------------------------------------------------------------------------- from ....const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/person/_isancestoroffiltermatch.py b/gramps/gen/filters/rules/person/_isancestoroffiltermatch.py index b0a4a1227..8ebd396e3 100644 --- a/gramps/gen/filters/rules/person/_isancestoroffiltermatch.py +++ b/gramps/gen/filters/rules/person/_isancestoroffiltermatch.py @@ -26,7 +26,7 @@ # #------------------------------------------------------------------------- from ....const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/person/_isbookmarked.py b/gramps/gen/filters/rules/person/_isbookmarked.py index a54ed2bc1..5f4c07579 100644 --- a/gramps/gen/filters/rules/person/_isbookmarked.py +++ b/gramps/gen/filters/rules/person/_isbookmarked.py @@ -27,7 +27,7 @@ # #------------------------------------------------------------------------- from ....const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/person/_ischildoffiltermatch.py b/gramps/gen/filters/rules/person/_ischildoffiltermatch.py index 76f69e467..3006740eb 100644 --- a/gramps/gen/filters/rules/person/_ischildoffiltermatch.py +++ b/gramps/gen/filters/rules/person/_ischildoffiltermatch.py @@ -26,7 +26,7 @@ # #------------------------------------------------------------------------- from ....const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/person/_isdefaultperson.py b/gramps/gen/filters/rules/person/_isdefaultperson.py index a5da52b72..a3d1f71d3 100644 --- a/gramps/gen/filters/rules/person/_isdefaultperson.py +++ b/gramps/gen/filters/rules/person/_isdefaultperson.py @@ -26,7 +26,7 @@ # #------------------------------------------------------------------------- from ....const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/person/_isdescendantfamilyof.py b/gramps/gen/filters/rules/person/_isdescendantfamilyof.py index 23e369049..4a78debdd 100644 --- a/gramps/gen/filters/rules/person/_isdescendantfamilyof.py +++ b/gramps/gen/filters/rules/person/_isdescendantfamilyof.py @@ -26,7 +26,7 @@ # #------------------------------------------------------------------------- from ....const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext try: set() except NameError: diff --git a/gramps/gen/filters/rules/person/_isdescendantfamilyoffiltermatch.py b/gramps/gen/filters/rules/person/_isdescendantfamilyoffiltermatch.py index 05b48e90b..e9ff340d8 100644 --- a/gramps/gen/filters/rules/person/_isdescendantfamilyoffiltermatch.py +++ b/gramps/gen/filters/rules/person/_isdescendantfamilyoffiltermatch.py @@ -26,7 +26,7 @@ # #------------------------------------------------------------------------- from ....const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/person/_isdescendantof.py b/gramps/gen/filters/rules/person/_isdescendantof.py index 7bd4050c6..792ec714a 100644 --- a/gramps/gen/filters/rules/person/_isdescendantof.py +++ b/gramps/gen/filters/rules/person/_isdescendantof.py @@ -26,7 +26,7 @@ # #------------------------------------------------------------------------- from ....const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/person/_isdescendantoffiltermatch.py b/gramps/gen/filters/rules/person/_isdescendantoffiltermatch.py index e5c943de8..337f28b6a 100644 --- a/gramps/gen/filters/rules/person/_isdescendantoffiltermatch.py +++ b/gramps/gen/filters/rules/person/_isdescendantoffiltermatch.py @@ -26,7 +26,7 @@ # #------------------------------------------------------------------------- from ....const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/person/_isduplicatedancestorof.py b/gramps/gen/filters/rules/person/_isduplicatedancestorof.py index 226964f48..d038e1298 100644 --- a/gramps/gen/filters/rules/person/_isduplicatedancestorof.py +++ b/gramps/gen/filters/rules/person/_isduplicatedancestorof.py @@ -27,7 +27,7 @@ # #------------------------------------------------------------------------- from ....const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/person/_isfemale.py b/gramps/gen/filters/rules/person/_isfemale.py index 26598f327..67d90eed0 100644 --- a/gramps/gen/filters/rules/person/_isfemale.py +++ b/gramps/gen/filters/rules/person/_isfemale.py @@ -26,7 +26,7 @@ # #------------------------------------------------------------------------- from ....const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/person/_islessthannthgenerationancestorof.py b/gramps/gen/filters/rules/person/_islessthannthgenerationancestorof.py index 082016e5d..7d3098b47 100644 --- a/gramps/gen/filters/rules/person/_islessthannthgenerationancestorof.py +++ b/gramps/gen/filters/rules/person/_islessthannthgenerationancestorof.py @@ -26,7 +26,7 @@ # #------------------------------------------------------------------------- from ....const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/person/_islessthannthgenerationancestorofbookmarked.py b/gramps/gen/filters/rules/person/_islessthannthgenerationancestorofbookmarked.py index d710dea08..0a6bbe90a 100644 --- a/gramps/gen/filters/rules/person/_islessthannthgenerationancestorofbookmarked.py +++ b/gramps/gen/filters/rules/person/_islessthannthgenerationancestorofbookmarked.py @@ -26,7 +26,7 @@ # #------------------------------------------------------------------------- from ....const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext try: set() diff --git a/gramps/gen/filters/rules/person/_islessthannthgenerationancestorofdefaultperson.py b/gramps/gen/filters/rules/person/_islessthannthgenerationancestorofdefaultperson.py index 3f42cb67b..7b97e400a 100644 --- a/gramps/gen/filters/rules/person/_islessthannthgenerationancestorofdefaultperson.py +++ b/gramps/gen/filters/rules/person/_islessthannthgenerationancestorofdefaultperson.py @@ -26,7 +26,7 @@ # #------------------------------------------------------------------------- from ....const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/person/_islessthannthgenerationdescendantof.py b/gramps/gen/filters/rules/person/_islessthannthgenerationdescendantof.py index fb7fa91e6..045edcdbb 100644 --- a/gramps/gen/filters/rules/person/_islessthannthgenerationdescendantof.py +++ b/gramps/gen/filters/rules/person/_islessthannthgenerationdescendantof.py @@ -26,7 +26,7 @@ # #------------------------------------------------------------------------- from ....const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/person/_ismale.py b/gramps/gen/filters/rules/person/_ismale.py index 509eb0b6d..c13cc2310 100644 --- a/gramps/gen/filters/rules/person/_ismale.py +++ b/gramps/gen/filters/rules/person/_ismale.py @@ -26,7 +26,7 @@ # #------------------------------------------------------------------------- from ....const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/person/_ismorethannthgenerationancestorof.py b/gramps/gen/filters/rules/person/_ismorethannthgenerationancestorof.py index 5b8e7eb92..fd81a255a 100644 --- a/gramps/gen/filters/rules/person/_ismorethannthgenerationancestorof.py +++ b/gramps/gen/filters/rules/person/_ismorethannthgenerationancestorof.py @@ -26,7 +26,7 @@ # #------------------------------------------------------------------------- from ....const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/person/_ismorethannthgenerationdescendantof.py b/gramps/gen/filters/rules/person/_ismorethannthgenerationdescendantof.py index ece20a1d0..f3efbb8b5 100644 --- a/gramps/gen/filters/rules/person/_ismorethannthgenerationdescendantof.py +++ b/gramps/gen/filters/rules/person/_ismorethannthgenerationdescendantof.py @@ -26,7 +26,7 @@ # #------------------------------------------------------------------------- from ....const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/person/_isparentoffiltermatch.py b/gramps/gen/filters/rules/person/_isparentoffiltermatch.py index 8af459bd3..b857af78c 100644 --- a/gramps/gen/filters/rules/person/_isparentoffiltermatch.py +++ b/gramps/gen/filters/rules/person/_isparentoffiltermatch.py @@ -26,7 +26,7 @@ # #------------------------------------------------------------------------- from ....const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/person/_isrelatedwith.py b/gramps/gen/filters/rules/person/_isrelatedwith.py index f60b4ce3e..d785244c8 100644 --- a/gramps/gen/filters/rules/person/_isrelatedwith.py +++ b/gramps/gen/filters/rules/person/_isrelatedwith.py @@ -26,7 +26,7 @@ # #------------------------------------------------------------------------- from ....const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/person/_issiblingoffiltermatch.py b/gramps/gen/filters/rules/person/_issiblingoffiltermatch.py index a8188eb23..74d4b622b 100644 --- a/gramps/gen/filters/rules/person/_issiblingoffiltermatch.py +++ b/gramps/gen/filters/rules/person/_issiblingoffiltermatch.py @@ -26,7 +26,7 @@ # #------------------------------------------------------------------------- from ....const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/person/_isspouseoffiltermatch.py b/gramps/gen/filters/rules/person/_isspouseoffiltermatch.py index 1a9b67903..47fd667dc 100644 --- a/gramps/gen/filters/rules/person/_isspouseoffiltermatch.py +++ b/gramps/gen/filters/rules/person/_isspouseoffiltermatch.py @@ -26,7 +26,7 @@ # #------------------------------------------------------------------------- from ....const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/person/_iswitness.py b/gramps/gen/filters/rules/person/_iswitness.py index 92d052530..fe060b4c8 100644 --- a/gramps/gen/filters/rules/person/_iswitness.py +++ b/gramps/gen/filters/rules/person/_iswitness.py @@ -26,7 +26,7 @@ # #------------------------------------------------------------------------- from ....const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/person/_matcheseventfilter.py b/gramps/gen/filters/rules/person/_matcheseventfilter.py index 08ef6bf3f..29dcf0875 100644 --- a/gramps/gen/filters/rules/person/_matcheseventfilter.py +++ b/gramps/gen/filters/rules/person/_matcheseventfilter.py @@ -27,7 +27,7 @@ # #------------------------------------------------------------------------- from ....const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/person/_matchesfilter.py b/gramps/gen/filters/rules/person/_matchesfilter.py index 420b0577a..088acc6c1 100644 --- a/gramps/gen/filters/rules/person/_matchesfilter.py +++ b/gramps/gen/filters/rules/person/_matchesfilter.py @@ -26,7 +26,7 @@ # #------------------------------------------------------------------------- from ....const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/person/_matchessourceconfidence.py b/gramps/gen/filters/rules/person/_matchessourceconfidence.py index 17c9a7fc2..baa0d5780 100644 --- a/gramps/gen/filters/rules/person/_matchessourceconfidence.py +++ b/gramps/gen/filters/rules/person/_matchessourceconfidence.py @@ -27,7 +27,7 @@ # #------------------------------------------------------------------------- from ....const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().sgettext +_ = glocale.translation.sgettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/person/_matchidof.py b/gramps/gen/filters/rules/person/_matchidof.py index 67240638d..5b4f0c9e9 100644 --- a/gramps/gen/filters/rules/person/_matchidof.py +++ b/gramps/gen/filters/rules/person/_matchidof.py @@ -26,7 +26,7 @@ # #------------------------------------------------------------------------- from ....const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/person/_missingparent.py b/gramps/gen/filters/rules/person/_missingparent.py index 4de452e25..41ff2fc35 100644 --- a/gramps/gen/filters/rules/person/_missingparent.py +++ b/gramps/gen/filters/rules/person/_missingparent.py @@ -27,7 +27,7 @@ # #------------------------------------------------------------------------- from ....const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/person/_multiplemarriages.py b/gramps/gen/filters/rules/person/_multiplemarriages.py index 7e16e65e1..390424d27 100644 --- a/gramps/gen/filters/rules/person/_multiplemarriages.py +++ b/gramps/gen/filters/rules/person/_multiplemarriages.py @@ -26,7 +26,7 @@ # #------------------------------------------------------------------------- from ....const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/person/_nevermarried.py b/gramps/gen/filters/rules/person/_nevermarried.py index cb82ed657..cdf97bd61 100644 --- a/gramps/gen/filters/rules/person/_nevermarried.py +++ b/gramps/gen/filters/rules/person/_nevermarried.py @@ -26,7 +26,7 @@ # #------------------------------------------------------------------------- from ....const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/person/_nobirthdate.py b/gramps/gen/filters/rules/person/_nobirthdate.py index 68b670153..88f876e8d 100644 --- a/gramps/gen/filters/rules/person/_nobirthdate.py +++ b/gramps/gen/filters/rules/person/_nobirthdate.py @@ -26,7 +26,7 @@ # #------------------------------------------------------------------------- from ....const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/person/_nodeathdate.py b/gramps/gen/filters/rules/person/_nodeathdate.py index cb5ef8d78..c3b6a09fb 100644 --- a/gramps/gen/filters/rules/person/_nodeathdate.py +++ b/gramps/gen/filters/rules/person/_nodeathdate.py @@ -26,7 +26,7 @@ # #------------------------------------------------------------------------- from ....const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/person/_peopleprivate.py b/gramps/gen/filters/rules/person/_peopleprivate.py index 88d068260..04c96a55f 100644 --- a/gramps/gen/filters/rules/person/_peopleprivate.py +++ b/gramps/gen/filters/rules/person/_peopleprivate.py @@ -26,7 +26,7 @@ # #------------------------------------------------------------------------- from ....const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/person/_peoplepublic.py b/gramps/gen/filters/rules/person/_peoplepublic.py index 116243d27..6ad6a1ed0 100644 --- a/gramps/gen/filters/rules/person/_peoplepublic.py +++ b/gramps/gen/filters/rules/person/_peoplepublic.py @@ -27,7 +27,7 @@ # #------------------------------------------------------------------------- from ....const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/person/_personwithincompleteevent.py b/gramps/gen/filters/rules/person/_personwithincompleteevent.py index 864795f60..5f0830728 100644 --- a/gramps/gen/filters/rules/person/_personwithincompleteevent.py +++ b/gramps/gen/filters/rules/person/_personwithincompleteevent.py @@ -26,7 +26,7 @@ # #------------------------------------------------------------------------- from ....const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/person/_probablyalive.py b/gramps/gen/filters/rules/person/_probablyalive.py index fa69d9520..dd7a8edb6 100644 --- a/gramps/gen/filters/rules/person/_probablyalive.py +++ b/gramps/gen/filters/rules/person/_probablyalive.py @@ -26,7 +26,7 @@ # #------------------------------------------------------------------------- from ....const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/person/_regexpidof.py b/gramps/gen/filters/rules/person/_regexpidof.py index 0b984ec2d..cd3d50bd5 100644 --- a/gramps/gen/filters/rules/person/_regexpidof.py +++ b/gramps/gen/filters/rules/person/_regexpidof.py @@ -26,7 +26,7 @@ # #------------------------------------------------------------------------- from ....const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/person/_regexpname.py b/gramps/gen/filters/rules/person/_regexpname.py index 2d19c9eba..fbdb4d484 100644 --- a/gramps/gen/filters/rules/person/_regexpname.py +++ b/gramps/gen/filters/rules/person/_regexpname.py @@ -27,7 +27,7 @@ # #------------------------------------------------------------------------- from ....const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/person/_relationshippathbetween.py b/gramps/gen/filters/rules/person/_relationshippathbetween.py index eae96400e..c5401f02d 100644 --- a/gramps/gen/filters/rules/person/_relationshippathbetween.py +++ b/gramps/gen/filters/rules/person/_relationshippathbetween.py @@ -26,7 +26,7 @@ # #------------------------------------------------------------------------- from ....const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/person/_relationshippathbetweenbookmarks.py b/gramps/gen/filters/rules/person/_relationshippathbetweenbookmarks.py index ad66f260d..6b8ddcfda 100644 --- a/gramps/gen/filters/rules/person/_relationshippathbetweenbookmarks.py +++ b/gramps/gen/filters/rules/person/_relationshippathbetweenbookmarks.py @@ -26,7 +26,7 @@ # #------------------------------------------------------------------------- from ....const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext try: set() except NameError: diff --git a/gramps/gen/filters/rules/person/_searchname.py b/gramps/gen/filters/rules/person/_searchname.py index 4ae961830..08239675e 100644 --- a/gramps/gen/filters/rules/person/_searchname.py +++ b/gramps/gen/filters/rules/person/_searchname.py @@ -27,7 +27,7 @@ # #------------------------------------------------------------------------- from ....const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/place/_allplaces.py b/gramps/gen/filters/rules/place/_allplaces.py index 07384ee8d..d617d973e 100644 --- a/gramps/gen/filters/rules/place/_allplaces.py +++ b/gramps/gen/filters/rules/place/_allplaces.py @@ -26,7 +26,7 @@ # #------------------------------------------------------------------------- from ....const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/place/_changedsince.py b/gramps/gen/filters/rules/place/_changedsince.py index bfbe1889d..21d721d70 100644 --- a/gramps/gen/filters/rules/place/_changedsince.py +++ b/gramps/gen/filters/rules/place/_changedsince.py @@ -27,7 +27,7 @@ # #------------------------------------------------------------------------- from ....const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/place/_hascitation.py b/gramps/gen/filters/rules/place/_hascitation.py index 3757ae1f3..50a4c17ec 100644 --- a/gramps/gen/filters/rules/place/_hascitation.py +++ b/gramps/gen/filters/rules/place/_hascitation.py @@ -30,7 +30,7 @@ Filter rule to match family with a particular citation. # #------------------------------------------------------------------------- from ....const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/place/_hasgallery.py b/gramps/gen/filters/rules/place/_hasgallery.py index c50c87abd..da55f1ceb 100755 --- a/gramps/gen/filters/rules/place/_hasgallery.py +++ b/gramps/gen/filters/rules/place/_hasgallery.py @@ -29,7 +29,7 @@ # #------------------------------------------------------------------------- from ....const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/place/_hasidof.py b/gramps/gen/filters/rules/place/_hasidof.py index f4e9254b5..7dd341eee 100644 --- a/gramps/gen/filters/rules/place/_hasidof.py +++ b/gramps/gen/filters/rules/place/_hasidof.py @@ -26,7 +26,7 @@ # #------------------------------------------------------------------------- from ....const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/place/_hasnolatorlon.py b/gramps/gen/filters/rules/place/_hasnolatorlon.py index d51e4af45..8a64b371e 100644 --- a/gramps/gen/filters/rules/place/_hasnolatorlon.py +++ b/gramps/gen/filters/rules/place/_hasnolatorlon.py @@ -28,7 +28,7 @@ # #------------------------------------------------------------------------- from ....const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/place/_hasnote.py b/gramps/gen/filters/rules/place/_hasnote.py index 4fb270b28..d47e06b87 100755 --- a/gramps/gen/filters/rules/place/_hasnote.py +++ b/gramps/gen/filters/rules/place/_hasnote.py @@ -29,7 +29,7 @@ # #------------------------------------------------------------------------- from ....const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/place/_hasnotematchingsubstringof.py b/gramps/gen/filters/rules/place/_hasnotematchingsubstringof.py index 5ec53ad03..ba02a0f01 100644 --- a/gramps/gen/filters/rules/place/_hasnotematchingsubstringof.py +++ b/gramps/gen/filters/rules/place/_hasnotematchingsubstringof.py @@ -26,7 +26,7 @@ # #------------------------------------------------------------------------- from ....const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/place/_hasnoteregexp.py b/gramps/gen/filters/rules/place/_hasnoteregexp.py index b0d0cd5da..d4b4f17a6 100644 --- a/gramps/gen/filters/rules/place/_hasnoteregexp.py +++ b/gramps/gen/filters/rules/place/_hasnoteregexp.py @@ -26,7 +26,7 @@ # #------------------------------------------------------------------------- from ....const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/place/_hasplace.py b/gramps/gen/filters/rules/place/_hasplace.py index e51bc1657..ef30b1b22 100644 --- a/gramps/gen/filters/rules/place/_hasplace.py +++ b/gramps/gen/filters/rules/place/_hasplace.py @@ -28,7 +28,7 @@ # #------------------------------------------------------------------------- from ....const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/place/_hasreferencecountof.py b/gramps/gen/filters/rules/place/_hasreferencecountof.py index 3a8e05c46..71da5e57c 100644 --- a/gramps/gen/filters/rules/place/_hasreferencecountof.py +++ b/gramps/gen/filters/rules/place/_hasreferencecountof.py @@ -26,7 +26,7 @@ # #------------------------------------------------------------------------- from ....const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/place/_hassourcecount.py b/gramps/gen/filters/rules/place/_hassourcecount.py index 4b878164c..66343c903 100644 --- a/gramps/gen/filters/rules/place/_hassourcecount.py +++ b/gramps/gen/filters/rules/place/_hassourcecount.py @@ -29,7 +29,7 @@ # #------------------------------------------------------------------------- from ....const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/place/_hassourceof.py b/gramps/gen/filters/rules/place/_hassourceof.py index 240fcb6f1..0ee342892 100644 --- a/gramps/gen/filters/rules/place/_hassourceof.py +++ b/gramps/gen/filters/rules/place/_hassourceof.py @@ -27,7 +27,7 @@ # #------------------------------------------------------------------------- from ....const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/place/_hastag.py b/gramps/gen/filters/rules/place/_hastag.py index 7f70998c6..6b2b37ee3 100644 --- a/gramps/gen/filters/rules/place/_hastag.py +++ b/gramps/gen/filters/rules/place/_hastag.py @@ -28,7 +28,7 @@ Rule that checks for a place with a particular tag. # #------------------------------------------------------------------------- from ....const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/place/_inlatlonneighborhood.py b/gramps/gen/filters/rules/place/_inlatlonneighborhood.py index 9298cd171..702d4f793 100644 --- a/gramps/gen/filters/rules/place/_inlatlonneighborhood.py +++ b/gramps/gen/filters/rules/place/_inlatlonneighborhood.py @@ -28,7 +28,7 @@ # #------------------------------------------------------------------------- from ....const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/place/_matcheseventfilter.py b/gramps/gen/filters/rules/place/_matcheseventfilter.py index 10382965d..dc76e6d21 100644 --- a/gramps/gen/filters/rules/place/_matcheseventfilter.py +++ b/gramps/gen/filters/rules/place/_matcheseventfilter.py @@ -26,7 +26,7 @@ # #------------------------------------------------------------------------- from ....const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/place/_matchesfilter.py b/gramps/gen/filters/rules/place/_matchesfilter.py index b49c09ad4..1f78d14d4 100644 --- a/gramps/gen/filters/rules/place/_matchesfilter.py +++ b/gramps/gen/filters/rules/place/_matchesfilter.py @@ -26,7 +26,7 @@ # #------------------------------------------------------------------------- from ....const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/place/_matchessourceconfidence.py b/gramps/gen/filters/rules/place/_matchessourceconfidence.py index df39e314f..29b1b4c07 100644 --- a/gramps/gen/filters/rules/place/_matchessourceconfidence.py +++ b/gramps/gen/filters/rules/place/_matchessourceconfidence.py @@ -27,7 +27,7 @@ # #------------------------------------------------------------------------- from ....const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().sgettext +_ = glocale.translation.sgettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/place/_placeprivate.py b/gramps/gen/filters/rules/place/_placeprivate.py index ffddbbfe1..36ce3d20c 100644 --- a/gramps/gen/filters/rules/place/_placeprivate.py +++ b/gramps/gen/filters/rules/place/_placeprivate.py @@ -26,7 +26,7 @@ # #------------------------------------------------------------------------- from ....const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/place/_regexpidof.py b/gramps/gen/filters/rules/place/_regexpidof.py index 984f8bdf0..a75e2b176 100644 --- a/gramps/gen/filters/rules/place/_regexpidof.py +++ b/gramps/gen/filters/rules/place/_regexpidof.py @@ -26,7 +26,7 @@ # #------------------------------------------------------------------------- from ....const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/repository/_allrepos.py b/gramps/gen/filters/rules/repository/_allrepos.py index beab09d5e..775376cb7 100644 --- a/gramps/gen/filters/rules/repository/_allrepos.py +++ b/gramps/gen/filters/rules/repository/_allrepos.py @@ -26,7 +26,7 @@ # #------------------------------------------------------------------------- from ....const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/repository/_changedsince.py b/gramps/gen/filters/rules/repository/_changedsince.py index 37fe0babc..140b34bc0 100644 --- a/gramps/gen/filters/rules/repository/_changedsince.py +++ b/gramps/gen/filters/rules/repository/_changedsince.py @@ -27,7 +27,7 @@ # #------------------------------------------------------------------------- from ....const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/repository/_hasidof.py b/gramps/gen/filters/rules/repository/_hasidof.py index cb8b46c44..62bcddf15 100644 --- a/gramps/gen/filters/rules/repository/_hasidof.py +++ b/gramps/gen/filters/rules/repository/_hasidof.py @@ -26,7 +26,7 @@ # #------------------------------------------------------------------------- from ....const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/repository/_hasnotematchingsubstringof.py b/gramps/gen/filters/rules/repository/_hasnotematchingsubstringof.py index e1349a2c6..4898a6751 100644 --- a/gramps/gen/filters/rules/repository/_hasnotematchingsubstringof.py +++ b/gramps/gen/filters/rules/repository/_hasnotematchingsubstringof.py @@ -26,7 +26,7 @@ # #------------------------------------------------------------------------- from ....const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/repository/_hasnoteregexp.py b/gramps/gen/filters/rules/repository/_hasnoteregexp.py index 6e2089026..cdfea90ff 100644 --- a/gramps/gen/filters/rules/repository/_hasnoteregexp.py +++ b/gramps/gen/filters/rules/repository/_hasnoteregexp.py @@ -26,7 +26,7 @@ # #------------------------------------------------------------------------- from ....const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/repository/_hasreferencecountof.py b/gramps/gen/filters/rules/repository/_hasreferencecountof.py index eb587c3ae..b5ae19c8c 100644 --- a/gramps/gen/filters/rules/repository/_hasreferencecountof.py +++ b/gramps/gen/filters/rules/repository/_hasreferencecountof.py @@ -26,7 +26,7 @@ # #------------------------------------------------------------------------- from ....const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/repository/_hasrepo.py b/gramps/gen/filters/rules/repository/_hasrepo.py index 0d3f6b681..e26d42395 100644 --- a/gramps/gen/filters/rules/repository/_hasrepo.py +++ b/gramps/gen/filters/rules/repository/_hasrepo.py @@ -26,7 +26,7 @@ # #------------------------------------------------------------------------- from ....const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/repository/_hastag.py b/gramps/gen/filters/rules/repository/_hastag.py index 5011ef881..c0b5c898e 100644 --- a/gramps/gen/filters/rules/repository/_hastag.py +++ b/gramps/gen/filters/rules/repository/_hastag.py @@ -28,7 +28,7 @@ Rule that checks for a repository with a particular tag. # #------------------------------------------------------------------------- from ....const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/repository/_matchesfilter.py b/gramps/gen/filters/rules/repository/_matchesfilter.py index 7725190da..bbd073334 100644 --- a/gramps/gen/filters/rules/repository/_matchesfilter.py +++ b/gramps/gen/filters/rules/repository/_matchesfilter.py @@ -26,7 +26,7 @@ # #------------------------------------------------------------------------- from ....const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/repository/_matchesnamesubstringof.py b/gramps/gen/filters/rules/repository/_matchesnamesubstringof.py index 7cb3c7d0a..16f8e3f2b 100644 --- a/gramps/gen/filters/rules/repository/_matchesnamesubstringof.py +++ b/gramps/gen/filters/rules/repository/_matchesnamesubstringof.py @@ -26,7 +26,7 @@ # #------------------------------------------------------------------------- from ....const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/repository/_regexpidof.py b/gramps/gen/filters/rules/repository/_regexpidof.py index 13b26e548..a10cd5ab5 100644 --- a/gramps/gen/filters/rules/repository/_regexpidof.py +++ b/gramps/gen/filters/rules/repository/_regexpidof.py @@ -26,7 +26,7 @@ # #------------------------------------------------------------------------- from ....const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/repository/_repoprivate.py b/gramps/gen/filters/rules/repository/_repoprivate.py index 8c7b9c1ff..b8202b35d 100644 --- a/gramps/gen/filters/rules/repository/_repoprivate.py +++ b/gramps/gen/filters/rules/repository/_repoprivate.py @@ -26,7 +26,7 @@ # #------------------------------------------------------------------------- from ....const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/source/_allsources.py b/gramps/gen/filters/rules/source/_allsources.py index 081d2c9c9..ae76a5c1f 100644 --- a/gramps/gen/filters/rules/source/_allsources.py +++ b/gramps/gen/filters/rules/source/_allsources.py @@ -26,7 +26,7 @@ # #------------------------------------------------------------------------- from ....const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/source/_changedsince.py b/gramps/gen/filters/rules/source/_changedsince.py index 8c08e526b..7caefad27 100644 --- a/gramps/gen/filters/rules/source/_changedsince.py +++ b/gramps/gen/filters/rules/source/_changedsince.py @@ -27,7 +27,7 @@ # #------------------------------------------------------------------------- from ....const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/source/_hasgallery.py b/gramps/gen/filters/rules/source/_hasgallery.py index 28f2d7627..e35f95a08 100755 --- a/gramps/gen/filters/rules/source/_hasgallery.py +++ b/gramps/gen/filters/rules/source/_hasgallery.py @@ -29,7 +29,7 @@ # #------------------------------------------------------------------------- from ....const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/source/_hasidof.py b/gramps/gen/filters/rules/source/_hasidof.py index 835090223..809ecd375 100644 --- a/gramps/gen/filters/rules/source/_hasidof.py +++ b/gramps/gen/filters/rules/source/_hasidof.py @@ -26,7 +26,7 @@ # #------------------------------------------------------------------------- from ....const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/source/_hasnote.py b/gramps/gen/filters/rules/source/_hasnote.py index 35ab07a48..75f7c3006 100755 --- a/gramps/gen/filters/rules/source/_hasnote.py +++ b/gramps/gen/filters/rules/source/_hasnote.py @@ -29,7 +29,7 @@ # #------------------------------------------------------------------------- from ....const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/source/_hasnotematchingsubstringof.py b/gramps/gen/filters/rules/source/_hasnotematchingsubstringof.py index 7b27b1434..cf93edce8 100644 --- a/gramps/gen/filters/rules/source/_hasnotematchingsubstringof.py +++ b/gramps/gen/filters/rules/source/_hasnotematchingsubstringof.py @@ -26,7 +26,7 @@ # #------------------------------------------------------------------------- from ....const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/source/_hasnoteregexp.py b/gramps/gen/filters/rules/source/_hasnoteregexp.py index 7a0369f84..9e83df3aa 100644 --- a/gramps/gen/filters/rules/source/_hasnoteregexp.py +++ b/gramps/gen/filters/rules/source/_hasnoteregexp.py @@ -26,7 +26,7 @@ # #------------------------------------------------------------------------- from ....const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/source/_hasreferencecountof.py b/gramps/gen/filters/rules/source/_hasreferencecountof.py index 327767824..11981fc27 100644 --- a/gramps/gen/filters/rules/source/_hasreferencecountof.py +++ b/gramps/gen/filters/rules/source/_hasreferencecountof.py @@ -26,7 +26,7 @@ # #------------------------------------------------------------------------- from ....const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/source/_hasrepository.py b/gramps/gen/filters/rules/source/_hasrepository.py index 481d5c8d1..0650b5cf3 100644 --- a/gramps/gen/filters/rules/source/_hasrepository.py +++ b/gramps/gen/filters/rules/source/_hasrepository.py @@ -30,7 +30,7 @@ # #------------------------------------------------------------------------- from ....const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/source/_hasrepositorycallnumberref.py b/gramps/gen/filters/rules/source/_hasrepositorycallnumberref.py index 4cd900a5f..5533edf1a 100644 --- a/gramps/gen/filters/rules/source/_hasrepositorycallnumberref.py +++ b/gramps/gen/filters/rules/source/_hasrepositorycallnumberref.py @@ -27,7 +27,7 @@ # #------------------------------------------------------------------------- from ....const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/source/_hastag.py b/gramps/gen/filters/rules/source/_hastag.py index 7a1480fce..3e77044b8 100644 --- a/gramps/gen/filters/rules/source/_hastag.py +++ b/gramps/gen/filters/rules/source/_hastag.py @@ -28,7 +28,7 @@ Rule that checks for a source with a particular tag. # #------------------------------------------------------------------------- from ....const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/source/_matchesfilter.py b/gramps/gen/filters/rules/source/_matchesfilter.py index e0fe78452..b542e4b76 100644 --- a/gramps/gen/filters/rules/source/_matchesfilter.py +++ b/gramps/gen/filters/rules/source/_matchesfilter.py @@ -26,7 +26,7 @@ # #------------------------------------------------------------------------- from ....const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/source/_matchesrepositoryfilter.py b/gramps/gen/filters/rules/source/_matchesrepositoryfilter.py index a0930e3df..b5366b0fe 100644 --- a/gramps/gen/filters/rules/source/_matchesrepositoryfilter.py +++ b/gramps/gen/filters/rules/source/_matchesrepositoryfilter.py @@ -27,7 +27,7 @@ # #------------------------------------------------------------------------- from ....const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/source/_matchestitlesubstringof.py b/gramps/gen/filters/rules/source/_matchestitlesubstringof.py index 6cdc9b105..2d51a87c2 100644 --- a/gramps/gen/filters/rules/source/_matchestitlesubstringof.py +++ b/gramps/gen/filters/rules/source/_matchestitlesubstringof.py @@ -26,7 +26,7 @@ # #------------------------------------------------------------------------- from ....const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/source/_regexpidof.py b/gramps/gen/filters/rules/source/_regexpidof.py index 00aee261b..9b1911ed4 100644 --- a/gramps/gen/filters/rules/source/_regexpidof.py +++ b/gramps/gen/filters/rules/source/_regexpidof.py @@ -26,7 +26,7 @@ # #------------------------------------------------------------------------- from ....const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/source/_sourceprivate.py b/gramps/gen/filters/rules/source/_sourceprivate.py index ff8b01683..7158dfcb7 100644 --- a/gramps/gen/filters/rules/source/_sourceprivate.py +++ b/gramps/gen/filters/rules/source/_sourceprivate.py @@ -26,7 +26,7 @@ # #------------------------------------------------------------------------- from ....const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/lib/attrtype.py b/gramps/gen/lib/attrtype.py index 55e922bc6..de836121d 100644 --- a/gramps/gen/lib/attrtype.py +++ b/gramps/gen/lib/attrtype.py @@ -30,7 +30,7 @@ Provide the different Attribute Types for GRAMPS. # #------------------------------------------------------------------------- from ..const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # # GRAMPS modules diff --git a/gramps/gen/lib/childreftype.py b/gramps/gen/lib/childreftype.py index b48348745..81ebc78a1 100644 --- a/gramps/gen/lib/childreftype.py +++ b/gramps/gen/lib/childreftype.py @@ -29,7 +29,7 @@ Provide the different child reference types. # #------------------------------------------------------------------------- from ..const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/lib/date.py b/gramps/gen/lib/date.py index e5a7d8980..2f17b8d9b 100644 --- a/gramps/gen/lib/date.py +++ b/gramps/gen/lib/date.py @@ -51,8 +51,8 @@ log = logging.getLogger(".Date") # #------------------------------------------------------------------------ from ..const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().sgettext -ngettext = glocale.get_translation().ngettext +_ = glocale.translation.sgettext +ngettext = glocale.translation.ngettext from .calendar import (gregorian_sdn, julian_sdn, hebrew_sdn, french_sdn, persian_sdn, islamic_sdn, swedish_sdn, diff --git a/gramps/gen/lib/eventroletype.py b/gramps/gen/lib/eventroletype.py index c2658fed9..d4c936e08 100644 --- a/gramps/gen/lib/eventroletype.py +++ b/gramps/gen/lib/eventroletype.py @@ -29,7 +29,7 @@ Provide the different event roles. # #------------------------------------------------------------------------ from ..const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().sgettext +_ = glocale.translation.sgettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/lib/eventtype.py b/gramps/gen/lib/eventtype.py index ddde001ce..c733d5266 100644 --- a/gramps/gen/lib/eventtype.py +++ b/gramps/gen/lib/eventtype.py @@ -30,7 +30,7 @@ Provide the different event types # #------------------------------------------------------------------------ from ..const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().sgettext +_ = glocale.translation.sgettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/lib/familyreltype.py b/gramps/gen/lib/familyreltype.py index b6cf2b4a8..1cb1aad2b 100644 --- a/gramps/gen/lib/familyreltype.py +++ b/gramps/gen/lib/familyreltype.py @@ -28,7 +28,7 @@ Provide the different family reference types. # #------------------------------------------------------------------------ from ..const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/lib/grampstype.py b/gramps/gen/lib/grampstype.py index 9dbdc4f33..8c82a423a 100644 --- a/gramps/gen/lib/grampstype.py +++ b/gramps/gen/lib/grampstype.py @@ -38,7 +38,7 @@ from __future__ import unicode_literals # #------------------------------------------------------------------------- from ..const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext from ..constfunc import STRTYPE _UNKNOWN = _('Unknown') diff --git a/gramps/gen/lib/ldsord.py b/gramps/gen/lib/ldsord.py index 17352ff3c..43c5c312d 100644 --- a/gramps/gen/lib/ldsord.py +++ b/gramps/gen/lib/ldsord.py @@ -32,7 +32,7 @@ LDS Ordinance class for GRAMPS. # #------------------------------------------------------------------------- from ..const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext from warnings import warn #------------------------------------------------------------------------- diff --git a/gramps/gen/lib/markertype.py b/gramps/gen/lib/markertype.py index ffafc9236..119eadb73 100644 --- a/gramps/gen/lib/markertype.py +++ b/gramps/gen/lib/markertype.py @@ -32,7 +32,7 @@ when loading old database files. # #------------------------------------------------------------------------- from ..const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/lib/nameorigintype.py b/gramps/gen/lib/nameorigintype.py index d511ca4ef..c6ee8b81b 100644 --- a/gramps/gen/lib/nameorigintype.py +++ b/gramps/gen/lib/nameorigintype.py @@ -30,7 +30,7 @@ Name types. # #------------------------------------------------------------------------- from ..const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().sgettext +_ = glocale.translation.sgettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/lib/nametype.py b/gramps/gen/lib/nametype.py index 4df805381..69a7cc223 100644 --- a/gramps/gen/lib/nametype.py +++ b/gramps/gen/lib/nametype.py @@ -30,7 +30,7 @@ Name types. # #------------------------------------------------------------------------- from ..const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/lib/notetype.py b/gramps/gen/lib/notetype.py index b9211a6bb..d26b52769 100644 --- a/gramps/gen/lib/notetype.py +++ b/gramps/gen/lib/notetype.py @@ -30,7 +30,7 @@ Note types. # #------------------------------------------------------------------------- from ..const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/lib/person.py b/gramps/gen/lib/person.py index a938af1f9..92d0cd6d1 100644 --- a/gramps/gen/lib/person.py +++ b/gramps/gen/lib/person.py @@ -50,7 +50,7 @@ from .eventroletype import EventRoleType from .attribute import Attribute from .const import IDENTICAL, EQUAL, DIFFERENT from ..const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext from ..constfunc import STRTYPE from .handle import Handle diff --git a/gramps/gen/lib/repotype.py b/gramps/gen/lib/repotype.py index 0fc797fc9..0de9cb81a 100644 --- a/gramps/gen/lib/repotype.py +++ b/gramps/gen/lib/repotype.py @@ -30,7 +30,7 @@ Repository types. # #------------------------------------------------------------------------- from ..const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/lib/srcmediatype.py b/gramps/gen/lib/srcmediatype.py index 82b572808..57930c473 100644 --- a/gramps/gen/lib/srcmediatype.py +++ b/gramps/gen/lib/srcmediatype.py @@ -29,7 +29,7 @@ SourceMedia types. # #------------------------------------------------------------------------- from ..const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/lib/styledtexttagtype.py b/gramps/gen/lib/styledtexttagtype.py index f12bf7a47..015ac1913 100644 --- a/gramps/gen/lib/styledtexttagtype.py +++ b/gramps/gen/lib/styledtexttagtype.py @@ -28,7 +28,7 @@ # #------------------------------------------------------------------------ from ..const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/lib/surnamebase.py b/gramps/gen/lib/surnamebase.py index abedac5f7..5bea47ed4 100644 --- a/gramps/gen/lib/surnamebase.py +++ b/gramps/gen/lib/surnamebase.py @@ -25,7 +25,7 @@ SurnameBase class for GRAMPS. """ from ..const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/lib/urltype.py b/gramps/gen/lib/urltype.py index e81268ed3..1d60d156d 100644 --- a/gramps/gen/lib/urltype.py +++ b/gramps/gen/lib/urltype.py @@ -30,7 +30,7 @@ URL types # #------------------------------------------------------------------------- from ..const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/merge/mergecitationquery.py b/gramps/gen/merge/mergecitationquery.py index 9148fe972..be54ce91b 100644 --- a/gramps/gen/merge/mergecitationquery.py +++ b/gramps/gen/merge/mergecitationquery.py @@ -33,7 +33,7 @@ Provide merge capabilities for citations. from ..lib import (Person, Family, Event, Place, MediaObject, Repository) from ..db import DbTxn from ..const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().sgettext +_ = glocale.translation.sgettext from ..errors import MergeError #------------------------------------------------------------------------- diff --git a/gramps/gen/merge/mergeeventquery.py b/gramps/gen/merge/mergeeventquery.py index a501fde70..93e3a5ce2 100644 --- a/gramps/gen/merge/mergeeventquery.py +++ b/gramps/gen/merge/mergeeventquery.py @@ -32,7 +32,7 @@ Provide merge capabilities for events. from ..lib import Person, Family from ..db import DbTxn from ..const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().sgettext +_ = glocale.translation.sgettext from ..errors import MergeError #------------------------------------------------------------------------- diff --git a/gramps/gen/merge/mergefamilyquery.py b/gramps/gen/merge/mergefamilyquery.py index 28fb05161..2289a1683 100644 --- a/gramps/gen/merge/mergefamilyquery.py +++ b/gramps/gen/merge/mergefamilyquery.py @@ -31,7 +31,7 @@ Provide merge capabilities for families. #------------------------------------------------------------------------- from ..db import DbTxn from ..const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().sgettext +_ = glocale.translation.sgettext from ..errors import MergeError from . import MergePersonQuery diff --git a/gramps/gen/merge/mergemediaquery.py b/gramps/gen/merge/mergemediaquery.py index 2ecb95872..d64e4877d 100644 --- a/gramps/gen/merge/mergemediaquery.py +++ b/gramps/gen/merge/mergemediaquery.py @@ -32,7 +32,7 @@ Provide merge capabilities for media objects. from ..lib import Person, Family, Event, Source, Citation, Place from ..db import DbTxn from ..const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().sgettext +_ = glocale.translation.sgettext from ..errors import MergeError #------------------------------------------------------------------------- diff --git a/gramps/gen/merge/mergenotequery.py b/gramps/gen/merge/mergenotequery.py index a8edc9cb5..9cdd2832a 100644 --- a/gramps/gen/merge/mergenotequery.py +++ b/gramps/gen/merge/mergenotequery.py @@ -33,7 +33,7 @@ from ..lib import (Person, Family, Event, Place, Source, Citation, Repository, MediaObject) from ..db import DbTxn from ..const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().sgettext +_ = glocale.translation.sgettext from ..errors import MergeError #------------------------------------------------------------------------- diff --git a/gramps/gen/merge/mergepersonquery.py b/gramps/gen/merge/mergepersonquery.py index 8cff0a20a..d69e96218 100644 --- a/gramps/gen/merge/mergepersonquery.py +++ b/gramps/gen/merge/mergepersonquery.py @@ -33,7 +33,7 @@ Provide merge capabilities for persons. #------------------------------------------------------------------------- from ..db import DbTxn from ..const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().sgettext +_ = glocale.translation.sgettext from ..errors import MergeError #------------------------------------------------------------------------- diff --git a/gramps/gen/merge/mergeplacequery.py b/gramps/gen/merge/mergeplacequery.py index a79480c74..1e7e93151 100644 --- a/gramps/gen/merge/mergeplacequery.py +++ b/gramps/gen/merge/mergeplacequery.py @@ -33,7 +33,7 @@ Provide merge capabilities for places. from ..lib import Person, Family, Event from ..db import DbTxn from ..const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().sgettext +_ = glocale.translation.sgettext from ..errors import MergeError #------------------------------------------------------------------------- diff --git a/gramps/gen/merge/mergerepositoryquery.py b/gramps/gen/merge/mergerepositoryquery.py index d99ca3ce7..9a1d709c8 100644 --- a/gramps/gen/merge/mergerepositoryquery.py +++ b/gramps/gen/merge/mergerepositoryquery.py @@ -32,7 +32,7 @@ Provide merge capabilities for repositories. from ..lib import Source from ..db import DbTxn from ..const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().sgettext +_ = glocale.translation.sgettext from ..errors import MergeError #------------------------------------------------------------------------- diff --git a/gramps/gen/merge/mergesourcequery.py b/gramps/gen/merge/mergesourcequery.py index bacb0fc53..b20fa3c9e 100644 --- a/gramps/gen/merge/mergesourcequery.py +++ b/gramps/gen/merge/mergesourcequery.py @@ -35,7 +35,7 @@ from ..lib import (Person, Family, Event, Place, Source, Repository, MediaObject, Citation) from ..db import DbTxn from ..const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().sgettext +_ = glocale.translation.sgettext from ..errors import MergeError #------------------------------------------------------------------------- diff --git a/gramps/gen/merge/test/merge_ref_test.py b/gramps/gen/merge/test/merge_ref_test.py index eae2d7255..a4fbdf9f2 100644 --- a/gramps/gen/merge/test/merge_ref_test.py +++ b/gramps/gen/merge/test/merge_ref_test.py @@ -41,7 +41,7 @@ from ...const import ROOT_DIR, USER_PLUGINS from ....version import VERSION from ...lib import Name, Surname from ...const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().sgettext +_ = glocale.translation.sgettext class CopiedDoc(object): """Context manager that creates a deep copy of an libxml-xml document.""" diff --git a/gramps/gen/mime/_pythonmime.py b/gramps/gen/mime/_pythonmime.py index a91b8e3eb..6506f41d6 100644 --- a/gramps/gen/mime/_pythonmime.py +++ b/gramps/gen/mime/_pythonmime.py @@ -23,7 +23,7 @@ import mimetypes from ..const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext _type_map = { 'application/x-gramps' : 'Gramps database', diff --git a/gramps/gen/mime/_winmime.py b/gramps/gen/mime/_winmime.py index eaa2cfc96..c80bb2745 100644 --- a/gramps/gen/mime/_winmime.py +++ b/gramps/gen/mime/_winmime.py @@ -44,7 +44,7 @@ else: #------------------------------------------------------------------------- from . import _pythonmime from ..const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext def get_description(mime_type): """Return the description of the specfied mime type""" diff --git a/gramps/gen/plug/_gramplet.py b/gramps/gen/plug/_gramplet.py index 51d0003ee..35809e0c8 100644 --- a/gramps/gen/plug/_gramplet.py +++ b/gramps/gen/plug/_gramplet.py @@ -31,7 +31,7 @@ else: import bsddb import types from ..const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext import logging LOG = logging.getLogger(".Gramplets") diff --git a/gramps/gen/plug/_manager.py b/gramps/gen/plug/_manager.py index 67a6207e4..bac05f223 100644 --- a/gramps/gen/plug/_manager.py +++ b/gramps/gen/plug/_manager.py @@ -42,7 +42,7 @@ import os import sys import re from ..const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/plug/_options.py b/gramps/gen/plug/_options.py index 4ff8339d1..898f9bd97 100644 --- a/gramps/gen/plug/_options.py +++ b/gramps/gen/plug/_options.py @@ -59,7 +59,7 @@ from .menu import Menu from ..plug import BasePluginManager PLUGMAN = BasePluginManager.get_instance() from ..const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # # List of options for a single module diff --git a/gramps/gen/plug/_pluginreg.py b/gramps/gen/plug/_pluginreg.py index 08aa49883..1ff59218a 100644 --- a/gramps/gen/plug/_pluginreg.py +++ b/gramps/gen/plug/_pluginreg.py @@ -46,7 +46,7 @@ import io from ...version import VERSION as GRAMPSVERSION, VERSION_TUPLE from ..const import IMAGE_DIR from ..const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext from ..constfunc import STRTYPE #------------------------------------------------------------------------- @@ -1092,7 +1092,7 @@ class PluginRegister(object): 'locale')): local_gettext = glocale.get_addon_translator(full_filename).gettext else: - local_gettext = glocale.get_translation().gettext + local_gettext = glocale.translation.gettext try: #execfile(full_filename, exec (compile(stream, full_filename, 'exec'), diff --git a/gramps/gen/plug/docbackend/docbackend.py b/gramps/gen/plug/docbackend/docbackend.py index 00b626c2b..c601fe427 100644 --- a/gramps/gen/plug/docbackend/docbackend.py +++ b/gramps/gen/plug/docbackend/docbackend.py @@ -31,7 +31,7 @@ from __future__ import print_function from ...const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/plug/docgen/graphdoc.py b/gramps/gen/plug/docgen/graphdoc.py index f01b9006f..359fca3ad 100644 --- a/gramps/gen/plug/docgen/graphdoc.py +++ b/gramps/gen/plug/docgen/graphdoc.py @@ -48,7 +48,7 @@ import sys # #------------------------------------------------------------------------------- from ...const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext from ...utils.file import search_for from . import BaseDoc from ..menu import NumberOption, TextOption, EnumeratedListOption, \ diff --git a/gramps/gen/plug/menu/_enumeratedlist.py b/gramps/gen/plug/menu/_enumeratedlist.py index ccc3991d8..1c7329f70 100644 --- a/gramps/gen/plug/menu/_enumeratedlist.py +++ b/gramps/gen/plug/menu/_enumeratedlist.py @@ -33,7 +33,7 @@ from __future__ import print_function from . import Option from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().sgettext +_ = glocale.translation.sgettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/plug/report/_book.py b/gramps/gen/plug/report/_book.py index bb37ead68..3b9c5689d 100644 --- a/gramps/gen/plug/report/_book.py +++ b/gramps/gen/plug/report/_book.py @@ -32,7 +32,7 @@ # #------------------------------------------------------------------------- from ...const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------ # diff --git a/gramps/gen/plug/report/_constants.py b/gramps/gen/plug/report/_constants.py index cabb171d4..4cb3dd5de 100644 --- a/gramps/gen/plug/report/_constants.py +++ b/gramps/gen/plug/report/_constants.py @@ -30,7 +30,7 @@ # #------------------------------------------------------------------------- from ...const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext import os #------------------------------------------------------------------------- diff --git a/gramps/gen/plug/report/_paper.py b/gramps/gen/plug/report/_paper.py index b9ae07f82..23061f2d7 100644 --- a/gramps/gen/plug/report/_paper.py +++ b/gramps/gen/plug/report/_paper.py @@ -27,7 +27,7 @@ # #------------------------------------------------------------------------- from ...const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().sgettext +_ = glocale.translation.sgettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/plug/report/endnotes.py b/gramps/gen/plug/report/endnotes.py index 524bdcda9..ec9d8d205 100644 --- a/gramps/gen/plug/report/endnotes.py +++ b/gramps/gen/plug/report/endnotes.py @@ -29,7 +29,7 @@ Provide utilities for printing endnotes in text reports. from ..docgen import FontStyle, ParagraphStyle, FONT_SANS_SERIF from ...lib import NoteType, Citation from ...const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext from ...utils.string import confidence from ...datehandler import displayer diff --git a/gramps/gen/plug/report/utils.py b/gramps/gen/plug/report/utils.py index f711f403e..4a270e061 100644 --- a/gramps/gen/plug/report/utils.py +++ b/gramps/gen/plug/report/utils.py @@ -35,7 +35,7 @@ A collection of utilities to aid in the generation of reports. #------------------------------------------------------------------------- import os from ...const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------ # diff --git a/gramps/gen/plug/utils.py b/gramps/gen/plug/utils.py index 14eb76a67..6972b08f3 100644 --- a/gramps/gen/plug/utils.py +++ b/gramps/gen/plug/utils.py @@ -47,7 +47,7 @@ from ..const import USER_PLUGINS from ...version import VERSION_TUPLE from ..utils.file import get_unicode_path_from_file_chooser from ..const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/proxy/private.py b/gramps/gen/proxy/private.py index 5b2e5df6e..c23720244 100644 --- a/gramps/gen/proxy/private.py +++ b/gramps/gen/proxy/private.py @@ -32,7 +32,7 @@ Proxy class for the GRAMPS databases. Filter out all data marked private. # #------------------------------------------------------------------------- from ..const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext import logging LOG = logging.getLogger(".citation") diff --git a/gramps/gen/relationship.py b/gramps/gen/relationship.py index d3dd5f6e8..b1701baa2 100644 --- a/gramps/gen/relationship.py +++ b/gramps/gen/relationship.py @@ -45,7 +45,7 @@ MALE = Person.MALE FEMALE = Person.FEMALE UNKNOWN = Person.UNKNOWN from .const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().sgettext +_ = glocale.translation.sgettext from .plug import PluginRegister, BasePluginManager #------------------------------------------------------------------------- # diff --git a/gramps/gen/simple/_simpleaccess.py b/gramps/gen/simple/_simpleaccess.py index 7acb41a6b..88f7988ca 100644 --- a/gramps/gen/simple/_simpleaccess.py +++ b/gramps/gen/simple/_simpleaccess.py @@ -38,7 +38,7 @@ from ..display.name import displayer as name_displayer from ..lib import EventType from ..config import config from ..const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext from ..constfunc import STRTYPE #------------------------------------------------------------------------- diff --git a/gramps/gen/simple/_simpletable.py b/gramps/gen/simple/_simpletable.py index 05cec4265..2999a7cab 100644 --- a/gramps/gen/simple/_simpletable.py +++ b/gramps/gen/simple/_simpletable.py @@ -28,7 +28,7 @@ Provide a simplified table creation interface import cgi from ..const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().sgettext +_ = glocale.translation.sgettext from ..lib import (Person, Family, Event, Source, Place, Citation, Repository, MediaObject, Note, Date, Span) from ..config import config diff --git a/gramps/gen/utils/alive.py b/gramps/gen/utils/alive.py index 9151bddb7..f0224c7cf 100644 --- a/gramps/gen/utils/alive.py +++ b/gramps/gen/utils/alive.py @@ -44,7 +44,7 @@ from ..display.name import displayer as name_displayer from ..lib.date import Date, Today from ..errors import DatabaseError from ..const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().sgettext +_ = glocale.translation.sgettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/utils/configmanager.py b/gramps/gen/utils/configmanager.py index 5b19c8e20..3a457bf03 100644 --- a/gramps/gen/utils/configmanager.py +++ b/gramps/gen/utils/configmanager.py @@ -46,7 +46,7 @@ import io from ..constfunc import STRTYPE from ..const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext def safe_eval(exp): # restrict eval to empty environment diff --git a/gramps/gen/utils/db.py b/gramps/gen/utils/db.py index e54b3bdab..21f063d95 100644 --- a/gramps/gen/utils/db.py +++ b/gramps/gen/utils/db.py @@ -40,7 +40,7 @@ from ..lib.nameorigintype import NameOriginType from ..lib.surname import Surname from ..display.name import displayer as name_displayer from ..const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().sgettext +_ = glocale.translation.sgettext from ..constfunc import cuni #------------------------------------------------------------------------- diff --git a/gramps/gen/utils/docgen/odstab.py b/gramps/gen/utils/docgen/odstab.py index cc2dae6d7..0e3cee7fd 100644 --- a/gramps/gen/utils/docgen/odstab.py +++ b/gramps/gen/utils/docgen/odstab.py @@ -29,7 +29,7 @@ import os import tempfile import zipfile from ...const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/utils/grampslocale.py b/gramps/gen/utils/grampslocale.py index 6ca2dcc0d..478dc9d3a 100644 --- a/gramps/gen/utils/grampslocale.py +++ b/gramps/gen/utils/grampslocale.py @@ -699,36 +699,6 @@ class GrampsLocale(object): """ return self.language - def get_translation(self, domain = None, languages = None): - """ - Get a translation object for a particular language. - See the gettext documentation for the available functions - >>> glocale = GrampsLocale() - >>> _ = glocale.get_translation('foo', 'French') - >>> _ = tr.gettext - """ - - if ((domain and not domain == self.localedomain) - or (languages and not languages == self.language)): - if not domain: - domain = self.localedomain - if not languages: - languages = self.language - fallback = False - if "en" in languages: - fallback = True - try: - # Don't use _get_translation because we want to fall - # back on the singleton rather than a NullTranslation - return gettext.translation(domain, self.localedir, - languages, - class_ = GrampsTranslations, - fallback = fallback) - except IOError: - LOG.warning("None of the requested languages (%s) were available, using %s instead", ', '.join(languages), self.lang) - return self.translation - else: - return self.translation def get_addon_translator(self, filename, domain="addon", languages=None): diff --git a/gramps/gen/utils/keyword.py b/gramps/gen/utils/keyword.py index 27681920b..46a7057a5 100644 --- a/gramps/gen/utils/keyword.py +++ b/gramps/gen/utils/keyword.py @@ -51,7 +51,7 @@ Keyword translation interface # 'g' : familynick = family nick name from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext KEYWORDS = [("title", "t", _("Person|Title"), _("Person|TITLE")), ("given", "f", _("Given"), _("GIVEN")), diff --git a/gramps/gen/utils/lds.py b/gramps/gen/utils/lds.py index ed009bb70..83599b422 100644 --- a/gramps/gen/utils/lds.py +++ b/gramps/gen/utils/lds.py @@ -31,7 +31,7 @@ import logging from xml.parsers.expat import ParserCreate from ..const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext LOG = logging.getLogger(".") diff --git a/gramps/gen/utils/place.py b/gramps/gen/utils/place.py index cf5bfa942..50e0411c0 100644 --- a/gramps/gen/utils/place.py +++ b/gramps/gen/utils/place.py @@ -32,7 +32,7 @@ from __future__ import print_function, unicode_literals from ..const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext import math #------------------------------------------------------------------------- diff --git a/gramps/gen/utils/string.py b/gramps/gen/utils/string.py index 27a1479f9..497e9d3d7 100644 --- a/gramps/gen/utils/string.py +++ b/gramps/gen/utils/string.py @@ -33,7 +33,7 @@ String mappings for constants #------------------------------------------------------------------------- from ..lib import Person, Citation, FamilyRelType from ..const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().sgettext +_ = glocale.translation.sgettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/utils/unknown.py b/gramps/gen/utils/unknown.py index 33872c7b9..c009f8bd4 100644 --- a/gramps/gen/utils/unknown.py +++ b/gramps/gen/utils/unknown.py @@ -47,7 +47,7 @@ from ..lib import (Person, Surname, Name, NameType, Family, FamilyRelType, from .id import create_id from ..const import IMAGE_DIR from ..const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().sgettext +_ = glocale.translation.sgettext #------------------------------------------------------------------------- # diff --git a/gramps/grampsapp.py b/gramps/grampsapp.py index 55c442d7d..11624a245 100644 --- a/gramps/grampsapp.py +++ b/gramps/grampsapp.py @@ -124,7 +124,7 @@ from .gen.mime import mime_type_is_defined #------------------------------------------------------------------------- from .gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gui/aboutdialog.py b/gramps/gui/aboutdialog.py index 868dfc466..5a4be4e56 100644 --- a/gramps/gui/aboutdialog.py +++ b/gramps/gui/aboutdialog.py @@ -28,7 +28,7 @@ # #------------------------------------------------------------------------- from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext import os import sys diff --git a/gramps/gui/clipboard.py b/gramps/gui/clipboard.py index 3053b590b..ecf504c66 100644 --- a/gramps/gui/clipboard.py +++ b/gramps/gui/clipboard.py @@ -57,7 +57,7 @@ from gramps.gen.datehandler import get_date from .display import display_help from .managedwindow import ManagedWindow from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().sgettext +_ = glocale.translation.sgettext from gramps.gen.constfunc import mac from .glade import Glade from .ddtargets import DdTargets diff --git a/gramps/gui/columnorder.py b/gramps/gui/columnorder.py index 2b533f235..914c0c6ad 100644 --- a/gramps/gui/columnorder.py +++ b/gramps/gui/columnorder.py @@ -33,7 +33,7 @@ Handle the column ordering # #------------------------------------------------------------------------- from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext import logging #------------------------------------------------------------------------- diff --git a/gramps/gui/configure.py b/gramps/gui/configure.py index 9fd14b937..1bd231c1b 100644 --- a/gramps/gui/configure.py +++ b/gramps/gui/configure.py @@ -33,7 +33,7 @@ from __future__ import print_function import random from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext import os from xml.sax.saxutils import escape import collections diff --git a/gramps/gui/dbloader.py b/gramps/gui/dbloader.py index 83fbbd881..d8eaf2154 100644 --- a/gramps/gui/dbloader.py +++ b/gramps/gui/dbloader.py @@ -54,7 +54,7 @@ from gi.repository import GObject # #------------------------------------------------------------------------- from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext from gramps.cli.grampscli import CLIDbLoader from gramps.gen.config import config from gramps.gen.db import DbBsddb diff --git a/gramps/gui/dbman.py b/gramps/gui/dbman.py index 6c14985bd..e53624946 100644 --- a/gramps/gui/dbman.py +++ b/gramps/gui/dbman.py @@ -74,7 +74,7 @@ from gi.repository import Pango # #------------------------------------------------------------------------- from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext from .user import User from .dialog import ErrorDialog, QuestionDialog, QuestionDialog2 from gramps.gen.db import DbBsddb diff --git a/gramps/gui/dialog.py b/gramps/gui/dialog.py index a9f79efa3..f3555a572 100644 --- a/gramps/gui/dialog.py +++ b/gramps/gui/dialog.py @@ -47,7 +47,7 @@ from gramps.gen.const import ICON from gramps.gen.config import config from .glade import Glade from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext from gramps.gen.constfunc import cuni try: diff --git a/gramps/gui/displaystate.py b/gramps/gui/displaystate.py index d7d202b94..65823ed4a 100644 --- a/gramps/gui/displaystate.py +++ b/gramps/gui/displaystate.py @@ -35,7 +35,7 @@ if sys.version_info[0] < 3: else: from io import StringIO from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gui/editors/addmedia.py b/gramps/gui/editors/addmedia.py index cbdc524be..1e48e4b31 100644 --- a/gramps/gui/editors/addmedia.py +++ b/gramps/gui/editors/addmedia.py @@ -37,7 +37,7 @@ import os # #------------------------------------------------------------------------- from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext from gramps.gen.constfunc import cuni #------------------------------------------------------------------------- diff --git a/gramps/gui/editors/displaytabs/addrembedlist.py b/gramps/gui/editors/displaytabs/addrembedlist.py index 9e2eb4847..ef53ece58 100644 --- a/gramps/gui/editors/displaytabs/addrembedlist.py +++ b/gramps/gui/editors/displaytabs/addrembedlist.py @@ -30,7 +30,7 @@ Address List display tab. # #------------------------------------------------------------------------- from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext from gi.repository import GObject #------------------------------------------------------------------------- diff --git a/gramps/gui/editors/displaytabs/attrembedlist.py b/gramps/gui/editors/displaytabs/attrembedlist.py index d51e60da7..5b63477ca 100644 --- a/gramps/gui/editors/displaytabs/attrembedlist.py +++ b/gramps/gui/editors/displaytabs/attrembedlist.py @@ -26,7 +26,7 @@ # #------------------------------------------------------------------------- from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext from gi.repository import GObject #------------------------------------------------------------------------- diff --git a/gramps/gui/editors/displaytabs/backreflist.py b/gramps/gui/editors/displaytabs/backreflist.py index c8dca5515..de3b5b5c2 100644 --- a/gramps/gui/editors/displaytabs/backreflist.py +++ b/gramps/gui/editors/displaytabs/backreflist.py @@ -28,7 +28,7 @@ # #------------------------------------------------------------------------- from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gui/editors/displaytabs/backrefmodel.py b/gramps/gui/editors/displaytabs/backrefmodel.py index 651ff8c70..0aeb2a2a2 100644 --- a/gramps/gui/editors/displaytabs/backrefmodel.py +++ b/gramps/gui/editors/displaytabs/backrefmodel.py @@ -32,7 +32,7 @@ from gi.repository import GObject from gi.repository import Gtk from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gui/editors/displaytabs/buttontab.py b/gramps/gui/editors/displaytabs/buttontab.py index 3d4917d67..35d09d822 100644 --- a/gramps/gui/editors/displaytabs/buttontab.py +++ b/gramps/gui/editors/displaytabs/buttontab.py @@ -29,7 +29,7 @@ from __future__ import print_function from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gui/editors/displaytabs/citationembedlist.py b/gramps/gui/editors/displaytabs/citationembedlist.py index 5b8b87879..5d00952a5 100644 --- a/gramps/gui/editors/displaytabs/citationembedlist.py +++ b/gramps/gui/editors/displaytabs/citationembedlist.py @@ -27,7 +27,7 @@ # #------------------------------------------------------------------------- from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext import logging LOG = logging.getLogger(".citation") diff --git a/gramps/gui/editors/displaytabs/dataembedlist.py b/gramps/gui/editors/displaytabs/dataembedlist.py index 6c3b57b17..007b6044a 100644 --- a/gramps/gui/editors/displaytabs/dataembedlist.py +++ b/gramps/gui/editors/displaytabs/dataembedlist.py @@ -26,7 +26,7 @@ # #------------------------------------------------------------------------- from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gui/editors/displaytabs/embeddedlist.py b/gramps/gui/editors/displaytabs/embeddedlist.py index bf43c3bcb..8445536c7 100644 --- a/gramps/gui/editors/displaytabs/embeddedlist.py +++ b/gramps/gui/editors/displaytabs/embeddedlist.py @@ -27,7 +27,7 @@ # #------------------------------------------------------------------------- from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext import sys if sys.version_info[0] < 3: import cPickle as pickle diff --git a/gramps/gui/editors/displaytabs/eventembedlist.py b/gramps/gui/editors/displaytabs/eventembedlist.py index 76556c111..5e5937b0b 100644 --- a/gramps/gui/editors/displaytabs/eventembedlist.py +++ b/gramps/gui/editors/displaytabs/eventembedlist.py @@ -27,7 +27,7 @@ # #------------------------------------------------------------------------- from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext from gi.repository import Gtk from gi.repository import GObject diff --git a/gramps/gui/editors/displaytabs/eventrefmodel.py b/gramps/gui/editors/displaytabs/eventrefmodel.py index 221759f9b..b93fec01d 100644 --- a/gramps/gui/editors/displaytabs/eventrefmodel.py +++ b/gramps/gui/editors/displaytabs/eventrefmodel.py @@ -27,7 +27,7 @@ # #------------------------------------------------------------------------- from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gui/editors/displaytabs/familyldsembedlist.py b/gramps/gui/editors/displaytabs/familyldsembedlist.py index 14e7c6bed..62e96dd24 100644 --- a/gramps/gui/editors/displaytabs/familyldsembedlist.py +++ b/gramps/gui/editors/displaytabs/familyldsembedlist.py @@ -26,7 +26,7 @@ # #------------------------------------------------------------------------- from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gui/editors/displaytabs/gallerytab.py b/gramps/gui/editors/displaytabs/gallerytab.py index ee152ca1f..155107d85 100644 --- a/gramps/gui/editors/displaytabs/gallerytab.py +++ b/gramps/gui/editors/displaytabs/gallerytab.py @@ -27,7 +27,7 @@ # #------------------------------------------------------------------------- from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext import os import sys if sys.version_info[0] < 3: diff --git a/gramps/gui/editors/displaytabs/ldsembedlist.py b/gramps/gui/editors/displaytabs/ldsembedlist.py index 105c4a8f1..5989cf907 100644 --- a/gramps/gui/editors/displaytabs/ldsembedlist.py +++ b/gramps/gui/editors/displaytabs/ldsembedlist.py @@ -26,7 +26,7 @@ # #------------------------------------------------------------------------- from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext from gi.repository import GObject #------------------------------------------------------------------------- diff --git a/gramps/gui/editors/displaytabs/locationembedlist.py b/gramps/gui/editors/displaytabs/locationembedlist.py index 2c2f99e80..10c613692 100644 --- a/gramps/gui/editors/displaytabs/locationembedlist.py +++ b/gramps/gui/editors/displaytabs/locationembedlist.py @@ -26,7 +26,7 @@ # #------------------------------------------------------------------------- from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext from gi.repository import GObject #------------------------------------------------------------------------- diff --git a/gramps/gui/editors/displaytabs/nameembedlist.py b/gramps/gui/editors/displaytabs/nameembedlist.py index 09e6dfdaa..b3e573425 100644 --- a/gramps/gui/editors/displaytabs/nameembedlist.py +++ b/gramps/gui/editors/displaytabs/nameembedlist.py @@ -35,7 +35,7 @@ from gi.repository import GObject # #------------------------------------------------------------------------- from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gui/editors/displaytabs/namemodel.py b/gramps/gui/editors/displaytabs/namemodel.py index 50c71e0e2..7037d04d4 100644 --- a/gramps/gui/editors/displaytabs/namemodel.py +++ b/gramps/gui/editors/displaytabs/namemodel.py @@ -28,7 +28,7 @@ # #------------------------------------------------------------------------- from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gui/editors/displaytabs/notetab.py b/gramps/gui/editors/displaytabs/notetab.py index 8c72c361b..fd9c2941c 100644 --- a/gramps/gui/editors/displaytabs/notetab.py +++ b/gramps/gui/editors/displaytabs/notetab.py @@ -26,7 +26,7 @@ # #------------------------------------------------------------------------- from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gui/editors/displaytabs/personeventembedlist.py b/gramps/gui/editors/displaytabs/personeventembedlist.py index 8a2b714ae..0a6d2fc36 100644 --- a/gramps/gui/editors/displaytabs/personeventembedlist.py +++ b/gramps/gui/editors/displaytabs/personeventembedlist.py @@ -27,7 +27,7 @@ # #------------------------------------------------------------------------- from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext from gi.repository import GObject #------------------------------------------------------------------------- diff --git a/gramps/gui/editors/displaytabs/personrefembedlist.py b/gramps/gui/editors/displaytabs/personrefembedlist.py index cd3371820..fd64f1153 100644 --- a/gramps/gui/editors/displaytabs/personrefembedlist.py +++ b/gramps/gui/editors/displaytabs/personrefembedlist.py @@ -26,7 +26,7 @@ # #------------------------------------------------------------------------- from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext from gi.repository import GObject #------------------------------------------------------------------------- diff --git a/gramps/gui/editors/displaytabs/repoembedlist.py b/gramps/gui/editors/displaytabs/repoembedlist.py index 33e3964d0..d7bab7e31 100644 --- a/gramps/gui/editors/displaytabs/repoembedlist.py +++ b/gramps/gui/editors/displaytabs/repoembedlist.py @@ -26,7 +26,7 @@ # #------------------------------------------------------------------------- from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext from gi.repository import GObject #------------------------------------------------------------------------- diff --git a/gramps/gui/editors/displaytabs/surnametab.py b/gramps/gui/editors/displaytabs/surnametab.py index 93da8fd99..acb29d6af 100644 --- a/gramps/gui/editors/displaytabs/surnametab.py +++ b/gramps/gui/editors/displaytabs/surnametab.py @@ -27,7 +27,7 @@ # #------------------------------------------------------------------------- from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().sgettext +_ = glocale.translation.sgettext #------------------------------------------------------------------------- # diff --git a/gramps/gui/editors/displaytabs/webembedlist.py b/gramps/gui/editors/displaytabs/webembedlist.py index e60fdab52..d2d58166d 100644 --- a/gramps/gui/editors/displaytabs/webembedlist.py +++ b/gramps/gui/editors/displaytabs/webembedlist.py @@ -26,7 +26,7 @@ # #------------------------------------------------------------------------- from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext from gi.repository import Gtk from gi.repository import GObject diff --git a/gramps/gui/editors/editaddress.py b/gramps/gui/editors/editaddress.py index 1e7622d5d..ee62d0334 100644 --- a/gramps/gui/editors/editaddress.py +++ b/gramps/gui/editors/editaddress.py @@ -34,7 +34,7 @@ mechanism for the user to edit address information. # #------------------------------------------------------------------------- from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gui/editors/editattribute.py b/gramps/gui/editors/editattribute.py index 4f0b98b21..1d8d0e5f1 100644 --- a/gramps/gui/editors/editattribute.py +++ b/gramps/gui/editors/editattribute.py @@ -33,7 +33,7 @@ mechanism for the user to edit attribute information. # #------------------------------------------------------------------------- from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gui/editors/editchildref.py b/gramps/gui/editors/editchildref.py index 86970c15d..6249f6b4f 100644 --- a/gramps/gui/editors/editchildref.py +++ b/gramps/gui/editors/editchildref.py @@ -33,7 +33,7 @@ mechanism for the user to edit address information. # #------------------------------------------------------------------------- from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gui/editors/editcitation.py b/gramps/gui/editors/editcitation.py index 32d9a07e4..d08fceef8 100644 --- a/gramps/gui/editors/editcitation.py +++ b/gramps/gui/editors/editcitation.py @@ -32,7 +32,7 @@ EditCitation class for GRAMPS. # #------------------------------------------------------------------------- from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext import logging LOG = logging.getLogger(".citation") diff --git a/gramps/gui/editors/editdate.py b/gramps/gui/editors/editdate.py index 1dcd2e089..f3c365708 100644 --- a/gramps/gui/editors/editdate.py +++ b/gramps/gui/editors/editdate.py @@ -62,7 +62,7 @@ from gi.repository import Gtk # #------------------------------------------------------------------------- from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().sgettext +_ = glocale.translation.sgettext from gramps.gen.lib.date import Date from gramps.gen.datehandler import displayer from gramps.gen.const import URL_MANUAL_PAGE diff --git a/gramps/gui/editors/editevent.py b/gramps/gui/editors/editevent.py index 19e4e6f34..2fcaa30f1 100644 --- a/gramps/gui/editors/editevent.py +++ b/gramps/gui/editors/editevent.py @@ -28,7 +28,7 @@ # #------------------------------------------------------------------------- from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().sgettext +_ = glocale.translation.sgettext #------------------------------------------------------------------------- # diff --git a/gramps/gui/editors/editeventref.py b/gramps/gui/editors/editeventref.py index 894cc3886..2213dece0 100644 --- a/gramps/gui/editors/editeventref.py +++ b/gramps/gui/editors/editeventref.py @@ -29,7 +29,7 @@ # #------------------------------------------------------------------------- from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gui/editors/editfamily.py b/gramps/gui/editors/editfamily.py index 357ed5769..e4dd6de86 100644 --- a/gramps/gui/editors/editfamily.py +++ b/gramps/gui/editors/editfamily.py @@ -54,7 +54,7 @@ log = logging.getLogger(".") # #------------------------------------------------------------------------- from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext from ..ddtargets import DdTargets from gi.repository import Gtk from gi.repository import Gdk diff --git a/gramps/gui/editors/editldsord.py b/gramps/gui/editors/editldsord.py index b7847271f..c6d1b971f 100644 --- a/gramps/gui/editors/editldsord.py +++ b/gramps/gui/editors/editldsord.py @@ -32,7 +32,7 @@ mechanism for the user to edit personal LDS information. # #------------------------------------------------------------------------- from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gui/editors/editlink.py b/gramps/gui/editors/editlink.py index 227e57c56..40b101ea1 100644 --- a/gramps/gui/editors/editlink.py +++ b/gramps/gui/editors/editlink.py @@ -34,7 +34,7 @@ import re # #------------------------------------------------------------------------- from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext from ..managedwindow import ManagedWindow from ..display import display_help from ..glade import Glade diff --git a/gramps/gui/editors/editlocation.py b/gramps/gui/editors/editlocation.py index 61de8c2ee..50ea2a1b4 100644 --- a/gramps/gui/editors/editlocation.py +++ b/gramps/gui/editors/editlocation.py @@ -31,7 +31,7 @@ from .editsecondary import EditSecondary from ..glade import Glade from ..widgets import MonitoredEntry from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gui/editors/editmedia.py b/gramps/gui/editors/editmedia.py index 47820a652..5015b1c6f 100644 --- a/gramps/gui/editors/editmedia.py +++ b/gramps/gui/editors/editmedia.py @@ -29,7 +29,7 @@ # #------------------------------------------------------------------------- from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gui/editors/editmediaref.py b/gramps/gui/editors/editmediaref.py index 63e7cb186..47713cbc5 100644 --- a/gramps/gui/editors/editmediaref.py +++ b/gramps/gui/editors/editmediaref.py @@ -30,7 +30,7 @@ # #------------------------------------------------------------------------- from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().sgettext +_ = glocale.translation.sgettext #------------------------------------------------------------------------- # diff --git a/gramps/gui/editors/editname.py b/gramps/gui/editors/editname.py index 69b3ed971..1e34ae7ea 100644 --- a/gramps/gui/editors/editname.py +++ b/gramps/gui/editors/editname.py @@ -31,7 +31,7 @@ #------------------------------------------------------------------------- from gi.repository import GObject from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext from copy import copy #------------------------------------------------------------------------- diff --git a/gramps/gui/editors/editnote.py b/gramps/gui/editors/editnote.py index 1696d22c6..71bfd3448 100644 --- a/gramps/gui/editors/editnote.py +++ b/gramps/gui/editors/editnote.py @@ -30,7 +30,7 @@ # #------------------------------------------------------------------------- from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext import logging _LOG = logging.getLogger(".gui.editors.EditNote") diff --git a/gramps/gui/editors/editperson.py b/gramps/gui/editors/editperson.py index c35eee579..01d7bb6e2 100644 --- a/gramps/gui/editors/editperson.py +++ b/gramps/gui/editors/editperson.py @@ -35,7 +35,7 @@ to edit information about a particular Person. #------------------------------------------------------------------------- from copy import copy from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().sgettext +_ = glocale.translation.sgettext #------------------------------------------------------------------------- # diff --git a/gramps/gui/editors/editpersonref.py b/gramps/gui/editors/editpersonref.py index 88b907653..947383b6a 100644 --- a/gramps/gui/editors/editpersonref.py +++ b/gramps/gui/editors/editpersonref.py @@ -33,7 +33,7 @@ mechanism for the user to edit address information. # #------------------------------------------------------------------------- from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gui/editors/editplace.py b/gramps/gui/editors/editplace.py index 374f69053..9e9b0fef9 100644 --- a/gramps/gui/editors/editplace.py +++ b/gramps/gui/editors/editplace.py @@ -31,7 +31,7 @@ from __future__ import unicode_literals from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext import logging log = logging.getLogger(".") diff --git a/gramps/gui/editors/editprimary.py b/gramps/gui/editors/editprimary.py index b96cce2c5..463a873ef 100644 --- a/gramps/gui/editors/editprimary.py +++ b/gramps/gui/editors/editprimary.py @@ -27,7 +27,7 @@ # #------------------------------------------------------------------------- from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gui/editors/editreporef.py b/gramps/gui/editors/editreporef.py index 9553345bf..08616a276 100644 --- a/gramps/gui/editors/editreporef.py +++ b/gramps/gui/editors/editreporef.py @@ -27,7 +27,7 @@ # #------------------------------------------------------------------------- from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gui/editors/editrepository.py b/gramps/gui/editors/editrepository.py index 9b599cc04..1dbe81445 100644 --- a/gramps/gui/editors/editrepository.py +++ b/gramps/gui/editors/editrepository.py @@ -27,7 +27,7 @@ # #------------------------------------------------------------------------- from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gui/editors/editsource.py b/gramps/gui/editors/editsource.py index 8f88f3905..c50f1b2f2 100644 --- a/gramps/gui/editors/editsource.py +++ b/gramps/gui/editors/editsource.py @@ -28,7 +28,7 @@ # #------------------------------------------------------------------------- from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext import logging log = logging.getLogger(".") LOG = logging.getLogger(".citation") diff --git a/gramps/gui/editors/edittaglist.py b/gramps/gui/editors/edittaglist.py index 0d517ca42..6746b334e 100644 --- a/gramps/gui/editors/edittaglist.py +++ b/gramps/gui/editors/edittaglist.py @@ -34,7 +34,7 @@ from gi.repository import Gtk # #------------------------------------------------------------------------- from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().sgettext +_ = glocale.translation.sgettext from ..managedwindow import ManagedWindow from gramps.gen.const import URL_MANUAL_PAGE from ..display import display_help diff --git a/gramps/gui/editors/editurl.py b/gramps/gui/editors/editurl.py index 277581166..4603aedba 100644 --- a/gramps/gui/editors/editurl.py +++ b/gramps/gui/editors/editurl.py @@ -27,7 +27,7 @@ # #------------------------------------------------------------------------- from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gui/editors/filtereditor.py b/gramps/gui/editors/filtereditor.py index 62dc00be2..5f513771a 100644 --- a/gramps/gui/editors/filtereditor.py +++ b/gramps/gui/editors/filtereditor.py @@ -63,7 +63,7 @@ from gramps.gen.const import RULE_GLADE, URL_MANUAL_PAGE from ..display import display_help from gramps.gen.errors import WindowActiveError from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().sgettext +_ = glocale.translation.sgettext from gramps.gen.lib import AttributeType, EventType, FamilyRelType, NameOriginType, NameType, NoteType from gramps.gen.filters import rules from ..autocomp import StandardCustomSelector, fill_entry diff --git a/gramps/gui/editors/objectentries.py b/gramps/gui/editors/objectentries.py index 79cb81ff8..e601ebdd4 100644 --- a/gramps/gui/editors/objectentries.py +++ b/gramps/gui/editors/objectentries.py @@ -26,7 +26,7 @@ # #------------------------------------------------------------------------- from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext import sys if sys.version_info[0] < 3: import cPickle as pickle diff --git a/gramps/gui/filters/_filterstore.py b/gramps/gui/filters/_filterstore.py index f7972cbfd..b21db9c38 100644 --- a/gramps/gui/filters/_filterstore.py +++ b/gramps/gui/filters/_filterstore.py @@ -31,7 +31,7 @@ Package providing filtering framework for GRAMPS. #------------------------------------------------------------------------- from gi.repository import Gtk from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gui/filters/_searchbar.py b/gramps/gui/filters/_searchbar.py index 61963da7c..6876aed0e 100644 --- a/gramps/gui/filters/_searchbar.py +++ b/gramps/gui/filters/_searchbar.py @@ -33,7 +33,7 @@ Package providing filtering framework for GRAMPS. from gi.repository import Gdk from gi.repository import Gtk from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext from gramps.gen.constfunc import cuni diff --git a/gramps/gui/filters/sidebar/_citationsidebarfilter.py b/gramps/gui/filters/sidebar/_citationsidebarfilter.py index 9ed332d94..2b119ced1 100644 --- a/gramps/gui/filters/sidebar/_citationsidebarfilter.py +++ b/gramps/gui/filters/sidebar/_citationsidebarfilter.py @@ -27,7 +27,7 @@ # #------------------------------------------------------------------------- from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gui/filters/sidebar/_eventsidebarfilter.py b/gramps/gui/filters/sidebar/_eventsidebarfilter.py index a5179d2df..110ea0419 100644 --- a/gramps/gui/filters/sidebar/_eventsidebarfilter.py +++ b/gramps/gui/filters/sidebar/_eventsidebarfilter.py @@ -26,7 +26,7 @@ # #------------------------------------------------------------------------- from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gui/filters/sidebar/_familysidebarfilter.py b/gramps/gui/filters/sidebar/_familysidebarfilter.py index 329c9e45b..9e6838c28 100644 --- a/gramps/gui/filters/sidebar/_familysidebarfilter.py +++ b/gramps/gui/filters/sidebar/_familysidebarfilter.py @@ -27,7 +27,7 @@ # #------------------------------------------------------------------------- from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gui/filters/sidebar/_mediasidebarfilter.py b/gramps/gui/filters/sidebar/_mediasidebarfilter.py index dfb7d0330..783cec0cd 100644 --- a/gramps/gui/filters/sidebar/_mediasidebarfilter.py +++ b/gramps/gui/filters/sidebar/_mediasidebarfilter.py @@ -27,7 +27,7 @@ # #------------------------------------------------------------------------- from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gui/filters/sidebar/_notesidebarfilter.py b/gramps/gui/filters/sidebar/_notesidebarfilter.py index f2cb706ec..83ba6698c 100644 --- a/gramps/gui/filters/sidebar/_notesidebarfilter.py +++ b/gramps/gui/filters/sidebar/_notesidebarfilter.py @@ -27,7 +27,7 @@ # #------------------------------------------------------------------------- from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gui/filters/sidebar/_personsidebarfilter.py b/gramps/gui/filters/sidebar/_personsidebarfilter.py index 366b2fe2f..b276b48a6 100644 --- a/gramps/gui/filters/sidebar/_personsidebarfilter.py +++ b/gramps/gui/filters/sidebar/_personsidebarfilter.py @@ -27,7 +27,7 @@ # #------------------------------------------------------------------------- from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext import locale #------------------------------------------------------------------------- diff --git a/gramps/gui/filters/sidebar/_placesidebarfilter.py b/gramps/gui/filters/sidebar/_placesidebarfilter.py index 13c5a0fff..78460287c 100644 --- a/gramps/gui/filters/sidebar/_placesidebarfilter.py +++ b/gramps/gui/filters/sidebar/_placesidebarfilter.py @@ -28,7 +28,7 @@ # #------------------------------------------------------------------------- from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gui/filters/sidebar/_reposidebarfilter.py b/gramps/gui/filters/sidebar/_reposidebarfilter.py index c5add6d63..648055259 100644 --- a/gramps/gui/filters/sidebar/_reposidebarfilter.py +++ b/gramps/gui/filters/sidebar/_reposidebarfilter.py @@ -26,7 +26,7 @@ # #------------------------------------------------------------------------- from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gui/filters/sidebar/_sidebarfilter.py b/gramps/gui/filters/sidebar/_sidebarfilter.py index f14bdff9a..2b310cbe0 100644 --- a/gramps/gui/filters/sidebar/_sidebarfilter.py +++ b/gramps/gui/filters/sidebar/_sidebarfilter.py @@ -22,7 +22,7 @@ # $Id$ from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext from bisect import insort_left from gi.repository import Gdk from gi.repository import Gtk diff --git a/gramps/gui/filters/sidebar/_sourcesidebarfilter.py b/gramps/gui/filters/sidebar/_sourcesidebarfilter.py index 578ad0e49..10f8b13e5 100644 --- a/gramps/gui/filters/sidebar/_sourcesidebarfilter.py +++ b/gramps/gui/filters/sidebar/_sourcesidebarfilter.py @@ -26,7 +26,7 @@ # #------------------------------------------------------------------------- from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gui/grampsgui.py b/gramps/gui/grampsgui.py index 09d3a6204..67babee88 100644 --- a/gramps/gui/grampsgui.py +++ b/gramps/gui/grampsgui.py @@ -42,7 +42,7 @@ 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 GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gui/logger/_errorreportassistant.py b/gramps/gui/logger/_errorreportassistant.py index c9ed333df..a9868da54 100644 --- a/gramps/gui/logger/_errorreportassistant.py +++ b/gramps/gui/logger/_errorreportassistant.py @@ -27,7 +27,7 @@ # #------------------------------------------------------------------------- from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext from gi.repository import Gdk from gi.repository import Gtk from gi.repository import GdkPixbuf diff --git a/gramps/gui/logger/_errorview.py b/gramps/gui/logger/_errorview.py index f96ea9b23..b53f8c0c9 100644 --- a/gramps/gui/logger/_errorview.py +++ b/gramps/gui/logger/_errorview.py @@ -34,7 +34,7 @@ from gi.repository import Gtk #------------------------------------------------------------------------- from gramps.gen.const import URL_MANUAL_PAGE from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().sgettext +_ = glocale.translation.sgettext from ._errorreportassistant import ErrorReportAssistant from ..display import display_help diff --git a/gramps/gui/makefilter.py b/gramps/gui/makefilter.py index e8e1d85be..012bf58f5 100644 --- a/gramps/gui/makefilter.py +++ b/gramps/gui/makefilter.py @@ -26,7 +26,7 @@ from gramps.gen.const import CUSTOM_FILTERS from gramps.gen.filters import (rules, FilterList, GenericFilterFactory, reload_custom_filters) from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().sgettext +_ = glocale.translation.sgettext import collections def make_filter(dbstate, uistate, objclass, gramps_ids, title=None): diff --git a/gramps/gui/merge/mergecitation.py b/gramps/gui/merge/mergecitation.py index 50bacb3c6..d9f0c172f 100644 --- a/gramps/gui/merge/mergecitation.py +++ b/gramps/gui/merge/mergecitation.py @@ -31,7 +31,7 @@ Provide merge capabilities for citations. # #------------------------------------------------------------------------- from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().sgettext +_ = glocale.translation.sgettext from gramps.gen.const import URL_MANUAL_PAGE from ..display import display_help from ..managedwindow import ManagedWindow diff --git a/gramps/gui/merge/mergeevent.py b/gramps/gui/merge/mergeevent.py index 1a84a18ba..4a0ed2936 100644 --- a/gramps/gui/merge/mergeevent.py +++ b/gramps/gui/merge/mergeevent.py @@ -30,7 +30,7 @@ Provide merge capabilities for events. # #------------------------------------------------------------------------- from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().sgettext +_ = glocale.translation.sgettext from gramps.gen.const import URL_MANUAL_PAGE from ..display import display_help from ..managedwindow import ManagedWindow diff --git a/gramps/gui/merge/mergefamily.py b/gramps/gui/merge/mergefamily.py index 3cc18c6d6..a896ab78a 100644 --- a/gramps/gui/merge/mergefamily.py +++ b/gramps/gui/merge/mergefamily.py @@ -30,7 +30,7 @@ Provide merge capabilities for families. # #------------------------------------------------------------------------- from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().sgettext +_ = glocale.translation.sgettext from gramps.gen.display.name import displayer as name_displayer from gramps.gen.const import URL_MANUAL_PAGE from ..display import display_help diff --git a/gramps/gui/merge/mergemedia.py b/gramps/gui/merge/mergemedia.py index 4dca62f07..c3e7d8434 100644 --- a/gramps/gui/merge/mergemedia.py +++ b/gramps/gui/merge/mergemedia.py @@ -30,7 +30,7 @@ Provide merge capabilities for media objects. # #------------------------------------------------------------------------- from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().sgettext +_ = glocale.translation.sgettext from gramps.gen.const import URL_MANUAL_PAGE from ..display import display_help from ..managedwindow import ManagedWindow diff --git a/gramps/gui/merge/mergenote.py b/gramps/gui/merge/mergenote.py index fee47aa2c..6262b93ba 100644 --- a/gramps/gui/merge/mergenote.py +++ b/gramps/gui/merge/mergenote.py @@ -30,7 +30,7 @@ Provide merge capabilities for notes. # #------------------------------------------------------------------------- from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().sgettext +_ = glocale.translation.sgettext from gramps.gen.const import URL_MANUAL_PAGE from ..display import display_help from ..managedwindow import ManagedWindow diff --git a/gramps/gui/merge/mergeperson.py b/gramps/gui/merge/mergeperson.py index a2393818a..89c868c5d 100644 --- a/gramps/gui/merge/mergeperson.py +++ b/gramps/gui/merge/mergeperson.py @@ -39,7 +39,7 @@ from gi.repository import Pango # #------------------------------------------------------------------------- from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().sgettext +_ = glocale.translation.sgettext from gramps.gen.plug.report import utils as ReportUtils from gramps.gen.display.name import displayer as name_displayer from gramps.gen.const import URL_MANUAL_PAGE diff --git a/gramps/gui/merge/mergeplace.py b/gramps/gui/merge/mergeplace.py index 9050daea6..dee0b8720 100644 --- a/gramps/gui/merge/mergeplace.py +++ b/gramps/gui/merge/mergeplace.py @@ -38,7 +38,7 @@ from gi.repository import Gtk # #------------------------------------------------------------------------- from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().sgettext +_ = glocale.translation.sgettext from gramps.gen.const import URL_MANUAL_PAGE from ..display import display_help from ..managedwindow import ManagedWindow diff --git a/gramps/gui/merge/mergerepository.py b/gramps/gui/merge/mergerepository.py index 238380fde..2df39c90e 100644 --- a/gramps/gui/merge/mergerepository.py +++ b/gramps/gui/merge/mergerepository.py @@ -30,7 +30,7 @@ Provide merge capabilities for repositories. # #------------------------------------------------------------------------- from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().sgettext +_ = glocale.translation.sgettext from gramps.gen.const import URL_MANUAL_PAGE from ..display import display_help from ..managedwindow import ManagedWindow diff --git a/gramps/gui/merge/mergesource.py b/gramps/gui/merge/mergesource.py index cd017d090..5362b9155 100644 --- a/gramps/gui/merge/mergesource.py +++ b/gramps/gui/merge/mergesource.py @@ -32,7 +32,7 @@ Provide merge capabilities for sources. # #------------------------------------------------------------------------- from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().sgettext +_ = glocale.translation.sgettext from gramps.gen.const import URL_MANUAL_PAGE from ..display import display_help from ..managedwindow import ManagedWindow diff --git a/gramps/gui/plug/_dialogs.py b/gramps/gui/plug/_dialogs.py index 31c990dd4..73790c123 100644 --- a/gramps/gui/plug/_dialogs.py +++ b/gramps/gui/plug/_dialogs.py @@ -34,7 +34,7 @@ from gi.repository import Gtk # #------------------------------------------------------------------------- from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext from collections import defaultdict #------------------------------------------------------------------------- diff --git a/gramps/gui/plug/_guioptions.py b/gramps/gui/plug/_guioptions.py index 4e881a623..0104e8928 100644 --- a/gramps/gui/plug/_guioptions.py +++ b/gramps/gui/plug/_guioptions.py @@ -36,7 +36,7 @@ from __future__ import unicode_literals # #------------------------------------------------------------------------ from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext import os import sys diff --git a/gramps/gui/plug/_windows.py b/gramps/gui/plug/_windows.py index 08e424764..3c8fefd27 100644 --- a/gramps/gui/plug/_windows.py +++ b/gramps/gui/plug/_windows.py @@ -53,7 +53,7 @@ from ..managedwindow import ManagedWindow from gramps.gen.errors import UnavailableError, WindowActiveError from gramps.gen.plug import PluginRegister, PTYPE_STR, load_addon_file from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext from ..utils import open_file_with_default_application from ..pluginmanager import GuiPluginManager from . import tool diff --git a/gramps/gui/plug/export/_exportassistant.py b/gramps/gui/plug/export/_exportassistant.py index af48f3174..0e9b43029 100644 --- a/gramps/gui/plug/export/_exportassistant.py +++ b/gramps/gui/plug/export/_exportassistant.py @@ -34,7 +34,7 @@ import os import sys from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gui/plug/export/_exportoptions.py b/gramps/gui/plug/export/_exportoptions.py index e2c617b01..27cfc1361 100644 --- a/gramps/gui/plug/export/_exportoptions.py +++ b/gramps/gui/plug/export/_exportoptions.py @@ -36,8 +36,8 @@ # #------------------------------------------------------------------------- from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext -ngettext = glocale.get_translation().ngettext +_ = glocale.translation.gettext +ngettext = glocale.translation.ngettext from gramps.gen.config import config from gramps.gen.display.name import displayer as name_displayer from gramps.gen.filters import GenericFilter, rules diff --git a/gramps/gui/plug/quick/_quickreports.py b/gramps/gui/plug/quick/_quickreports.py index 151efc880..d3c3b047d 100644 --- a/gramps/gui/plug/quick/_quickreports.py +++ b/gramps/gui/plug/quick/_quickreports.py @@ -34,7 +34,7 @@ This module provides the functions to build the quick report context menu's from __future__ import print_function from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext import sys if sys.version_info[0] < 3: from StringIO import StringIO diff --git a/gramps/gui/plug/quick/_quicktable.py b/gramps/gui/plug/quick/_quicktable.py index ec54b038e..18630e148 100644 --- a/gramps/gui/plug/quick/_quicktable.py +++ b/gramps/gui/plug/quick/_quicktable.py @@ -54,7 +54,7 @@ from gi.repository import Gtk #------------------------------------------------------------------------- from gramps.gen.const import GRAMPS_LOCALE as glocale from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().sgettext +_ = glocale.translation.sgettext from gramps.gen.simple import SimpleTable from gramps.gen.errors import WindowActiveError from ...widgets.multitreeview import MultiTreeView diff --git a/gramps/gui/plug/quick/_textbufdoc.py b/gramps/gui/plug/quick/_textbufdoc.py index 5a899f17f..dc95e8d98 100644 --- a/gramps/gui/plug/quick/_textbufdoc.py +++ b/gramps/gui/plug/quick/_textbufdoc.py @@ -27,7 +27,7 @@ # #------------------------------------------------------------------------ from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext from gi.repository import Gtk from gi.repository import Pango, PangoCairo diff --git a/gramps/gui/plug/report/_bookdialog.py b/gramps/gui/plug/report/_bookdialog.py index 0b34db5e8..e6b0e7763 100644 --- a/gramps/gui/plug/report/_bookdialog.py +++ b/gramps/gui/plug/report/_bookdialog.py @@ -35,7 +35,7 @@ from __future__ import print_function from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------ # diff --git a/gramps/gui/plug/report/_docreportdialog.py b/gramps/gui/plug/report/_docreportdialog.py index e8fa68cd0..01cba9710 100644 --- a/gramps/gui/plug/report/_docreportdialog.py +++ b/gramps/gui/plug/report/_docreportdialog.py @@ -29,7 +29,7 @@ #------------------------------------------------------------------------- import os from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gui/plug/report/_graphvizreportdialog.py b/gramps/gui/plug/report/_graphvizreportdialog.py index 122794290..891c9f219 100644 --- a/gramps/gui/plug/report/_graphvizreportdialog.py +++ b/gramps/gui/plug/report/_graphvizreportdialog.py @@ -31,7 +31,7 @@ #------------------------------------------------------------------------ import os from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------------- # diff --git a/gramps/gui/plug/report/_papermenu.py b/gramps/gui/plug/report/_papermenu.py index 6aab25b3f..f8b3dcaa9 100644 --- a/gramps/gui/plug/report/_papermenu.py +++ b/gramps/gui/plug/report/_papermenu.py @@ -27,7 +27,7 @@ # #------------------------------------------------------------------------- from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().sgettext +_ = glocale.translation.sgettext #------------------------------------------------------------------------- # diff --git a/gramps/gui/plug/report/_reportdialog.py b/gramps/gui/plug/report/_reportdialog.py index 7d5ad9a78..257273149 100644 --- a/gramps/gui/plug/report/_reportdialog.py +++ b/gramps/gui/plug/report/_reportdialog.py @@ -48,7 +48,7 @@ from gi.repository import Gtk # #------------------------------------------------------------------------- from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext from gramps.gen.config import config from gramps.gen.errors import DatabaseError, FilterError, ReportError, WindowActiveError from ...utils import open_file_with_default_application diff --git a/gramps/gui/plug/report/_stylecombobox.py b/gramps/gui/plug/report/_stylecombobox.py index 92a66f588..332bba0ac 100644 --- a/gramps/gui/plug/report/_stylecombobox.py +++ b/gramps/gui/plug/report/_stylecombobox.py @@ -22,7 +22,7 @@ # $Id$ from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext from gi.repository import Gtk from gi.repository import GObject diff --git a/gramps/gui/plug/report/_styleeditor.py b/gramps/gui/plug/report/_styleeditor.py index 37bd2079f..7fa86c1e9 100644 --- a/gramps/gui/plug/report/_styleeditor.py +++ b/gramps/gui/plug/report/_styleeditor.py @@ -34,7 +34,7 @@ Paragraph/Font style editor # #------------------------------------------------------------------------ from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().sgettext +_ = glocale.translation.sgettext import logging log = logging.getLogger(".") import re diff --git a/gramps/gui/plug/tool.py b/gramps/gui/plug/tool.py index 8da3baf4a..176ad1633 100644 --- a/gramps/gui/plug/tool.py +++ b/gramps/gui/plug/tool.py @@ -32,7 +32,7 @@ from __future__ import print_function from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext import logging log = logging.getLogger(".") diff --git a/gramps/gui/selectors/selectcitation.py b/gramps/gui/selectors/selectcitation.py index 97354a31f..b80a98dfc 100644 --- a/gramps/gui/selectors/selectcitation.py +++ b/gramps/gui/selectors/selectcitation.py @@ -32,7 +32,7 @@ SelectCitation class for GRAMPS. # #------------------------------------------------------------------------- from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gui/selectors/selectevent.py b/gramps/gui/selectors/selectevent.py index 2e2bf7f8c..276de99a0 100644 --- a/gramps/gui/selectors/selectevent.py +++ b/gramps/gui/selectors/selectevent.py @@ -27,7 +27,7 @@ # #------------------------------------------------------------------------- from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gui/selectors/selectfamily.py b/gramps/gui/selectors/selectfamily.py index 3a8079178..2ad896e4b 100644 --- a/gramps/gui/selectors/selectfamily.py +++ b/gramps/gui/selectors/selectfamily.py @@ -27,7 +27,7 @@ # #------------------------------------------------------------------------- from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gui/selectors/selectnote.py b/gramps/gui/selectors/selectnote.py index a16f0c0f2..06c4390be 100644 --- a/gramps/gui/selectors/selectnote.py +++ b/gramps/gui/selectors/selectnote.py @@ -30,7 +30,7 @@ # #------------------------------------------------------------------------- from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gui/selectors/selectobject.py b/gramps/gui/selectors/selectobject.py index 12af0e965..9112adb19 100644 --- a/gramps/gui/selectors/selectobject.py +++ b/gramps/gui/selectors/selectobject.py @@ -31,7 +31,7 @@ #------------------------------------------------------------------------- import gc from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gui/selectors/selectperson.py b/gramps/gui/selectors/selectperson.py index a8fd98c73..3d8b9aa56 100644 --- a/gramps/gui/selectors/selectperson.py +++ b/gramps/gui/selectors/selectperson.py @@ -27,7 +27,7 @@ # #------------------------------------------------------------------------- from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext from gi.repository import Gdk from gi.repository import Gtk diff --git a/gramps/gui/selectors/selectplace.py b/gramps/gui/selectors/selectplace.py index 9d8d6150c..977ec2826 100644 --- a/gramps/gui/selectors/selectplace.py +++ b/gramps/gui/selectors/selectplace.py @@ -28,7 +28,7 @@ # #------------------------------------------------------------------------- from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gui/selectors/selectrepository.py b/gramps/gui/selectors/selectrepository.py index 9c84cc9b5..1db701743 100644 --- a/gramps/gui/selectors/selectrepository.py +++ b/gramps/gui/selectors/selectrepository.py @@ -27,7 +27,7 @@ # #------------------------------------------------------------------------- from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gui/selectors/selectsource.py b/gramps/gui/selectors/selectsource.py index 047a14c9e..9e76f671c 100644 --- a/gramps/gui/selectors/selectsource.py +++ b/gramps/gui/selectors/selectsource.py @@ -27,7 +27,7 @@ # #------------------------------------------------------------------------- from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gui/spell.py b/gramps/gui/spell.py index 452b4a0c2..8f7a5f34c 100644 --- a/gramps/gui/spell.py +++ b/gramps/gui/spell.py @@ -50,7 +50,7 @@ from gi.repository import Gtk from gi import Repository from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext HAVE_GTKSPELL = False diff --git a/gramps/gui/tipofday.py b/gramps/gui/tipofday.py index 5b746987b..de4250d39 100644 --- a/gramps/gui/tipofday.py +++ b/gramps/gui/tipofday.py @@ -32,7 +32,7 @@ Handles the Tip of the Day dialog from xml.parsers.expat import ParserCreate, ExpatError from random import Random from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext import os import sys diff --git a/gramps/gui/undohistory.py b/gramps/gui/undohistory.py index ea92676c1..615397556 100644 --- a/gramps/gui/undohistory.py +++ b/gramps/gui/undohistory.py @@ -29,7 +29,7 @@ #------------------------------------------------------------------------ import time from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext from itertools import chain #------------------------------------------------------------------------- diff --git a/gramps/gui/utils.py b/gramps/gui/utils.py index 21c63150b..ce338cc70 100644 --- a/gramps/gui/utils.py +++ b/gramps/gui/utils.py @@ -34,7 +34,7 @@ from __future__ import print_function, division import os import sys from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext # gtk is not included here, because this file is currently imported # by code that needs to run without the DISPLAY variable (eg, in # the cli only). diff --git a/gramps/gui/viewmanager.py b/gramps/gui/viewmanager.py index 63f2dfe50..4091c0536 100644 --- a/gramps/gui/viewmanager.py +++ b/gramps/gui/viewmanager.py @@ -69,7 +69,7 @@ from gi.repository import Gtk # #------------------------------------------------------------------------- from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().sgettext +_ = glocale.translation.sgettext from gramps.cli.grampscli import CLIManager from .user import User from .plug import tool @@ -589,7 +589,7 @@ class ViewManager(CLIManager): if count: self.do_reg_plugins(self.dbstate, self.uistate) OkDialog(_("Done downloading and installing addons"), - "%s %s" % (glocale.get_translation().ngettext("%d addon was installed.", + "%s %s" % (glocale.translation.ngettext("%d addon was installed.", "%d addons were installed.", count) % count, _("You need to restart Gramps to see new views.")), diff --git a/gramps/gui/views/bookmarks.py b/gramps/gui/views/bookmarks.py index 3d9d77e2e..fad945ce7 100644 --- a/gramps/gui/views/bookmarks.py +++ b/gramps/gui/views/bookmarks.py @@ -59,7 +59,7 @@ from ..listmodel import ListModel from gramps.gen.utils.db import navigation_label from gramps.gen.const import URL_MANUAL_PAGE from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().sgettext +_ = glocale.translation.sgettext #------------------------------------------------------------------------- # diff --git a/gramps/gui/views/listview.py b/gramps/gui/views/listview.py index 68915c8d5..fcaacdfab 100644 --- a/gramps/gui/views/listview.py +++ b/gramps/gui/views/listview.py @@ -70,7 +70,7 @@ from gramps.gen.utils.file import get_unicode_path_from_file_chooser from ..dialog import QuestionDialog, QuestionDialog2 from ..editors import FilterEditor from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().sgettext +_ = glocale.translation.sgettext from ..ddtargets import DdTargets from ..plug.quick import create_quickreport_menu, create_web_connect_menu from ..utils import is_right_click diff --git a/gramps/gui/views/navigationview.py b/gramps/gui/views/navigationview.py index 215ea7c65..a08588df6 100644 --- a/gramps/gui/views/navigationview.py +++ b/gramps/gui/views/navigationview.py @@ -49,7 +49,7 @@ from gi.repository import Gtk #---------------------------------------------------------------- from .pageview import PageView from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().sgettext +_ = glocale.translation.sgettext from gramps.gen.utils.db import navigation_label from gramps.gen.constfunc import mod_key diff --git a/gramps/gui/views/pageview.py b/gramps/gui/views/pageview.py index ceaf0804d..c8a7a65e3 100644 --- a/gramps/gui/views/pageview.py +++ b/gramps/gui/views/pageview.py @@ -41,7 +41,7 @@ _LOG = logging.getLogger('.pageview') from gi.repository import Gtk from gi.repository import Gdk from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #---------------------------------------------------------------- # diff --git a/gramps/gui/views/tags.py b/gramps/gui/views/tags.py index d1dec6fa7..b91e290e0 100644 --- a/gramps/gui/views/tags.py +++ b/gramps/gui/views/tags.py @@ -43,7 +43,7 @@ from gi.repository import Gdk # #------------------------------------------------------------------------- from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().sgettext +_ = glocale.translation.sgettext from gramps.gen.lib import Tag from gramps.gen.db import DbTxn from ..dbguielement import DbGUIElement diff --git a/gramps/gui/views/treemodels/citationtreemodel.py b/gramps/gui/views/treemodels/citationtreemodel.py index 3a69abf37..c5a84966a 100644 --- a/gramps/gui/views/treemodels/citationtreemodel.py +++ b/gramps/gui/views/treemodels/citationtreemodel.py @@ -39,7 +39,7 @@ LOG = logging.getLogger(".citation") # #------------------------------------------------------------------------- from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gui/views/treemodels/mediamodel.py b/gramps/gui/views/treemodels/mediamodel.py index a7e0306a9..dd203b300 100644 --- a/gramps/gui/views/treemodels/mediamodel.py +++ b/gramps/gui/views/treemodels/mediamodel.py @@ -26,7 +26,7 @@ # #------------------------------------------------------------------------- from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext import logging log = logging.getLogger(".") diff --git a/gramps/gui/views/treemodels/peoplemodel.py b/gramps/gui/views/treemodels/peoplemodel.py index 1948312be..d14bf0c5e 100644 --- a/gramps/gui/views/treemodels/peoplemodel.py +++ b/gramps/gui/views/treemodels/peoplemodel.py @@ -55,7 +55,7 @@ _LOG = logging.getLogger(".") # #------------------------------------------------------------------------- from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext from gramps.gen.lib import Name, EventRef, EventType, EventRoleType from gramps.gen.display.name import displayer as name_displayer from gramps.gen.datehandler import format_time, get_date, get_date_valid diff --git a/gramps/gui/views/treemodels/placemodel.py b/gramps/gui/views/treemodels/placemodel.py index 2d2e9bfb4..6687f31cc 100644 --- a/gramps/gui/views/treemodels/placemodel.py +++ b/gramps/gui/views/treemodels/placemodel.py @@ -58,7 +58,7 @@ from .treebasemodel import TreeBaseModel # #------------------------------------------------------------------------- from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gui/views/treemodels/treebasemodel.py b/gramps/gui/views/treemodels/treebasemodel.py index bfa91719a..a33f8f5d4 100644 --- a/gramps/gui/views/treemodels/treebasemodel.py +++ b/gramps/gui/views/treemodels/treebasemodel.py @@ -38,7 +38,7 @@ import time import locale import sys from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext import logging _LOG = logging.getLogger(".gui.treebasemodel") diff --git a/gramps/gui/widgets/buttons.py b/gramps/gui/widgets/buttons.py index c4953e254..1247f9c4b 100644 --- a/gramps/gui/widgets/buttons.py +++ b/gramps/gui/widgets/buttons.py @@ -28,7 +28,7 @@ __all__ = ["IconButton", "WarnButton", "SimpleButton", "PrivacyButton"] # #------------------------------------------------------------------------- from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext import logging _LOG = logging.getLogger(".widgets.buttons") diff --git a/gramps/gui/widgets/expandcollapsearrow.py b/gramps/gui/widgets/expandcollapsearrow.py index f040fa59d..5d2d3e98b 100644 --- a/gramps/gui/widgets/expandcollapsearrow.py +++ b/gramps/gui/widgets/expandcollapsearrow.py @@ -28,7 +28,7 @@ __all__ = ["ExpandCollapseArrow"] # #------------------------------------------------------------------------- from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext import logging _LOG = logging.getLogger(".widgets.expandcollapsearrow") diff --git a/gramps/gui/widgets/fanchart.py b/gramps/gui/widgets/fanchart.py index 28fad531e..14e7dbf78 100644 --- a/gramps/gui/widgets/fanchart.py +++ b/gramps/gui/widgets/fanchart.py @@ -71,7 +71,7 @@ from gramps.gen.utils.libformatting import FormattingHelper from gramps.gen.utils.db import (find_children, find_parents, find_witnessed_people, get_age, get_timeperiod, preset_name) from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gui/widgets/grampletbar.py b/gramps/gui/widgets/grampletbar.py index 5036d4d29..606cf3c2f 100644 --- a/gramps/gui/widgets/grampletbar.py +++ b/gramps/gui/widgets/grampletbar.py @@ -40,7 +40,7 @@ LOG = logging.getLogger('.grampletbar') # #------------------------------------------------------------------------- from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext import time import os import sys diff --git a/gramps/gui/widgets/grampletpane.py b/gramps/gui/widgets/grampletpane.py index dbb7cfce7..dc7a94c45 100644 --- a/gramps/gui/widgets/grampletpane.py +++ b/gramps/gui/widgets/grampletpane.py @@ -67,7 +67,7 @@ from ..pluginmanager import GuiPluginManager from .undoablebuffer import UndoableBuffer from gramps.gen.constfunc import cuni from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gui/widgets/labels.py b/gramps/gui/widgets/labels.py index 22123801b..b6e0e0328 100644 --- a/gramps/gui/widgets/labels.py +++ b/gramps/gui/widgets/labels.py @@ -31,7 +31,7 @@ __all__ = ["LinkLabel", "EditLabel", "BasicLabel", "GenderLabel", import os import cgi from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext import logging _LOG = logging.getLogger(".widgets.labels") diff --git a/gramps/gui/widgets/monitoredwidgets.py b/gramps/gui/widgets/monitoredwidgets.py index 78d45f646..059db661a 100644 --- a/gramps/gui/widgets/monitoredwidgets.py +++ b/gramps/gui/widgets/monitoredwidgets.py @@ -52,7 +52,7 @@ from gi.repository import Pango # #------------------------------------------------------------------------- from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext from ..autocomp import StandardCustomSelector, fill_entry from gramps.gen.datehandler import displayer, parser from gramps.gen.lib.date import Date, NextYear diff --git a/gramps/gui/widgets/photo.py b/gramps/gui/widgets/photo.py index a985d4625..e61bf3b52 100644 --- a/gramps/gui/widgets/photo.py +++ b/gramps/gui/widgets/photo.py @@ -36,7 +36,7 @@ from gi.repository import Gtk from ..thumbnails import get_thumbnail_image, SIZE_NORMAL, SIZE_LARGE from ..utils import open_file_with_default_application from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/gui/widgets/progressdialog.py b/gramps/gui/widgets/progressdialog.py index 01416c95e..17c8c74d9 100644 --- a/gramps/gui/widgets/progressdialog.py +++ b/gramps/gui/widgets/progressdialog.py @@ -31,7 +31,7 @@ from __future__ import print_function #------------------------------------------------------------------------- import time from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext import logging log = logging.getLogger("gen.progressdialog") diff --git a/gramps/gui/widgets/reorderfam.py b/gramps/gui/widgets/reorderfam.py index 25a20c80c..fd6857cd8 100644 --- a/gramps/gui/widgets/reorderfam.py +++ b/gramps/gui/widgets/reorderfam.py @@ -26,7 +26,7 @@ # #------------------------------------------------------------------------- from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().sgettext +_ = glocale.translation.sgettext #------------------------------------------------------------------------- # diff --git a/gramps/gui/widgets/styledtextbuffer.py b/gramps/gui/widgets/styledtextbuffer.py index 6f88496b8..28049ae8f 100644 --- a/gramps/gui/widgets/styledtextbuffer.py +++ b/gramps/gui/widgets/styledtextbuffer.py @@ -31,7 +31,7 @@ __all__ = ["ALLOWED_STYLES", "MATCH_START", "MATCH_END", "MATCH_FLAVOR", # #------------------------------------------------------------------------- from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext import re import logging diff --git a/gramps/gui/widgets/styledtexteditor.py b/gramps/gui/widgets/styledtexteditor.py index 998598248..0b398fe54 100644 --- a/gramps/gui/widgets/styledtexteditor.py +++ b/gramps/gui/widgets/styledtexteditor.py @@ -31,7 +31,7 @@ __all__ = ["StyledTextEditor"] # #------------------------------------------------------------------------- from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext import logging _LOG = logging.getLogger(".widgets.styledtexteditor") diff --git a/gramps/gui/widgets/undoableentry.py b/gramps/gui/widgets/undoableentry.py index caf179f30..7fa18db87 100644 --- a/gramps/gui/widgets/undoableentry.py +++ b/gramps/gui/widgets/undoableentry.py @@ -30,7 +30,7 @@ __all__ = ["UndoableEntry"] # #------------------------------------------------------------------------- from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext import logging _LOG = logging.getLogger(".widgets.undoableentry") diff --git a/gramps/gui/widgets/validatedmaskedentry.py b/gramps/gui/widgets/validatedmaskedentry.py index 0a811e3e9..36e1fd994 100644 --- a/gramps/gui/widgets/validatedmaskedentry.py +++ b/gramps/gui/widgets/validatedmaskedentry.py @@ -29,7 +29,7 @@ __all__ = ["MaskedEntry", "ValidatableMaskedEntry"] # #------------------------------------------------------------------------- from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext import string import sys diff --git a/gramps/guiQML/viewmanager.py b/gramps/guiQML/viewmanager.py index 33cabb6f8..2164fc399 100644 --- a/gramps/guiQML/viewmanager.py +++ b/gramps/guiQML/viewmanager.py @@ -64,7 +64,7 @@ from PySide import QtOpenGL from gramps.gen.const import ROOT_DIR from gramps.cli.grampscli import CLIManager, CLIDbLoader from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext from guiQML.views.dbman import DbManager from guiQML.questiondialog import ErrorDialog diff --git a/gramps/guiQML/views/centralview.py b/gramps/guiQML/views/centralview.py index 7dee2ce0f..c3c421216 100644 --- a/gramps/guiQML/views/centralview.py +++ b/gramps/guiQML/views/centralview.py @@ -65,7 +65,7 @@ from PySide import QtOpenGL #------------------------------------------------------------------------- from gramps.gen.const import ROOT_DIR from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext from gramps.gen.constfunc import cuni, UNITYPE diff --git a/gramps/guiQML/views/dbman.py b/gramps/guiQML/views/dbman.py index a831df7bf..01fdf173b 100644 --- a/gramps/guiQML/views/dbman.py +++ b/gramps/guiQML/views/dbman.py @@ -66,7 +66,7 @@ from PySide import QtOpenGL from gramps.gen.const import IMAGE_DIR, ROOT_DIR from gramps.cli.clidbman import CLIDbManager, NAME_FILE, time_val from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext from gramps.gen.constfunc import cuni, UNITYPE #------------------------------------------------------------------------- diff --git a/gramps/guiQML/views/personview.py b/gramps/guiQML/views/personview.py index 1583ece8c..eba20d47b 100644 --- a/gramps/guiQML/views/personview.py +++ b/gramps/guiQML/views/personview.py @@ -60,7 +60,7 @@ from gramps.gen.const import ROOT_DIR from gramps.gen.constfunc import cuni, UNITYPE from gramps.gui.views.treemodels import conv_unicode_tosrtkey from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext from gramps.gen.display.name import displayer as name_displayer from gramps.gen.lib import Name ##TODO: follow must be refractored so as not to require GTK diff --git a/gramps/plugins/docgen/asciidoc.py b/gramps/plugins/docgen/asciidoc.py index a4da020cb..8b17f90e4 100644 --- a/gramps/plugins/docgen/asciidoc.py +++ b/gramps/plugins/docgen/asciidoc.py @@ -39,7 +39,7 @@ import sys # #------------------------------------------------------------------------ from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext from gramps.gen.plug.docgen import (BaseDoc, TextDoc, PARA_ALIGN_RIGHT, PARA_ALIGN_CENTER) from gramps.gen.errors import ReportError diff --git a/gramps/plugins/docgen/gtkprint.py b/gramps/plugins/docgen/gtkprint.py index 0216a8f30..70bdf5b12 100644 --- a/gramps/plugins/docgen/gtkprint.py +++ b/gramps/plugins/docgen/gtkprint.py @@ -30,7 +30,7 @@ from __future__ import division # #------------------------------------------------------------------------ from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext from math import radians #------------------------------------------------------------------------ diff --git a/gramps/plugins/docgen/htmldoc.py b/gramps/plugins/docgen/htmldoc.py index acf7a19d6..2c0a9d24a 100644 --- a/gramps/plugins/docgen/htmldoc.py +++ b/gramps/plugins/docgen/htmldoc.py @@ -46,7 +46,7 @@ import time # #------------------------------------------------------------------------ from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext from gramps.gen.utils.image import resize_to_jpeg from gramps.gen.const import DATA_DIR, WEBSTUFF_IMAGE_DIR, PROGRAM_NAME, URL_HOMEPAGE from gramps.version import VERSION diff --git a/gramps/plugins/docgen/latexdoc.py b/gramps/plugins/docgen/latexdoc.py index a351c58e0..764b2b58c 100644 --- a/gramps/plugins/docgen/latexdoc.py +++ b/gramps/plugins/docgen/latexdoc.py @@ -38,7 +38,7 @@ # #------------------------------------------------------------------------ from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext from bisect import bisect import re, os, sys import logging diff --git a/gramps/plugins/docgen/odfdoc.py b/gramps/plugins/docgen/odfdoc.py index afb58e6bf..9e3f0d26d 100644 --- a/gramps/plugins/docgen/odfdoc.py +++ b/gramps/plugins/docgen/odfdoc.py @@ -103,7 +103,7 @@ from gramps.gen.errors import ReportError # #------------------------------------------------------------------------- from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext _apptype = 'application/vnd.oasis.opendocument.text' diff --git a/gramps/plugins/docgen/pdfdoc.py b/gramps/plugins/docgen/pdfdoc.py index 3f2dc22c9..5b1dd92f4 100644 --- a/gramps/plugins/docgen/pdfdoc.py +++ b/gramps/plugins/docgen/pdfdoc.py @@ -30,7 +30,7 @@ # #------------------------------------------------------------------------ from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext import sys #------------------------------------------------------------------------ diff --git a/gramps/plugins/docgen/psdrawdoc.py b/gramps/plugins/docgen/psdrawdoc.py index 84cfe5140..120ed28a4 100644 --- a/gramps/plugins/docgen/psdrawdoc.py +++ b/gramps/plugins/docgen/psdrawdoc.py @@ -37,7 +37,7 @@ PostScript document generator. #Gramps modules #------------------------------------------------------------------------- from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext from gramps.gen.plug.report import utils as ReportUtils from gramps.gen.plug.docgen import BaseDoc, DrawDoc, FONT_SERIF, PAPER_PORTRAIT, SOLID from gramps.gen.plug.utils import gformat diff --git a/gramps/plugins/docgen/rtfdoc.py b/gramps/plugins/docgen/rtfdoc.py index 1e36e7b38..140081a7c 100644 --- a/gramps/plugins/docgen/rtfdoc.py +++ b/gramps/plugins/docgen/rtfdoc.py @@ -32,7 +32,7 @@ from __future__ import print_function from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext import logging LOG = logging.getLogger(".rtfdoc") diff --git a/gramps/plugins/docgen/svgdrawdoc.py b/gramps/plugins/docgen/svgdrawdoc.py index 879709554..41f9f222f 100644 --- a/gramps/plugins/docgen/svgdrawdoc.py +++ b/gramps/plugins/docgen/svgdrawdoc.py @@ -44,7 +44,7 @@ else: # #------------------------------------------------------------------------- from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext from gramps.gen.plug.docgen import BaseDoc, DrawDoc, SOLID, FONT_SANS_SERIF from gramps.gen.errors import ReportError from gramps.gen.plug.menu import EnumeratedListOption diff --git a/gramps/plugins/drawreport/ancestortree.py b/gramps/plugins/drawreport/ancestortree.py index a7d99c0ec..55abbe4ec 100644 --- a/gramps/plugins/drawreport/ancestortree.py +++ b/gramps/plugins/drawreport/ancestortree.py @@ -40,7 +40,7 @@ def log2(val): X_INDEX = log2 from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().sgettext +_ = glocale.translation.sgettext #------------------------------------------------------------------------ # diff --git a/gramps/plugins/drawreport/calendarreport.py b/gramps/plugins/drawreport/calendarreport.py index 8f623e24a..8ffdc9a34 100644 --- a/gramps/plugins/drawreport/calendarreport.py +++ b/gramps/plugins/drawreport/calendarreport.py @@ -27,7 +27,7 @@ # #------------------------------------------------------------------------ from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext from functools import partial import datetime import time @@ -322,7 +322,7 @@ class Calendar(Report): 'person' : short_name, 'relation' : ""} else: - text = (glocale.get_translation().ngettext('%(person)s, %(age)d%(relation)s', + text = (glocale.translation.ngettext('%(person)s, %(age)d%(relation)s', '%(person)s, %(age)d%(relation)s', nyears) % {'person' : short_name, 'age' : nyears, @@ -382,7 +382,7 @@ class Calendar(Report): 'person' : short_name, } else: - text = (glocale.get_translation().ngettext("%(spouse)s and\n %(person)s, %(nyears)d", + text = (glocale.translation.ngettext("%(spouse)s and\n %(person)s, %(nyears)d", "%(spouse)s and\n %(person)s, %(nyears)d", nyears) % {'spouse' : spouse_name, 'person' : short_name, diff --git a/gramps/plugins/drawreport/descendtree.py b/gramps/plugins/drawreport/descendtree.py index 283ee9468..23c7e28b6 100644 --- a/gramps/plugins/drawreport/descendtree.py +++ b/gramps/plugins/drawreport/descendtree.py @@ -35,7 +35,7 @@ from __future__ import division # #------------------------------------------------------------------------ from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().sgettext +_ = glocale.translation.sgettext from gramps.gen.errors import ReportError diff --git a/gramps/plugins/drawreport/fanchart.py b/gramps/plugins/drawreport/fanchart.py index f74db8c4d..be1fb67e3 100644 --- a/gramps/plugins/drawreport/fanchart.py +++ b/gramps/plugins/drawreport/fanchart.py @@ -29,7 +29,7 @@ # #------------------------------------------------------------------------ from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext from math import pi, cos, sin, log10, acos def log2(val): diff --git a/gramps/plugins/drawreport/statisticschart.py b/gramps/plugins/drawreport/statisticschart.py index 311a96cac..0cd8a145f 100644 --- a/gramps/plugins/drawreport/statisticschart.py +++ b/gramps/plugins/drawreport/statisticschart.py @@ -35,7 +35,7 @@ from __future__ import division #------------------------------------------------------------------------ import time from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().sgettext +_ = glocale.translation.sgettext from functools import partial #------------------------------------------------------------------------ diff --git a/gramps/plugins/drawreport/timeline.py b/gramps/plugins/drawreport/timeline.py index a0dc4a12d..b84b429d9 100644 --- a/gramps/plugins/drawreport/timeline.py +++ b/gramps/plugins/drawreport/timeline.py @@ -34,7 +34,7 @@ from __future__ import division # #------------------------------------------------------------------------ from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().sgettext +_ = glocale.translation.sgettext #------------------------------------------------------------------------ # diff --git a/gramps/plugins/export/exportcsv.py b/gramps/plugins/export/exportcsv.py index e8d0e3f15..208f9f4c6 100644 --- a/gramps/plugins/export/exportcsv.py +++ b/gramps/plugins/export/exportcsv.py @@ -33,7 +33,7 @@ import os import sys from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().sgettext +_ = glocale.translation.sgettext import csv if sys.version_info[0] < 3: from cStringIO import StringIO diff --git a/gramps/plugins/export/exportftree.py b/gramps/plugins/export/exportftree.py index c030d0ead..ebd332343 100644 --- a/gramps/plugins/export/exportftree.py +++ b/gramps/plugins/export/exportftree.py @@ -31,7 +31,7 @@ #------------------------------------------------------------------------- import os from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------ # diff --git a/gramps/plugins/export/exportgedcom.py b/gramps/plugins/export/exportgedcom.py index c9caaa6aa..fc36ea28b 100644 --- a/gramps/plugins/export/exportgedcom.py +++ b/gramps/plugins/export/exportgedcom.py @@ -43,7 +43,7 @@ import io # #------------------------------------------------------------------------- from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext from gramps.gen.lib import AttributeType, ChildRefType, Citation, Date, EventRoleType, EventType, LdsOrd, NameType, NoteType, Person, UrlType from gramps.version import VERSION import gramps.plugins.lib.libgedcom as libgedcom diff --git a/gramps/plugins/export/exportgeneweb.py b/gramps/plugins/export/exportgeneweb.py index e068e5638..d3fc65aa0 100644 --- a/gramps/plugins/export/exportgeneweb.py +++ b/gramps/plugins/export/exportgeneweb.py @@ -32,7 +32,7 @@ #------------------------------------------------------------------------- import os from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------ # diff --git a/gramps/plugins/export/exportpkg.py b/gramps/plugins/export/exportpkg.py index 7f2ec37fb..15531e528 100644 --- a/gramps/plugins/export/exportpkg.py +++ b/gramps/plugins/export/exportpkg.py @@ -41,7 +41,7 @@ if sys.version_info[0] < 3: else: from io import StringIO from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------ # diff --git a/gramps/plugins/export/exportvcalendar.py b/gramps/plugins/export/exportvcalendar.py index 881da3576..e68a57774 100644 --- a/gramps/plugins/export/exportvcalendar.py +++ b/gramps/plugins/export/exportvcalendar.py @@ -48,7 +48,7 @@ log = logging.getLogger(".ExportVCal") # #------------------------------------------------------------------------- from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext from gramps.gui.plug.export import WriterOptionBox from gramps.gen.utils.db import family_name from gramps.gen.lib import Date, EventType diff --git a/gramps/plugins/export/exportvcard.py b/gramps/plugins/export/exportvcard.py index d5da7804e..68ea9ca6e 100644 --- a/gramps/plugins/export/exportvcard.py +++ b/gramps/plugins/export/exportvcard.py @@ -48,7 +48,7 @@ log = logging.getLogger(".ExportVCard") # #------------------------------------------------------------------------- from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext from gramps.gui.plug.export import WriterOptionBox from gramps.gen.const import PROGRAM_NAME from gramps.version import VERSION diff --git a/gramps/plugins/export/exportxml.py b/gramps/plugins/export/exportxml.py index 86bca0025..e78e3bcac 100644 --- a/gramps/plugins/export/exportxml.py +++ b/gramps/plugins/export/exportxml.py @@ -42,7 +42,7 @@ import os import codecs from xml.sax.saxutils import escape from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------ diff --git a/gramps/plugins/gramplet/ageondategramplet.py b/gramps/plugins/gramplet/ageondategramplet.py index b03287f0b..0014a5fba 100644 --- a/gramps/plugins/gramplet/ageondategramplet.py +++ b/gramps/plugins/gramplet/ageondategramplet.py @@ -36,7 +36,7 @@ on a particular date. #------------------------------------------------------------------------ from gramps.gen.plug import Gramplet from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().sgettext +_ = glocale.translation.sgettext from gramps.gen.datehandler import parser from gramps.gui.plug.quick import run_quick_report_by_name diff --git a/gramps/plugins/gramplet/agestats.py b/gramps/plugins/gramplet/agestats.py index 560525b37..00fe0c50a 100644 --- a/gramps/plugins/gramplet/agestats.py +++ b/gramps/plugins/gramplet/agestats.py @@ -29,7 +29,7 @@ from collections import defaultdict from gramps.gen.plug import Gramplet from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext from gramps.gen.lib import ChildRefType class AgeStatsGramplet(Gramplet): diff --git a/gramps/plugins/gramplet/attributes.py b/gramps/plugins/gramplet/attributes.py index 6f98dd183..9d2ec3003 100644 --- a/gramps/plugins/gramplet/attributes.py +++ b/gramps/plugins/gramplet/attributes.py @@ -23,7 +23,7 @@ from gramps.gui.listmodel import ListModel, NOSORT from gramps.gui.plug.quick import run_quick_report_by_name from gramps.gen.plug import Gramplet from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext from gi.repository import Gtk class Attributes(Gramplet): diff --git a/gramps/plugins/gramplet/attributesgramplet.py b/gramps/plugins/gramplet/attributesgramplet.py index 31c426f8c..67975d8f6 100644 --- a/gramps/plugins/gramplet/attributesgramplet.py +++ b/gramps/plugins/gramplet/attributesgramplet.py @@ -22,7 +22,7 @@ from gramps.gen.plug import Gramplet from gramps.gen.display.name import displayer as name_displayer from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext class AttributesGramplet(Gramplet): """ diff --git a/gramps/plugins/gramplet/backlinks.py b/gramps/plugins/gramplet/backlinks.py index c0d1a341d..06394cf64 100644 --- a/gramps/plugins/gramplet/backlinks.py +++ b/gramps/plugins/gramplet/backlinks.py @@ -24,7 +24,7 @@ from gramps.gui.listmodel import ListModel, NOSORT from gramps.gen.utils.db import navigation_label from gramps.gen.plug import Gramplet from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext from gi.repository import Gtk class Backlinks(Gramplet): diff --git a/gramps/plugins/gramplet/calendargramplet.py b/gramps/plugins/gramplet/calendargramplet.py index 39013268f..74e26ff04 100644 --- a/gramps/plugins/gramplet/calendargramplet.py +++ b/gramps/plugins/gramplet/calendargramplet.py @@ -25,7 +25,7 @@ #------------------------------------------------------------------------ from gramps.gen.plug import Gramplet from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().sgettext +_ = glocale.translation.sgettext from gramps.gui.plug.quick import run_quick_report_by_name from gramps.gen.lib import Date diff --git a/gramps/plugins/gramplet/children.py b/gramps/plugins/gramplet/children.py index 618bbb6ea..5a3912a40 100644 --- a/gramps/plugins/gramplet/children.py +++ b/gramps/plugins/gramplet/children.py @@ -23,7 +23,7 @@ from gramps.gui.editors import EditPerson from gramps.gui.listmodel import ListModel, NOSORT from gramps.gen.plug import Gramplet from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext from gramps.gen.display.name import displayer as name_displayer from gramps.gen.utils.db import get_birth_or_fallback, get_death_or_fallback from gramps.gen.datehandler import get_date diff --git a/gramps/plugins/gramplet/citations.py b/gramps/plugins/gramplet/citations.py index f63167ca2..15f577b05 100644 --- a/gramps/plugins/gramplet/citations.py +++ b/gramps/plugins/gramplet/citations.py @@ -25,7 +25,7 @@ from gramps.gui.listmodel import ListModel, NOSORT from gramps.gen.plug import Gramplet from gramps.gui.dbguielement import DbGUIElement from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext from gramps.gen.errors import WindowActiveError from gi.repository import Gtk diff --git a/gramps/plugins/gramplet/descendgramplet.py b/gramps/plugins/gramplet/descendgramplet.py index 8ebc69eb4..a97307703 100644 --- a/gramps/plugins/gramplet/descendgramplet.py +++ b/gramps/plugins/gramplet/descendgramplet.py @@ -31,7 +31,7 @@ # #------------------------------------------------------------------------ from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------ # diff --git a/gramps/plugins/gramplet/events.py b/gramps/plugins/gramplet/events.py index 0048277f2..ef10e0ddb 100644 --- a/gramps/plugins/gramplet/events.py +++ b/gramps/plugins/gramplet/events.py @@ -23,7 +23,7 @@ from gramps.gui.editors import EditEvent from gramps.gui.listmodel import ListModel, NOSORT from gramps.gen.plug import Gramplet from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext from gramps.gen.display.name import displayer as name_displayer from gramps.gen.datehandler import get_date from gramps.gen.utils.db import get_birth_or_fallback, get_marriage_or_fallback diff --git a/gramps/plugins/gramplet/fanchartdescgramplet.py b/gramps/plugins/gramplet/fanchartdescgramplet.py index 2465c1cfc..3165a2313 100644 --- a/gramps/plugins/gramplet/fanchartdescgramplet.py +++ b/gramps/plugins/gramplet/fanchartdescgramplet.py @@ -43,7 +43,7 @@ except ImportError: # #------------------------------------------------------------------------- from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext from gramps.gen.plug import Gramplet from gramps.gen.errors import WindowActiveError from gramps.gui.editors import EditPerson diff --git a/gramps/plugins/gramplet/fanchartgramplet.py b/gramps/plugins/gramplet/fanchartgramplet.py index ffa52b756..020429513 100644 --- a/gramps/plugins/gramplet/fanchartgramplet.py +++ b/gramps/plugins/gramplet/fanchartgramplet.py @@ -49,7 +49,7 @@ except ImportError: # #------------------------------------------------------------------------- from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext from gramps.gen.plug import Gramplet from gramps.gen.errors import WindowActiveError from gramps.gui.editors import EditPerson diff --git a/gramps/plugins/gramplet/faqgramplet.py b/gramps/plugins/gramplet/faqgramplet.py index 9f20c2d00..e71f8c9c8 100644 --- a/gramps/plugins/gramplet/faqgramplet.py +++ b/gramps/plugins/gramplet/faqgramplet.py @@ -25,7 +25,7 @@ #------------------------------------------------------------------------ from gramps.gen.plug import Gramplet from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().sgettext +_ = glocale.translation.sgettext from gramps.gen.const import URL_MANUAL_PAGE #------------------------------------------------------------------------ diff --git a/gramps/plugins/gramplet/givennamegramplet.py b/gramps/plugins/gramplet/givennamegramplet.py index 4e5e9bb95..c1f1366ad 100644 --- a/gramps/plugins/gramplet/givennamegramplet.py +++ b/gramps/plugins/gramplet/givennamegramplet.py @@ -22,7 +22,7 @@ # from collections import defaultdict from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext from gramps.gen.plug import Gramplet from gramps.gen.config import config diff --git a/gramps/plugins/gramplet/notes.py b/gramps/plugins/gramplet/notes.py index ae6777fe2..af18bbdac 100644 --- a/gramps/plugins/gramplet/notes.py +++ b/gramps/plugins/gramplet/notes.py @@ -25,7 +25,7 @@ from gramps.gui.widgets.styledtexteditor import StyledTextEditor from gramps.gui.widgets import SimpleButton from gramps.gen.lib import StyledText from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext from gi.repository import Gtk class Notes(Gramplet): diff --git a/gramps/plugins/gramplet/pedigreegramplet.py b/gramps/plugins/gramplet/pedigreegramplet.py index 88550d6da..202a3acb0 100644 --- a/gramps/plugins/gramplet/pedigreegramplet.py +++ b/gramps/plugins/gramplet/pedigreegramplet.py @@ -36,7 +36,7 @@ import locale #------------------------------------------------------------------------ from gramps.gen.plug import Gramplet from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().sgettext +_ = glocale.translation.sgettext from gramps.gen.display.name import displayer as name_displayer from gramps.gen.datehandler import get_date from gramps.gen.lib import EventType @@ -268,13 +268,13 @@ class PedigreeGramplet(Gramplet): self.link(_("Generation %d") % g, 'PersonList', handles, tooltip=_("Double-click to see people in generation %d") % g) percent = locale.format('%.2f', float(count)/2**(g-1) * 100) + percent_sign - self.append_text(glocale.get_translation().ngettext( + self.append_text(glocale.translation.ngettext( " has %(count_person)d of %(max_count_person)d individuals (%(percent)s complete)\n", " has %(count_person)d of %(max_count_person)d individuals (%(percent)s complete)\n", 2**(g-1)) % {'count_person': count, 'max_count_person': 2**(g-1), 'percent': percent}) self.link(_("All generations"), 'PersonList', all, tooltip=_("Double-click to see all generations")) - self.append_text(glocale.get_translation().ngettext( + self.append_text(glocale.translation.ngettext( " have %d individual\n", " have %d individuals\n", len(all)) % len(all)) diff --git a/gramps/plugins/gramplet/persondetails.py b/gramps/plugins/gramplet/persondetails.py index 940119a36..98237b6a9 100644 --- a/gramps/plugins/gramplet/persondetails.py +++ b/gramps/plugins/gramplet/persondetails.py @@ -24,7 +24,7 @@ from gramps.gen.plug import Gramplet from gramps.gui.widgets import Photo from gramps.gen.display.name import displayer as name_displayer from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext from gramps.gen.datehandler import get_date from gramps.gen.utils.file import media_path_full from gi.repository import Gtk diff --git a/gramps/plugins/gramplet/personresidence.py b/gramps/plugins/gramplet/personresidence.py index 704eaa5e7..d140c944d 100644 --- a/gramps/plugins/gramplet/personresidence.py +++ b/gramps/plugins/gramplet/personresidence.py @@ -24,7 +24,7 @@ from gramps.gui.editors import EditEvent from gramps.gui.listmodel import ListModel, NOSORT from gramps.gen.plug import Gramplet from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext from gramps.gen.datehandler import get_date from gramps.gen.errors import WindowActiveError from gi.repository import Gtk diff --git a/gramps/plugins/gramplet/placedetails.py b/gramps/plugins/gramplet/placedetails.py index 13fcebf2b..eec3e7818 100644 --- a/gramps/plugins/gramplet/placedetails.py +++ b/gramps/plugins/gramplet/placedetails.py @@ -22,7 +22,7 @@ from gramps.gen.plug import Gramplet from gramps.gui.widgets import Photo from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext from gramps.gen.utils.place import conv_lat_lon from gramps.gen.utils.file import media_path_full from gi.repository import Gtk diff --git a/gramps/plugins/gramplet/quickviewgramplet.py b/gramps/plugins/gramplet/quickviewgramplet.py index 4ab31e70f..887ab07f7 100644 --- a/gramps/plugins/gramplet/quickviewgramplet.py +++ b/gramps/plugins/gramplet/quickviewgramplet.py @@ -33,7 +33,7 @@ #------------------------------------------------------------------------ from gramps.gen.plug import Gramplet from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().sgettext +_ = glocale.translation.sgettext from gramps.gui.plug.quick import run_quick_report_by_name, get_quick_report_list from gramps.gen.plug import (CATEGORY_QR_PERSON, CATEGORY_QR_FAMILY, CATEGORY_QR_EVENT, CATEGORY_QR_SOURCE, CATEGORY_QR_NOTE, diff --git a/gramps/plugins/gramplet/recordsgramplet.py b/gramps/plugins/gramplet/recordsgramplet.py index 015558958..3acbea367 100644 --- a/gramps/plugins/gramplet/recordsgramplet.py +++ b/gramps/plugins/gramplet/recordsgramplet.py @@ -28,7 +28,7 @@ # #------------------------------------------------------------------------ from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().sgettext +_ = glocale.translation.sgettext #------------------------------------------------------------------------ # diff --git a/gramps/plugins/gramplet/relativegramplet.py b/gramps/plugins/gramplet/relativegramplet.py index 5f785dbd5..5dcce9493 100644 --- a/gramps/plugins/gramplet/relativegramplet.py +++ b/gramps/plugins/gramplet/relativegramplet.py @@ -25,7 +25,7 @@ #------------------------------------------------------------------------ from gramps.gen.plug import Gramplet from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().sgettext +_ = glocale.translation.sgettext from gramps.gen.display.name import displayer as name_displayer #------------------------------------------------------------------------ diff --git a/gramps/plugins/gramplet/repositorydetails.py b/gramps/plugins/gramplet/repositorydetails.py index 9a1257f99..f33fe3d86 100644 --- a/gramps/plugins/gramplet/repositorydetails.py +++ b/gramps/plugins/gramplet/repositorydetails.py @@ -22,7 +22,7 @@ from gramps.gen.lib import UrlType from gramps.gen.plug import Gramplet from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext from gi.repository import Gtk from gi.repository import Pango diff --git a/gramps/plugins/gramplet/sessionloggramplet.py b/gramps/plugins/gramplet/sessionloggramplet.py index 04b05f082..d5aff9201 100644 --- a/gramps/plugins/gramplet/sessionloggramplet.py +++ b/gramps/plugins/gramplet/sessionloggramplet.py @@ -29,7 +29,7 @@ from gramps.gen.lib import Person, Family from gramps.gen.db import PERSON_KEY, FAMILY_KEY, TXNDEL from gramps.gen.plug import Gramplet from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().sgettext +_ = glocale.translation.sgettext from gramps.gen.display.name import displayer as name_displayer from gramps.gen.utils.db import family_name diff --git a/gramps/plugins/gramplet/statsgramplet.py b/gramps/plugins/gramplet/statsgramplet.py index d06362154..06741c9a8 100644 --- a/gramps/plugins/gramplet/statsgramplet.py +++ b/gramps/plugins/gramplet/statsgramplet.py @@ -32,7 +32,7 @@ import posixpath #------------------------------------------------------------------------ from gramps.gen.plug import Gramplet from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().sgettext +_ = glocale.translation.sgettext from gramps.gen.utils.file import media_path_full from gramps.gen.datehandler import get_date from gramps.gen.lib import Person diff --git a/gramps/plugins/gramplet/surnamecloudgramplet.py b/gramps/plugins/gramplet/surnamecloudgramplet.py index 9270be3a2..37a9f693e 100644 --- a/gramps/plugins/gramplet/surnamecloudgramplet.py +++ b/gramps/plugins/gramplet/surnamecloudgramplet.py @@ -27,7 +27,7 @@ from collections import defaultdict #------------------------------------------------------------------------ from gramps.gen.plug import Gramplet from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().sgettext +_ = glocale.translation.sgettext from gramps.gen.config import config #------------------------------------------------------------------------ diff --git a/gramps/plugins/gramplet/todo.py b/gramps/plugins/gramplet/todo.py index c895e94c8..ba763afdc 100644 --- a/gramps/plugins/gramplet/todo.py +++ b/gramps/plugins/gramplet/todo.py @@ -25,7 +25,7 @@ from gramps.gui.widgets import SimpleButton from gramps.gen.lib import StyledText, Note, NoteType from gramps.gen.db import DbTxn from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext from gi.repository import Gtk class ToDo(Gramplet): diff --git a/gramps/plugins/gramplet/todogramplet.py b/gramps/plugins/gramplet/todogramplet.py index b5704edd0..d70b06693 100644 --- a/gramps/plugins/gramplet/todogramplet.py +++ b/gramps/plugins/gramplet/todogramplet.py @@ -29,7 +29,7 @@ from gramps.gen.utils.db import navigation_label from gramps.gen.db import DbTxn from gi.repository import Gtk from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext class ToDoGramplet(Gramplet): """ diff --git a/gramps/plugins/gramplet/topsurnamesgramplet.py b/gramps/plugins/gramplet/topsurnamesgramplet.py index bc50f6b73..de443ad11 100644 --- a/gramps/plugins/gramplet/topsurnamesgramplet.py +++ b/gramps/plugins/gramplet/topsurnamesgramplet.py @@ -27,7 +27,7 @@ from collections import defaultdict #------------------------------------------------------------------------ from gramps.gen.plug import Gramplet from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().sgettext +_ = glocale.translation.sgettext from gramps.gen.config import config #------------------------------------------------------------------------ diff --git a/gramps/plugins/gramplet/welcomegramplet.py b/gramps/plugins/gramplet/welcomegramplet.py index 73657794a..7a74a80e4 100644 --- a/gramps/plugins/gramplet/welcomegramplet.py +++ b/gramps/plugins/gramplet/welcomegramplet.py @@ -36,7 +36,7 @@ from gramps.gui.widgets.styledtexteditor import StyledTextEditor from gramps.gui.widgets import SimpleButton from gramps.gen.lib import StyledText, StyledTextTag, StyledTextTagType from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().sgettext +_ = glocale.translation.sgettext #------------------------------------------------------------------------ # diff --git a/gramps/plugins/gramplet/whatsnext.py b/gramps/plugins/gramplet/whatsnext.py index 1926fd8be..2d9b3903d 100644 --- a/gramps/plugins/gramplet/whatsnext.py +++ b/gramps/plugins/gramplet/whatsnext.py @@ -32,7 +32,7 @@ from gramps.gen.plug import Gramplet from gramps.gen.display.name import displayer as name_displayer from gramps.gen.plug.report import utils as ReportUtils from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().sgettext +_ = glocale.translation.sgettext #------------------------------------------------------------------------ # diff --git a/gramps/plugins/graph/gvfamilylines.py b/gramps/plugins/graph/gvfamilylines.py index 04c2e95c4..f7036d074 100644 --- a/gramps/plugins/graph/gvfamilylines.py +++ b/gramps/plugins/graph/gvfamilylines.py @@ -37,7 +37,7 @@ from __future__ import unicode_literals # #------------------------------------------------------------------------ from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext from functools import partial #------------------------------------------------------------------------ diff --git a/gramps/plugins/graph/gvhourglass.py b/gramps/plugins/graph/gvhourglass.py index 304a585f4..d2fbc29d9 100644 --- a/gramps/plugins/graph/gvhourglass.py +++ b/gramps/plugins/graph/gvhourglass.py @@ -32,7 +32,7 @@ Generate an hourglass graph using the GraphViz generator. # #------------------------------------------------------------------------ from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------ # diff --git a/gramps/plugins/graph/gvrelgraph.py b/gramps/plugins/graph/gvrelgraph.py index 0bbade82b..86c9d0fe4 100644 --- a/gramps/plugins/graph/gvrelgraph.py +++ b/gramps/plugins/graph/gvrelgraph.py @@ -40,7 +40,7 @@ Create a relationship graph using Graphviz # #------------------------------------------------------------------------ from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().sgettext +_ = glocale.translation.sgettext from functools import partial #------------------------------------------------------------------------ diff --git a/gramps/plugins/importer/importcsv.py b/gramps/plugins/importer/importcsv.py index 1765edd15..4932e19c2 100644 --- a/gramps/plugins/importer/importcsv.py +++ b/gramps/plugins/importer/importcsv.py @@ -49,7 +49,7 @@ LOG = logging.getLogger(".ImportCSV") # #------------------------------------------------------------------------- from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().sgettext +_ = glocale.translation.sgettext from gramps.gen.lib import ChildRef, Citation, Event, EventRef, EventType, Family, FamilyRelType, Name, NameType, Note, NoteType, Person, Place, Source, Surname, Tag from gramps.gen.db import DbTxn from gramps.gen.plug.utils import OpenFileOrStdin @@ -338,7 +338,7 @@ class CSVParser(object): self.db.enable_signals() self.db.request_rebuild() tym = time.time() - tym - msg = glocale.get_translation().ngettext('Import Complete: %d second', + msg = glocale.translation.ngettext('Import Complete: %d second', 'Import Complete: %d seconds', tym ) % tym LOG.debug(msg) LOG.debug("New Families: %d" % self.fam_count) diff --git a/gramps/plugins/importer/importgedcom.py b/gramps/plugins/importer/importgedcom.py index f9dcc5e7c..2b15d0402 100644 --- a/gramps/plugins/importer/importgedcom.py +++ b/gramps/plugins/importer/importgedcom.py @@ -44,7 +44,7 @@ LOG = logging.getLogger(".GedcomImport") # #------------------------------------------------------------------------ from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext from gramps.gen.errors import DbError, GedcomError from gramps.gui.glade import Glade from gramps.plugins.lib.libmixin import DbMixin diff --git a/gramps/plugins/importer/importgeneweb.py b/gramps/plugins/importer/importgeneweb.py index 78b9ebf36..804730680 100644 --- a/gramps/plugins/importer/importgeneweb.py +++ b/gramps/plugins/importer/importgeneweb.py @@ -34,7 +34,7 @@ import re import time import sys from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------ # @@ -187,7 +187,7 @@ class GeneWebParser(object): self.errmsg(str(err)) t = time.time() - t - msg = glocale.get_translation().ngettext('Import Complete: %d second','Import Complete: %d seconds', t ) % t + msg = glocale.translation.ngettext('Import Complete: %d second','Import Complete: %d seconds', t ) % t self.db.enable_signals() self.db.request_rebuild() diff --git a/gramps/plugins/importer/importgpkg.py b/gramps/plugins/importer/importgpkg.py index 6e250a5ef..16fb221ef 100644 --- a/gramps/plugins/importer/importgpkg.py +++ b/gramps/plugins/importer/importgpkg.py @@ -32,7 +32,7 @@ import os import tarfile from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------ # diff --git a/gramps/plugins/importer/importgrdb.py b/gramps/plugins/importer/importgrdb.py index c000194ed..d8eac19cb 100644 --- a/gramps/plugins/importer/importgrdb.py +++ b/gramps/plugins/importer/importgrdb.py @@ -36,7 +36,7 @@ LOG = logging.getLogger(".Db") # #------------------------------------------------------------------------- from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/plugins/importer/importprogen.py b/gramps/plugins/importer/importprogen.py index e49e13a09..7fe6df77b 100644 --- a/gramps/plugins/importer/importprogen.py +++ b/gramps/plugins/importer/importprogen.py @@ -48,7 +48,7 @@ log = logging.getLogger('.ImportProGen') # #------------------------------------------------------------------------- from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext from gramps.gen.utils.id import create_id from gramps.gui.utils import ProgressMeter from gramps.gen.lib import (Attribute, AttributeType, ChildRef, Date, Event, diff --git a/gramps/plugins/importer/importvcard.py b/gramps/plugins/importer/importvcard.py index b11c7be97..bc7b54b2d 100644 --- a/gramps/plugins/importer/importvcard.py +++ b/gramps/plugins/importer/importvcard.py @@ -33,7 +33,7 @@ import sys import re import time from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------ # @@ -228,7 +228,7 @@ class VCardParser(object): self.database.enable_signals() self.database.request_rebuild() tym = time.time() - tym - msg = glocale.get_translation().ngettext('Import Complete: %d second', + msg = glocale.translation.ngettext('Import Complete: %d second', 'Import Complete: %d seconds', tym ) % tym LOG.debug(msg) diff --git a/gramps/plugins/importer/importxml.py b/gramps/plugins/importer/importxml.py index 2433dd0a2..2c997cdae 100644 --- a/gramps/plugins/importer/importxml.py +++ b/gramps/plugins/importer/importxml.py @@ -34,7 +34,7 @@ import sys import time from xml.parsers.expat import ExpatError, ParserCreate from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext import re import logging import collections diff --git a/gramps/plugins/lib/libcairodoc.py b/gramps/plugins/lib/libcairodoc.py index 813e82883..c949cfeee 100644 --- a/gramps/plugins/lib/libcairodoc.py +++ b/gramps/plugins/lib/libcairodoc.py @@ -38,7 +38,7 @@ from __future__ import division, print_function #------------------------------------------------------------------------ from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext from math import radians import re diff --git a/gramps/plugins/lib/libgedcom.py b/gramps/plugins/lib/libgedcom.py index 89674886c..81bd9f91f 100644 --- a/gramps/plugins/lib/libgedcom.py +++ b/gramps/plugins/lib/libgedcom.py @@ -122,7 +122,7 @@ LOG = logging.getLogger(".libgedcom") # #------------------------------------------------------------------------- from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext from gramps.gen.errors import GedcomError from gramps.gen.const import DATA_DIR from gramps.gen.lib import (Address, Attribute, AttributeType, ChildRef, diff --git a/gramps/plugins/lib/libholiday.py b/gramps/plugins/lib/libholiday.py index 7ec1c52a8..8ff27dfea 100644 --- a/gramps/plugins/lib/libholiday.py +++ b/gramps/plugins/lib/libholiday.py @@ -28,7 +28,7 @@ from __future__ import print_function from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext from xml.parsers import expat from gramps.gen.lib.calendar import (gregorian_ymd, hebrew_sdn) import datetime diff --git a/gramps/plugins/lib/libhtmlconst.py b/gramps/plugins/lib/libhtmlconst.py index de1bc798d..7fd2342f1 100644 --- a/gramps/plugins/lib/libhtmlconst.py +++ b/gramps/plugins/lib/libhtmlconst.py @@ -33,7 +33,7 @@ General constants used in different html enabled plugins """ from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------ # diff --git a/gramps/plugins/lib/libmetadata.py b/gramps/plugins/lib/libmetadata.py index d3f82edc7..c028a6a7f 100644 --- a/gramps/plugins/lib/libmetadata.py +++ b/gramps/plugins/lib/libmetadata.py @@ -37,7 +37,7 @@ from gi.repository import GExiv2 from gramps.gui.listmodel import ListModel from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext from gramps.gen.utils.place import conv_lat_lon from fractions import Fraction from gramps.gen.lib import Date diff --git a/gramps/plugins/lib/libnarrate.py b/gramps/plugins/lib/libnarrate.py index 9e3afeeb2..cb6a57526 100644 --- a/gramps/plugins/lib/libnarrate.py +++ b/gramps/plugins/lib/libnarrate.py @@ -73,7 +73,7 @@ def _get_empty_endnote_numbers(obj): # avoid normal translation! ##from gramps.gen.const import GRAMPS_LOCALE as glocale -##_ = glocale.get_translation().gettext +##_ = glocale.translation.gettext def _(message): return message #------------------------------------------------------------------------ diff --git a/gramps/plugins/lib/libpersonview.py b/gramps/plugins/lib/libpersonview.py index 03c89756f..b38c3b0c4 100644 --- a/gramps/plugins/lib/libpersonview.py +++ b/gramps/plugins/lib/libpersonview.py @@ -68,7 +68,7 @@ from gramps.gen.plug import CATEGORY_QR_PERSON # #------------------------------------------------------------------------- from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().sgettext +_ = glocale.translation.sgettext #------------------------------------------------------------------------- # diff --git a/gramps/plugins/lib/libplaceview.py b/gramps/plugins/lib/libplaceview.py index 7e1c86ead..d6d6fb95c 100644 --- a/gramps/plugins/lib/libplaceview.py +++ b/gramps/plugins/lib/libplaceview.py @@ -66,7 +66,7 @@ from gramps.gen.plug import CATEGORY_QR_PLACE # #------------------------------------------------------------------------- from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- diff --git a/gramps/plugins/lib/librecords.py b/gramps/plugins/lib/librecords.py index fb7347ed5..a19388242 100644 --- a/gramps/plugins/lib/librecords.py +++ b/gramps/plugins/lib/librecords.py @@ -29,7 +29,7 @@ #------------------------------------------------------------------------ import datetime from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().sgettext +_ = glocale.translation.sgettext #------------------------------------------------------------------------ # diff --git a/gramps/plugins/lib/libtreebase.py b/gramps/plugins/lib/libtreebase.py index ce263ca2c..783ad7419 100644 --- a/gramps/plugins/lib/libtreebase.py +++ b/gramps/plugins/lib/libtreebase.py @@ -35,7 +35,7 @@ from __future__ import division # #------------------------------------------------------------------------ from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().sgettext +_ = glocale.translation.sgettext from gramps.gen.plug.report import utils as ReportUtils from gramps.gen.display.name import displayer as name_displayer from gramps.plugins.lib.libsubstkeyword import SubstKeywords diff --git a/gramps/plugins/lib/maps/geography.py b/gramps/plugins/lib/maps/geography.py index c192908a5..5d0c2e5cd 100644 --- a/gramps/plugins/lib/maps/geography.py +++ b/gramps/plugins/lib/maps/geography.py @@ -28,7 +28,7 @@ # #------------------------------------------------------------------------- from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().sgettext +_ = glocale.translation.sgettext import os import sys import re diff --git a/gramps/plugins/lib/maps/osmgps.py b/gramps/plugins/lib/maps/osmgps.py index 88be59fe9..5632c47ca 100644 --- a/gramps/plugins/lib/maps/osmgps.py +++ b/gramps/plugins/lib/maps/osmgps.py @@ -61,7 +61,7 @@ from .markerlayer import MarkerLayer from .datelayer import DateLayer from .messagelayer import MessageLayer from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().sgettext +_ = glocale.translation.sgettext from gramps.gen.config import config from gramps.gui.dialog import ErrorDialog diff --git a/gramps/plugins/lib/maps/placeselection.py b/gramps/plugins/lib/maps/placeselection.py index ce09a46a9..4efadce91 100644 --- a/gramps/plugins/lib/maps/placeselection.py +++ b/gramps/plugins/lib/maps/placeselection.py @@ -28,7 +28,7 @@ # #------------------------------------------------------------------------- from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().sgettext +_ = glocale.translation.sgettext import re from gi.repository import GObject import math diff --git a/gramps/plugins/mapservices/eniroswedenmap.py b/gramps/plugins/mapservices/eniroswedenmap.py index 260a2c896..e3a540c18 100644 --- a/gramps/plugins/mapservices/eniroswedenmap.py +++ b/gramps/plugins/mapservices/eniroswedenmap.py @@ -32,7 +32,7 @@ Eniro Sweden (Denmark) map service plugin. Opens place in kartor.eniro.se # #------------------------------------------------------------------------ from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------ # diff --git a/gramps/plugins/mapservices/googlemap.py b/gramps/plugins/mapservices/googlemap.py index dd5f96366..af17a518c 100644 --- a/gramps/plugins/mapservices/googlemap.py +++ b/gramps/plugins/mapservices/googlemap.py @@ -29,7 +29,7 @@ Google Maps map service plugin. Open place in maps.google.com # #------------------------------------------------------------------------ from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------ # diff --git a/gramps/plugins/mapservices/openstreetmap.py b/gramps/plugins/mapservices/openstreetmap.py index e33554a34..6c8557893 100644 --- a/gramps/plugins/mapservices/openstreetmap.py +++ b/gramps/plugins/mapservices/openstreetmap.py @@ -29,7 +29,7 @@ OpenStreetMap map service plugin. Open place in openstreetmap.org # #------------------------------------------------------------------------ from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------ # diff --git a/gramps/plugins/quickview/ageondate.py b/gramps/plugins/quickview/ageondate.py index e17e16e71..8a24824cf 100644 --- a/gramps/plugins/quickview/ageondate.py +++ b/gramps/plugins/quickview/ageondate.py @@ -31,7 +31,7 @@ from gramps.gen.simple import SimpleAccess, SimpleDoc from gramps.gui.plug.quick import QuickTable from gramps.gen.utils.alive import probably_alive from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext from gramps.gen.datehandler import displayer from gramps.gen.config import config diff --git a/gramps/plugins/quickview/all_events.py b/gramps/plugins/quickview/all_events.py index d2d7934d9..9d5dee0ad 100644 --- a/gramps/plugins/quickview/all_events.py +++ b/gramps/plugins/quickview/all_events.py @@ -29,7 +29,7 @@ Display a person's events, both personal and family from gramps.gen.simple import SimpleAccess, by_date, SimpleDoc from gramps.gui.plug.quick import QuickTable from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext def run(database, document, person): """ diff --git a/gramps/plugins/quickview/all_relations.py b/gramps/plugins/quickview/all_relations.py index 495361fce..200c8a624 100644 --- a/gramps/plugins/quickview/all_relations.py +++ b/gramps/plugins/quickview/all_relations.py @@ -33,7 +33,7 @@ Display a person's relations to the home person from gramps.gen.simple import SimpleAccess, SimpleDoc from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext from gramps.gen.relationship import get_relationship_calculator # define the formatting string once as a constant. Since this is reused diff --git a/gramps/plugins/quickview/attributematch.py b/gramps/plugins/quickview/attributematch.py index a485a3b57..700900489 100644 --- a/gramps/plugins/quickview/attributematch.py +++ b/gramps/plugins/quickview/attributematch.py @@ -25,7 +25,7 @@ from gramps.gen.simple import SimpleAccess, SimpleDoc from gramps.gui.plug.quick import QuickTable from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext def run(database, document, attribute, value=None): sdb = SimpleAccess(database) diff --git a/gramps/plugins/quickview/filterbyname.py b/gramps/plugins/quickview/filterbyname.py index e52a17ce9..0e9785140 100644 --- a/gramps/plugins/quickview/filterbyname.py +++ b/gramps/plugins/quickview/filterbyname.py @@ -37,7 +37,7 @@ from gramps.gen.datehandler import get_date import posixpath from collections import defaultdict from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().sgettext +_ = glocale.translation.sgettext fname_map = {'all': _('Filtering_on|all'), 'Inverse Person': _('Filtering_on|Inverse Person'), @@ -392,7 +392,7 @@ def run(database, document, filter_name, *args, **kwargs): else: raise AttributeError("invalid filter name: '%s'" % filter_name) - sdoc.paragraph(glocale.get_translation().ngettext("Filter matched %d record." + sdoc.paragraph(glocale.translation.ngettext("Filter matched %d record." , "Filter matched %d records.", matches) % matches) sdoc.paragraph("") diff --git a/gramps/plugins/quickview/lineage.py b/gramps/plugins/quickview/lineage.py index dae274117..fa85e735d 100644 --- a/gramps/plugins/quickview/lineage.py +++ b/gramps/plugins/quickview/lineage.py @@ -36,7 +36,7 @@ from gramps.gen.lib import ChildRefType, Person from gramps.gen.simple import SimpleAccess, SimpleDoc from gramps.gui.plug.quick import QuickTable from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext __FMT = "%-30s\t%-12s\t%-12s" __FMT_REM = " %s: %s" diff --git a/gramps/plugins/quickview/linkreferences.py b/gramps/plugins/quickview/linkreferences.py index fe458ef02..3c27e4bdb 100644 --- a/gramps/plugins/quickview/linkreferences.py +++ b/gramps/plugins/quickview/linkreferences.py @@ -29,7 +29,7 @@ from gramps.gen.simple import SimpleAccess, SimpleDoc from gramps.gui.plug.quick import QuickTable from gramps.gen.lib import StyledTextTagType from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext def run(database, document, obj): """ diff --git a/gramps/plugins/quickview/onthisday.py b/gramps/plugins/quickview/onthisday.py index 94dbfe21d..d87d1c855 100644 --- a/gramps/plugins/quickview/onthisday.py +++ b/gramps/plugins/quickview/onthisday.py @@ -29,7 +29,7 @@ Display all events on a particular day. from gramps.gen.simple import SimpleAccess, SimpleDoc, SimpleTable from gramps.gui.plug.quick import QuickTable from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext from gramps.gen.lib import Date def get_ref(db, objclass, handle): diff --git a/gramps/plugins/quickview/references.py b/gramps/plugins/quickview/references.py index fb9752c01..d324f6e66 100644 --- a/gramps/plugins/quickview/references.py +++ b/gramps/plugins/quickview/references.py @@ -30,7 +30,7 @@ Display references for any object from gramps.gen.simple import SimpleAccess, SimpleDoc from gramps.gui.plug.quick import QuickTable from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext def get_ref(db, objclass, handle): """ diff --git a/gramps/plugins/quickview/reporef.py b/gramps/plugins/quickview/reporef.py index 77f22d3ce..d0cc3210f 100755 --- a/gramps/plugins/quickview/reporef.py +++ b/gramps/plugins/quickview/reporef.py @@ -37,7 +37,7 @@ Display RepoRef for sources related to active repository from gramps.gen.simple import SimpleAccess, SimpleDoc from gramps.gui.plug.quick import QuickTable from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext def run(database, document, repo): """ diff --git a/gramps/plugins/quickview/samesurnames.py b/gramps/plugins/quickview/samesurnames.py index f2bb963bb..7f9b90745 100644 --- a/gramps/plugins/quickview/samesurnames.py +++ b/gramps/plugins/quickview/samesurnames.py @@ -30,7 +30,7 @@ Display a people who have a person's same surname or given name. from gramps.gen.simple import SimpleAccess, SimpleDoc from gramps.gui.plug.quick import QuickTable from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext from gramps.gen.lib import Person from gramps.gen.filters.rules import Rule from gramps.gen.filters import GenericFilterFactory @@ -124,7 +124,7 @@ def run(database, document, person): matches += 1 document.has_data = matches > 0 - sdoc.paragraph(glocale.get_translation().ngettext("There is %d person with a matching name, or alternate name.\n" + sdoc.paragraph(glocale.translation.ngettext("There is %d person with a matching name, or alternate name.\n" , "There are %d people with a matching name, or alternate name.\n" , matches) % matches) @@ -166,7 +166,7 @@ def run_given(database, document, person): matches += 1 document.has_data = matches > 0 - sdoc.paragraph(glocale.get_translation().ngettext("There is %d person with a matching name, or alternate name.\n" + sdoc.paragraph(glocale.translation.ngettext("There is %d person with a matching name, or alternate name.\n" , "There are %d people with a matching name, or alternate name.\n" , matches) % matches) diff --git a/gramps/plugins/quickview/siblings.py b/gramps/plugins/quickview/siblings.py index d0ba1cab6..18dd46116 100644 --- a/gramps/plugins/quickview/siblings.py +++ b/gramps/plugins/quickview/siblings.py @@ -30,7 +30,7 @@ from gramps.gen.simple import SimpleAccess, SimpleDoc from gramps.gui.plug.quick import QuickTable from gramps.gen.relationship import get_relationship_calculator from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext def run(database, document, person): """ diff --git a/gramps/plugins/sidebar/dropdownsidebar.py b/gramps/plugins/sidebar/dropdownsidebar.py index 74d1204f4..ab0437873 100644 --- a/gramps/plugins/sidebar/dropdownsidebar.py +++ b/gramps/plugins/sidebar/dropdownsidebar.py @@ -38,7 +38,7 @@ from gi.repository import Gtk from gramps.gen.config import config from gramps.gui.basesidebar import BaseSidebar from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # # DropdownSidebar class diff --git a/gramps/plugins/textreport/alphabeticalindex.py b/gramps/plugins/textreport/alphabeticalindex.py index 328c4271c..30a204fc7 100644 --- a/gramps/plugins/textreport/alphabeticalindex.py +++ b/gramps/plugins/textreport/alphabeticalindex.py @@ -25,7 +25,7 @@ # #------------------------------------------------------------------------ from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().sgettext +_ = glocale.translation.sgettext #------------------------------------------------------------------------ # diff --git a/gramps/plugins/textreport/ancestorreport.py b/gramps/plugins/textreport/ancestorreport.py index ae0116af9..fe9bdf3ea 100644 --- a/gramps/plugins/textreport/ancestorreport.py +++ b/gramps/plugins/textreport/ancestorreport.py @@ -39,7 +39,7 @@ import copy # #------------------------------------------------------------------------ from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext from gramps.gen.display.name import displayer as global_name_display from gramps.gen.errors import ReportError from gramps.gen.lib import ChildRefType diff --git a/gramps/plugins/textreport/birthdayreport.py b/gramps/plugins/textreport/birthdayreport.py index b19196d77..b64d8965a 100644 --- a/gramps/plugins/textreport/birthdayreport.py +++ b/gramps/plugins/textreport/birthdayreport.py @@ -30,8 +30,8 @@ #------------------------------------------------------------------------ import copy from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext -ngettext = glocale.get_translation().ngettext +_ = glocale.translation.gettext +ngettext = glocale.translation.ngettext import datetime, time #------------------------------------------------------------------------ diff --git a/gramps/plugins/textreport/custombooktext.py b/gramps/plugins/textreport/custombooktext.py index c6539ba8c..1df27f8da 100644 --- a/gramps/plugins/textreport/custombooktext.py +++ b/gramps/plugins/textreport/custombooktext.py @@ -31,7 +31,7 @@ # #------------------------------------------------------------------------ from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------ # diff --git a/gramps/plugins/textreport/descendreport.py b/gramps/plugins/textreport/descendreport.py index 956a5acb8..0895b7480 100644 --- a/gramps/plugins/textreport/descendreport.py +++ b/gramps/plugins/textreport/descendreport.py @@ -36,7 +36,7 @@ Reports/Text Reports/Descendant Report. #------------------------------------------------------------------------ import copy from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------ # diff --git a/gramps/plugins/textreport/detancestralreport.py b/gramps/plugins/textreport/detancestralreport.py index d674839e6..87fd1f129 100644 --- a/gramps/plugins/textreport/detancestralreport.py +++ b/gramps/plugins/textreport/detancestralreport.py @@ -42,7 +42,7 @@ import copy # #------------------------------------------------------------------------ from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext from gramps.gen.display.name import displayer as global_name_display from gramps.gen.errors import ReportError from gramps.gen.lib import EventType, FamilyRelType, Person, NoteType diff --git a/gramps/plugins/textreport/detdescendantreport.py b/gramps/plugins/textreport/detdescendantreport.py index 378c5de95..e89b60f90 100644 --- a/gramps/plugins/textreport/detdescendantreport.py +++ b/gramps/plugins/textreport/detdescendantreport.py @@ -45,7 +45,7 @@ from functools import partial # #------------------------------------------------------------------------ from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext from gramps.gen.const import GRAMPS_LOCALE as glocale from gramps.gen.display.name import displayer as global_name_display from gramps.gen.errors import ReportError diff --git a/gramps/plugins/textreport/endoflinereport.py b/gramps/plugins/textreport/endoflinereport.py index 4c3f1583a..78e0c5ed9 100644 --- a/gramps/plugins/textreport/endoflinereport.py +++ b/gramps/plugins/textreport/endoflinereport.py @@ -30,7 +30,7 @@ #------------------------------------------------------------------------ import copy from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------ # diff --git a/gramps/plugins/textreport/familygroup.py b/gramps/plugins/textreport/familygroup.py index 5d6bb0e73..13b15210b 100644 --- a/gramps/plugins/textreport/familygroup.py +++ b/gramps/plugins/textreport/familygroup.py @@ -47,7 +47,7 @@ from gramps.gen.plug.docgen import (IndexMark, FontStyle, ParagraphStyle, TableS INDEX_TYPE_TOC, PARA_ALIGN_CENTER) from gramps.gen.datehandler import get_date from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().sgettext +_ = glocale.translation.sgettext from gramps.gen.display.name import displayer as global_name_display #------------------------------------------------------------------------ diff --git a/gramps/plugins/textreport/indivcomplete.py b/gramps/plugins/textreport/indivcomplete.py index 7734b6786..5d57b551b 100644 --- a/gramps/plugins/textreport/indivcomplete.py +++ b/gramps/plugins/textreport/indivcomplete.py @@ -34,7 +34,7 @@ import os import copy from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext from collections import defaultdict #------------------------------------------------------------------------ diff --git a/gramps/plugins/textreport/kinshipreport.py b/gramps/plugins/textreport/kinshipreport.py index 947a71322..c794639f9 100644 --- a/gramps/plugins/textreport/kinshipreport.py +++ b/gramps/plugins/textreport/kinshipreport.py @@ -32,7 +32,7 @@ #------------------------------------------------------------------------ import copy from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------ # diff --git a/gramps/plugins/textreport/numberofancestorsreport.py b/gramps/plugins/textreport/numberofancestorsreport.py index dc2a07b57..b71242afd 100644 --- a/gramps/plugins/textreport/numberofancestorsreport.py +++ b/gramps/plugins/textreport/numberofancestorsreport.py @@ -33,7 +33,7 @@ #------------------------------------------------------------------------ import copy from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext import locale import math @@ -120,7 +120,7 @@ class NumberOfAncestorsReport(Report): # TC # English return something like: # Generation 3 has 2 individuals. (50.00%) - text = glocale.get_translation().ngettext( + text = glocale.translation.ngettext( "Generation %(generation)d has %(count)d individual. %(percent)s", "Generation %(generation)d has %(count)d individuals. %(percent)s", thisgensize) % {'generation': gen, 'count': thisgensize, 'percent': percent} diff --git a/gramps/plugins/textreport/placereport.py b/gramps/plugins/textreport/placereport.py index cdddfec8e..8f21d29a8 100644 --- a/gramps/plugins/textreport/placereport.py +++ b/gramps/plugins/textreport/placereport.py @@ -30,7 +30,7 @@ # #------------------------------------------------------------------------ from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------ # diff --git a/gramps/plugins/textreport/recordsreport.py b/gramps/plugins/textreport/recordsreport.py index 558fd3e51..9c64895c0 100644 --- a/gramps/plugins/textreport/recordsreport.py +++ b/gramps/plugins/textreport/recordsreport.py @@ -28,7 +28,7 @@ # #------------------------------------------------------------------------ from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().sgettext +_ = glocale.translation.sgettext #------------------------------------------------------------------------ # diff --git a/gramps/plugins/textreport/simplebooktitle.py b/gramps/plugins/textreport/simplebooktitle.py index 192ac6066..9a8fe080a 100644 --- a/gramps/plugins/textreport/simplebooktitle.py +++ b/gramps/plugins/textreport/simplebooktitle.py @@ -29,7 +29,7 @@ #------------------------------------------------------------------------ import time from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().sgettext +_ = glocale.translation.sgettext import os #------------------------------------------------------------------------ diff --git a/gramps/plugins/textreport/summary.py b/gramps/plugins/textreport/summary.py index 72c7cc2dc..d05ffa735 100644 --- a/gramps/plugins/textreport/summary.py +++ b/gramps/plugins/textreport/summary.py @@ -33,7 +33,7 @@ Reports/Text Reports/Database Summary Report. #------------------------------------------------------------------------ import posixpath from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------ # diff --git a/gramps/plugins/textreport/tableofcontents.py b/gramps/plugins/textreport/tableofcontents.py index a897bd63c..0a589c4f3 100644 --- a/gramps/plugins/textreport/tableofcontents.py +++ b/gramps/plugins/textreport/tableofcontents.py @@ -25,7 +25,7 @@ # #------------------------------------------------------------------------ from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().sgettext +_ = glocale.translation.sgettext #------------------------------------------------------------------------ # diff --git a/gramps/plugins/textreport/tagreport.py b/gramps/plugins/textreport/tagreport.py index 858fe2cc4..0b11ad08a 100644 --- a/gramps/plugins/textreport/tagreport.py +++ b/gramps/plugins/textreport/tagreport.py @@ -31,7 +31,7 @@ # #------------------------------------------------------------------------ from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------ # diff --git a/gramps/plugins/tool/changenames.py b/gramps/plugins/tool/changenames.py index 40c7ed4df..c776b80e2 100644 --- a/gramps/plugins/tool/changenames.py +++ b/gramps/plugins/tool/changenames.py @@ -46,7 +46,7 @@ from gramps.gui.managedwindow import ManagedWindow from gramps.gui.dialog import OkDialog from gramps.gui.plug import tool from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().sgettext +_ = glocale.translation.sgettext from gramps.gui.glade import Glade #------------------------------------------------------------------------- diff --git a/gramps/plugins/tool/changetypes.py b/gramps/plugins/tool/changetypes.py index 20365749e..ac827253b 100644 --- a/gramps/plugins/tool/changetypes.py +++ b/gramps/plugins/tool/changetypes.py @@ -38,7 +38,7 @@ from __future__ import print_function #------------------------------------------------------------------------ from gramps.gui.utils import ProgressMeter from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext from gramps.gui.managedwindow import ManagedWindow from gramps.gui.autocomp import fill_combo from gramps.gen.lib import EventType @@ -133,7 +133,7 @@ class ChangeTypes(tool.BatchTool, ManagedWindow): if modified == 0: msg = _("No event record was modified.") else: - msg = glocale.get_translation().ngettext("%d event record was modified." + msg = glocale.translation.ngettext("%d event record was modified." , "%d event records were modified.", modified) % modified if cli: diff --git a/gramps/plugins/tool/check.py b/gramps/plugins/tool/check.py index f68376eb4..6667f34e1 100644 --- a/gramps/plugins/tool/check.py +++ b/gramps/plugins/tool/check.py @@ -79,8 +79,8 @@ from gramps.gen.display.name import displayer as _nd from gramps.gui.glade import Glade from gramps.gen.constfunc import UNITYPE, cuni, handle2internal from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext -ngettext = glocale.get_translation().ngettext +_ = glocale.translation.gettext +ngettext = glocale.translation.ngettext # table for handling control chars in notes. # All except 09, 0A, 0D are replaced with space. diff --git a/gramps/plugins/tool/dateparserdisplaytest.py b/gramps/plugins/tool/dateparserdisplaytest.py index 53710b7ec..1244e9757 100644 --- a/gramps/plugins/tool/dateparserdisplaytest.py +++ b/gramps/plugins/tool/dateparserdisplaytest.py @@ -37,7 +37,7 @@ Tools/Debug/Check Localized Date Parser and Displayer import traceback import sys from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/plugins/tool/desbrowser.py b/gramps/plugins/tool/desbrowser.py index c3f7326f6..0b543ec01 100644 --- a/gramps/plugins/tool/desbrowser.py +++ b/gramps/plugins/tool/desbrowser.py @@ -43,7 +43,7 @@ from gramps.gui.plug import tool from gramps.gui.display import display_help from gramps.gui.managedwindow import ManagedWindow from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().sgettext +_ = glocale.translation.sgettext from gramps.gui.glade import Glade from gramps.gui.editors import EditPerson diff --git a/gramps/plugins/tool/dumpgenderstats.py b/gramps/plugins/tool/dumpgenderstats.py index d91f34ea0..010186d14 100644 --- a/gramps/plugins/tool/dumpgenderstats.py +++ b/gramps/plugins/tool/dumpgenderstats.py @@ -29,7 +29,7 @@ from __future__ import print_function from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext from gi.repository import Gtk from gramps.gui.listmodel import ListModel, INTEGER from gramps.gui.managedwindow import ManagedWindow diff --git a/gramps/plugins/tool/eval.py b/gramps/plugins/tool/eval.py index b94c866b9..e4cfbfc2e 100644 --- a/gramps/plugins/tool/eval.py +++ b/gramps/plugins/tool/eval.py @@ -36,7 +36,7 @@ if sys.version_info[0] < 3: else: from io import StringIO from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext import traceback #------------------------------------------------------------------------ diff --git a/gramps/plugins/tool/eventcmp.py b/gramps/plugins/tool/eventcmp.py index 142e9f306..6c3d1e5b9 100644 --- a/gramps/plugins/tool/eventcmp.py +++ b/gramps/plugins/tool/eventcmp.py @@ -59,7 +59,7 @@ from gramps.gen.plug.report import utils as ReportUtils from gramps.gui.display import display_help from gramps.gui.managedwindow import ManagedWindow from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().sgettext +_ = glocale.translation.sgettext from gramps.gui.glade import Glade from gramps.gui.editors import FilterEditor diff --git a/gramps/plugins/tool/eventnames.py b/gramps/plugins/tool/eventnames.py index 26dd615e6..9e181d9af 100644 --- a/gramps/plugins/tool/eventnames.py +++ b/gramps/plugins/tool/eventnames.py @@ -30,7 +30,7 @@ # #------------------------------------------------------------------------- from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- @@ -112,7 +112,7 @@ class EventNames(tool.BatchTool, ManagedWindow): if self.change == True: OkDialog(_('Modifications made'), - glocale.get_translation().ngettext("%s event description has been added", + glocale.translation.ngettext("%s event description has been added", "%s event descriptions have been added", counter) % counter) else: OkDialog(_('No modifications made'), diff --git a/gramps/plugins/tool/extractcity.py b/gramps/plugins/tool/extractcity.py index 5cb5906d6..603cf4bb3 100644 --- a/gramps/plugins/tool/extractcity.py +++ b/gramps/plugins/tool/extractcity.py @@ -33,7 +33,7 @@ from __future__ import unicode_literals #------------------------------------------------------------------------- import re from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/plugins/tool/finddupes.py b/gramps/plugins/tool/finddupes.py index 0f6655e98..b2771a5c5 100644 --- a/gramps/plugins/tool/finddupes.py +++ b/gramps/plugins/tool/finddupes.py @@ -50,7 +50,7 @@ from gramps.gui.display import display_help from gramps.gui.managedwindow import ManagedWindow from gramps.gui.dialog import RunDatabaseRepair from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().sgettext +_ = glocale.translation.sgettext from gramps.gui.glade import Glade #------------------------------------------------------------------------- diff --git a/gramps/plugins/tool/leak.py b/gramps/plugins/tool/leak.py index f5c4fd611..648c108eb 100644 --- a/gramps/plugins/tool/leak.py +++ b/gramps/plugins/tool/leak.py @@ -33,7 +33,7 @@ Show uncollected objects in a window. #------------------------------------------------------------------------ import sys from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext from gramps.gen.config import config if config.get('preferences.use-bsddb3') or sys.version_info[0] >= 3: from bsddb3.db import DBError diff --git a/gramps/plugins/tool/mediamanager.py b/gramps/plugins/tool/mediamanager.py index e41d42e92..4a57c18d2 100644 --- a/gramps/plugins/tool/mediamanager.py +++ b/gramps/plugins/tool/mediamanager.py @@ -59,7 +59,7 @@ from gramps.gen.updatecallback import UpdateCallback from gramps.gui.plug import tool from gramps.gen.utils.file import media_path_full, relative_path, media_path from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().sgettext +_ = glocale.translation.sgettext from gramps.gen.mime import get_type, is_image_type from gramps.gen.constfunc import cuni diff --git a/gramps/plugins/tool/mergecitations.py b/gramps/plugins/tool/mergecitations.py index 855489f69..1badae0c1 100644 --- a/gramps/plugins/tool/mergecitations.py +++ b/gramps/plugins/tool/mergecitations.py @@ -56,7 +56,7 @@ from gramps.gui.display import display_help from gramps.gen.datehandler import get_date from gramps.gui.managedwindow import ManagedWindow from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().sgettext +_ = glocale.translation.sgettext from gramps.gui.glade import Glade from gramps.gen.db import DbTxn @@ -226,7 +226,7 @@ class MergeCitations(tool.BatchTool,ManagedWindow): self.progress.close() OkDialog( _("Number of merges done"), - glocale.get_translation().ngettext("%(num)d citation merged", + glocale.translation.ngettext("%(num)d citation merged", "%(num)d citations merged", num_merges) % {'num': num_merges}) self.close(obj) diff --git a/gramps/plugins/tool/notrelated.py b/gramps/plugins/tool/notrelated.py index 18ea718ab..855432ca1 100644 --- a/gramps/plugins/tool/notrelated.py +++ b/gramps/plugins/tool/notrelated.py @@ -46,8 +46,8 @@ from gramps.gui.managedwindow import ManagedWindow from gramps.gui.utils import ProgressMeter from gramps.gui.display import display_help from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().sgettext -ngettext = glocale.get_translation().ngettext +_ = glocale.translation.sgettext +ngettext = glocale.translation.ngettext from gramps.gui.glade import Glade from gramps.gen.lib import Tag from gramps.gen.db import DbTxn diff --git a/gramps/plugins/tool/ownereditor.py b/gramps/plugins/tool/ownereditor.py index 1bfdeb6f2..dfa7f91f8 100644 --- a/gramps/plugins/tool/ownereditor.py +++ b/gramps/plugins/tool/ownereditor.py @@ -45,7 +45,7 @@ from gramps.gui.widgets import MonitoredEntry from gramps.gui.managedwindow import ManagedWindow from gramps.gui.plug import tool from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().sgettext +_ = glocale.translation.sgettext from gramps.gui.glade import Glade from gramps.gui.utils import is_right_click diff --git a/gramps/plugins/tool/patchnames.py b/gramps/plugins/tool/patchnames.py index 073d2ad4b..ba26a6210 100644 --- a/gramps/plugins/tool/patchnames.py +++ b/gramps/plugins/tool/patchnames.py @@ -53,7 +53,7 @@ from gramps.gui.display import display_help from gramps.gen.lib import NameOriginType, Surname from gramps.gen.db import DbTxn from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().sgettext +_ = glocale.translation.sgettext from gramps.gui.glade import Glade #------------------------------------------------------------------------- diff --git a/gramps/plugins/tool/phpgedviewconnector.py b/gramps/plugins/tool/phpgedviewconnector.py index 7010a773a..9cfb261cf 100644 --- a/gramps/plugins/tool/phpgedviewconnector.py +++ b/gramps/plugins/tool/phpgedviewconnector.py @@ -38,7 +38,7 @@ from gi.repository import Gtk import os from tempfile import mkstemp from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext from gramps.gui.glade import Glade import gramps.plugins.lib.libgedcom as libgedcom diff --git a/gramps/plugins/tool/rebuild.py b/gramps/plugins/tool/rebuild.py index b882d04ab..ba79199ab 100644 --- a/gramps/plugins/tool/rebuild.py +++ b/gramps/plugins/tool/rebuild.py @@ -32,7 +32,7 @@ from __future__ import print_function from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------ # diff --git a/gramps/plugins/tool/rebuildgenderstat.py b/gramps/plugins/tool/rebuildgenderstat.py index 0da7143e6..c96645f20 100644 --- a/gramps/plugins/tool/rebuildgenderstat.py +++ b/gramps/plugins/tool/rebuildgenderstat.py @@ -32,7 +32,7 @@ from __future__ import print_function from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------ # diff --git a/gramps/plugins/tool/rebuildrefmap.py b/gramps/plugins/tool/rebuildrefmap.py index 946382cea..ed194d41b 100644 --- a/gramps/plugins/tool/rebuildrefmap.py +++ b/gramps/plugins/tool/rebuildrefmap.py @@ -34,7 +34,7 @@ from __future__ import print_function from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------ # diff --git a/gramps/plugins/tool/relcalc.py b/gramps/plugins/tool/relcalc.py index 64d2f1fa1..ca7fd0716 100644 --- a/gramps/plugins/tool/relcalc.py +++ b/gramps/plugins/tool/relcalc.py @@ -31,7 +31,7 @@ # #------------------------------------------------------------------------- from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/plugins/tool/removeunused.py b/gramps/plugins/tool/removeunused.py index c9b561cd8..08db1f382 100644 --- a/gramps/plugins/tool/removeunused.py +++ b/gramps/plugins/tool/removeunused.py @@ -32,7 +32,7 @@ #------------------------------------------------------------------------- from __future__ import with_statement from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext from gramps.gen.constfunc import handle2internal #------------------------------------------------------------------------ diff --git a/gramps/plugins/tool/reorderids.py b/gramps/plugins/tool/reorderids.py index 8d13a6b50..c61681530 100644 --- a/gramps/plugins/tool/reorderids.py +++ b/gramps/plugins/tool/reorderids.py @@ -36,7 +36,7 @@ from __future__ import print_function import re from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------ # diff --git a/gramps/plugins/tool/sortevents.py b/gramps/plugins/tool/sortevents.py index f4960fdd7..4bc3e8a76 100644 --- a/gramps/plugins/tool/sortevents.py +++ b/gramps/plugins/tool/sortevents.py @@ -29,7 +29,7 @@ # #------------------------------------------------------------------------- from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/plugins/tool/soundgen.py b/gramps/plugins/tool/soundgen.py index 69c722702..e000f6d06 100644 --- a/gramps/plugins/tool/soundgen.py +++ b/gramps/plugins/tool/soundgen.py @@ -35,7 +35,7 @@ from gramps.gui.display import display_help from gramps.gui.managedwindow import ManagedWindow from gramps.gui.autocomp import fill_combo from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().sgettext +_ = glocale.translation.sgettext from gramps.gui.plug import tool from gramps.gui.glade import Glade from gramps.gen.constfunc import cuni diff --git a/gramps/plugins/tool/testcasegenerator.py b/gramps/plugins/tool/testcasegenerator.py index d98385d4d..30b3499cc 100644 --- a/gramps/plugins/tool/testcasegenerator.py +++ b/gramps/plugins/tool/testcasegenerator.py @@ -36,7 +36,7 @@ from __future__ import print_function from random import randint,choice,random from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext import time #------------------------------------------------------------------------- diff --git a/gramps/plugins/tool/verify.py b/gramps/plugins/tool/verify.py index e20ee3eb8..19063155e 100644 --- a/gramps/plugins/tool/verify.py +++ b/gramps/plugins/tool/verify.py @@ -73,7 +73,7 @@ from gramps.gui.managedwindow import ManagedWindow from gramps.gen.updatecallback import UpdateCallback from gramps.gui.plug import tool from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().sgettext +_ = glocale.translation.sgettext from gramps.gui.glade import Glade #------------------------------------------------------------------------- diff --git a/gramps/plugins/view/citationlistview.py b/gramps/plugins/view/citationlistview.py index 807a85172..3acab27d3 100644 --- a/gramps/plugins/view/citationlistview.py +++ b/gramps/plugins/view/citationlistview.py @@ -64,7 +64,7 @@ from gramps.gui.merge import MergeCitation # #------------------------------------------------------------------------- from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- diff --git a/gramps/plugins/view/citationtreeview.py b/gramps/plugins/view/citationtreeview.py index 941fc1a5d..43717959d 100644 --- a/gramps/plugins/view/citationtreeview.py +++ b/gramps/plugins/view/citationtreeview.py @@ -67,7 +67,7 @@ from gramps.gui.merge import MergeCitation, MergeSource # #------------------------------------------------------------------------- from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/plugins/view/dashboardview.py b/gramps/plugins/view/dashboardview.py index 625802e1f..e4b926b14 100644 --- a/gramps/plugins/view/dashboardview.py +++ b/gramps/plugins/view/dashboardview.py @@ -38,7 +38,7 @@ from gi.repository import Gtk #------------------------------------------------------------------------- from gramps.gui.views.pageview import PageView from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext from gramps.gui.widgets.grampletpane import GrampletPane class DashboardView(PageView): diff --git a/gramps/plugins/view/eventview.py b/gramps/plugins/view/eventview.py index 6ca110513..7b23ae264 100644 --- a/gramps/plugins/view/eventview.py +++ b/gramps/plugins/view/eventview.py @@ -31,7 +31,7 @@ Provide the event view. # #------------------------------------------------------------------------- from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext import logging _LOG = logging.getLogger(".plugins.eventview") diff --git a/gramps/plugins/view/familyview.py b/gramps/plugins/view/familyview.py index 8a9ff9ebc..f981bf80d 100644 --- a/gramps/plugins/view/familyview.py +++ b/gramps/plugins/view/familyview.py @@ -31,7 +31,7 @@ Family View. # #------------------------------------------------------------------------- from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext import logging _LOG = logging.getLogger(".plugins.eventview") #------------------------------------------------------------------------- diff --git a/gramps/plugins/view/fanchartdescview.py b/gramps/plugins/view/fanchartdescview.py index 348118ee1..1fbbcb15f 100644 --- a/gramps/plugins/view/fanchartdescview.py +++ b/gramps/plugins/view/fanchartdescview.py @@ -36,7 +36,7 @@ from gi.repository import Gdk from gi.repository import Gtk import cairo from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/plugins/view/fanchartview.py b/gramps/plugins/view/fanchartview.py index 3aafd4ed1..006bf4e19 100644 --- a/gramps/plugins/view/fanchartview.py +++ b/gramps/plugins/view/fanchartview.py @@ -36,7 +36,7 @@ from gi.repository import Gdk from gi.repository import Gtk import cairo from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/plugins/view/geoclose.py b/gramps/plugins/view/geoclose.py index 892c7ab71..0e574a64f 100644 --- a/gramps/plugins/view/geoclose.py +++ b/gramps/plugins/view/geoclose.py @@ -31,7 +31,7 @@ Geography for two persons # #------------------------------------------------------------------------- from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext import operator from gi.repository import Gtk from math import * diff --git a/gramps/plugins/view/geoevents.py b/gramps/plugins/view/geoevents.py index dacb3553c..71452c5e2 100644 --- a/gramps/plugins/view/geoevents.py +++ b/gramps/plugins/view/geoevents.py @@ -31,7 +31,7 @@ Geography for events # #------------------------------------------------------------------------- from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext import os import sys import operator diff --git a/gramps/plugins/view/geofamclose.py b/gramps/plugins/view/geofamclose.py index 96a6809c2..8aa817a77 100644 --- a/gramps/plugins/view/geofamclose.py +++ b/gramps/plugins/view/geofamclose.py @@ -31,7 +31,7 @@ Geography for two families # #------------------------------------------------------------------------- from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext import operator from gi.repository import Gtk from math import * diff --git a/gramps/plugins/view/geofamily.py b/gramps/plugins/view/geofamily.py index 826c4c479..a48ae93ec 100644 --- a/gramps/plugins/view/geofamily.py +++ b/gramps/plugins/view/geofamily.py @@ -31,7 +31,7 @@ Geography for one family # #------------------------------------------------------------------------- from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext import os import sys import operator diff --git a/gramps/plugins/view/geomoves.py b/gramps/plugins/view/geomoves.py index a2be98640..2b2f71893 100644 --- a/gramps/plugins/view/geomoves.py +++ b/gramps/plugins/view/geomoves.py @@ -31,7 +31,7 @@ Geography for one person and all his descendant # #------------------------------------------------------------------------- from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext import operator from gi.repository import Gtk from gi.repository import Gdk diff --git a/gramps/plugins/view/geoperson.py b/gramps/plugins/view/geoperson.py index a81eabc79..67dfc4cfc 100644 --- a/gramps/plugins/view/geoperson.py +++ b/gramps/plugins/view/geoperson.py @@ -31,7 +31,7 @@ Geography for one person # #------------------------------------------------------------------------- from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext import os import sys import operator diff --git a/gramps/plugins/view/geoplaces.py b/gramps/plugins/view/geoplaces.py index 659c098b8..322189d7a 100644 --- a/gramps/plugins/view/geoplaces.py +++ b/gramps/plugins/view/geoplaces.py @@ -31,7 +31,7 @@ Geography for places # #------------------------------------------------------------------------- from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext import os import sys import time diff --git a/gramps/plugins/view/htmlrenderer.py b/gramps/plugins/view/htmlrenderer.py index ae11c09ed..c41942a22 100644 --- a/gramps/plugins/view/htmlrenderer.py +++ b/gramps/plugins/view/htmlrenderer.py @@ -66,7 +66,7 @@ from gramps.gen.constfunc import lin, mac, win from gramps.gen.config import config from gramps.gen.const import TEMP_DIR from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/plugins/view/mediaview.py b/gramps/plugins/view/mediaview.py index 5b5fe2db3..9fbe0a361 100644 --- a/gramps/plugins/view/mediaview.py +++ b/gramps/plugins/view/mediaview.py @@ -32,7 +32,7 @@ Media View. # #------------------------------------------------------------------------- from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext import os import sys if sys.version_info[0] < 3: diff --git a/gramps/plugins/view/noteview.py b/gramps/plugins/view/noteview.py index 4744a6543..4618c06aa 100644 --- a/gramps/plugins/view/noteview.py +++ b/gramps/plugins/view/noteview.py @@ -30,7 +30,7 @@ Note View. # #------------------------------------------------------------------------- from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext import logging _LOG = logging.getLogger(".plugins.noteview") diff --git a/gramps/plugins/view/pedigreeview.py b/gramps/plugins/view/pedigreeview.py index a41065c53..05c2451ec 100644 --- a/gramps/plugins/view/pedigreeview.py +++ b/gramps/plugins/view/pedigreeview.py @@ -32,7 +32,7 @@ from __future__ import unicode_literals, division from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().sgettext +_ = glocale.translation.sgettext from cgi import escape import math import sys diff --git a/gramps/plugins/view/personlistview.py b/gramps/plugins/view/personlistview.py index c78c45076..6f625a63e 100644 --- a/gramps/plugins/view/personlistview.py +++ b/gramps/plugins/view/personlistview.py @@ -40,7 +40,7 @@ from gramps.gui.views.treemodels.peoplemodel import PersonListModel # #------------------------------------------------------------------------- from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/plugins/view/persontreeview.py b/gramps/plugins/view/persontreeview.py index a1dfbcbfb..61a8b90e3 100644 --- a/gramps/plugins/view/persontreeview.py +++ b/gramps/plugins/view/persontreeview.py @@ -52,7 +52,7 @@ from gramps.gen.utils.db import preset_name # #------------------------------------------------------------------------- from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/plugins/view/placelistview.py b/gramps/plugins/view/placelistview.py index c14a3f9a0..86a345595 100644 --- a/gramps/plugins/view/placelistview.py +++ b/gramps/plugins/view/placelistview.py @@ -37,7 +37,7 @@ from gramps.gui.views.treemodels.placemodel import PlaceListModel # #------------------------------------------------------------------------- from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/plugins/view/placetreeview.py b/gramps/plugins/view/placetreeview.py index 08a47fbfb..df2ebc5d7 100644 --- a/gramps/plugins/view/placetreeview.py +++ b/gramps/plugins/view/placetreeview.py @@ -43,7 +43,7 @@ from gramps.gui.editors import EditPlace # #------------------------------------------------------------------------- from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- # diff --git a/gramps/plugins/view/relview.py b/gramps/plugins/view/relview.py index 4886c6414..dc5ae024d 100644 --- a/gramps/plugins/view/relview.py +++ b/gramps/plugins/view/relview.py @@ -31,8 +31,8 @@ from __future__ import unicode_literals # #------------------------------------------------------------------------- from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().sgettext -ngettext = glocale.get_translation().ngettext +_ = glocale.translation.sgettext +ngettext = glocale.translation.ngettext import cgi #------------------------------------------------------------------------- diff --git a/gramps/plugins/view/repoview.py b/gramps/plugins/view/repoview.py index cd54616d5..1e56c5756 100644 --- a/gramps/plugins/view/repoview.py +++ b/gramps/plugins/view/repoview.py @@ -55,7 +55,7 @@ from gramps.gen.plug import CATEGORY_QR_REPOSITORY # #------------------------------------------------------------------------- from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- diff --git a/gramps/plugins/view/sourceview.py b/gramps/plugins/view/sourceview.py index 9ec64e09c..4f6d3dec2 100644 --- a/gramps/plugins/view/sourceview.py +++ b/gramps/plugins/view/sourceview.py @@ -59,7 +59,7 @@ from gramps.gen.plug import CATEGORY_QR_SOURCE # #------------------------------------------------------------------------- from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().gettext +_ = glocale.translation.gettext #------------------------------------------------------------------------- diff --git a/gramps/plugins/webreport/narrativeweb.py b/gramps/plugins/webreport/narrativeweb.py index daffa4aef..6c7f6b287 100644 --- a/gramps/plugins/webreport/narrativeweb.py +++ b/gramps/plugins/webreport/narrativeweb.py @@ -105,7 +105,7 @@ log = logging.getLogger(".NarrativeWeb") # GRAMPS module #------------------------------------------------ from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().sgettext +_ = glocale.translation.sgettext from gramps.gen.lib import (ChildRefType, Date, EventType, FamilyRelType, Name, NameType, Person, UrlType, NoteType, EventRoleType, Family, Event, Place, Source, diff --git a/gramps/plugins/webreport/webcal.py b/gramps/plugins/webreport/webcal.py index e08bb1b66..f40506613 100644 --- a/gramps/plugins/webreport/webcal.py +++ b/gramps/plugins/webreport/webcal.py @@ -37,7 +37,7 @@ from functools import partial import os, codecs, shutil, re, sys import datetime, calendar from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().sgettext +_ = glocale.translation.sgettext #------------------------------------------------------------------------ # Set up logging @@ -1714,7 +1714,7 @@ def get_day_list(event_date, holiday_list, bday_anniv_list): txt_str = _('%(couple)s, wedding') % { 'couple' : text} else: - txt_str = (glocale.get_translation().ngettext( + txt_str = (glocale.translation.ngettext( '%(couple)s, %(years)d' ' year anniversary', '%(couple)s, %(years)d' diff --git a/gramps/plugins/webstuff/webstuff.py b/gramps/plugins/webstuff/webstuff.py index 5be4ca0ee..5aebfe56a 100644 --- a/gramps/plugins/webstuff/webstuff.py +++ b/gramps/plugins/webstuff/webstuff.py @@ -27,7 +27,7 @@ import os from gramps.gen.const import VERSION_DIR from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.get_translation().sgettext +_ = glocale.translation.sgettext def make_css_dict(tup): """