From c6e51d841dbb15b7dcaf58d3c8586e884df273ba Mon Sep 17 00:00:00 2001 From: John Ralls Date: Thu, 17 Jan 2013 19:46:55 +0000 Subject: [PATCH] GrampsLocale: Remove ggettext svn: r21144 --- gramps/cli/arghandler.py | 3 +- gramps/cli/argparser.py | 3 +- gramps/cli/clidbman.py | 3 +- gramps/cli/grampscli.py | 3 +- gramps/cli/plug/__init__.py | 3 +- gramps/cli/user.py | 3 +- gramps/gen/config.py | 3 +- gramps/gen/const.py.in | 12 +---- gramps/gen/db/base.py | 3 +- gramps/gen/db/exceptions.py | 3 +- gramps/gen/db/read.py | 3 +- gramps/gen/db/undoredo.py | 3 +- gramps/gen/db/upgrade.py | 5 +- gramps/gen/db/write.py | 3 +- gramps/gen/display/name.py | 4 +- gramps/gen/filters/_filterparser.py | 3 +- gramps/gen/filters/rules/_changedsincebase.py | 3 +- gramps/gen/filters/rules/_everything.py | 3 +- gramps/gen/filters/rules/_hasattributebase.py | 3 +- gramps/gen/filters/rules/_hascitationbase.py | 3 +- gramps/gen/filters/rules/_haseventbase.py | 3 +- gramps/gen/filters/rules/_hasgallerybase.py | 3 +- gramps/gen/filters/rules/_hasgrampsid.py | 3 +- gramps/gen/filters/rules/_hasldsbase.py | 3 +- gramps/gen/filters/rules/_hasnotebase.py | 3 +- gramps/gen/filters/rules/_hasnoteregexbase.py | 3 +- .../gen/filters/rules/_hasnotesubstrbase.py | 3 +- .../filters/rules/_hasreferencecountbase.py | 3 +- gramps/gen/filters/rules/_hassourcebase.py | 3 +- .../gen/filters/rules/_hassourcecountbase.py | 3 +- gramps/gen/filters/rules/_hassourceofbase.py | 3 +- gramps/gen/filters/rules/_hastagbase.py | 3 +- .../rules/_hastextmatchingsubstringof.py | 3 +- gramps/gen/filters/rules/_isprivate.py | 3 +- gramps/gen/filters/rules/_ispublic.py | 3 +- .../filters/rules/_matcheseventfilterbase.py | 3 +- .../gen/filters/rules/_matchesfilterbase.py | 3 +- .../rules/_matchessourceconfidencebase.py | 3 +- .../filters/rules/_matchessourcefilterbase.py | 3 +- gramps/gen/filters/rules/_regexpidbase.py | 3 +- gramps/gen/filters/rules/_rule.py | 3 +- .../filters/rules/citation/_allcitations.py | 3 +- .../filters/rules/citation/_changedsince.py | 3 +- .../rules/citation/_citationprivate.py | 3 +- .../filters/rules/citation/_hascitation.py | 3 +- .../gen/filters/rules/citation/_hasgallery.py | 3 +- gramps/gen/filters/rules/citation/_hasidof.py | 3 +- gramps/gen/filters/rules/citation/_hasnote.py | 3 +- .../citation/_hasnotematchingsubstringof.py | 3 +- .../filters/rules/citation/_hasnoteregexp.py | 3 +- .../rules/citation/_hasreferencecountof.py | 3 +- .../gen/filters/rules/citation/_hassource.py | 3 +- .../filters/rules/citation/_matchesfilter.py | 3 +- .../rules/citation/_matchespagesubstringof.py | 3 +- .../citation/_matchesrepositoryfilter.py | 3 +- .../rules/citation/_matchessourcefilter.py | 3 +- .../gen/filters/rules/citation/_regexpidof.py | 3 +- gramps/gen/filters/rules/event/_allevents.py | 3 +- .../gen/filters/rules/event/_changedsince.py | 3 +- .../gen/filters/rules/event/_eventprivate.py | 3 +- .../gen/filters/rules/event/_hasattribute.py | 3 +- .../gen/filters/rules/event/_hascitation.py | 3 +- gramps/gen/filters/rules/event/_hasdata.py | 3 +- gramps/gen/filters/rules/event/_hasgallery.py | 3 +- gramps/gen/filters/rules/event/_hasidof.py | 3 +- gramps/gen/filters/rules/event/_hasnote.py | 3 +- .../event/_hasnotematchingsubstringof.py | 3 +- .../gen/filters/rules/event/_hasnoteregexp.py | 3 +- .../rules/event/_hasreferencecountof.py | 3 +- .../filters/rules/event/_hassourcecount.py | 3 +- gramps/gen/filters/rules/event/_hastype.py | 3 +- .../gen/filters/rules/event/_matchesfilter.py | 3 +- .../rules/event/_matchespersonfilter.py | 3 +- .../rules/event/_matchessourceconfidence.py | 3 +- .../rules/event/_matchessourcefilter.py | 3 +- gramps/gen/filters/rules/event/_regexpidof.py | 3 +- .../gen/filters/rules/family/_allfamilies.py | 3 +- .../gen/filters/rules/family/_changedsince.py | 3 +- .../gen/filters/rules/family/_childhasidof.py | 3 +- .../filters/rules/family/_childhasnameof.py | 3 +- .../filters/rules/family/_familyprivate.py | 3 +- .../filters/rules/family/_fatherhasidof.py | 3 +- .../filters/rules/family/_fatherhasnameof.py | 3 +- .../gen/filters/rules/family/_hasattribute.py | 3 +- .../gen/filters/rules/family/_hascitation.py | 3 +- gramps/gen/filters/rules/family/_hasevent.py | 3 +- .../gen/filters/rules/family/_hasgallery.py | 3 +- gramps/gen/filters/rules/family/_hasidof.py | 3 +- gramps/gen/filters/rules/family/_haslds.py | 3 +- gramps/gen/filters/rules/family/_hasnote.py | 3 +- .../family/_hasnotematchingsubstringof.py | 3 +- .../filters/rules/family/_hasnoteregexp.py | 3 +- .../rules/family/_hasreferencecountof.py | 3 +- .../gen/filters/rules/family/_hasreltype.py | 3 +- .../filters/rules/family/_hassourcecount.py | 3 +- .../gen/filters/rules/family/_hassourceof.py | 3 +- gramps/gen/filters/rules/family/_hastag.py | 3 +- .../gen/filters/rules/family/_isbookmarked.py | 3 +- .../filters/rules/family/_matchesfilter.py | 3 +- .../rules/family/_matchessourceconfidence.py | 3 +- .../filters/rules/family/_motherhasidof.py | 3 +- .../filters/rules/family/_motherhasnameof.py | 3 +- .../filters/rules/family/_regexpchildname.py | 3 +- .../filters/rules/family/_regexpfathername.py | 3 +- .../gen/filters/rules/family/_regexpidof.py | 3 +- .../filters/rules/family/_regexpmothername.py | 3 +- .../filters/rules/family/_searchchildname.py | 3 +- .../filters/rules/family/_searchfathername.py | 3 +- .../filters/rules/family/_searchmothername.py | 3 +- gramps/gen/filters/rules/media/_allmedia.py | 3 +- .../gen/filters/rules/media/_changedsince.py | 3 +- .../gen/filters/rules/media/_hasattribute.py | 3 +- .../gen/filters/rules/media/_hascitation.py | 3 +- gramps/gen/filters/rules/media/_hasidof.py | 3 +- gramps/gen/filters/rules/media/_hasmedia.py | 3 +- .../media/_hasnotematchingsubstringof.py | 3 +- .../gen/filters/rules/media/_hasnoteregexp.py | 3 +- .../rules/media/_hasreferencecountof.py | 3 +- .../filters/rules/media/_hassourcecount.py | 3 +- .../gen/filters/rules/media/_hassourceof.py | 3 +- gramps/gen/filters/rules/media/_hastag.py | 3 +- .../gen/filters/rules/media/_matchesfilter.py | 3 +- .../rules/media/_matchessourceconfidence.py | 3 +- .../gen/filters/rules/media/_mediaprivate.py | 3 +- gramps/gen/filters/rules/media/_regexpidof.py | 3 +- gramps/gen/filters/rules/note/_allnotes.py | 3 +- .../gen/filters/rules/note/_changedsince.py | 3 +- gramps/gen/filters/rules/note/_hasidof.py | 3 +- gramps/gen/filters/rules/note/_hasnote.py | 3 +- .../rules/note/_hasreferencecountof.py | 3 +- gramps/gen/filters/rules/note/_hastag.py | 3 +- .../gen/filters/rules/note/_matchesfilter.py | 3 +- .../filters/rules/note/_matchesregexpof.py | 3 +- .../filters/rules/note/_matchessubstringof.py | 3 +- gramps/gen/filters/rules/note/_noteprivate.py | 3 +- gramps/gen/filters/rules/note/_regexpidof.py | 3 +- .../gen/filters/rules/person/_changedsince.py | 3 +- .../person/_deeprelationshippathbetween.py | 3 +- .../gen/filters/rules/person/_disconnected.py | 3 +- gramps/gen/filters/rules/person/_everyone.py | 3 +- .../person/_familywithincompleteevent.py | 3 +- .../gen/filters/rules/person/_hasaddress.py | 3 +- .../filters/rules/person/_hasalternatename.py | 3 +- .../filters/rules/person/_hasassociation.py | 3 +- .../gen/filters/rules/person/_hasattribute.py | 3 +- gramps/gen/filters/rules/person/_hasbirth.py | 3 +- .../gen/filters/rules/person/_hascitation.py | 3 +- .../rules/person/_hascommonancestorwith.py | 3 +- .../_hascommonancestorwithfiltermatch.py | 3 +- gramps/gen/filters/rules/person/_hasdeath.py | 3 +- gramps/gen/filters/rules/person/_hasevent.py | 3 +- .../rules/person/_hasfamilyattribute.py | 3 +- .../filters/rules/person/_hasfamilyevent.py | 3 +- .../gen/filters/rules/person/_hasgallery.py | 3 +- gramps/gen/filters/rules/person/_hasidof.py | 3 +- gramps/gen/filters/rules/person/_haslds.py | 3 +- gramps/gen/filters/rules/person/_hasnameof.py | 3 +- .../rules/person/_hasnameorigintype.py | 3 +- .../gen/filters/rules/person/_hasnametype.py | 3 +- .../gen/filters/rules/person/_hasnickname.py | 3 +- gramps/gen/filters/rules/person/_hasnote.py | 3 +- .../person/_hasnotematchingsubstringof.py | 3 +- .../filters/rules/person/_hasnoteregexp.py | 3 +- .../filters/rules/person/_hasrelationship.py | 3 +- .../filters/rules/person/_hassourcecount.py | 3 +- .../gen/filters/rules/person/_hassourceof.py | 3 +- gramps/gen/filters/rules/person/_hastag.py | 3 +- .../person/_hastextmatchingsubstringof.py | 3 +- .../filters/rules/person/_hasunknowngender.py | 3 +- .../filters/rules/person/_havealtfamilies.py | 3 +- .../gen/filters/rules/person/_havechildren.py | 3 +- .../filters/rules/person/_incompletenames.py | 3 +- .../gen/filters/rules/person/_isancestorof.py | 3 +- .../rules/person/_isancestoroffiltermatch.py | 3 +- .../gen/filters/rules/person/_isbookmarked.py | 3 +- .../rules/person/_ischildoffiltermatch.py | 3 +- .../filters/rules/person/_isdefaultperson.py | 3 +- .../rules/person/_isdescendantfamilyof.py | 3 +- .../_isdescendantfamilyoffiltermatch.py | 3 +- .../filters/rules/person/_isdescendantof.py | 3 +- .../person/_isdescendantoffiltermatch.py | 3 +- .../rules/person/_isduplicatedancestorof.py | 3 +- gramps/gen/filters/rules/person/_isfemale.py | 3 +- .../_islessthannthgenerationancestorof.py | 3 +- ...ssthannthgenerationancestorofbookmarked.py | 3 +- ...hannthgenerationancestorofdefaultperson.py | 3 +- .../_islessthannthgenerationdescendantof.py | 3 +- gramps/gen/filters/rules/person/_ismale.py | 3 +- .../_ismorethannthgenerationancestorof.py | 3 +- .../_ismorethannthgenerationdescendantof.py | 3 +- .../rules/person/_isparentoffiltermatch.py | 3 +- .../filters/rules/person/_isrelatedwith.py | 3 +- .../rules/person/_issiblingoffiltermatch.py | 3 +- .../rules/person/_isspouseoffiltermatch.py | 3 +- gramps/gen/filters/rules/person/_iswitness.py | 3 +- .../rules/person/_matcheseventfilter.py | 3 +- .../filters/rules/person/_matchesfilter.py | 3 +- .../rules/person/_matchessourceconfidence.py | 3 +- gramps/gen/filters/rules/person/_matchidof.py | 3 +- .../filters/rules/person/_missingparent.py | 3 +- .../rules/person/_multiplemarriages.py | 3 +- .../gen/filters/rules/person/_nevermarried.py | 3 +- .../gen/filters/rules/person/_nobirthdate.py | 3 +- .../gen/filters/rules/person/_nodeathdate.py | 3 +- .../filters/rules/person/_peopleprivate.py | 3 +- .../gen/filters/rules/person/_peoplepublic.py | 3 +- .../person/_personwithincompleteevent.py | 3 +- .../filters/rules/person/_probablyalive.py | 3 +- .../gen/filters/rules/person/_regexpidof.py | 3 +- .../gen/filters/rules/person/_regexpname.py | 3 +- .../rules/person/_relationshippathbetween.py | 3 +- .../_relationshippathbetweenbookmarks.py | 3 +- .../gen/filters/rules/person/_searchname.py | 3 +- gramps/gen/filters/rules/place/_allplaces.py | 3 +- .../gen/filters/rules/place/_changedsince.py | 3 +- .../gen/filters/rules/place/_hascitation.py | 3 +- gramps/gen/filters/rules/place/_hasgallery.py | 3 +- gramps/gen/filters/rules/place/_hasidof.py | 3 +- .../gen/filters/rules/place/_hasnolatorlon.py | 3 +- gramps/gen/filters/rules/place/_hasnote.py | 3 +- .../place/_hasnotematchingsubstringof.py | 3 +- .../gen/filters/rules/place/_hasnoteregexp.py | 3 +- gramps/gen/filters/rules/place/_hasplace.py | 3 +- .../rules/place/_hasreferencecountof.py | 3 +- .../filters/rules/place/_hassourcecount.py | 3 +- .../gen/filters/rules/place/_hassourceof.py | 3 +- .../rules/place/_inlatlonneighborhood.py | 3 +- .../rules/place/_matcheseventfilter.py | 3 +- .../gen/filters/rules/place/_matchesfilter.py | 3 +- .../rules/place/_matchessourceconfidence.py | 3 +- .../gen/filters/rules/place/_placeprivate.py | 3 +- gramps/gen/filters/rules/place/_regexpidof.py | 3 +- .../gen/filters/rules/repository/_allrepos.py | 3 +- .../filters/rules/repository/_changedsince.py | 3 +- .../gen/filters/rules/repository/_hasidof.py | 3 +- .../repository/_hasnotematchingsubstringof.py | 3 +- .../rules/repository/_hasnoteregexp.py | 3 +- .../rules/repository/_hasreferencecountof.py | 3 +- .../gen/filters/rules/repository/_hasrepo.py | 3 +- .../rules/repository/_matchesfilter.py | 3 +- .../repository/_matchesnamesubstringof.py | 3 +- .../filters/rules/repository/_regexpidof.py | 3 +- .../filters/rules/repository/_repoprivate.py | 3 +- .../gen/filters/rules/source/_allsources.py | 3 +- .../gen/filters/rules/source/_changedsince.py | 3 +- .../gen/filters/rules/source/_hasgallery.py | 3 +- gramps/gen/filters/rules/source/_hasidof.py | 3 +- gramps/gen/filters/rules/source/_hasnote.py | 3 +- .../source/_hasnotematchingsubstringof.py | 3 +- .../filters/rules/source/_hasnoteregexp.py | 3 +- .../rules/source/_hasreferencecountof.py | 3 +- .../filters/rules/source/_hasrepository.py | 3 +- .../source/_hasrepositorycallnumberref.py | 3 +- .../filters/rules/source/_matchesfilter.py | 3 +- .../rules/source/_matchesrepositoryfilter.py | 3 +- .../rules/source/_matchestitlesubstringof.py | 3 +- .../gen/filters/rules/source/_regexpidof.py | 3 +- .../filters/rules/source/_sourceprivate.py | 3 +- gramps/gen/ggettext.py | 46 ------------------- gramps/gen/lib/attrtype.py | 3 +- gramps/gen/lib/childreftype.py | 3 +- gramps/gen/lib/date.py | 6 ++- gramps/gen/lib/eventroletype.py | 3 +- gramps/gen/lib/eventtype.py | 3 +- gramps/gen/lib/familyreltype.py | 3 +- gramps/gen/lib/grampstype.py | 3 +- gramps/gen/lib/ldsord.py | 3 +- gramps/gen/lib/markertype.py | 3 +- gramps/gen/lib/nameorigintype.py | 3 +- gramps/gen/lib/nametype.py | 3 +- gramps/gen/lib/notetype.py | 3 +- gramps/gen/lib/person.py | 3 +- gramps/gen/lib/repotype.py | 3 +- gramps/gen/lib/srcmediatype.py | 3 +- gramps/gen/lib/styledtexttagtype.py | 3 +- gramps/gen/lib/surnamebase.py | 3 +- gramps/gen/lib/urltype.py | 3 +- gramps/gen/merge/mergecitationquery.py | 3 +- gramps/gen/merge/mergeeventquery.py | 3 +- gramps/gen/merge/mergefamilyquery.py | 3 +- gramps/gen/merge/mergemediaquery.py | 3 +- gramps/gen/merge/mergenotequery.py | 3 +- gramps/gen/merge/mergepersonquery.py | 3 +- gramps/gen/merge/mergeplacequery.py | 3 +- gramps/gen/merge/mergerepositoryquery.py | 3 +- gramps/gen/merge/mergesourcequery.py | 3 +- gramps/gen/merge/test/merge_ref_test.py | 3 +- gramps/gen/mime/_pythonmime.py | 3 +- gramps/gen/mime/_winmime.py | 3 +- gramps/gen/plug/_gramplet.py | 3 +- gramps/gen/plug/_manager.py | 3 +- gramps/gen/plug/_options.py | 3 +- gramps/gen/plug/_pluginreg.py | 5 +- gramps/gen/plug/docbackend/docbackend.py | 3 +- gramps/gen/plug/docgen/graphdoc.py | 3 +- gramps/gen/plug/report/_book.py | 3 +- gramps/gen/plug/report/_constants.py | 3 +- gramps/gen/plug/report/_paper.py | 3 +- gramps/gen/plug/report/endnotes.py | 3 +- gramps/gen/plug/report/utils.py | 3 +- gramps/gen/plug/utils.py | 3 +- gramps/gen/proxy/private.py | 3 +- gramps/gen/relationship.py | 3 +- gramps/gen/simple/_simpleaccess.py | 3 +- gramps/gen/simple/_simpletable.py | 3 +- gramps/gen/utils/alive.py | 3 +- gramps/gen/utils/configmanager.py | 3 +- gramps/gen/utils/db.py | 3 +- gramps/gen/utils/docgen/odstab.py | 3 +- gramps/gen/utils/lds.py | 3 +- gramps/gen/utils/place.py | 3 +- gramps/gen/utils/string.py | 3 +- gramps/gen/utils/unknown.py | 3 +- gramps/gui/aboutdialog.py | 3 +- gramps/gui/clipboard.py | 3 +- gramps/gui/columnorder.py | 3 +- gramps/gui/configure.py | 3 +- gramps/gui/dbloader.py | 3 +- gramps/gui/dbman.py | 3 +- gramps/gui/dialog.py | 3 +- gramps/gui/displaystate.py | 3 +- gramps/gui/editors/addmedia.py | 3 +- .../gui/editors/displaytabs/addrembedlist.py | 3 +- .../gui/editors/displaytabs/attrembedlist.py | 3 +- gramps/gui/editors/displaytabs/backreflist.py | 3 +- .../gui/editors/displaytabs/backrefmodel.py | 3 +- gramps/gui/editors/displaytabs/buttontab.py | 3 +- .../editors/displaytabs/citationembedlist.py | 3 +- .../gui/editors/displaytabs/dataembedlist.py | 3 +- .../gui/editors/displaytabs/embeddedlist.py | 3 +- .../gui/editors/displaytabs/eventembedlist.py | 3 +- .../gui/editors/displaytabs/eventrefmodel.py | 3 +- .../editors/displaytabs/familyldsembedlist.py | 3 +- gramps/gui/editors/displaytabs/gallerytab.py | 3 +- .../gui/editors/displaytabs/ldsembedlist.py | 3 +- .../editors/displaytabs/locationembedlist.py | 3 +- .../gui/editors/displaytabs/nameembedlist.py | 3 +- gramps/gui/editors/displaytabs/namemodel.py | 3 +- gramps/gui/editors/displaytabs/notetab.py | 3 +- .../displaytabs/personeventembedlist.py | 3 +- .../editors/displaytabs/personrefembedlist.py | 3 +- .../gui/editors/displaytabs/repoembedlist.py | 3 +- gramps/gui/editors/displaytabs/surnametab.py | 3 +- .../gui/editors/displaytabs/webembedlist.py | 3 +- gramps/gui/editors/editaddress.py | 3 +- gramps/gui/editors/editattribute.py | 3 +- gramps/gui/editors/editchildref.py | 3 +- gramps/gui/editors/editcitation.py | 3 +- gramps/gui/editors/editdate.py | 3 +- gramps/gui/editors/editevent.py | 3 +- gramps/gui/editors/editeventref.py | 3 +- gramps/gui/editors/editfamily.py | 3 +- gramps/gui/editors/editldsord.py | 3 +- gramps/gui/editors/editlink.py | 3 +- gramps/gui/editors/editlocation.py | 3 +- gramps/gui/editors/editmedia.py | 3 +- gramps/gui/editors/editmediaref.py | 3 +- gramps/gui/editors/editname.py | 3 +- gramps/gui/editors/editnote.py | 3 +- gramps/gui/editors/editperson.py | 3 +- gramps/gui/editors/editpersonref.py | 3 +- gramps/gui/editors/editplace.py | 3 +- gramps/gui/editors/editprimary.py | 3 +- gramps/gui/editors/editreporef.py | 3 +- gramps/gui/editors/editrepository.py | 3 +- gramps/gui/editors/editsource.py | 3 +- gramps/gui/editors/edittaglist.py | 3 +- gramps/gui/editors/editurl.py | 3 +- gramps/gui/editors/filtereditor.py | 3 +- gramps/gui/editors/objectentries.py | 3 +- gramps/gui/filters/_filterstore.py | 3 +- gramps/gui/filters/_searchbar.py | 3 +- .../filters/sidebar/_citationsidebarfilter.py | 3 +- .../filters/sidebar/_eventsidebarfilter.py | 3 +- .../filters/sidebar/_familysidebarfilter.py | 3 +- .../filters/sidebar/_mediasidebarfilter.py | 3 +- .../gui/filters/sidebar/_notesidebarfilter.py | 3 +- .../filters/sidebar/_personsidebarfilter.py | 3 +- .../filters/sidebar/_placesidebarfilter.py | 3 +- .../gui/filters/sidebar/_reposidebarfilter.py | 3 +- gramps/gui/filters/sidebar/_sidebarfilter.py | 3 +- .../filters/sidebar/_sourcesidebarfilter.py | 3 +- gramps/gui/grampsgui.py | 21 +++++---- gramps/gui/logger/_errorreportassistant.py | 3 +- gramps/gui/logger/_errorview.py | 3 +- gramps/gui/makefilter.py | 3 +- gramps/gui/merge/mergecitation.py | 3 +- gramps/gui/merge/mergeevent.py | 3 +- gramps/gui/merge/mergefamily.py | 3 +- gramps/gui/merge/mergemedia.py | 3 +- gramps/gui/merge/mergenote.py | 3 +- gramps/gui/merge/mergeperson.py | 3 +- gramps/gui/merge/mergeplace.py | 3 +- gramps/gui/merge/mergerepository.py | 3 +- gramps/gui/merge/mergesource.py | 3 +- gramps/gui/plug/_dialogs.py | 3 +- gramps/gui/plug/_guioptions.py | 3 +- gramps/gui/plug/_windows.py | 3 +- gramps/gui/plug/export/_exportassistant.py | 3 +- gramps/gui/plug/export/_exportoptions.py | 5 +- gramps/gui/plug/quick/_quickreports.py | 3 +- gramps/gui/plug/quick/_quicktable.py | 3 +- gramps/gui/plug/quick/_textbufdoc.py | 3 +- gramps/gui/plug/report/_bookdialog.py | 3 +- gramps/gui/plug/report/_docreportdialog.py | 3 +- .../gui/plug/report/_graphvizreportdialog.py | 3 +- gramps/gui/plug/report/_papermenu.py | 3 +- gramps/gui/plug/report/_reportdialog.py | 3 +- gramps/gui/plug/report/_stylecombobox.py | 3 +- gramps/gui/plug/report/_styleeditor.py | 3 +- gramps/gui/plug/tool.py | 3 +- gramps/gui/selectors/selectcitation.py | 3 +- gramps/gui/selectors/selectevent.py | 3 +- gramps/gui/selectors/selectfamily.py | 3 +- gramps/gui/selectors/selectnote.py | 3 +- gramps/gui/selectors/selectobject.py | 3 +- gramps/gui/selectors/selectperson.py | 3 +- gramps/gui/selectors/selectplace.py | 3 +- gramps/gui/selectors/selectrepository.py | 3 +- gramps/gui/selectors/selectsource.py | 3 +- gramps/gui/spell.py | 5 +- gramps/gui/tipofday.py | 3 +- gramps/gui/undohistory.py | 3 +- gramps/gui/utils.py | 3 +- gramps/gui/viewmanager.py | 6 +-- gramps/gui/views/bookmarks.py | 3 +- gramps/gui/views/listview.py | 3 +- gramps/gui/views/navigationview.py | 3 +- gramps/gui/views/pageview.py | 3 +- gramps/gui/views/tags.py | 3 +- .../gui/views/treemodels/citationtreemodel.py | 3 +- gramps/gui/views/treemodels/mediamodel.py | 3 +- gramps/gui/views/treemodels/peoplemodel.py | 3 +- gramps/gui/views/treemodels/placemodel.py | 3 +- gramps/gui/views/treemodels/treebasemodel.py | 3 +- gramps/gui/widgets/buttons.py | 3 +- gramps/gui/widgets/expandcollapsearrow.py | 3 +- gramps/gui/widgets/fanchart.py | 3 +- gramps/gui/widgets/grampletbar.py | 3 +- gramps/gui/widgets/grampletpane.py | 3 +- gramps/gui/widgets/labels.py | 3 +- gramps/gui/widgets/monitoredwidgets.py | 3 +- gramps/gui/widgets/photo.py | 3 +- gramps/gui/widgets/progressdialog.py | 3 +- gramps/gui/widgets/reorderfam.py | 3 +- gramps/gui/widgets/styledtextbuffer.py | 3 +- gramps/gui/widgets/styledtexteditor.py | 3 +- gramps/gui/widgets/undoableentry.py | 3 +- gramps/gui/widgets/validatedmaskedentry.py | 3 +- gramps/guiQML/viewmanager.py | 3 +- gramps/guiQML/views/centralview.py | 3 +- gramps/guiQML/views/dbman.py | 3 +- gramps/guiQML/views/personview.py | 3 +- gramps/plugins/docgen/asciidoc.py | 6 ++- gramps/plugins/docgen/gtkprint.py | 3 +- gramps/plugins/docgen/htmldoc.py | 3 +- gramps/plugins/docgen/latexdoc.py | 3 +- gramps/plugins/docgen/odfdoc.py | 3 +- gramps/plugins/docgen/pdfdoc.py | 3 +- gramps/plugins/docgen/psdrawdoc.py | 5 +- gramps/plugins/docgen/rtfdoc.py | 3 +- gramps/plugins/docgen/svgdrawdoc.py | 3 +- gramps/plugins/drawreport/ancestortree.py | 3 +- gramps/plugins/drawreport/calendarreport.py | 8 ++-- gramps/plugins/drawreport/descendtree.py | 3 +- gramps/plugins/drawreport/fanchart.py | 3 +- gramps/plugins/drawreport/statisticschart.py | 3 +- gramps/plugins/drawreport/timeline.py | 3 +- gramps/plugins/export/exportcsv.py | 3 +- gramps/plugins/export/exportftree.py | 3 +- gramps/plugins/export/exportgedcom.py | 3 +- gramps/plugins/export/exportgeneweb.py | 3 +- gramps/plugins/export/exportpkg.py | 5 +- gramps/plugins/export/exportvcalendar.py | 3 +- gramps/plugins/export/exportvcard.py | 3 +- gramps/plugins/export/exportxml.py | 3 +- gramps/plugins/gramplet/ageondategramplet.py | 3 +- gramps/plugins/gramplet/agestats.py | 3 +- gramps/plugins/gramplet/attributes.py | 3 +- gramps/plugins/gramplet/attributesgramplet.py | 3 +- gramps/plugins/gramplet/backlinks.py | 3 +- gramps/plugins/gramplet/calendargramplet.py | 3 +- gramps/plugins/gramplet/children.py | 3 +- gramps/plugins/gramplet/citations.py | 3 +- gramps/plugins/gramplet/descendgramplet.py | 3 +- gramps/plugins/gramplet/editexifmetadata.py | 3 +- gramps/plugins/gramplet/events.py | 3 +- .../plugins/gramplet/fanchartdescgramplet.py | 3 +- gramps/plugins/gramplet/fanchartgramplet.py | 3 +- gramps/plugins/gramplet/faqgramplet.py | 3 +- gramps/plugins/gramplet/givennamegramplet.py | 3 +- gramps/plugins/gramplet/notes.py | 3 +- gramps/plugins/gramplet/pedigreegramplet.py | 8 ++-- gramps/plugins/gramplet/persondetails.py | 3 +- gramps/plugins/gramplet/personresidence.py | 3 +- gramps/plugins/gramplet/placedetails.py | 3 +- gramps/plugins/gramplet/quickviewgramplet.py | 3 +- gramps/plugins/gramplet/recordsgramplet.py | 3 +- gramps/plugins/gramplet/relativegramplet.py | 3 +- gramps/plugins/gramplet/repositorydetails.py | 3 +- gramps/plugins/gramplet/sessionloggramplet.py | 3 +- gramps/plugins/gramplet/statsgramplet.py | 3 +- .../plugins/gramplet/surnamecloudgramplet.py | 3 +- gramps/plugins/gramplet/todogramplet.py | 2 + .../plugins/gramplet/topsurnamesgramplet.py | 3 +- gramps/plugins/gramplet/welcomegramplet.py | 3 +- gramps/plugins/gramplet/whatsnext.py | 3 +- gramps/plugins/graph/gvfamilylines.py | 3 +- gramps/plugins/graph/gvhourglass.py | 3 +- gramps/plugins/graph/gvrelgraph.py | 3 +- gramps/plugins/importer/importcsv.py | 6 +-- gramps/plugins/importer/importgedcom.py | 3 +- gramps/plugins/importer/importgeneweb.py | 6 +-- gramps/plugins/importer/importgpkg.py | 3 +- gramps/plugins/importer/importgrdb.py | 3 +- gramps/plugins/importer/importprogen.py | 3 +- gramps/plugins/importer/importvcard.py | 6 +-- gramps/plugins/importer/importxml.py | 3 +- gramps/plugins/lib/libcairodoc.py | 3 +- gramps/plugins/lib/libgedcom.py | 3 +- gramps/plugins/lib/libgrdb.py | 3 +- gramps/plugins/lib/libholiday.py | 3 +- gramps/plugins/lib/libhtmlconst.py | 3 +- gramps/plugins/lib/libmetadata.py | 3 +- gramps/plugins/lib/libnarrate.py | 3 +- gramps/plugins/lib/libpersonview.py | 3 +- gramps/plugins/lib/libplaceview.py | 3 +- gramps/plugins/lib/librecords.py | 3 +- gramps/plugins/lib/libtranslate.py | 3 +- gramps/plugins/lib/libtreebase.py | 3 +- gramps/plugins/lib/maps/geography.py | 3 +- gramps/plugins/lib/maps/osmgps.py | 3 +- gramps/plugins/lib/maps/placeselection.py | 3 +- gramps/plugins/mapservices/eniroswedenmap.py | 3 +- gramps/plugins/mapservices/googlemap.py | 3 +- gramps/plugins/mapservices/openstreetmap.py | 3 +- gramps/plugins/quickview/ageondate.py | 3 +- gramps/plugins/quickview/all_events.py | 3 +- gramps/plugins/quickview/all_relations.py | 3 +- gramps/plugins/quickview/attributematch.py | 3 +- gramps/plugins/quickview/filterbyname.py | 6 +-- gramps/plugins/quickview/lineage.py | 3 +- gramps/plugins/quickview/linkreferences.py | 3 +- gramps/plugins/quickview/onthisday.py | 3 +- gramps/plugins/quickview/references.py | 3 +- gramps/plugins/quickview/reporef.py | 3 +- gramps/plugins/quickview/samesurnames.py | 8 ++-- gramps/plugins/quickview/siblings.py | 3 +- gramps/plugins/sidebar/dropdownsidebar.py | 3 +- .../plugins/textreport/alphabeticalindex.py | 3 +- gramps/plugins/textreport/ancestorreport.py | 3 +- gramps/plugins/textreport/birthdayreport.py | 5 +- gramps/plugins/textreport/custombooktext.py | 3 +- gramps/plugins/textreport/descendreport.py | 3 +- .../plugins/textreport/detancestralreport.py | 3 +- .../plugins/textreport/detdescendantreport.py | 3 +- gramps/plugins/textreport/endoflinereport.py | 3 +- gramps/plugins/textreport/familygroup.py | 3 +- gramps/plugins/textreport/indivcomplete.py | 3 +- gramps/plugins/textreport/kinshipreport.py | 3 +- .../textreport/numberofancestorsreport.py | 6 +-- gramps/plugins/textreport/placereport.py | 3 +- gramps/plugins/textreport/recordsreport.py | 3 +- gramps/plugins/textreport/simplebooktitle.py | 3 +- gramps/plugins/textreport/summary.py | 3 +- gramps/plugins/textreport/tableofcontents.py | 3 +- gramps/plugins/textreport/tagreport.py | 3 +- gramps/plugins/tool/changenames.py | 3 +- gramps/plugins/tool/changetypes.py | 6 +-- gramps/plugins/tool/check.py | 5 +- gramps/plugins/tool/dateparserdisplaytest.py | 3 +- gramps/plugins/tool/desbrowser.py | 3 +- gramps/plugins/tool/dumpgenderstats.py | 3 +- gramps/plugins/tool/eval.py | 3 +- gramps/plugins/tool/eventcmp.py | 3 +- gramps/plugins/tool/eventnames.py | 7 +-- gramps/plugins/tool/extractcity.py | 3 +- gramps/plugins/tool/finddupes.py | 3 +- gramps/plugins/tool/leak.py | 3 +- gramps/plugins/tool/mediamanager.py | 3 +- gramps/plugins/tool/mergecitations.py | 7 +-- gramps/plugins/tool/notrelated.py | 13 +++--- gramps/plugins/tool/ownereditor.py | 3 +- gramps/plugins/tool/patchnames.py | 3 +- gramps/plugins/tool/phpgedviewconnector.py | 3 +- gramps/plugins/tool/rebuild.py | 3 +- gramps/plugins/tool/rebuildgenderstat.py | 3 +- gramps/plugins/tool/rebuildrefmap.py | 3 +- gramps/plugins/tool/relcalc.py | 3 +- gramps/plugins/tool/removeunused.py | 3 +- gramps/plugins/tool/reorderids.py | 3 +- gramps/plugins/tool/sortevents.py | 3 +- gramps/plugins/tool/soundgen.py | 3 +- gramps/plugins/tool/testcasegenerator.py | 3 +- gramps/plugins/tool/verify.py | 3 +- gramps/plugins/view/citationlistview.py | 3 +- gramps/plugins/view/citationtreeview.py | 3 +- gramps/plugins/view/dashboardview.py | 3 +- gramps/plugins/view/eventview.py | 3 +- gramps/plugins/view/familyview.py | 3 +- gramps/plugins/view/fanchartdescview.py | 3 +- gramps/plugins/view/fanchartview.py | 3 +- gramps/plugins/view/geoclose.py | 3 +- gramps/plugins/view/geoevents.py | 3 +- gramps/plugins/view/geofamclose.py | 3 +- gramps/plugins/view/geofamily.py | 3 +- gramps/plugins/view/geomoves.py | 3 +- gramps/plugins/view/geoperson.py | 3 +- gramps/plugins/view/geoplaces.py | 3 +- gramps/plugins/view/htmlrenderer.py | 3 +- gramps/plugins/view/mediaview.py | 3 +- gramps/plugins/view/noteview.py | 3 +- gramps/plugins/view/pedigreeview.py | 4 +- gramps/plugins/view/personlistview.py | 3 +- gramps/plugins/view/persontreeview.py | 3 +- gramps/plugins/view/placelistview.py | 3 +- gramps/plugins/view/placetreeview.py | 3 +- gramps/plugins/view/relview.py | 5 +- gramps/plugins/view/repoview.py | 3 +- gramps/plugins/view/sourceview.py | 3 +- gramps/plugins/webreport/narrativeweb.py | 3 +- gramps/plugins/webreport/webcal.py | 14 +++--- gramps/plugins/webstuff/webstuff.py | 3 +- 623 files changed, 1291 insertions(+), 738 deletions(-) delete mode 100644 gramps/gen/ggettext.py diff --git a/gramps/cli/arghandler.py b/gramps/cli/arghandler.py index e21180339..aab7bd624 100644 --- a/gramps/cli/arghandler.py +++ b/gramps/cli/arghandler.py @@ -39,7 +39,8 @@ Module responsible for handling the command line arguments for GRAMPS. from __future__ import print_function import os import sys -from gramps.gen.ggettext import gettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/cli/argparser.py b/gramps/cli/argparser.py index 9215f828c..c6346ee2c 100644 --- a/gramps/cli/argparser.py +++ b/gramps/cli/argparser.py @@ -39,7 +39,8 @@ Module responsible for handling the command line arguments for GRAMPS. from __future__ import print_function import sys import getopt -from gramps.gen.ggettext import gettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext import logging #------------------------------------------------------------------------- diff --git a/gramps/cli/clidbman.py b/gramps/cli/clidbman.py index cfe496acf..694f2f46a 100644 --- a/gramps/cli/clidbman.py +++ b/gramps/cli/clidbman.py @@ -44,7 +44,6 @@ else: from urllib.parse import urlparse from urllib.request import urlopen, url2pathname import tempfile -from gramps.gen.ggettext import gettext as _ #------------------------------------------------------------------------- # # set up logging @@ -58,6 +57,8 @@ LOG = logging.getLogger(".clidbman") # gramps modules # #------------------------------------------------------------------------- +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_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 90b70057b..180920aa4 100644 --- a/gramps/cli/grampscli.py +++ b/gramps/cli/grampscli.py @@ -35,7 +35,8 @@ Provides also two small base classes: CLIDbLoader, CLIManager #------------------------------------------------------------------------- from __future__ import print_function -from gramps.gen.ggettext import gettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext import os import sys diff --git a/gramps/cli/plug/__init__.py b/gramps/cli/plug/__init__.py index 663120254..014245637 100644 --- a/gramps/cli/plug/__init__.py +++ b/gramps/cli/plug/__init__.py @@ -35,7 +35,8 @@ #------------------------------------------------------------------------- from __future__ import print_function -from gramps.gen.ggettext import gettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext import traceback import os import sys diff --git a/gramps/cli/user.py b/gramps/cli/user.py index ea9d9933d..2896de4d3 100644 --- a/gramps/cli/user.py +++ b/gramps/cli/user.py @@ -38,7 +38,8 @@ import sys # Gramps Modules # #------------------------------------------------------------------------ -from gramps.gen.ggettext import gettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext from gramps.gen.user import User #------------------------------------------------------------------------ diff --git a/gramps/gen/config.py b/gramps/gen/config.py index 63eab45ea..b7753cb1d 100644 --- a/gramps/gen/config.py +++ b/gramps/gen/config.py @@ -41,7 +41,8 @@ import logging # Gramps imports # #--------------------------------------------------------------- -from .ggettext import gettext as _ +from .const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext from .const import HOME_DIR, USER_HOME, VERSION_DIR from .utils.configmanager import ConfigManager diff --git a/gramps/gen/const.py.in b/gramps/gen/const.py.in index 487c22fcf..fc0451630 100644 --- a/gramps/gen/const.py.in +++ b/gramps/gen/const.py.in @@ -224,8 +224,7 @@ LICENSE_FILE = os.path.join(DOC_DIR, 'COPYING') #------------------------------------------------------------------------- from .utils.grampslocale import GrampsLocale GRAMPS_LOCALE = GrampsLocale() -from .ggettext import sgettext as _ ->>>>>>> GrampsLocale: Replace use of the GNU Gettext API with the Gettext Class API +_ = GRAMPS_LOCALE.get_translation().sgettext #------------------------------------------------------------------------- # @@ -339,7 +338,6 @@ SHORTOPTS = "O:C:i:e:f:a:p:d:c:lLhuv?s" GRAMPS_UUID = uuid.UUID('516cd010-5a41-470f-99f8-eb22f1098ad6') -<<<<<<< HEAD def need_to_update_const(): """ Check to see if this file is older than setup.py or const.py.in """ @@ -365,11 +363,3 @@ def need_to_update_const(): if need_to_update_const(): print("Outdated gramps.gen.const; please run 'python setup.py build'") - -GRAMPS_LOCALE = 0 -from .utils.grampslocale import GrampsLocale -GRAMPS_LOCALE = GrampsLocale() - - -======= ->>>>>>> GrampsLocale: Replace use of the GNU Gettext API with the Gettext Class API diff --git a/gramps/gen/db/base.py b/gramps/gen/db/base.py index 846aa6fb4..ce995a75b 100644 --- a/gramps/gen/db/base.py +++ b/gramps/gen/db/base.py @@ -32,7 +32,8 @@ from this class. # Python libraries # #------------------------------------------------------------------------- -from ..ggettext import gettext as _ +from ..const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/db/exceptions.py b/gramps/gen/db/exceptions.py index 91ff64e48..ef4d0910f 100644 --- a/gramps/gen/db/exceptions.py +++ b/gramps/gen/db/exceptions.py @@ -27,7 +27,8 @@ # Standard python modules # #------------------------------------------------------------------------- -from ..ggettext import gettext as _ +from ..const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext class DbException(Exception): diff --git a/gramps/gen/db/read.py b/gramps/gen/db/read.py index 19e3f7a00..edf5923c3 100644 --- a/gramps/gen/db/read.py +++ b/gramps/gen/db/read.py @@ -49,7 +49,8 @@ if config.get('preferences.use-bsddb3') or sys.version_info[0] >= 3: from bsddb3 import db else: from bsddb import db -from ..ggettext import gettext as _ +from ..const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext import re import logging diff --git a/gramps/gen/db/undoredo.py b/gramps/gen/db/undoredo.py index 9303621df..078f3297c 100644 --- a/gramps/gen/db/undoredo.py +++ b/gramps/gen/db/undoredo.py @@ -46,7 +46,8 @@ if config.get('preferences.use-bsddb3') or sys.version_info[0] >= 3: from bsddb3 import db else: from bsddb import db -from ..ggettext import gettext as _ +from ..const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/db/upgrade.py b/gramps/gen/db/upgrade.py index 0608b15e9..1df9bf040 100644 --- a/gramps/gen/db/upgrade.py +++ b/gramps/gen/db/upgrade.py @@ -30,8 +30,9 @@ import time import logging LOG = logging.getLogger(".citation") -from ..ggettext import gettext as _ -from ..constfunc import cuni, UNITYPE +from ..const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext +from ..constfunc import cuni """ methods to upgrade a database from version 13 to current version diff --git a/gramps/gen/db/write.py b/gramps/gen/db/write.py index 6e6f3e659..417bb557c 100644 --- a/gramps/gen/db/write.py +++ b/gramps/gen/db/write.py @@ -46,7 +46,8 @@ from functools import wraps import logging from sys import maxsize -from ..ggettext import gettext as _ +from ..const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext from ..config import config if config.get('preferences.use-bsddb3') or sys.version_info[0] >= 3: from bsddb3 import dbshelve, db diff --git a/gramps/gen/display/name.py b/gramps/gen/display/name.py index d499bb6d9..578bff562 100644 --- a/gramps/gen/display/name.py +++ b/gramps/gen/display/name.py @@ -53,8 +53,8 @@ Specific symbols for parts of a name are defined: # Python modules # #------------------------------------------------------------------------- -from ..ggettext import sgettext as _ -import sys +from ..const import GRAMPS_LOCALE as glocale +_ = glocale.get_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 f9ec36905..5291d8611 100644 --- a/gramps/gen/filters/_filterparser.py +++ b/gramps/gen/filters/_filterparser.py @@ -28,7 +28,8 @@ from __future__ import print_function, unicode_literals from xml.sax import handler -from ..ggettext import gettext as _ +from ..const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/_changedsincebase.py b/gramps/gen/filters/rules/_changedsincebase.py index 031d99a00..f052f584b 100644 --- a/gramps/gen/filters/rules/_changedsincebase.py +++ b/gramps/gen/filters/rules/_changedsincebase.py @@ -26,7 +26,8 @@ # Standard Python modules # #------------------------------------------------------------------------- -from ...ggettext import gettext as _ +from ...const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext import re import time diff --git a/gramps/gen/filters/rules/_everything.py b/gramps/gen/filters/rules/_everything.py index 3dfb460c5..5b0ad50d2 100644 --- a/gramps/gen/filters/rules/_everything.py +++ b/gramps/gen/filters/rules/_everything.py @@ -25,7 +25,8 @@ # Standard Python modules # #------------------------------------------------------------------------- -from ...ggettext import gettext as _ +from ...const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/_hasattributebase.py b/gramps/gen/filters/rules/_hasattributebase.py index 3cf93e168..0b189caf0 100644 --- a/gramps/gen/filters/rules/_hasattributebase.py +++ b/gramps/gen/filters/rules/_hasattributebase.py @@ -25,7 +25,8 @@ # Standard Python modules # #------------------------------------------------------------------------- -from ...ggettext import gettext as _ +from ...const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/_hascitationbase.py b/gramps/gen/filters/rules/_hascitationbase.py index c03722761..6f69837be 100644 --- a/gramps/gen/filters/rules/_hascitationbase.py +++ b/gramps/gen/filters/rules/_hascitationbase.py @@ -26,7 +26,8 @@ # Standard Python modules # #------------------------------------------------------------------------- -from ...ggettext import gettext as _ +from ...const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/_haseventbase.py b/gramps/gen/filters/rules/_haseventbase.py index 2161acbad..5628b1db7 100644 --- a/gramps/gen/filters/rules/_haseventbase.py +++ b/gramps/gen/filters/rules/_haseventbase.py @@ -25,7 +25,8 @@ # Standard Python modules # #------------------------------------------------------------------------- -from ...ggettext import gettext as _ +from ...const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/_hasgallerybase.py b/gramps/gen/filters/rules/_hasgallerybase.py index 16ae2e9cc..19fe804db 100755 --- a/gramps/gen/filters/rules/_hasgallerybase.py +++ b/gramps/gen/filters/rules/_hasgallerybase.py @@ -28,7 +28,8 @@ # Standard Python modules # #------------------------------------------------------------------------- -from ...ggettext import gettext as _ +from ...const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/_hasgrampsid.py b/gramps/gen/filters/rules/_hasgrampsid.py index 652ff2b47..115d62542 100644 --- a/gramps/gen/filters/rules/_hasgrampsid.py +++ b/gramps/gen/filters/rules/_hasgrampsid.py @@ -26,7 +26,8 @@ # Standard Python modules # #------------------------------------------------------------------------- -from ...ggettext import gettext as _ +from ...const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/_hasldsbase.py b/gramps/gen/filters/rules/_hasldsbase.py index 790d6d6f7..9def6f1b8 100755 --- a/gramps/gen/filters/rules/_hasldsbase.py +++ b/gramps/gen/filters/rules/_hasldsbase.py @@ -28,7 +28,8 @@ # Standard Python modules # #------------------------------------------------------------------------- -from ...ggettext import gettext as _ +from ...const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/_hasnotebase.py b/gramps/gen/filters/rules/_hasnotebase.py index e73842518..ea688715a 100755 --- a/gramps/gen/filters/rules/_hasnotebase.py +++ b/gramps/gen/filters/rules/_hasnotebase.py @@ -29,7 +29,8 @@ # Standard Python modules # #------------------------------------------------------------------------- -from ...ggettext import gettext as _ +from ...const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/_hasnoteregexbase.py b/gramps/gen/filters/rules/_hasnoteregexbase.py index 86e7ca4aa..a32b06cd8 100644 --- a/gramps/gen/filters/rules/_hasnoteregexbase.py +++ b/gramps/gen/filters/rules/_hasnoteregexbase.py @@ -26,7 +26,8 @@ # #------------------------------------------------------------------------- import re -from ...ggettext import gettext as _ +from ...const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/_hasnotesubstrbase.py b/gramps/gen/filters/rules/_hasnotesubstrbase.py index ca2a5cf10..1a7427445 100644 --- a/gramps/gen/filters/rules/_hasnotesubstrbase.py +++ b/gramps/gen/filters/rules/_hasnotesubstrbase.py @@ -25,7 +25,8 @@ # Standard Python modules # #------------------------------------------------------------------------- -from ...ggettext import gettext as _ +from ...const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/_hasreferencecountbase.py b/gramps/gen/filters/rules/_hasreferencecountbase.py index 497dbf4f8..6cee7b745 100644 --- a/gramps/gen/filters/rules/_hasreferencecountbase.py +++ b/gramps/gen/filters/rules/_hasreferencecountbase.py @@ -25,7 +25,8 @@ # Standard Python modules # #------------------------------------------------------------------------- -from ...ggettext import gettext as _ +from ...const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/_hassourcebase.py b/gramps/gen/filters/rules/_hassourcebase.py index 7da17576f..774b242d7 100644 --- a/gramps/gen/filters/rules/_hassourcebase.py +++ b/gramps/gen/filters/rules/_hassourcebase.py @@ -26,7 +26,8 @@ # Standard Python modules # #------------------------------------------------------------------------- -from ...ggettext import gettext as _ +from ...const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/_hassourcecountbase.py b/gramps/gen/filters/rules/_hassourcecountbase.py index bd1228d49..61cbad48c 100755 --- a/gramps/gen/filters/rules/_hassourcecountbase.py +++ b/gramps/gen/filters/rules/_hassourcecountbase.py @@ -28,7 +28,8 @@ # Standard Python modules # #------------------------------------------------------------------------- -from ...ggettext import gettext as _ +from ...const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/_hassourceofbase.py b/gramps/gen/filters/rules/_hassourceofbase.py index d9011963b..728f2d1d4 100644 --- a/gramps/gen/filters/rules/_hassourceofbase.py +++ b/gramps/gen/filters/rules/_hassourceofbase.py @@ -26,7 +26,8 @@ # Standard Python modules # #------------------------------------------------------------------------- -from ...ggettext import gettext as _ +from ...const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/_hastagbase.py b/gramps/gen/filters/rules/_hastagbase.py index 0b62e294e..6837d1e61 100644 --- a/gramps/gen/filters/rules/_hastagbase.py +++ b/gramps/gen/filters/rules/_hastagbase.py @@ -27,7 +27,8 @@ Rule that checks for an object with a particular tag. # Standard Python modules # #------------------------------------------------------------------------- -from ...ggettext import gettext as _ +from ...const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/_hastextmatchingsubstringof.py b/gramps/gen/filters/rules/_hastextmatchingsubstringof.py index d3656a688..50bae9cd3 100644 --- a/gramps/gen/filters/rules/_hastextmatchingsubstringof.py +++ b/gramps/gen/filters/rules/_hastextmatchingsubstringof.py @@ -25,7 +25,8 @@ # Standard Python modules # #------------------------------------------------------------------------- -from ...ggettext import gettext as _ +from ...const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/_isprivate.py b/gramps/gen/filters/rules/_isprivate.py index 9489990cb..85db6af6b 100644 --- a/gramps/gen/filters/rules/_isprivate.py +++ b/gramps/gen/filters/rules/_isprivate.py @@ -23,7 +23,8 @@ # Standard Python modules # #------------------------------------------------------------------------- -from ...ggettext import gettext as _ +from ...const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/_ispublic.py b/gramps/gen/filters/rules/_ispublic.py index 611462fc9..07cca589a 100644 --- a/gramps/gen/filters/rules/_ispublic.py +++ b/gramps/gen/filters/rules/_ispublic.py @@ -26,7 +26,8 @@ # GRAMPS modules # #------------------------------------------------------------------------- -from gramps.gen.ggettext import gettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext from . import Rule #------------------------------------------------------------------------- diff --git a/gramps/gen/filters/rules/_matcheseventfilterbase.py b/gramps/gen/filters/rules/_matcheseventfilterbase.py index d7fbc375e..a2addbab0 100644 --- a/gramps/gen/filters/rules/_matcheseventfilterbase.py +++ b/gramps/gen/filters/rules/_matcheseventfilterbase.py @@ -25,7 +25,8 @@ # Standard Python modules # #------------------------------------------------------------------------- -from ...ggettext import gettext as _ +from ...const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/_matchesfilterbase.py b/gramps/gen/filters/rules/_matchesfilterbase.py index a47ac3e94..98c25ba77 100644 --- a/gramps/gen/filters/rules/_matchesfilterbase.py +++ b/gramps/gen/filters/rules/_matchesfilterbase.py @@ -25,7 +25,6 @@ # Standard Python modules # #------------------------------------------------------------------------- -from ...ggettext import gettext as _ import logging LOG = logging.getLogger(".filter") @@ -36,6 +35,8 @@ 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 import gramps.gen.filters from . import Rule diff --git a/gramps/gen/filters/rules/_matchessourceconfidencebase.py b/gramps/gen/filters/rules/_matchessourceconfidencebase.py index f0281dc81..f346b02d8 100644 --- a/gramps/gen/filters/rules/_matchessourceconfidencebase.py +++ b/gramps/gen/filters/rules/_matchessourceconfidencebase.py @@ -29,7 +29,8 @@ # Standard Python modules # #------------------------------------------------------------------------- -from ...ggettext import gettext as _ +from ...const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/_matchessourcefilterbase.py b/gramps/gen/filters/rules/_matchessourcefilterbase.py index e803916fc..250bcc348 100644 --- a/gramps/gen/filters/rules/_matchessourcefilterbase.py +++ b/gramps/gen/filters/rules/_matchessourcefilterbase.py @@ -26,7 +26,8 @@ # Standard Python modules # #------------------------------------------------------------------------- -from ...ggettext import gettext as _ +from ...const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/_regexpidbase.py b/gramps/gen/filters/rules/_regexpidbase.py index 99ed1a004..cb486e01a 100644 --- a/gramps/gen/filters/rules/_regexpidbase.py +++ b/gramps/gen/filters/rules/_regexpidbase.py @@ -26,7 +26,8 @@ # #------------------------------------------------------------------------- import re -from ...ggettext import gettext as _ +from ...const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/_rule.py b/gramps/gen/filters/rules/_rule.py index d4f7140a5..ee2bfcb6f 100644 --- a/gramps/gen/filters/rules/_rule.py +++ b/gramps/gen/filters/rules/_rule.py @@ -30,7 +30,8 @@ Base class for filter rules. # Standard Python modules # #------------------------------------------------------------------------- -from ...ggettext import gettext as _ +from ...const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext import re #------------------------------------------------------------------------- diff --git a/gramps/gen/filters/rules/citation/_allcitations.py b/gramps/gen/filters/rules/citation/_allcitations.py index 71bc3b32e..1f7de3bf0 100644 --- a/gramps/gen/filters/rules/citation/_allcitations.py +++ b/gramps/gen/filters/rules/citation/_allcitations.py @@ -26,7 +26,8 @@ # Standard Python modules # #------------------------------------------------------------------------- -from ....ggettext import gettext as _ +from ....const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/citation/_changedsince.py b/gramps/gen/filters/rules/citation/_changedsince.py index 9d78b9fb4..ee43f6cea 100644 --- a/gramps/gen/filters/rules/citation/_changedsince.py +++ b/gramps/gen/filters/rules/citation/_changedsince.py @@ -26,7 +26,8 @@ # Standard Python modules # #------------------------------------------------------------------------- -from ....ggettext import gettext as _ +from ....const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/citation/_citationprivate.py b/gramps/gen/filters/rules/citation/_citationprivate.py index 54c67407f..b92b9b22d 100644 --- a/gramps/gen/filters/rules/citation/_citationprivate.py +++ b/gramps/gen/filters/rules/citation/_citationprivate.py @@ -26,7 +26,8 @@ # Standard Python modules # #------------------------------------------------------------------------- -from ....ggettext import gettext as _ +from ....const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/citation/_hascitation.py b/gramps/gen/filters/rules/citation/_hascitation.py index 0c59473e7..66e1e9320 100644 --- a/gramps/gen/filters/rules/citation/_hascitation.py +++ b/gramps/gen/filters/rules/citation/_hascitation.py @@ -28,7 +28,8 @@ Filter rule to match citation data. # Standard Python modules # #------------------------------------------------------------------------- -from ....ggettext import gettext as _ +from ....const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/citation/_hasgallery.py b/gramps/gen/filters/rules/citation/_hasgallery.py index 69c3b0519..82c99da84 100755 --- a/gramps/gen/filters/rules/citation/_hasgallery.py +++ b/gramps/gen/filters/rules/citation/_hasgallery.py @@ -28,7 +28,8 @@ # Standard Python modules # #------------------------------------------------------------------------- -from ....ggettext import gettext as _ +from ....const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/citation/_hasidof.py b/gramps/gen/filters/rules/citation/_hasidof.py index 7dffeddf0..f773b9e78 100644 --- a/gramps/gen/filters/rules/citation/_hasidof.py +++ b/gramps/gen/filters/rules/citation/_hasidof.py @@ -26,7 +26,8 @@ # Standard Python modules # #------------------------------------------------------------------------- -from ....ggettext import gettext as _ +from ....const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/citation/_hasnote.py b/gramps/gen/filters/rules/citation/_hasnote.py index 46135b009..650c280f2 100755 --- a/gramps/gen/filters/rules/citation/_hasnote.py +++ b/gramps/gen/filters/rules/citation/_hasnote.py @@ -29,7 +29,8 @@ # Standard Python modules # #------------------------------------------------------------------------- -from ....ggettext import gettext as _ +from ....const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/citation/_hasnotematchingsubstringof.py b/gramps/gen/filters/rules/citation/_hasnotematchingsubstringof.py index 45c27552f..a28b691cf 100644 --- a/gramps/gen/filters/rules/citation/_hasnotematchingsubstringof.py +++ b/gramps/gen/filters/rules/citation/_hasnotematchingsubstringof.py @@ -26,7 +26,8 @@ # Standard Python modules # #------------------------------------------------------------------------- -from ....ggettext import gettext as _ +from ....const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/citation/_hasnoteregexp.py b/gramps/gen/filters/rules/citation/_hasnoteregexp.py index cd32e9607..1d6217bbe 100644 --- a/gramps/gen/filters/rules/citation/_hasnoteregexp.py +++ b/gramps/gen/filters/rules/citation/_hasnoteregexp.py @@ -26,7 +26,8 @@ # Standard Python modules # #------------------------------------------------------------------------- -from ....ggettext import gettext as _ +from ....const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/citation/_hasreferencecountof.py b/gramps/gen/filters/rules/citation/_hasreferencecountof.py index 4f2c8a7c6..c6e5cc306 100644 --- a/gramps/gen/filters/rules/citation/_hasreferencecountof.py +++ b/gramps/gen/filters/rules/citation/_hasreferencecountof.py @@ -26,7 +26,8 @@ # Standard Python modules # #------------------------------------------------------------------------- -from ....ggettext import gettext as _ +from ....const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/citation/_hassource.py b/gramps/gen/filters/rules/citation/_hassource.py index 5bd2bf4b9..a8635e51a 100644 --- a/gramps/gen/filters/rules/citation/_hassource.py +++ b/gramps/gen/filters/rules/citation/_hassource.py @@ -29,7 +29,8 @@ Filter rule to match citation with a particular source. # Standard Python modules # #------------------------------------------------------------------------- -from ....ggettext import gettext as _ +from ....const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/citation/_matchesfilter.py b/gramps/gen/filters/rules/citation/_matchesfilter.py index 23f66af21..ec15e9f85 100644 --- a/gramps/gen/filters/rules/citation/_matchesfilter.py +++ b/gramps/gen/filters/rules/citation/_matchesfilter.py @@ -26,7 +26,8 @@ # Standard Python modules # #------------------------------------------------------------------------- -from ....ggettext import gettext as _ +from ....const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/citation/_matchespagesubstringof.py b/gramps/gen/filters/rules/citation/_matchespagesubstringof.py index 60c555c24..09bd9ec4d 100644 --- a/gramps/gen/filters/rules/citation/_matchespagesubstringof.py +++ b/gramps/gen/filters/rules/citation/_matchespagesubstringof.py @@ -25,7 +25,8 @@ # Standard Python modules # #------------------------------------------------------------------------- -from ....ggettext import gettext as _ +from ....const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/citation/_matchesrepositoryfilter.py b/gramps/gen/filters/rules/citation/_matchesrepositoryfilter.py index 602e570f3..be63a2924 100644 --- a/gramps/gen/filters/rules/citation/_matchesrepositoryfilter.py +++ b/gramps/gen/filters/rules/citation/_matchesrepositoryfilter.py @@ -28,7 +28,8 @@ #------------------------------------------------------------------------- import logging LOG = logging.getLogger(".citation") -from ....ggettext import gettext as _ +from ....const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/citation/_matchessourcefilter.py b/gramps/gen/filters/rules/citation/_matchessourcefilter.py index 3f018e850..f8bf6cfdd 100644 --- a/gramps/gen/filters/rules/citation/_matchessourcefilter.py +++ b/gramps/gen/filters/rules/citation/_matchessourcefilter.py @@ -27,7 +27,8 @@ # Standard Python modules # #------------------------------------------------------------------------- -from ....ggettext import gettext as _ +from ....const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/citation/_regexpidof.py b/gramps/gen/filters/rules/citation/_regexpidof.py index 51ae317a4..ce3a3c2b9 100644 --- a/gramps/gen/filters/rules/citation/_regexpidof.py +++ b/gramps/gen/filters/rules/citation/_regexpidof.py @@ -26,7 +26,8 @@ # Standard Python modules # #------------------------------------------------------------------------- -from ....ggettext import gettext as _ +from ....const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/event/_allevents.py b/gramps/gen/filters/rules/event/_allevents.py index 58a0e40e9..d1d4ae5ee 100644 --- a/gramps/gen/filters/rules/event/_allevents.py +++ b/gramps/gen/filters/rules/event/_allevents.py @@ -25,7 +25,8 @@ # Standard Python modules # #------------------------------------------------------------------------- -from ....ggettext import gettext as _ +from ....const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/event/_changedsince.py b/gramps/gen/filters/rules/event/_changedsince.py index bc4078a6c..a49179d9a 100644 --- a/gramps/gen/filters/rules/event/_changedsince.py +++ b/gramps/gen/filters/rules/event/_changedsince.py @@ -26,7 +26,8 @@ # Standard Python modules # #------------------------------------------------------------------------- -from ....ggettext import gettext as _ +from ....const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/event/_eventprivate.py b/gramps/gen/filters/rules/event/_eventprivate.py index 72ceb556c..05952357a 100644 --- a/gramps/gen/filters/rules/event/_eventprivate.py +++ b/gramps/gen/filters/rules/event/_eventprivate.py @@ -25,7 +25,8 @@ # Standard Python modules # #------------------------------------------------------------------------- -from ....ggettext import gettext as _ +from ....const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/event/_hasattribute.py b/gramps/gen/filters/rules/event/_hasattribute.py index 386b9cc3a..bf5bf0b61 100644 --- a/gramps/gen/filters/rules/event/_hasattribute.py +++ b/gramps/gen/filters/rules/event/_hasattribute.py @@ -25,7 +25,8 @@ # Standard Python modules # #------------------------------------------------------------------------- -from ....ggettext import gettext as _ +from ....const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/event/_hascitation.py b/gramps/gen/filters/rules/event/_hascitation.py index 1ba1ace9b..de69708bd 100644 --- a/gramps/gen/filters/rules/event/_hascitation.py +++ b/gramps/gen/filters/rules/event/_hascitation.py @@ -29,7 +29,8 @@ Filter rule to match event with a particular citation. # Standard Python modules # #------------------------------------------------------------------------- -from ....ggettext import gettext as _ +from ....const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/event/_hasdata.py b/gramps/gen/filters/rules/event/_hasdata.py index cb5284de3..c74b2ba1e 100644 --- a/gramps/gen/filters/rules/event/_hasdata.py +++ b/gramps/gen/filters/rules/event/_hasdata.py @@ -25,7 +25,8 @@ # Standard Python modules # #------------------------------------------------------------------------- -from ....ggettext import gettext as _ +from ....const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/event/_hasgallery.py b/gramps/gen/filters/rules/event/_hasgallery.py index 3fe726cd7..a267e8bad 100755 --- a/gramps/gen/filters/rules/event/_hasgallery.py +++ b/gramps/gen/filters/rules/event/_hasgallery.py @@ -28,7 +28,8 @@ # Standard Python modules # #------------------------------------------------------------------------- -from ....ggettext import gettext as _ +from ....const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/event/_hasidof.py b/gramps/gen/filters/rules/event/_hasidof.py index 47a6f5562..4c094a047 100644 --- a/gramps/gen/filters/rules/event/_hasidof.py +++ b/gramps/gen/filters/rules/event/_hasidof.py @@ -25,7 +25,8 @@ # Standard Python modules # #------------------------------------------------------------------------- -from ....ggettext import gettext as _ +from ....const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/event/_hasnote.py b/gramps/gen/filters/rules/event/_hasnote.py index 2c5ebd5f2..1cc979ac4 100755 --- a/gramps/gen/filters/rules/event/_hasnote.py +++ b/gramps/gen/filters/rules/event/_hasnote.py @@ -28,7 +28,8 @@ # Standard Python modules # #------------------------------------------------------------------------- -from ....ggettext import gettext as _ +from ....const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/event/_hasnotematchingsubstringof.py b/gramps/gen/filters/rules/event/_hasnotematchingsubstringof.py index ee41f4b33..f706aa9c8 100644 --- a/gramps/gen/filters/rules/event/_hasnotematchingsubstringof.py +++ b/gramps/gen/filters/rules/event/_hasnotematchingsubstringof.py @@ -25,7 +25,8 @@ # Standard Python modules # #------------------------------------------------------------------------- -from ....ggettext import gettext as _ +from ....const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/event/_hasnoteregexp.py b/gramps/gen/filters/rules/event/_hasnoteregexp.py index 498b6e125..8f0500b81 100644 --- a/gramps/gen/filters/rules/event/_hasnoteregexp.py +++ b/gramps/gen/filters/rules/event/_hasnoteregexp.py @@ -25,7 +25,8 @@ # Standard Python modules # #------------------------------------------------------------------------- -from ....ggettext import gettext as _ +from ....const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/event/_hasreferencecountof.py b/gramps/gen/filters/rules/event/_hasreferencecountof.py index b4e006a5d..c361499c2 100644 --- a/gramps/gen/filters/rules/event/_hasreferencecountof.py +++ b/gramps/gen/filters/rules/event/_hasreferencecountof.py @@ -25,7 +25,8 @@ # Standard Python modules # #------------------------------------------------------------------------- -from ....ggettext import gettext as _ +from ....const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/event/_hassourcecount.py b/gramps/gen/filters/rules/event/_hassourcecount.py index a318b5716..bec77fd27 100644 --- a/gramps/gen/filters/rules/event/_hassourcecount.py +++ b/gramps/gen/filters/rules/event/_hassourcecount.py @@ -27,7 +27,8 @@ # Standard Python modules # #------------------------------------------------------------------------- -from ....ggettext import gettext as _ +from ....const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/event/_hastype.py b/gramps/gen/filters/rules/event/_hastype.py index 625f603e2..780548dff 100644 --- a/gramps/gen/filters/rules/event/_hastype.py +++ b/gramps/gen/filters/rules/event/_hastype.py @@ -25,7 +25,8 @@ # Standard Python modules # #------------------------------------------------------------------------- -from ....ggettext import gettext as _ +from ....const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/event/_matchesfilter.py b/gramps/gen/filters/rules/event/_matchesfilter.py index 0ad712a08..1c87b36f8 100644 --- a/gramps/gen/filters/rules/event/_matchesfilter.py +++ b/gramps/gen/filters/rules/event/_matchesfilter.py @@ -25,7 +25,8 @@ # Standard Python modules # #------------------------------------------------------------------------- -from ....ggettext import gettext as _ +from ....const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/event/_matchespersonfilter.py b/gramps/gen/filters/rules/event/_matchespersonfilter.py index 11ae8ae73..4ecbd73e2 100644 --- a/gramps/gen/filters/rules/event/_matchespersonfilter.py +++ b/gramps/gen/filters/rules/event/_matchespersonfilter.py @@ -25,7 +25,8 @@ # Standard Python modules # #------------------------------------------------------------------------- -from ....ggettext import gettext as _ +from ....const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/event/_matchessourceconfidence.py b/gramps/gen/filters/rules/event/_matchessourceconfidence.py index feae5830c..5d040d9ed 100644 --- a/gramps/gen/filters/rules/event/_matchessourceconfidence.py +++ b/gramps/gen/filters/rules/event/_matchessourceconfidence.py @@ -26,7 +26,8 @@ # Standard Python modules # #------------------------------------------------------------------------- -from ....ggettext import sgettext as _ +from ....const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().sgettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/event/_matchessourcefilter.py b/gramps/gen/filters/rules/event/_matchessourcefilter.py index b802c4fa1..7cb61501d 100644 --- a/gramps/gen/filters/rules/event/_matchessourcefilter.py +++ b/gramps/gen/filters/rules/event/_matchessourcefilter.py @@ -27,7 +27,8 @@ # Standard Python modules # #------------------------------------------------------------------------- -from ....ggettext import gettext as _ +from ....const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/event/_regexpidof.py b/gramps/gen/filters/rules/event/_regexpidof.py index 9cbb1b97d..a6adc0f1a 100644 --- a/gramps/gen/filters/rules/event/_regexpidof.py +++ b/gramps/gen/filters/rules/event/_regexpidof.py @@ -25,7 +25,8 @@ # Standard Python modules # #------------------------------------------------------------------------- -from ....ggettext import gettext as _ +from ....const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/family/_allfamilies.py b/gramps/gen/filters/rules/family/_allfamilies.py index d3bb04c11..c11dd9625 100644 --- a/gramps/gen/filters/rules/family/_allfamilies.py +++ b/gramps/gen/filters/rules/family/_allfamilies.py @@ -25,7 +25,8 @@ # Standard Python modules # #------------------------------------------------------------------------- -from ....ggettext import gettext as _ +from ....const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/family/_changedsince.py b/gramps/gen/filters/rules/family/_changedsince.py index f142c7d03..172ed76cc 100644 --- a/gramps/gen/filters/rules/family/_changedsince.py +++ b/gramps/gen/filters/rules/family/_changedsince.py @@ -26,7 +26,8 @@ # Standard Python modules # #------------------------------------------------------------------------- -from ....ggettext import gettext as _ +from ....const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/family/_childhasidof.py b/gramps/gen/filters/rules/family/_childhasidof.py index aae58e238..b68198b89 100644 --- a/gramps/gen/filters/rules/family/_childhasidof.py +++ b/gramps/gen/filters/rules/family/_childhasidof.py @@ -25,7 +25,8 @@ # Standard Python modules # #------------------------------------------------------------------------- -from ....ggettext import gettext as _ +from ....const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/family/_childhasnameof.py b/gramps/gen/filters/rules/family/_childhasnameof.py index 71ec16b6a..8a4c7efca 100644 --- a/gramps/gen/filters/rules/family/_childhasnameof.py +++ b/gramps/gen/filters/rules/family/_childhasnameof.py @@ -25,7 +25,8 @@ # Standard Python modules # #------------------------------------------------------------------------- -from ....ggettext import gettext as _ +from ....const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/family/_familyprivate.py b/gramps/gen/filters/rules/family/_familyprivate.py index 7e77cb576..775bce695 100644 --- a/gramps/gen/filters/rules/family/_familyprivate.py +++ b/gramps/gen/filters/rules/family/_familyprivate.py @@ -25,7 +25,8 @@ # Standard Python modules # #------------------------------------------------------------------------- -from ....ggettext import gettext as _ +from ....const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/family/_fatherhasidof.py b/gramps/gen/filters/rules/family/_fatherhasidof.py index 57fa18378..3e73fc31d 100644 --- a/gramps/gen/filters/rules/family/_fatherhasidof.py +++ b/gramps/gen/filters/rules/family/_fatherhasidof.py @@ -25,7 +25,8 @@ # Standard Python modules # #------------------------------------------------------------------------- -from ....ggettext import gettext as _ +from ....const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/family/_fatherhasnameof.py b/gramps/gen/filters/rules/family/_fatherhasnameof.py index 4277c4f7d..7f443917b 100644 --- a/gramps/gen/filters/rules/family/_fatherhasnameof.py +++ b/gramps/gen/filters/rules/family/_fatherhasnameof.py @@ -25,7 +25,8 @@ # Standard Python modules # #------------------------------------------------------------------------- -from ....ggettext import gettext as _ +from ....const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/family/_hasattribute.py b/gramps/gen/filters/rules/family/_hasattribute.py index 91d672a24..6a1acda43 100644 --- a/gramps/gen/filters/rules/family/_hasattribute.py +++ b/gramps/gen/filters/rules/family/_hasattribute.py @@ -25,7 +25,8 @@ # Standard Python modules # #------------------------------------------------------------------------- -from ....ggettext import gettext as _ +from ....const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/family/_hascitation.py b/gramps/gen/filters/rules/family/_hascitation.py index 13af919b5..426989a8c 100644 --- a/gramps/gen/filters/rules/family/_hascitation.py +++ b/gramps/gen/filters/rules/family/_hascitation.py @@ -29,7 +29,8 @@ Filter rule to match family with a particular citation. # Standard Python modules # #------------------------------------------------------------------------- -from ....ggettext import gettext as _ +from ....const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/family/_hasevent.py b/gramps/gen/filters/rules/family/_hasevent.py index 41cfb0ecb..90a9d2289 100644 --- a/gramps/gen/filters/rules/family/_hasevent.py +++ b/gramps/gen/filters/rules/family/_hasevent.py @@ -28,7 +28,8 @@ Filter rule to match families with a particular event. # Standard Python modules # #------------------------------------------------------------------------- -from ....ggettext import gettext as _ +from ....const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/family/_hasgallery.py b/gramps/gen/filters/rules/family/_hasgallery.py index f03d24f76..e91b05284 100755 --- a/gramps/gen/filters/rules/family/_hasgallery.py +++ b/gramps/gen/filters/rules/family/_hasgallery.py @@ -28,7 +28,8 @@ # Standard Python modules # #------------------------------------------------------------------------- -from ....ggettext import gettext as _ +from ....const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/family/_hasidof.py b/gramps/gen/filters/rules/family/_hasidof.py index 78aaa5da6..80d1e0a9e 100644 --- a/gramps/gen/filters/rules/family/_hasidof.py +++ b/gramps/gen/filters/rules/family/_hasidof.py @@ -25,7 +25,8 @@ # Standard Python modules # #------------------------------------------------------------------------- -from ....ggettext import gettext as _ +from ....const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/family/_haslds.py b/gramps/gen/filters/rules/family/_haslds.py index 2be58a65a..ada984ccf 100755 --- a/gramps/gen/filters/rules/family/_haslds.py +++ b/gramps/gen/filters/rules/family/_haslds.py @@ -28,7 +28,8 @@ # Standard Python modules # #------------------------------------------------------------------------- -from ....ggettext import gettext as _ +from ....const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/family/_hasnote.py b/gramps/gen/filters/rules/family/_hasnote.py index 26a47da5a..b129a1839 100755 --- a/gramps/gen/filters/rules/family/_hasnote.py +++ b/gramps/gen/filters/rules/family/_hasnote.py @@ -28,7 +28,8 @@ # Standard Python modules # #------------------------------------------------------------------------- -from ....ggettext import gettext as _ +from ....const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/family/_hasnotematchingsubstringof.py b/gramps/gen/filters/rules/family/_hasnotematchingsubstringof.py index 0b230a9e4..055fd1ac7 100644 --- a/gramps/gen/filters/rules/family/_hasnotematchingsubstringof.py +++ b/gramps/gen/filters/rules/family/_hasnotematchingsubstringof.py @@ -25,7 +25,8 @@ # Standard Python modules # #------------------------------------------------------------------------- -from ....ggettext import gettext as _ +from ....const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/family/_hasnoteregexp.py b/gramps/gen/filters/rules/family/_hasnoteregexp.py index 6bf8635cd..ec9ca1744 100644 --- a/gramps/gen/filters/rules/family/_hasnoteregexp.py +++ b/gramps/gen/filters/rules/family/_hasnoteregexp.py @@ -25,7 +25,8 @@ # Standard Python modules # #------------------------------------------------------------------------- -from ....ggettext import gettext as _ +from ....const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/family/_hasreferencecountof.py b/gramps/gen/filters/rules/family/_hasreferencecountof.py index c604ce8f4..ad612653e 100644 --- a/gramps/gen/filters/rules/family/_hasreferencecountof.py +++ b/gramps/gen/filters/rules/family/_hasreferencecountof.py @@ -25,7 +25,8 @@ # Standard Python modules # #------------------------------------------------------------------------- -from ....ggettext import gettext as _ +from ....const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/family/_hasreltype.py b/gramps/gen/filters/rules/family/_hasreltype.py index 78f3557f9..5fc0e5490 100644 --- a/gramps/gen/filters/rules/family/_hasreltype.py +++ b/gramps/gen/filters/rules/family/_hasreltype.py @@ -25,7 +25,8 @@ # Standard Python modules # #------------------------------------------------------------------------- -from ....ggettext import gettext as _ +from ....const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/family/_hassourcecount.py b/gramps/gen/filters/rules/family/_hassourcecount.py index 0db41ee83..4ef925a9d 100755 --- a/gramps/gen/filters/rules/family/_hassourcecount.py +++ b/gramps/gen/filters/rules/family/_hassourcecount.py @@ -28,7 +28,8 @@ # Standard Python modules # #------------------------------------------------------------------------- -from ....ggettext import gettext as _ +from ....const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/family/_hassourceof.py b/gramps/gen/filters/rules/family/_hassourceof.py index ef6785200..7e2161471 100644 --- a/gramps/gen/filters/rules/family/_hassourceof.py +++ b/gramps/gen/filters/rules/family/_hassourceof.py @@ -26,7 +26,8 @@ # Standard Python modules # #------------------------------------------------------------------------- -from ....ggettext import gettext as _ +from ....const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/family/_hastag.py b/gramps/gen/filters/rules/family/_hastag.py index 78f6fb735..423346ad8 100644 --- a/gramps/gen/filters/rules/family/_hastag.py +++ b/gramps/gen/filters/rules/family/_hastag.py @@ -27,7 +27,8 @@ Rule that checks for a family with a particular tag. # Standard Python modules # #------------------------------------------------------------------------- -from ....ggettext import gettext as _ +from ....const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/family/_isbookmarked.py b/gramps/gen/filters/rules/family/_isbookmarked.py index 37cf00ae4..9dd1a7b77 100644 --- a/gramps/gen/filters/rules/family/_isbookmarked.py +++ b/gramps/gen/filters/rules/family/_isbookmarked.py @@ -25,7 +25,8 @@ # Standard Python modules # #------------------------------------------------------------------------- -from ....ggettext import gettext as _ +from ....const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/family/_matchesfilter.py b/gramps/gen/filters/rules/family/_matchesfilter.py index 7b412cd38..bd2e635d0 100644 --- a/gramps/gen/filters/rules/family/_matchesfilter.py +++ b/gramps/gen/filters/rules/family/_matchesfilter.py @@ -25,7 +25,8 @@ # Standard Python modules # #------------------------------------------------------------------------- -from ....ggettext import gettext as _ +from ....const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/family/_matchessourceconfidence.py b/gramps/gen/filters/rules/family/_matchessourceconfidence.py index f2e7fc74b..5dd8ce413 100644 --- a/gramps/gen/filters/rules/family/_matchessourceconfidence.py +++ b/gramps/gen/filters/rules/family/_matchessourceconfidence.py @@ -26,7 +26,8 @@ # Standard Python modules # #------------------------------------------------------------------------- -from ....ggettext import sgettext as _ +from ....const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().sgettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/family/_motherhasidof.py b/gramps/gen/filters/rules/family/_motherhasidof.py index ce6cb1191..841d76790 100644 --- a/gramps/gen/filters/rules/family/_motherhasidof.py +++ b/gramps/gen/filters/rules/family/_motherhasidof.py @@ -25,7 +25,8 @@ # Standard Python modules # #------------------------------------------------------------------------- -from ....ggettext import gettext as _ +from ....const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/family/_motherhasnameof.py b/gramps/gen/filters/rules/family/_motherhasnameof.py index 5c9b73b4f..f42e30279 100644 --- a/gramps/gen/filters/rules/family/_motherhasnameof.py +++ b/gramps/gen/filters/rules/family/_motherhasnameof.py @@ -25,7 +25,8 @@ # Standard Python modules # #------------------------------------------------------------------------- -from ....ggettext import gettext as _ +from ....const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/family/_regexpchildname.py b/gramps/gen/filters/rules/family/_regexpchildname.py index a3769eefb..a353421e7 100644 --- a/gramps/gen/filters/rules/family/_regexpchildname.py +++ b/gramps/gen/filters/rules/family/_regexpchildname.py @@ -25,7 +25,8 @@ # Standard Python modules # #------------------------------------------------------------------------- -from ....ggettext import gettext as _ +from ....const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/family/_regexpfathername.py b/gramps/gen/filters/rules/family/_regexpfathername.py index e11b1d642..18c92f773 100644 --- a/gramps/gen/filters/rules/family/_regexpfathername.py +++ b/gramps/gen/filters/rules/family/_regexpfathername.py @@ -25,7 +25,8 @@ # Standard Python modules # #------------------------------------------------------------------------- -from ....ggettext import gettext as _ +from ....const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/family/_regexpidof.py b/gramps/gen/filters/rules/family/_regexpidof.py index dfc7f6252..0c501d76c 100644 --- a/gramps/gen/filters/rules/family/_regexpidof.py +++ b/gramps/gen/filters/rules/family/_regexpidof.py @@ -25,7 +25,8 @@ # Standard Python modules # #------------------------------------------------------------------------- -from ....ggettext import gettext as _ +from ....const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/family/_regexpmothername.py b/gramps/gen/filters/rules/family/_regexpmothername.py index 2ad18019a..ef6ea928f 100644 --- a/gramps/gen/filters/rules/family/_regexpmothername.py +++ b/gramps/gen/filters/rules/family/_regexpmothername.py @@ -25,7 +25,8 @@ # Standard Python modules # #------------------------------------------------------------------------- -from ....ggettext import gettext as _ +from ....const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/family/_searchchildname.py b/gramps/gen/filters/rules/family/_searchchildname.py index 0e50f0603..e653103a9 100644 --- a/gramps/gen/filters/rules/family/_searchchildname.py +++ b/gramps/gen/filters/rules/family/_searchchildname.py @@ -25,7 +25,8 @@ # Standard Python modules # #------------------------------------------------------------------------- -from ....ggettext import gettext as _ +from ....const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/family/_searchfathername.py b/gramps/gen/filters/rules/family/_searchfathername.py index acec58143..83f4c9000 100644 --- a/gramps/gen/filters/rules/family/_searchfathername.py +++ b/gramps/gen/filters/rules/family/_searchfathername.py @@ -25,7 +25,8 @@ # Standard Python modules # #------------------------------------------------------------------------- -from ....ggettext import gettext as _ +from ....const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/family/_searchmothername.py b/gramps/gen/filters/rules/family/_searchmothername.py index ef3acc4ca..ee0ebeb83 100644 --- a/gramps/gen/filters/rules/family/_searchmothername.py +++ b/gramps/gen/filters/rules/family/_searchmothername.py @@ -25,7 +25,8 @@ # Standard Python modules # #------------------------------------------------------------------------- -from ....ggettext import gettext as _ +from ....const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/media/_allmedia.py b/gramps/gen/filters/rules/media/_allmedia.py index 8a4db8157..4ef9eff29 100644 --- a/gramps/gen/filters/rules/media/_allmedia.py +++ b/gramps/gen/filters/rules/media/_allmedia.py @@ -25,7 +25,8 @@ # Standard Python modules # #------------------------------------------------------------------------- -from ....ggettext import gettext as _ +from ....const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/media/_changedsince.py b/gramps/gen/filters/rules/media/_changedsince.py index 20802c907..14110d7f8 100644 --- a/gramps/gen/filters/rules/media/_changedsince.py +++ b/gramps/gen/filters/rules/media/_changedsince.py @@ -25,7 +25,8 @@ # Standard Python modules # #------------------------------------------------------------------------- -from ....ggettext import gettext as _ +from ....const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/media/_hasattribute.py b/gramps/gen/filters/rules/media/_hasattribute.py index cc13ead0f..6e5d7eded 100644 --- a/gramps/gen/filters/rules/media/_hasattribute.py +++ b/gramps/gen/filters/rules/media/_hasattribute.py @@ -25,7 +25,8 @@ # Standard Python modules # #------------------------------------------------------------------------- -from ....ggettext import gettext as _ +from ....const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/media/_hascitation.py b/gramps/gen/filters/rules/media/_hascitation.py index 8a72ac8aa..07c8a44e7 100644 --- a/gramps/gen/filters/rules/media/_hascitation.py +++ b/gramps/gen/filters/rules/media/_hascitation.py @@ -28,7 +28,8 @@ Filter rule to match persons with a particular citation. # Standard Python modules # #------------------------------------------------------------------------- -from ....ggettext import gettext as _ +from ....const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/media/_hasidof.py b/gramps/gen/filters/rules/media/_hasidof.py index 9315b59fc..eb9f64311 100644 --- a/gramps/gen/filters/rules/media/_hasidof.py +++ b/gramps/gen/filters/rules/media/_hasidof.py @@ -25,7 +25,8 @@ # Standard Python modules # #------------------------------------------------------------------------- -from ....ggettext import gettext as _ +from ....const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/media/_hasmedia.py b/gramps/gen/filters/rules/media/_hasmedia.py index 4fad9a894..59450c91f 100644 --- a/gramps/gen/filters/rules/media/_hasmedia.py +++ b/gramps/gen/filters/rules/media/_hasmedia.py @@ -25,7 +25,8 @@ # Standard Python modules # #------------------------------------------------------------------------- -from ....ggettext import gettext as _ +from ....const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/media/_hasnotematchingsubstringof.py b/gramps/gen/filters/rules/media/_hasnotematchingsubstringof.py index c3ce4138e..5fd6c489a 100644 --- a/gramps/gen/filters/rules/media/_hasnotematchingsubstringof.py +++ b/gramps/gen/filters/rules/media/_hasnotematchingsubstringof.py @@ -25,7 +25,8 @@ # Standard Python modules # #------------------------------------------------------------------------- -from ....ggettext import gettext as _ +from ....const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/media/_hasnoteregexp.py b/gramps/gen/filters/rules/media/_hasnoteregexp.py index f2ad8e1ad..ce262f154 100644 --- a/gramps/gen/filters/rules/media/_hasnoteregexp.py +++ b/gramps/gen/filters/rules/media/_hasnoteregexp.py @@ -25,7 +25,8 @@ # Standard Python modules # #------------------------------------------------------------------------- -from ....ggettext import gettext as _ +from ....const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/media/_hasreferencecountof.py b/gramps/gen/filters/rules/media/_hasreferencecountof.py index 931905f0f..eaba932a6 100644 --- a/gramps/gen/filters/rules/media/_hasreferencecountof.py +++ b/gramps/gen/filters/rules/media/_hasreferencecountof.py @@ -25,7 +25,8 @@ # Standard Python modules # #------------------------------------------------------------------------- -from ....ggettext import gettext as _ +from ....const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/media/_hassourcecount.py b/gramps/gen/filters/rules/media/_hassourcecount.py index db33fa12c..5f79fa301 100644 --- a/gramps/gen/filters/rules/media/_hassourcecount.py +++ b/gramps/gen/filters/rules/media/_hassourcecount.py @@ -28,7 +28,8 @@ # Standard Python modules # #------------------------------------------------------------------------- -from ....ggettext import gettext as _ +from ....const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/media/_hassourceof.py b/gramps/gen/filters/rules/media/_hassourceof.py index 9a88b2509..f59cac150 100644 --- a/gramps/gen/filters/rules/media/_hassourceof.py +++ b/gramps/gen/filters/rules/media/_hassourceof.py @@ -26,7 +26,8 @@ # Standard Python modules # #------------------------------------------------------------------------- -from ....ggettext import gettext as _ +from ....const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/media/_hastag.py b/gramps/gen/filters/rules/media/_hastag.py index 6782ce428..7a831eb49 100644 --- a/gramps/gen/filters/rules/media/_hastag.py +++ b/gramps/gen/filters/rules/media/_hastag.py @@ -27,7 +27,8 @@ Rule that checks for a media object with a particular tag. # Standard Python modules # #------------------------------------------------------------------------- -from ....ggettext import gettext as _ +from ....const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/media/_matchesfilter.py b/gramps/gen/filters/rules/media/_matchesfilter.py index 943ef9400..d24c76534 100644 --- a/gramps/gen/filters/rules/media/_matchesfilter.py +++ b/gramps/gen/filters/rules/media/_matchesfilter.py @@ -25,7 +25,8 @@ # Standard Python modules # #------------------------------------------------------------------------- -from ....ggettext import gettext as _ +from ....const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/media/_matchessourceconfidence.py b/gramps/gen/filters/rules/media/_matchessourceconfidence.py index df87c4c33..d6aa8568b 100644 --- a/gramps/gen/filters/rules/media/_matchessourceconfidence.py +++ b/gramps/gen/filters/rules/media/_matchessourceconfidence.py @@ -26,7 +26,8 @@ # Standard Python modules # #------------------------------------------------------------------------- -from ....ggettext import sgettext as _ +from ....const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().sgettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/media/_mediaprivate.py b/gramps/gen/filters/rules/media/_mediaprivate.py index 8e28537d7..8c91b01ea 100644 --- a/gramps/gen/filters/rules/media/_mediaprivate.py +++ b/gramps/gen/filters/rules/media/_mediaprivate.py @@ -25,7 +25,8 @@ # Standard Python modules # #------------------------------------------------------------------------- -from ....ggettext import gettext as _ +from ....const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/media/_regexpidof.py b/gramps/gen/filters/rules/media/_regexpidof.py index e857b046e..aff710a50 100644 --- a/gramps/gen/filters/rules/media/_regexpidof.py +++ b/gramps/gen/filters/rules/media/_regexpidof.py @@ -25,7 +25,8 @@ # Standard Python modules # #------------------------------------------------------------------------- -from ....ggettext import gettext as _ +from ....const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/note/_allnotes.py b/gramps/gen/filters/rules/note/_allnotes.py index 7c28fd1b6..129945e8a 100644 --- a/gramps/gen/filters/rules/note/_allnotes.py +++ b/gramps/gen/filters/rules/note/_allnotes.py @@ -25,7 +25,8 @@ # Standard Python modules # #------------------------------------------------------------------------- -from ....ggettext import gettext as _ +from ....const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/note/_changedsince.py b/gramps/gen/filters/rules/note/_changedsince.py index 7d4321e4b..075ebb3e2 100644 --- a/gramps/gen/filters/rules/note/_changedsince.py +++ b/gramps/gen/filters/rules/note/_changedsince.py @@ -26,7 +26,8 @@ # Standard Python modules # #------------------------------------------------------------------------- -from ....ggettext import gettext as _ +from ....const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/note/_hasidof.py b/gramps/gen/filters/rules/note/_hasidof.py index 3cc7ed815..8f0104ac7 100644 --- a/gramps/gen/filters/rules/note/_hasidof.py +++ b/gramps/gen/filters/rules/note/_hasidof.py @@ -25,7 +25,8 @@ # Standard Python modules # #------------------------------------------------------------------------- -from ....ggettext import gettext as _ +from ....const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/note/_hasnote.py b/gramps/gen/filters/rules/note/_hasnote.py index 3a9011d8f..5a0809359 100644 --- a/gramps/gen/filters/rules/note/_hasnote.py +++ b/gramps/gen/filters/rules/note/_hasnote.py @@ -25,7 +25,8 @@ # Standard Python modules # #------------------------------------------------------------------------- -from ....ggettext import gettext as _ +from ....const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/note/_hasreferencecountof.py b/gramps/gen/filters/rules/note/_hasreferencecountof.py index 0bb82bca7..43a6d75e4 100644 --- a/gramps/gen/filters/rules/note/_hasreferencecountof.py +++ b/gramps/gen/filters/rules/note/_hasreferencecountof.py @@ -25,7 +25,8 @@ # Standard Python modules # #------------------------------------------------------------------------- -from ....ggettext import gettext as _ +from ....const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/note/_hastag.py b/gramps/gen/filters/rules/note/_hastag.py index e0ec1f2a2..3bb325f51 100644 --- a/gramps/gen/filters/rules/note/_hastag.py +++ b/gramps/gen/filters/rules/note/_hastag.py @@ -27,7 +27,8 @@ Rule that checks for a note with a particular tag. # Standard Python modules # #------------------------------------------------------------------------- -from ....ggettext import gettext as _ +from ....const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/note/_matchesfilter.py b/gramps/gen/filters/rules/note/_matchesfilter.py index b415b273a..f27afe02e 100644 --- a/gramps/gen/filters/rules/note/_matchesfilter.py +++ b/gramps/gen/filters/rules/note/_matchesfilter.py @@ -25,7 +25,8 @@ # Standard Python modules # #------------------------------------------------------------------------- -from ....ggettext import gettext as _ +from ....const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/note/_matchesregexpof.py b/gramps/gen/filters/rules/note/_matchesregexpof.py index af564ab16..340597143 100644 --- a/gramps/gen/filters/rules/note/_matchesregexpof.py +++ b/gramps/gen/filters/rules/note/_matchesregexpof.py @@ -27,7 +27,8 @@ # #------------------------------------------------------------------------- import re -from ....ggettext import gettext as _ +from ....const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/note/_matchessubstringof.py b/gramps/gen/filters/rules/note/_matchessubstringof.py index 0aef3d1e6..d824b89a1 100644 --- a/gramps/gen/filters/rules/note/_matchessubstringof.py +++ b/gramps/gen/filters/rules/note/_matchessubstringof.py @@ -26,7 +26,8 @@ # Standard Python modules # #------------------------------------------------------------------------- -from ....ggettext import gettext as _ +from ....const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/note/_noteprivate.py b/gramps/gen/filters/rules/note/_noteprivate.py index de77b35fa..5c77c9adc 100644 --- a/gramps/gen/filters/rules/note/_noteprivate.py +++ b/gramps/gen/filters/rules/note/_noteprivate.py @@ -25,7 +25,8 @@ # Standard Python modules # #------------------------------------------------------------------------- -from ....ggettext import gettext as _ +from ....const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/note/_regexpidof.py b/gramps/gen/filters/rules/note/_regexpidof.py index f8c2d5630..863a8923b 100644 --- a/gramps/gen/filters/rules/note/_regexpidof.py +++ b/gramps/gen/filters/rules/note/_regexpidof.py @@ -25,7 +25,8 @@ # Standard Python modules # #------------------------------------------------------------------------- -from ....ggettext import gettext as _ +from ....const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/person/_changedsince.py b/gramps/gen/filters/rules/person/_changedsince.py index b811e9c47..d33b83260 100644 --- a/gramps/gen/filters/rules/person/_changedsince.py +++ b/gramps/gen/filters/rules/person/_changedsince.py @@ -26,7 +26,8 @@ # Standard Python modules # #------------------------------------------------------------------------- -from ....ggettext import gettext as _ +from ....const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/person/_deeprelationshippathbetween.py b/gramps/gen/filters/rules/person/_deeprelationshippathbetween.py index 8a5540495..e9a0486fb 100644 --- a/gramps/gen/filters/rules/person/_deeprelationshippathbetween.py +++ b/gramps/gen/filters/rules/person/_deeprelationshippathbetween.py @@ -26,7 +26,8 @@ # Standard Python modules # #------------------------------------------------------------------------- -from ....ggettext import gettext as _ +from ....const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/person/_disconnected.py b/gramps/gen/filters/rules/person/_disconnected.py index 55363fc00..03816123f 100644 --- a/gramps/gen/filters/rules/person/_disconnected.py +++ b/gramps/gen/filters/rules/person/_disconnected.py @@ -25,7 +25,8 @@ # Standard Python modules # #------------------------------------------------------------------------- -from ....ggettext import gettext as _ +from ....const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/person/_everyone.py b/gramps/gen/filters/rules/person/_everyone.py index d199c8e38..fc5b15900 100644 --- a/gramps/gen/filters/rules/person/_everyone.py +++ b/gramps/gen/filters/rules/person/_everyone.py @@ -25,7 +25,8 @@ # Standard Python modules # #------------------------------------------------------------------------- -from ....ggettext import gettext as _ +from ....const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/person/_familywithincompleteevent.py b/gramps/gen/filters/rules/person/_familywithincompleteevent.py index d7da77b21..f81b5ea14 100644 --- a/gramps/gen/filters/rules/person/_familywithincompleteevent.py +++ b/gramps/gen/filters/rules/person/_familywithincompleteevent.py @@ -25,7 +25,8 @@ # Standard Python modules # #------------------------------------------------------------------------- -from ....ggettext import gettext as _ +from ....const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/person/_hasaddress.py b/gramps/gen/filters/rules/person/_hasaddress.py index ba2719c9b..61e8765ca 100755 --- a/gramps/gen/filters/rules/person/_hasaddress.py +++ b/gramps/gen/filters/rules/person/_hasaddress.py @@ -28,7 +28,8 @@ # Standard Python modules # #------------------------------------------------------------------------- -from ....ggettext import gettext as _ +from ....const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/person/_hasalternatename.py b/gramps/gen/filters/rules/person/_hasalternatename.py index 8b528bc2c..1c19295e6 100644 --- a/gramps/gen/filters/rules/person/_hasalternatename.py +++ b/gramps/gen/filters/rules/person/_hasalternatename.py @@ -26,7 +26,8 @@ # Standard Python modules # #------------------------------------------------------------------------- -from ....ggettext import gettext as _ +from ....const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/person/_hasassociation.py b/gramps/gen/filters/rules/person/_hasassociation.py index 3689353e2..84aba02b6 100755 --- a/gramps/gen/filters/rules/person/_hasassociation.py +++ b/gramps/gen/filters/rules/person/_hasassociation.py @@ -28,7 +28,8 @@ # Standard Python modules # #------------------------------------------------------------------------- -from ....ggettext import gettext as _ +from ....const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/person/_hasattribute.py b/gramps/gen/filters/rules/person/_hasattribute.py index 56fa0323b..99fcf9e62 100644 --- a/gramps/gen/filters/rules/person/_hasattribute.py +++ b/gramps/gen/filters/rules/person/_hasattribute.py @@ -25,7 +25,8 @@ # Standard Python modules # #------------------------------------------------------------------------- -from ....ggettext import gettext as _ +from ....const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/person/_hasbirth.py b/gramps/gen/filters/rules/person/_hasbirth.py index a7626f7d5..86eb69483 100644 --- a/gramps/gen/filters/rules/person/_hasbirth.py +++ b/gramps/gen/filters/rules/person/_hasbirth.py @@ -25,7 +25,8 @@ # Standard Python modules # #------------------------------------------------------------------------- -from ....ggettext import gettext as _ +from ....const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/person/_hascitation.py b/gramps/gen/filters/rules/person/_hascitation.py index 444bcce7b..7fe5c24ae 100644 --- a/gramps/gen/filters/rules/person/_hascitation.py +++ b/gramps/gen/filters/rules/person/_hascitation.py @@ -28,7 +28,8 @@ Filter rule to match persons with a particular citation. # Standard Python modules # #------------------------------------------------------------------------- -from ....ggettext import gettext as _ +from ....const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/person/_hascommonancestorwith.py b/gramps/gen/filters/rules/person/_hascommonancestorwith.py index 05a8a2026..bb21790af 100644 --- a/gramps/gen/filters/rules/person/_hascommonancestorwith.py +++ b/gramps/gen/filters/rules/person/_hascommonancestorwith.py @@ -25,7 +25,8 @@ # Standard Python modules # #------------------------------------------------------------------------- -from ....ggettext import gettext as _ +from ....const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/person/_hascommonancestorwithfiltermatch.py b/gramps/gen/filters/rules/person/_hascommonancestorwithfiltermatch.py index 06e20216c..0b0b1ca89 100644 --- a/gramps/gen/filters/rules/person/_hascommonancestorwithfiltermatch.py +++ b/gramps/gen/filters/rules/person/_hascommonancestorwithfiltermatch.py @@ -25,7 +25,8 @@ # Standard Python modules # #------------------------------------------------------------------------- -from ....ggettext import gettext as _ +from ....const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/person/_hasdeath.py b/gramps/gen/filters/rules/person/_hasdeath.py index 091f466dc..fcce0efdc 100644 --- a/gramps/gen/filters/rules/person/_hasdeath.py +++ b/gramps/gen/filters/rules/person/_hasdeath.py @@ -25,7 +25,8 @@ # Standard Python modules # #------------------------------------------------------------------------- -from ....ggettext import gettext as _ +from ....const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/person/_hasevent.py b/gramps/gen/filters/rules/person/_hasevent.py index 6444bd233..7462968ab 100644 --- a/gramps/gen/filters/rules/person/_hasevent.py +++ b/gramps/gen/filters/rules/person/_hasevent.py @@ -28,7 +28,8 @@ Filter rule to match persons with a particular event. # Standard Python modules # #------------------------------------------------------------------------- -from ....ggettext import gettext as _ +from ....const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/person/_hasfamilyattribute.py b/gramps/gen/filters/rules/person/_hasfamilyattribute.py index c0d34b5eb..fc45da3d5 100644 --- a/gramps/gen/filters/rules/person/_hasfamilyattribute.py +++ b/gramps/gen/filters/rules/person/_hasfamilyattribute.py @@ -25,7 +25,8 @@ # Standard Python modules # #------------------------------------------------------------------------- -from ....ggettext import gettext as _ +from ....const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/person/_hasfamilyevent.py b/gramps/gen/filters/rules/person/_hasfamilyevent.py index 0985993ad..aff4089f8 100644 --- a/gramps/gen/filters/rules/person/_hasfamilyevent.py +++ b/gramps/gen/filters/rules/person/_hasfamilyevent.py @@ -25,7 +25,8 @@ # Standard Python modules # #------------------------------------------------------------------------- -from ....ggettext import gettext as _ +from ....const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/person/_hasgallery.py b/gramps/gen/filters/rules/person/_hasgallery.py index ba309903f..598229b08 100644 --- a/gramps/gen/filters/rules/person/_hasgallery.py +++ b/gramps/gen/filters/rules/person/_hasgallery.py @@ -25,7 +25,8 @@ # Standard Python modules # #------------------------------------------------------------------------- -from ....ggettext import gettext as _ +from ....const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/person/_hasidof.py b/gramps/gen/filters/rules/person/_hasidof.py index 9350b354b..82661fca5 100644 --- a/gramps/gen/filters/rules/person/_hasidof.py +++ b/gramps/gen/filters/rules/person/_hasidof.py @@ -25,7 +25,8 @@ # Standard Python modules # #------------------------------------------------------------------------- -from ....ggettext import gettext as _ +from ....const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/person/_haslds.py b/gramps/gen/filters/rules/person/_haslds.py index 05575f150..5a9a73f06 100755 --- a/gramps/gen/filters/rules/person/_haslds.py +++ b/gramps/gen/filters/rules/person/_haslds.py @@ -28,7 +28,8 @@ # Standard Python modules # #------------------------------------------------------------------------- -from ....ggettext import gettext as _ +from ....const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/person/_hasnameof.py b/gramps/gen/filters/rules/person/_hasnameof.py index 681e3cf71..f42f0062d 100644 --- a/gramps/gen/filters/rules/person/_hasnameof.py +++ b/gramps/gen/filters/rules/person/_hasnameof.py @@ -26,7 +26,8 @@ # Standard Python modules # #------------------------------------------------------------------------- -from ....ggettext import sgettext as _ +from ....const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().sgettext import re #------------------------------------------------------------------------- diff --git a/gramps/gen/filters/rules/person/_hasnameorigintype.py b/gramps/gen/filters/rules/person/_hasnameorigintype.py index ff2760981..c8fb041f8 100644 --- a/gramps/gen/filters/rules/person/_hasnameorigintype.py +++ b/gramps/gen/filters/rules/person/_hasnameorigintype.py @@ -26,7 +26,8 @@ # Standard Python modules # #------------------------------------------------------------------------- -from ....ggettext import gettext as _ +from ....const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/person/_hasnametype.py b/gramps/gen/filters/rules/person/_hasnametype.py index 8f863e40b..0d105d9c6 100644 --- a/gramps/gen/filters/rules/person/_hasnametype.py +++ b/gramps/gen/filters/rules/person/_hasnametype.py @@ -26,7 +26,8 @@ # Standard Python modules # #------------------------------------------------------------------------- -from ....ggettext import gettext as _ +from ....const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/person/_hasnickname.py b/gramps/gen/filters/rules/person/_hasnickname.py index 33c69d945..3637f5bc0 100644 --- a/gramps/gen/filters/rules/person/_hasnickname.py +++ b/gramps/gen/filters/rules/person/_hasnickname.py @@ -26,7 +26,8 @@ # Standard Python modules # #------------------------------------------------------------------------- -from ....ggettext import gettext as _ +from ....const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/person/_hasnote.py b/gramps/gen/filters/rules/person/_hasnote.py index cfac1b00a..13293bb60 100644 --- a/gramps/gen/filters/rules/person/_hasnote.py +++ b/gramps/gen/filters/rules/person/_hasnote.py @@ -28,7 +28,8 @@ # Standard Python modules # #------------------------------------------------------------------------- -from ....ggettext import gettext as _ +from ....const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/person/_hasnotematchingsubstringof.py b/gramps/gen/filters/rules/person/_hasnotematchingsubstringof.py index 94f5cf303..9c07adb07 100644 --- a/gramps/gen/filters/rules/person/_hasnotematchingsubstringof.py +++ b/gramps/gen/filters/rules/person/_hasnotematchingsubstringof.py @@ -25,7 +25,8 @@ # Standard Python modules # #------------------------------------------------------------------------- -from ....ggettext import gettext as _ +from ....const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/person/_hasnoteregexp.py b/gramps/gen/filters/rules/person/_hasnoteregexp.py index ae0296de9..ed03e4785 100644 --- a/gramps/gen/filters/rules/person/_hasnoteregexp.py +++ b/gramps/gen/filters/rules/person/_hasnoteregexp.py @@ -25,7 +25,8 @@ # Standard Python modules # #------------------------------------------------------------------------- -from ....ggettext import gettext as _ +from ....const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/person/_hasrelationship.py b/gramps/gen/filters/rules/person/_hasrelationship.py index 6ecaf9797..24bf62570 100644 --- a/gramps/gen/filters/rules/person/_hasrelationship.py +++ b/gramps/gen/filters/rules/person/_hasrelationship.py @@ -25,7 +25,8 @@ # Standard Python modules # #------------------------------------------------------------------------- -from ....ggettext import gettext as _ +from ....const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/person/_hassourcecount.py b/gramps/gen/filters/rules/person/_hassourcecount.py index 8cded5cde..2df5c0d3d 100755 --- a/gramps/gen/filters/rules/person/_hassourcecount.py +++ b/gramps/gen/filters/rules/person/_hassourcecount.py @@ -28,7 +28,8 @@ # Standard Python modules # #------------------------------------------------------------------------- -from ....ggettext import gettext as _ +from ....const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/person/_hassourceof.py b/gramps/gen/filters/rules/person/_hassourceof.py index a91f13115..079a392e4 100644 --- a/gramps/gen/filters/rules/person/_hassourceof.py +++ b/gramps/gen/filters/rules/person/_hassourceof.py @@ -26,7 +26,8 @@ # Standard Python modules # #------------------------------------------------------------------------- -from ....ggettext import gettext as _ +from ....const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/person/_hastag.py b/gramps/gen/filters/rules/person/_hastag.py index 9bf56e888..fe3910823 100644 --- a/gramps/gen/filters/rules/person/_hastag.py +++ b/gramps/gen/filters/rules/person/_hastag.py @@ -27,7 +27,8 @@ Rule that checks for a person with a particular tag. # Standard Python modules # #------------------------------------------------------------------------- -from ....ggettext import gettext as _ +from ....const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/person/_hastextmatchingsubstringof.py b/gramps/gen/filters/rules/person/_hastextmatchingsubstringof.py index b4077cf93..79731cce4 100644 --- a/gramps/gen/filters/rules/person/_hastextmatchingsubstringof.py +++ b/gramps/gen/filters/rules/person/_hastextmatchingsubstringof.py @@ -26,7 +26,8 @@ # Standard Python modules # #------------------------------------------------------------------------- -from ....ggettext import gettext as _ +from ....const import GRAMPS_LOCALE as glocale +_ = glocale.get_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 818ad3df5..ab4c5380d 100644 --- a/gramps/gen/filters/rules/person/_hasunknowngender.py +++ b/gramps/gen/filters/rules/person/_hasunknowngender.py @@ -25,7 +25,8 @@ # Standard Python modules # #------------------------------------------------------------------------- -from ....ggettext import gettext as _ +from ....const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/person/_havealtfamilies.py b/gramps/gen/filters/rules/person/_havealtfamilies.py index fcfdcbd93..5e86ad7bc 100644 --- a/gramps/gen/filters/rules/person/_havealtfamilies.py +++ b/gramps/gen/filters/rules/person/_havealtfamilies.py @@ -25,7 +25,8 @@ # Standard Python modules # #------------------------------------------------------------------------- -from ....ggettext import gettext as _ +from ....const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/person/_havechildren.py b/gramps/gen/filters/rules/person/_havechildren.py index be012a140..9d8559338 100644 --- a/gramps/gen/filters/rules/person/_havechildren.py +++ b/gramps/gen/filters/rules/person/_havechildren.py @@ -25,7 +25,8 @@ # Standard Python modules # #------------------------------------------------------------------------- -from ....ggettext import gettext as _ +from ....const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/person/_incompletenames.py b/gramps/gen/filters/rules/person/_incompletenames.py index 6590aad0b..992324e36 100644 --- a/gramps/gen/filters/rules/person/_incompletenames.py +++ b/gramps/gen/filters/rules/person/_incompletenames.py @@ -25,7 +25,8 @@ # Standard Python modules # #------------------------------------------------------------------------- -from ....ggettext import gettext as _ +from ....const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/person/_isancestorof.py b/gramps/gen/filters/rules/person/_isancestorof.py index 331f4fa11..b605d7e31 100644 --- a/gramps/gen/filters/rules/person/_isancestorof.py +++ b/gramps/gen/filters/rules/person/_isancestorof.py @@ -25,7 +25,8 @@ # Standard Python modules # #------------------------------------------------------------------------- -from ....ggettext import gettext as _ +from ....const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/person/_isancestoroffiltermatch.py b/gramps/gen/filters/rules/person/_isancestoroffiltermatch.py index 5b771f9a1..d878128d7 100644 --- a/gramps/gen/filters/rules/person/_isancestoroffiltermatch.py +++ b/gramps/gen/filters/rules/person/_isancestoroffiltermatch.py @@ -25,7 +25,8 @@ # Standard Python modules # #------------------------------------------------------------------------- -from ....ggettext import gettext as _ +from ....const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/person/_isbookmarked.py b/gramps/gen/filters/rules/person/_isbookmarked.py index 0836ba4f1..a54ed2bc1 100644 --- a/gramps/gen/filters/rules/person/_isbookmarked.py +++ b/gramps/gen/filters/rules/person/_isbookmarked.py @@ -26,7 +26,8 @@ # Standard Python modules # #------------------------------------------------------------------------- -from ....ggettext import gettext as _ +from ....const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/person/_ischildoffiltermatch.py b/gramps/gen/filters/rules/person/_ischildoffiltermatch.py index 87776e5b0..76f69e467 100644 --- a/gramps/gen/filters/rules/person/_ischildoffiltermatch.py +++ b/gramps/gen/filters/rules/person/_ischildoffiltermatch.py @@ -25,7 +25,8 @@ # Standard Python modules # #------------------------------------------------------------------------- -from ....ggettext import gettext as _ +from ....const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/person/_isdefaultperson.py b/gramps/gen/filters/rules/person/_isdefaultperson.py index e2e4d1d46..a5da52b72 100644 --- a/gramps/gen/filters/rules/person/_isdefaultperson.py +++ b/gramps/gen/filters/rules/person/_isdefaultperson.py @@ -25,7 +25,8 @@ # Standard Python modules # #------------------------------------------------------------------------- -from ....ggettext import gettext as _ +from ....const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/person/_isdescendantfamilyof.py b/gramps/gen/filters/rules/person/_isdescendantfamilyof.py index ecff7deb9..23e369049 100644 --- a/gramps/gen/filters/rules/person/_isdescendantfamilyof.py +++ b/gramps/gen/filters/rules/person/_isdescendantfamilyof.py @@ -25,7 +25,8 @@ # Standard Python modules # #------------------------------------------------------------------------- -from ....ggettext import gettext as _ +from ....const import GRAMPS_LOCALE as glocale +_ = glocale.get_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 d4d1ed477..05b48e90b 100644 --- a/gramps/gen/filters/rules/person/_isdescendantfamilyoffiltermatch.py +++ b/gramps/gen/filters/rules/person/_isdescendantfamilyoffiltermatch.py @@ -25,7 +25,8 @@ # Standard Python modules # #------------------------------------------------------------------------- -from ....ggettext import gettext as _ +from ....const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/person/_isdescendantof.py b/gramps/gen/filters/rules/person/_isdescendantof.py index 116ca97e0..7bd4050c6 100644 --- a/gramps/gen/filters/rules/person/_isdescendantof.py +++ b/gramps/gen/filters/rules/person/_isdescendantof.py @@ -25,7 +25,8 @@ # Standard Python modules # #------------------------------------------------------------------------- -from ....ggettext import gettext as _ +from ....const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/person/_isdescendantoffiltermatch.py b/gramps/gen/filters/rules/person/_isdescendantoffiltermatch.py index f2461b52a..0ebae5862 100644 --- a/gramps/gen/filters/rules/person/_isdescendantoffiltermatch.py +++ b/gramps/gen/filters/rules/person/_isdescendantoffiltermatch.py @@ -25,7 +25,8 @@ # Standard Python modules # #------------------------------------------------------------------------- -from ....ggettext import gettext as _ +from ....const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/person/_isduplicatedancestorof.py b/gramps/gen/filters/rules/person/_isduplicatedancestorof.py index 51944bf9b..226964f48 100644 --- a/gramps/gen/filters/rules/person/_isduplicatedancestorof.py +++ b/gramps/gen/filters/rules/person/_isduplicatedancestorof.py @@ -26,7 +26,8 @@ # Standard Python modules # #------------------------------------------------------------------------- -from ....ggettext import gettext as _ +from ....const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/person/_isfemale.py b/gramps/gen/filters/rules/person/_isfemale.py index 55a43ce04..26598f327 100644 --- a/gramps/gen/filters/rules/person/_isfemale.py +++ b/gramps/gen/filters/rules/person/_isfemale.py @@ -25,7 +25,8 @@ # Standard Python modules # #------------------------------------------------------------------------- -from ....ggettext import gettext as _ +from ....const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/person/_islessthannthgenerationancestorof.py b/gramps/gen/filters/rules/person/_islessthannthgenerationancestorof.py index 966d91aa6..082016e5d 100644 --- a/gramps/gen/filters/rules/person/_islessthannthgenerationancestorof.py +++ b/gramps/gen/filters/rules/person/_islessthannthgenerationancestorof.py @@ -25,7 +25,8 @@ # Standard Python modules # #------------------------------------------------------------------------- -from ....ggettext import gettext as _ +from ....const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/person/_islessthannthgenerationancestorofbookmarked.py b/gramps/gen/filters/rules/person/_islessthannthgenerationancestorofbookmarked.py index a52fc91ef..d710dea08 100644 --- a/gramps/gen/filters/rules/person/_islessthannthgenerationancestorofbookmarked.py +++ b/gramps/gen/filters/rules/person/_islessthannthgenerationancestorofbookmarked.py @@ -25,7 +25,8 @@ # Standard Python modules # #------------------------------------------------------------------------- -from ....ggettext import gettext as _ +from ....const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext try: set() diff --git a/gramps/gen/filters/rules/person/_islessthannthgenerationancestorofdefaultperson.py b/gramps/gen/filters/rules/person/_islessthannthgenerationancestorofdefaultperson.py index 2abcf55c8..3f42cb67b 100644 --- a/gramps/gen/filters/rules/person/_islessthannthgenerationancestorofdefaultperson.py +++ b/gramps/gen/filters/rules/person/_islessthannthgenerationancestorofdefaultperson.py @@ -25,7 +25,8 @@ # Standard Python modules # #------------------------------------------------------------------------- -from ....ggettext import gettext as _ +from ....const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/person/_islessthannthgenerationdescendantof.py b/gramps/gen/filters/rules/person/_islessthannthgenerationdescendantof.py index dc434df57..fb7fa91e6 100644 --- a/gramps/gen/filters/rules/person/_islessthannthgenerationdescendantof.py +++ b/gramps/gen/filters/rules/person/_islessthannthgenerationdescendantof.py @@ -25,7 +25,8 @@ # Standard Python modules # #------------------------------------------------------------------------- -from ....ggettext import gettext as _ +from ....const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/person/_ismale.py b/gramps/gen/filters/rules/person/_ismale.py index a1b345282..509eb0b6d 100644 --- a/gramps/gen/filters/rules/person/_ismale.py +++ b/gramps/gen/filters/rules/person/_ismale.py @@ -25,7 +25,8 @@ # Standard Python modules # #------------------------------------------------------------------------- -from ....ggettext import gettext as _ +from ....const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/person/_ismorethannthgenerationancestorof.py b/gramps/gen/filters/rules/person/_ismorethannthgenerationancestorof.py index 25ba42b44..5b8e7eb92 100644 --- a/gramps/gen/filters/rules/person/_ismorethannthgenerationancestorof.py +++ b/gramps/gen/filters/rules/person/_ismorethannthgenerationancestorof.py @@ -25,7 +25,8 @@ # Standard Python modules # #------------------------------------------------------------------------- -from ....ggettext import gettext as _ +from ....const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/person/_ismorethannthgenerationdescendantof.py b/gramps/gen/filters/rules/person/_ismorethannthgenerationdescendantof.py index 585cbef9b..ece20a1d0 100644 --- a/gramps/gen/filters/rules/person/_ismorethannthgenerationdescendantof.py +++ b/gramps/gen/filters/rules/person/_ismorethannthgenerationdescendantof.py @@ -25,7 +25,8 @@ # Standard Python modules # #------------------------------------------------------------------------- -from ....ggettext import gettext as _ +from ....const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/person/_isparentoffiltermatch.py b/gramps/gen/filters/rules/person/_isparentoffiltermatch.py index a6354eb48..8af459bd3 100644 --- a/gramps/gen/filters/rules/person/_isparentoffiltermatch.py +++ b/gramps/gen/filters/rules/person/_isparentoffiltermatch.py @@ -25,7 +25,8 @@ # Standard Python modules # #------------------------------------------------------------------------- -from ....ggettext import gettext as _ +from ....const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/person/_isrelatedwith.py b/gramps/gen/filters/rules/person/_isrelatedwith.py index fec4ed206..f60b4ce3e 100644 --- a/gramps/gen/filters/rules/person/_isrelatedwith.py +++ b/gramps/gen/filters/rules/person/_isrelatedwith.py @@ -25,7 +25,8 @@ # Standard Python modules # #------------------------------------------------------------------------- -from ....ggettext import gettext as _ +from ....const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/person/_issiblingoffiltermatch.py b/gramps/gen/filters/rules/person/_issiblingoffiltermatch.py index c03faaa9e..a8188eb23 100644 --- a/gramps/gen/filters/rules/person/_issiblingoffiltermatch.py +++ b/gramps/gen/filters/rules/person/_issiblingoffiltermatch.py @@ -25,7 +25,8 @@ # Standard Python modules # #------------------------------------------------------------------------- -from ....ggettext import gettext as _ +from ....const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/person/_isspouseoffiltermatch.py b/gramps/gen/filters/rules/person/_isspouseoffiltermatch.py index 2aee0c31a..1a9b67903 100644 --- a/gramps/gen/filters/rules/person/_isspouseoffiltermatch.py +++ b/gramps/gen/filters/rules/person/_isspouseoffiltermatch.py @@ -25,7 +25,8 @@ # Standard Python modules # #------------------------------------------------------------------------- -from ....ggettext import gettext as _ +from ....const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/person/_iswitness.py b/gramps/gen/filters/rules/person/_iswitness.py index 6fb18005a..92d052530 100644 --- a/gramps/gen/filters/rules/person/_iswitness.py +++ b/gramps/gen/filters/rules/person/_iswitness.py @@ -25,7 +25,8 @@ # Standard Python modules # #------------------------------------------------------------------------- -from ....ggettext import gettext as _ +from ....const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/person/_matcheseventfilter.py b/gramps/gen/filters/rules/person/_matcheseventfilter.py index 7a7763a94..08ef6bf3f 100644 --- a/gramps/gen/filters/rules/person/_matcheseventfilter.py +++ b/gramps/gen/filters/rules/person/_matcheseventfilter.py @@ -26,7 +26,8 @@ # Standard Python modules # #------------------------------------------------------------------------- -from ....ggettext import gettext as _ +from ....const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/person/_matchesfilter.py b/gramps/gen/filters/rules/person/_matchesfilter.py index e1aa81245..420b0577a 100644 --- a/gramps/gen/filters/rules/person/_matchesfilter.py +++ b/gramps/gen/filters/rules/person/_matchesfilter.py @@ -25,7 +25,8 @@ # Standard Python modules # #------------------------------------------------------------------------- -from ....ggettext import gettext as _ +from ....const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/person/_matchessourceconfidence.py b/gramps/gen/filters/rules/person/_matchessourceconfidence.py index 138fa17cb..17c9a7fc2 100644 --- a/gramps/gen/filters/rules/person/_matchessourceconfidence.py +++ b/gramps/gen/filters/rules/person/_matchessourceconfidence.py @@ -26,7 +26,8 @@ # Standard Python modules # #------------------------------------------------------------------------- -from ....ggettext import sgettext as _ +from ....const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().sgettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/person/_matchidof.py b/gramps/gen/filters/rules/person/_matchidof.py index 1b437568c..67240638d 100644 --- a/gramps/gen/filters/rules/person/_matchidof.py +++ b/gramps/gen/filters/rules/person/_matchidof.py @@ -25,7 +25,8 @@ # Standard Python modules # #------------------------------------------------------------------------- -from ....ggettext import gettext as _ +from ....const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/person/_missingparent.py b/gramps/gen/filters/rules/person/_missingparent.py index 8492c2cf8..4de452e25 100644 --- a/gramps/gen/filters/rules/person/_missingparent.py +++ b/gramps/gen/filters/rules/person/_missingparent.py @@ -26,7 +26,8 @@ # Standard Python modules # #------------------------------------------------------------------------- -from ....ggettext import gettext as _ +from ....const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/person/_multiplemarriages.py b/gramps/gen/filters/rules/person/_multiplemarriages.py index 49c674a2b..7e16e65e1 100644 --- a/gramps/gen/filters/rules/person/_multiplemarriages.py +++ b/gramps/gen/filters/rules/person/_multiplemarriages.py @@ -25,7 +25,8 @@ # Standard Python modules # #------------------------------------------------------------------------- -from ....ggettext import gettext as _ +from ....const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/person/_nevermarried.py b/gramps/gen/filters/rules/person/_nevermarried.py index b484745d6..cb82ed657 100644 --- a/gramps/gen/filters/rules/person/_nevermarried.py +++ b/gramps/gen/filters/rules/person/_nevermarried.py @@ -25,7 +25,8 @@ # Standard Python modules # #------------------------------------------------------------------------- -from ....ggettext import gettext as _ +from ....const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/person/_nobirthdate.py b/gramps/gen/filters/rules/person/_nobirthdate.py index 5c2e78d14..68b670153 100644 --- a/gramps/gen/filters/rules/person/_nobirthdate.py +++ b/gramps/gen/filters/rules/person/_nobirthdate.py @@ -25,7 +25,8 @@ # Standard Python modules # #------------------------------------------------------------------------- -from ....ggettext import gettext as _ +from ....const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/person/_nodeathdate.py b/gramps/gen/filters/rules/person/_nodeathdate.py index 63d5491ec..cb5ef8d78 100644 --- a/gramps/gen/filters/rules/person/_nodeathdate.py +++ b/gramps/gen/filters/rules/person/_nodeathdate.py @@ -25,7 +25,8 @@ # Standard Python modules # #------------------------------------------------------------------------- -from ....ggettext import gettext as _ +from ....const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/person/_peopleprivate.py b/gramps/gen/filters/rules/person/_peopleprivate.py index 829b70412..88d068260 100644 --- a/gramps/gen/filters/rules/person/_peopleprivate.py +++ b/gramps/gen/filters/rules/person/_peopleprivate.py @@ -25,7 +25,8 @@ # Standard Python modules # #------------------------------------------------------------------------- -from ....ggettext import gettext as _ +from ....const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/person/_peoplepublic.py b/gramps/gen/filters/rules/person/_peoplepublic.py index 8013969e6..116243d27 100644 --- a/gramps/gen/filters/rules/person/_peoplepublic.py +++ b/gramps/gen/filters/rules/person/_peoplepublic.py @@ -26,7 +26,8 @@ # Standard Python modules # #------------------------------------------------------------------------- -from ....ggettext import gettext as _ +from ....const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/person/_personwithincompleteevent.py b/gramps/gen/filters/rules/person/_personwithincompleteevent.py index 694bc5fca..864795f60 100644 --- a/gramps/gen/filters/rules/person/_personwithincompleteevent.py +++ b/gramps/gen/filters/rules/person/_personwithincompleteevent.py @@ -25,7 +25,8 @@ # Standard Python modules # #------------------------------------------------------------------------- -from ....ggettext import gettext as _ +from ....const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/person/_probablyalive.py b/gramps/gen/filters/rules/person/_probablyalive.py index d1f2bec8f..fa69d9520 100644 --- a/gramps/gen/filters/rules/person/_probablyalive.py +++ b/gramps/gen/filters/rules/person/_probablyalive.py @@ -25,7 +25,8 @@ # Standard Python modules # #------------------------------------------------------------------------- -from ....ggettext import gettext as _ +from ....const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/person/_regexpidof.py b/gramps/gen/filters/rules/person/_regexpidof.py index 31ae5b72f..0b984ec2d 100644 --- a/gramps/gen/filters/rules/person/_regexpidof.py +++ b/gramps/gen/filters/rules/person/_regexpidof.py @@ -25,7 +25,8 @@ # Standard Python modules # #------------------------------------------------------------------------- -from ....ggettext import gettext as _ +from ....const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/person/_regexpname.py b/gramps/gen/filters/rules/person/_regexpname.py index fe2e2919c..535f2eafe 100644 --- a/gramps/gen/filters/rules/person/_regexpname.py +++ b/gramps/gen/filters/rules/person/_regexpname.py @@ -26,7 +26,8 @@ # Standard Python modules # #------------------------------------------------------------------------- -from ....ggettext import gettext as _ +from ....const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/person/_relationshippathbetween.py b/gramps/gen/filters/rules/person/_relationshippathbetween.py index 466b76a07..eae96400e 100644 --- a/gramps/gen/filters/rules/person/_relationshippathbetween.py +++ b/gramps/gen/filters/rules/person/_relationshippathbetween.py @@ -25,7 +25,8 @@ # Standard Python modules # #------------------------------------------------------------------------- -from ....ggettext import gettext as _ +from ....const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/person/_relationshippathbetweenbookmarks.py b/gramps/gen/filters/rules/person/_relationshippathbetweenbookmarks.py index 344c9c918..ad66f260d 100644 --- a/gramps/gen/filters/rules/person/_relationshippathbetweenbookmarks.py +++ b/gramps/gen/filters/rules/person/_relationshippathbetweenbookmarks.py @@ -25,7 +25,8 @@ # Standard Python modules # #------------------------------------------------------------------------- -from ....ggettext import gettext as _ +from ....const import GRAMPS_LOCALE as glocale +_ = glocale.get_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 eb0bf6e86..4ae961830 100644 --- a/gramps/gen/filters/rules/person/_searchname.py +++ b/gramps/gen/filters/rules/person/_searchname.py @@ -26,7 +26,8 @@ # Standard Python modules # #------------------------------------------------------------------------- -from ....ggettext import gettext as _ +from ....const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/place/_allplaces.py b/gramps/gen/filters/rules/place/_allplaces.py index ad3c4dbd7..07384ee8d 100644 --- a/gramps/gen/filters/rules/place/_allplaces.py +++ b/gramps/gen/filters/rules/place/_allplaces.py @@ -25,7 +25,8 @@ # Standard Python modules # #------------------------------------------------------------------------- -from ....ggettext import gettext as _ +from ....const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/place/_changedsince.py b/gramps/gen/filters/rules/place/_changedsince.py index de9bd222e..bfbe1889d 100644 --- a/gramps/gen/filters/rules/place/_changedsince.py +++ b/gramps/gen/filters/rules/place/_changedsince.py @@ -26,7 +26,8 @@ # Standard Python modules # #------------------------------------------------------------------------- -from ....ggettext import gettext as _ +from ....const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/place/_hascitation.py b/gramps/gen/filters/rules/place/_hascitation.py index 2e5322f5f..3757ae1f3 100644 --- a/gramps/gen/filters/rules/place/_hascitation.py +++ b/gramps/gen/filters/rules/place/_hascitation.py @@ -29,7 +29,8 @@ Filter rule to match family with a particular citation. # Standard Python modules # #------------------------------------------------------------------------- -from ....ggettext import gettext as _ +from ....const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/place/_hasgallery.py b/gramps/gen/filters/rules/place/_hasgallery.py index 9ad91ad52..c50c87abd 100755 --- a/gramps/gen/filters/rules/place/_hasgallery.py +++ b/gramps/gen/filters/rules/place/_hasgallery.py @@ -28,7 +28,8 @@ # Standard Python modules # #------------------------------------------------------------------------- -from ....ggettext import gettext as _ +from ....const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/place/_hasidof.py b/gramps/gen/filters/rules/place/_hasidof.py index c2be8a6e4..f4e9254b5 100644 --- a/gramps/gen/filters/rules/place/_hasidof.py +++ b/gramps/gen/filters/rules/place/_hasidof.py @@ -25,7 +25,8 @@ # Standard Python modules # #------------------------------------------------------------------------- -from ....ggettext import gettext as _ +from ....const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/place/_hasnolatorlon.py b/gramps/gen/filters/rules/place/_hasnolatorlon.py index b0c9ee143..d51e4af45 100644 --- a/gramps/gen/filters/rules/place/_hasnolatorlon.py +++ b/gramps/gen/filters/rules/place/_hasnolatorlon.py @@ -27,7 +27,8 @@ # Standard Python modules # #------------------------------------------------------------------------- -from ....ggettext import gettext as _ +from ....const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/place/_hasnote.py b/gramps/gen/filters/rules/place/_hasnote.py index cd936c109..4fb270b28 100755 --- a/gramps/gen/filters/rules/place/_hasnote.py +++ b/gramps/gen/filters/rules/place/_hasnote.py @@ -28,7 +28,8 @@ # Standard Python modules # #------------------------------------------------------------------------- -from ....ggettext import gettext as _ +from ....const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/place/_hasnotematchingsubstringof.py b/gramps/gen/filters/rules/place/_hasnotematchingsubstringof.py index 333eef214..5ec53ad03 100644 --- a/gramps/gen/filters/rules/place/_hasnotematchingsubstringof.py +++ b/gramps/gen/filters/rules/place/_hasnotematchingsubstringof.py @@ -25,7 +25,8 @@ # Standard Python modules # #------------------------------------------------------------------------- -from ....ggettext import gettext as _ +from ....const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/place/_hasnoteregexp.py b/gramps/gen/filters/rules/place/_hasnoteregexp.py index 4242cd226..b0d0cd5da 100644 --- a/gramps/gen/filters/rules/place/_hasnoteregexp.py +++ b/gramps/gen/filters/rules/place/_hasnoteregexp.py @@ -25,7 +25,8 @@ # Standard Python modules # #------------------------------------------------------------------------- -from ....ggettext import gettext as _ +from ....const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/place/_hasplace.py b/gramps/gen/filters/rules/place/_hasplace.py index d9d1afb1b..b92754a63 100644 --- a/gramps/gen/filters/rules/place/_hasplace.py +++ b/gramps/gen/filters/rules/place/_hasplace.py @@ -27,7 +27,8 @@ # Standard Python modules # #------------------------------------------------------------------------- -from ....ggettext import gettext as _ +from ....const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/place/_hasreferencecountof.py b/gramps/gen/filters/rules/place/_hasreferencecountof.py index 8f337bd38..3a8e05c46 100644 --- a/gramps/gen/filters/rules/place/_hasreferencecountof.py +++ b/gramps/gen/filters/rules/place/_hasreferencecountof.py @@ -25,7 +25,8 @@ # Standard Python modules # #------------------------------------------------------------------------- -from ....ggettext import gettext as _ +from ....const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/place/_hassourcecount.py b/gramps/gen/filters/rules/place/_hassourcecount.py index 6f47e12e5..4b878164c 100644 --- a/gramps/gen/filters/rules/place/_hassourcecount.py +++ b/gramps/gen/filters/rules/place/_hassourcecount.py @@ -28,7 +28,8 @@ # Standard Python modules # #------------------------------------------------------------------------- -from ....ggettext import gettext as _ +from ....const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/place/_hassourceof.py b/gramps/gen/filters/rules/place/_hassourceof.py index 6c846b9af..240fcb6f1 100644 --- a/gramps/gen/filters/rules/place/_hassourceof.py +++ b/gramps/gen/filters/rules/place/_hassourceof.py @@ -26,7 +26,8 @@ # Standard Python modules # #------------------------------------------------------------------------- -from ....ggettext import gettext as _ +from ....const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/place/_inlatlonneighborhood.py b/gramps/gen/filters/rules/place/_inlatlonneighborhood.py index f6aee6e22..9298cd171 100644 --- a/gramps/gen/filters/rules/place/_inlatlonneighborhood.py +++ b/gramps/gen/filters/rules/place/_inlatlonneighborhood.py @@ -27,7 +27,8 @@ # Standard Python modules # #------------------------------------------------------------------------- -from ....ggettext import gettext as _ +from ....const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/place/_matcheseventfilter.py b/gramps/gen/filters/rules/place/_matcheseventfilter.py index a38f2f2c4..10382965d 100644 --- a/gramps/gen/filters/rules/place/_matcheseventfilter.py +++ b/gramps/gen/filters/rules/place/_matcheseventfilter.py @@ -25,7 +25,8 @@ # Standard Python modules # #------------------------------------------------------------------------- -from ....ggettext import gettext as _ +from ....const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/place/_matchesfilter.py b/gramps/gen/filters/rules/place/_matchesfilter.py index 8e6100322..b49c09ad4 100644 --- a/gramps/gen/filters/rules/place/_matchesfilter.py +++ b/gramps/gen/filters/rules/place/_matchesfilter.py @@ -25,7 +25,8 @@ # Standard Python modules # #------------------------------------------------------------------------- -from ....ggettext import gettext as _ +from ....const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/place/_matchessourceconfidence.py b/gramps/gen/filters/rules/place/_matchessourceconfidence.py index 0fe30d397..df39e314f 100644 --- a/gramps/gen/filters/rules/place/_matchessourceconfidence.py +++ b/gramps/gen/filters/rules/place/_matchessourceconfidence.py @@ -26,7 +26,8 @@ # Standard Python modules # #------------------------------------------------------------------------- -from ....ggettext import sgettext as _ +from ....const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().sgettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/place/_placeprivate.py b/gramps/gen/filters/rules/place/_placeprivate.py index 65e1dc73b..ffddbbfe1 100644 --- a/gramps/gen/filters/rules/place/_placeprivate.py +++ b/gramps/gen/filters/rules/place/_placeprivate.py @@ -25,7 +25,8 @@ # Standard Python modules # #------------------------------------------------------------------------- -from ....ggettext import gettext as _ +from ....const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/place/_regexpidof.py b/gramps/gen/filters/rules/place/_regexpidof.py index b0d8a8035..984f8bdf0 100644 --- a/gramps/gen/filters/rules/place/_regexpidof.py +++ b/gramps/gen/filters/rules/place/_regexpidof.py @@ -25,7 +25,8 @@ # Standard Python modules # #------------------------------------------------------------------------- -from ....ggettext import gettext as _ +from ....const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/repository/_allrepos.py b/gramps/gen/filters/rules/repository/_allrepos.py index 4ce03d3b3..beab09d5e 100644 --- a/gramps/gen/filters/rules/repository/_allrepos.py +++ b/gramps/gen/filters/rules/repository/_allrepos.py @@ -25,7 +25,8 @@ # Standard Python modules # #------------------------------------------------------------------------- -from ....ggettext import gettext as _ +from ....const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/repository/_changedsince.py b/gramps/gen/filters/rules/repository/_changedsince.py index 07010061a..37fe0babc 100644 --- a/gramps/gen/filters/rules/repository/_changedsince.py +++ b/gramps/gen/filters/rules/repository/_changedsince.py @@ -26,7 +26,8 @@ # Standard Python modules # #------------------------------------------------------------------------- -from ....ggettext import gettext as _ +from ....const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/repository/_hasidof.py b/gramps/gen/filters/rules/repository/_hasidof.py index 112d49c5b..cb8b46c44 100644 --- a/gramps/gen/filters/rules/repository/_hasidof.py +++ b/gramps/gen/filters/rules/repository/_hasidof.py @@ -25,7 +25,8 @@ # Standard Python modules # #------------------------------------------------------------------------- -from ....ggettext import gettext as _ +from ....const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/repository/_hasnotematchingsubstringof.py b/gramps/gen/filters/rules/repository/_hasnotematchingsubstringof.py index 1f0e12e10..e1349a2c6 100644 --- a/gramps/gen/filters/rules/repository/_hasnotematchingsubstringof.py +++ b/gramps/gen/filters/rules/repository/_hasnotematchingsubstringof.py @@ -25,7 +25,8 @@ # Standard Python modules # #------------------------------------------------------------------------- -from ....ggettext import gettext as _ +from ....const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/repository/_hasnoteregexp.py b/gramps/gen/filters/rules/repository/_hasnoteregexp.py index f01be904e..6e2089026 100644 --- a/gramps/gen/filters/rules/repository/_hasnoteregexp.py +++ b/gramps/gen/filters/rules/repository/_hasnoteregexp.py @@ -25,7 +25,8 @@ # Standard Python modules # #------------------------------------------------------------------------- -from ....ggettext import gettext as _ +from ....const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/repository/_hasreferencecountof.py b/gramps/gen/filters/rules/repository/_hasreferencecountof.py index 8b120e009..eb587c3ae 100644 --- a/gramps/gen/filters/rules/repository/_hasreferencecountof.py +++ b/gramps/gen/filters/rules/repository/_hasreferencecountof.py @@ -25,7 +25,8 @@ # Standard Python modules # #------------------------------------------------------------------------- -from ....ggettext import gettext as _ +from ....const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/repository/_hasrepo.py b/gramps/gen/filters/rules/repository/_hasrepo.py index 49ac7f321..37c3e45fd 100644 --- a/gramps/gen/filters/rules/repository/_hasrepo.py +++ b/gramps/gen/filters/rules/repository/_hasrepo.py @@ -25,7 +25,8 @@ # Standard Python modules # #------------------------------------------------------------------------- -from ....ggettext import gettext as _ +from ....const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/repository/_matchesfilter.py b/gramps/gen/filters/rules/repository/_matchesfilter.py index 8f7a583a5..7725190da 100644 --- a/gramps/gen/filters/rules/repository/_matchesfilter.py +++ b/gramps/gen/filters/rules/repository/_matchesfilter.py @@ -25,7 +25,8 @@ # Standard Python modules # #------------------------------------------------------------------------- -from ....ggettext import gettext as _ +from ....const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/repository/_matchesnamesubstringof.py b/gramps/gen/filters/rules/repository/_matchesnamesubstringof.py index 90124ddb0..7cb3c7d0a 100644 --- a/gramps/gen/filters/rules/repository/_matchesnamesubstringof.py +++ b/gramps/gen/filters/rules/repository/_matchesnamesubstringof.py @@ -25,7 +25,8 @@ # Standard Python modules # #------------------------------------------------------------------------- -from ....ggettext import gettext as _ +from ....const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/repository/_regexpidof.py b/gramps/gen/filters/rules/repository/_regexpidof.py index a25b7d651..13b26e548 100644 --- a/gramps/gen/filters/rules/repository/_regexpidof.py +++ b/gramps/gen/filters/rules/repository/_regexpidof.py @@ -25,7 +25,8 @@ # Standard Python modules # #------------------------------------------------------------------------- -from ....ggettext import gettext as _ +from ....const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/repository/_repoprivate.py b/gramps/gen/filters/rules/repository/_repoprivate.py index a4210b579..8c7b9c1ff 100644 --- a/gramps/gen/filters/rules/repository/_repoprivate.py +++ b/gramps/gen/filters/rules/repository/_repoprivate.py @@ -25,7 +25,8 @@ # Standard Python modules # #------------------------------------------------------------------------- -from ....ggettext import gettext as _ +from ....const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/source/_allsources.py b/gramps/gen/filters/rules/source/_allsources.py index 438d2efbc..081d2c9c9 100644 --- a/gramps/gen/filters/rules/source/_allsources.py +++ b/gramps/gen/filters/rules/source/_allsources.py @@ -25,7 +25,8 @@ # Standard Python modules # #------------------------------------------------------------------------- -from ....ggettext import gettext as _ +from ....const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/source/_changedsince.py b/gramps/gen/filters/rules/source/_changedsince.py index 48427d097..8c08e526b 100644 --- a/gramps/gen/filters/rules/source/_changedsince.py +++ b/gramps/gen/filters/rules/source/_changedsince.py @@ -26,7 +26,8 @@ # Standard Python modules # #------------------------------------------------------------------------- -from ....ggettext import gettext as _ +from ....const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/source/_hasgallery.py b/gramps/gen/filters/rules/source/_hasgallery.py index dd56fcba8..28f2d7627 100755 --- a/gramps/gen/filters/rules/source/_hasgallery.py +++ b/gramps/gen/filters/rules/source/_hasgallery.py @@ -28,7 +28,8 @@ # Standard Python modules # #------------------------------------------------------------------------- -from ....ggettext import gettext as _ +from ....const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/source/_hasidof.py b/gramps/gen/filters/rules/source/_hasidof.py index d2bd73d80..835090223 100644 --- a/gramps/gen/filters/rules/source/_hasidof.py +++ b/gramps/gen/filters/rules/source/_hasidof.py @@ -25,7 +25,8 @@ # Standard Python modules # #------------------------------------------------------------------------- -from ....ggettext import gettext as _ +from ....const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/source/_hasnote.py b/gramps/gen/filters/rules/source/_hasnote.py index cade6df58..35ab07a48 100755 --- a/gramps/gen/filters/rules/source/_hasnote.py +++ b/gramps/gen/filters/rules/source/_hasnote.py @@ -28,7 +28,8 @@ # Standard Python modules # #------------------------------------------------------------------------- -from ....ggettext import gettext as _ +from ....const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/source/_hasnotematchingsubstringof.py b/gramps/gen/filters/rules/source/_hasnotematchingsubstringof.py index 2ba763b54..7b27b1434 100644 --- a/gramps/gen/filters/rules/source/_hasnotematchingsubstringof.py +++ b/gramps/gen/filters/rules/source/_hasnotematchingsubstringof.py @@ -25,7 +25,8 @@ # Standard Python modules # #------------------------------------------------------------------------- -from ....ggettext import gettext as _ +from ....const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/source/_hasnoteregexp.py b/gramps/gen/filters/rules/source/_hasnoteregexp.py index 631b27e66..7a0369f84 100644 --- a/gramps/gen/filters/rules/source/_hasnoteregexp.py +++ b/gramps/gen/filters/rules/source/_hasnoteregexp.py @@ -25,7 +25,8 @@ # Standard Python modules # #------------------------------------------------------------------------- -from ....ggettext import gettext as _ +from ....const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/source/_hasreferencecountof.py b/gramps/gen/filters/rules/source/_hasreferencecountof.py index 4b1022ace..327767824 100644 --- a/gramps/gen/filters/rules/source/_hasreferencecountof.py +++ b/gramps/gen/filters/rules/source/_hasreferencecountof.py @@ -25,7 +25,8 @@ # Standard Python modules # #------------------------------------------------------------------------- -from ....ggettext import gettext as _ +from ....const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/source/_hasrepository.py b/gramps/gen/filters/rules/source/_hasrepository.py index 3dceab31a..481d5c8d1 100644 --- a/gramps/gen/filters/rules/source/_hasrepository.py +++ b/gramps/gen/filters/rules/source/_hasrepository.py @@ -29,7 +29,8 @@ # Standard Python modules # #------------------------------------------------------------------------- -from ....ggettext import gettext as _ +from ....const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/source/_hasrepositorycallnumberref.py b/gramps/gen/filters/rules/source/_hasrepositorycallnumberref.py index 54c097ac0..4cd900a5f 100644 --- a/gramps/gen/filters/rules/source/_hasrepositorycallnumberref.py +++ b/gramps/gen/filters/rules/source/_hasrepositorycallnumberref.py @@ -26,7 +26,8 @@ # Standard Python modules # #------------------------------------------------------------------------- -from ....ggettext import gettext as _ +from ....const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/source/_matchesfilter.py b/gramps/gen/filters/rules/source/_matchesfilter.py index fd3ea414b..e0fe78452 100644 --- a/gramps/gen/filters/rules/source/_matchesfilter.py +++ b/gramps/gen/filters/rules/source/_matchesfilter.py @@ -25,7 +25,8 @@ # Standard Python modules # #------------------------------------------------------------------------- -from ....ggettext import gettext as _ +from ....const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/source/_matchesrepositoryfilter.py b/gramps/gen/filters/rules/source/_matchesrepositoryfilter.py index 2c31f55e0..a0930e3df 100644 --- a/gramps/gen/filters/rules/source/_matchesrepositoryfilter.py +++ b/gramps/gen/filters/rules/source/_matchesrepositoryfilter.py @@ -26,7 +26,8 @@ # Standard Python modules # #------------------------------------------------------------------------- -from ....ggettext import gettext as _ +from ....const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/source/_matchestitlesubstringof.py b/gramps/gen/filters/rules/source/_matchestitlesubstringof.py index d1c7b11d1..6cdc9b105 100644 --- a/gramps/gen/filters/rules/source/_matchestitlesubstringof.py +++ b/gramps/gen/filters/rules/source/_matchestitlesubstringof.py @@ -25,7 +25,8 @@ # Standard Python modules # #------------------------------------------------------------------------- -from ....ggettext import gettext as _ +from ....const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/source/_regexpidof.py b/gramps/gen/filters/rules/source/_regexpidof.py index a08076660..00aee261b 100644 --- a/gramps/gen/filters/rules/source/_regexpidof.py +++ b/gramps/gen/filters/rules/source/_regexpidof.py @@ -25,7 +25,8 @@ # Standard Python modules # #------------------------------------------------------------------------- -from ....ggettext import gettext as _ +from ....const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/filters/rules/source/_sourceprivate.py b/gramps/gen/filters/rules/source/_sourceprivate.py index 191ef9ee4..ff8b01683 100644 --- a/gramps/gen/filters/rules/source/_sourceprivate.py +++ b/gramps/gen/filters/rules/source/_sourceprivate.py @@ -25,7 +25,8 @@ # Standard Python modules # #------------------------------------------------------------------------- -from ....ggettext import gettext as _ +from ....const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/ggettext.py b/gramps/gen/ggettext.py deleted file mode 100644 index cdfb0618b..000000000 --- a/gramps/gen/ggettext.py +++ /dev/null @@ -1,46 +0,0 @@ -# -# Gramps - a GTK+/GNOME based genealogy program -# -# Copyright (C) 2000-2006 Donald N. Allingham -# Copyright (C) 2009-2010 Brian G. Matherly -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -# - -# $Id$ - -""" -This module ("Gramps Gettext") is an extension to the Python gettext module. -""" - -#------------------------------------------------------------------------ -# -# python modules -# -#------------------------------------------------------------------------ -from gramps.gen.const import GRAMPS_LOCALE as _gl -_tl = _gl.get_translation() -gettext = _tl.gettext -# When in the 'C' locale, get_translation returns a NULLTranslation -# which doesn't provide sgettext. This traps that case and uses -# gettext instead -- which is fine, because there's no translation -# file involved and it's just going to return the msgid anyeay. -sgettext = None -try: - _tl.__getattr__(sgettext) - sgettext = _tl.sgettext -except AttributeError: - sgettext = _tl.gettext -ngettext = _tl.ngettext diff --git a/gramps/gen/lib/attrtype.py b/gramps/gen/lib/attrtype.py index 53dd9e4e1..55e922bc6 100644 --- a/gramps/gen/lib/attrtype.py +++ b/gramps/gen/lib/attrtype.py @@ -29,7 +29,8 @@ Provide the different Attribute Types for GRAMPS. # Standard Python modules # #------------------------------------------------------------------------- -from ..ggettext import gettext as _ +from ..const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # # GRAMPS modules diff --git a/gramps/gen/lib/childreftype.py b/gramps/gen/lib/childreftype.py index 720f0da0d..b48348745 100644 --- a/gramps/gen/lib/childreftype.py +++ b/gramps/gen/lib/childreftype.py @@ -28,7 +28,8 @@ Provide the different child reference types. # standard python modules # #------------------------------------------------------------------------- -from ..ggettext import gettext as _ +from ..const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/lib/date.py b/gramps/gen/lib/date.py index 832ae0b91..e5a7d8980 100644 --- a/gramps/gen/lib/date.py +++ b/gramps/gen/lib/date.py @@ -29,8 +29,6 @@ # #------------------------------------------------------------------------ from __future__ import unicode_literals, division -from ..ggettext import sgettext as _ -from ..ggettext import ngettext #------------------------------------------------------------------------ # @@ -52,6 +50,10 @@ log = logging.getLogger(".Date") # Gramps modules # #------------------------------------------------------------------------ +from ..const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().sgettext +ngettext = glocale.get_translation().ngettext + from .calendar import (gregorian_sdn, julian_sdn, hebrew_sdn, french_sdn, persian_sdn, islamic_sdn, swedish_sdn, gregorian_ymd, julian_ymd, hebrew_ymd, diff --git a/gramps/gen/lib/eventroletype.py b/gramps/gen/lib/eventroletype.py index b9bd2ad4d..c2658fed9 100644 --- a/gramps/gen/lib/eventroletype.py +++ b/gramps/gen/lib/eventroletype.py @@ -28,7 +28,8 @@ Provide the different event roles. # Python modules # #------------------------------------------------------------------------ -from ..ggettext import sgettext as _ +from ..const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().sgettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/lib/eventtype.py b/gramps/gen/lib/eventtype.py index 040783ef0..ddde001ce 100644 --- a/gramps/gen/lib/eventtype.py +++ b/gramps/gen/lib/eventtype.py @@ -29,7 +29,8 @@ Provide the different event types # Python modules # #------------------------------------------------------------------------ -from ..ggettext import sgettext as _ +from ..const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().sgettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/lib/familyreltype.py b/gramps/gen/lib/familyreltype.py index 0e9d20e9a..b6cf2b4a8 100644 --- a/gramps/gen/lib/familyreltype.py +++ b/gramps/gen/lib/familyreltype.py @@ -27,7 +27,8 @@ Provide the different family reference types. # Python modules # #------------------------------------------------------------------------ -from ..ggettext import gettext as _ +from ..const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/lib/grampstype.py b/gramps/gen/lib/grampstype.py index 33658a444..9dbdc4f33 100644 --- a/gramps/gen/lib/grampstype.py +++ b/gramps/gen/lib/grampstype.py @@ -31,13 +31,14 @@ Base type for all gramps types. # #------------------------------------------------------------------------ from __future__ import unicode_literals -from ..ggettext import gettext as _ #------------------------------------------------------------------------- # # GRAMPS modules # #------------------------------------------------------------------------- +from ..const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext from ..constfunc import STRTYPE _UNKNOWN = _('Unknown') diff --git a/gramps/gen/lib/ldsord.py b/gramps/gen/lib/ldsord.py index 041a6d4f6..17352ff3c 100644 --- a/gramps/gen/lib/ldsord.py +++ b/gramps/gen/lib/ldsord.py @@ -31,7 +31,8 @@ LDS Ordinance class for GRAMPS. # Python modules # #------------------------------------------------------------------------- -from ..ggettext import gettext as _ +from ..const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext from warnings import warn #------------------------------------------------------------------------- diff --git a/gramps/gen/lib/markertype.py b/gramps/gen/lib/markertype.py index 781cea62d..ffafc9236 100644 --- a/gramps/gen/lib/markertype.py +++ b/gramps/gen/lib/markertype.py @@ -31,7 +31,8 @@ when loading old database files. # Python modules # #------------------------------------------------------------------------- -from ..ggettext import gettext as _ +from ..const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/lib/nameorigintype.py b/gramps/gen/lib/nameorigintype.py index 407d8baf6..d511ca4ef 100644 --- a/gramps/gen/lib/nameorigintype.py +++ b/gramps/gen/lib/nameorigintype.py @@ -29,7 +29,8 @@ Name types. # Python modules # #------------------------------------------------------------------------- -from ..ggettext import sgettext as _ +from ..const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().sgettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/lib/nametype.py b/gramps/gen/lib/nametype.py index b3b421d86..4df805381 100644 --- a/gramps/gen/lib/nametype.py +++ b/gramps/gen/lib/nametype.py @@ -29,7 +29,8 @@ Name types. # Python modules # #------------------------------------------------------------------------- -from ..ggettext import gettext as _ +from ..const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/lib/notetype.py b/gramps/gen/lib/notetype.py index 2136d04c0..b9211a6bb 100644 --- a/gramps/gen/lib/notetype.py +++ b/gramps/gen/lib/notetype.py @@ -29,7 +29,8 @@ Note types. # standard python modules # #------------------------------------------------------------------------- -from ..ggettext import gettext as _ +from ..const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/lib/person.py b/gramps/gen/lib/person.py index 3cbe49430..3ac13fb20 100644 --- a/gramps/gen/lib/person.py +++ b/gramps/gen/lib/person.py @@ -49,7 +49,8 @@ from .attrtype import AttributeType from .eventroletype import EventRoleType from .attribute import Attribute from .const import IDENTICAL, EQUAL, DIFFERENT -from ..ggettext import gettext as _ +from ..const import GRAMPS_LOCALE as glocale +_ = glocale.get_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 0cc937021..0fc797fc9 100644 --- a/gramps/gen/lib/repotype.py +++ b/gramps/gen/lib/repotype.py @@ -29,7 +29,8 @@ Repository types. # Python modules # #------------------------------------------------------------------------- -from ..ggettext import gettext as _ +from ..const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/lib/srcmediatype.py b/gramps/gen/lib/srcmediatype.py index 4d802497f..82b572808 100644 --- a/gramps/gen/lib/srcmediatype.py +++ b/gramps/gen/lib/srcmediatype.py @@ -28,7 +28,8 @@ SourceMedia types. # Python modules # #------------------------------------------------------------------------- -from ..ggettext import gettext as _ +from ..const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/lib/styledtexttagtype.py b/gramps/gen/lib/styledtexttagtype.py index ca813340c..f12bf7a47 100644 --- a/gramps/gen/lib/styledtexttagtype.py +++ b/gramps/gen/lib/styledtexttagtype.py @@ -27,7 +27,8 @@ # Python modules # #------------------------------------------------------------------------ -from ..ggettext import gettext as _ +from ..const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/lib/surnamebase.py b/gramps/gen/lib/surnamebase.py index 2c1c85665..abedac5f7 100644 --- a/gramps/gen/lib/surnamebase.py +++ b/gramps/gen/lib/surnamebase.py @@ -24,7 +24,8 @@ SurnameBase class for GRAMPS. """ -from ..ggettext import gettext as _ +from ..const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/lib/urltype.py b/gramps/gen/lib/urltype.py index e9fa17ea5..e81268ed3 100644 --- a/gramps/gen/lib/urltype.py +++ b/gramps/gen/lib/urltype.py @@ -29,7 +29,8 @@ URL types # Python modules # #------------------------------------------------------------------------- -from ..ggettext import gettext as _ +from ..const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/merge/mergecitationquery.py b/gramps/gen/merge/mergecitationquery.py index b5158245d..9148fe972 100644 --- a/gramps/gen/merge/mergecitationquery.py +++ b/gramps/gen/merge/mergecitationquery.py @@ -32,7 +32,8 @@ Provide merge capabilities for citations. #------------------------------------------------------------------------- from ..lib import (Person, Family, Event, Place, MediaObject, Repository) from ..db import DbTxn -from ..ggettext import sgettext as _ +from ..const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().sgettext from ..errors import MergeError #------------------------------------------------------------------------- diff --git a/gramps/gen/merge/mergeeventquery.py b/gramps/gen/merge/mergeeventquery.py index fb86da3c5..a501fde70 100644 --- a/gramps/gen/merge/mergeeventquery.py +++ b/gramps/gen/merge/mergeeventquery.py @@ -31,7 +31,8 @@ Provide merge capabilities for events. #------------------------------------------------------------------------- from ..lib import Person, Family from ..db import DbTxn -from ..ggettext import sgettext as _ +from ..const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().sgettext from ..errors import MergeError #------------------------------------------------------------------------- diff --git a/gramps/gen/merge/mergefamilyquery.py b/gramps/gen/merge/mergefamilyquery.py index b27212dce..28fb05161 100644 --- a/gramps/gen/merge/mergefamilyquery.py +++ b/gramps/gen/merge/mergefamilyquery.py @@ -30,7 +30,8 @@ Provide merge capabilities for families. # #------------------------------------------------------------------------- from ..db import DbTxn -from ..ggettext import sgettext as _ +from ..const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().sgettext from ..errors import MergeError from . import MergePersonQuery diff --git a/gramps/gen/merge/mergemediaquery.py b/gramps/gen/merge/mergemediaquery.py index d021a1c64..2ecb95872 100644 --- a/gramps/gen/merge/mergemediaquery.py +++ b/gramps/gen/merge/mergemediaquery.py @@ -31,7 +31,8 @@ Provide merge capabilities for media objects. #------------------------------------------------------------------------- from ..lib import Person, Family, Event, Source, Citation, Place from ..db import DbTxn -from ..ggettext import sgettext as _ +from ..const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().sgettext from ..errors import MergeError #------------------------------------------------------------------------- diff --git a/gramps/gen/merge/mergenotequery.py b/gramps/gen/merge/mergenotequery.py index ddb6f1228..a8edc9cb5 100644 --- a/gramps/gen/merge/mergenotequery.py +++ b/gramps/gen/merge/mergenotequery.py @@ -32,7 +32,8 @@ Provide merge capabilities for notes. from ..lib import (Person, Family, Event, Place, Source, Citation, Repository, MediaObject) from ..db import DbTxn -from ..ggettext import sgettext as _ +from ..const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().sgettext from ..errors import MergeError #------------------------------------------------------------------------- diff --git a/gramps/gen/merge/mergepersonquery.py b/gramps/gen/merge/mergepersonquery.py index e05d6f812..8cff0a20a 100644 --- a/gramps/gen/merge/mergepersonquery.py +++ b/gramps/gen/merge/mergepersonquery.py @@ -32,7 +32,8 @@ Provide merge capabilities for persons. # #------------------------------------------------------------------------- from ..db import DbTxn -from ..ggettext import sgettext as _ +from ..const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().sgettext from ..errors import MergeError #------------------------------------------------------------------------- diff --git a/gramps/gen/merge/mergeplacequery.py b/gramps/gen/merge/mergeplacequery.py index 4a115dab0..a79480c74 100644 --- a/gramps/gen/merge/mergeplacequery.py +++ b/gramps/gen/merge/mergeplacequery.py @@ -32,7 +32,8 @@ Provide merge capabilities for places. #------------------------------------------------------------------------- from ..lib import Person, Family, Event from ..db import DbTxn -from ..ggettext import sgettext as _ +from ..const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().sgettext from ..errors import MergeError #------------------------------------------------------------------------- diff --git a/gramps/gen/merge/mergerepositoryquery.py b/gramps/gen/merge/mergerepositoryquery.py index 3e9b47cb4..d99ca3ce7 100644 --- a/gramps/gen/merge/mergerepositoryquery.py +++ b/gramps/gen/merge/mergerepositoryquery.py @@ -31,7 +31,8 @@ Provide merge capabilities for repositories. #------------------------------------------------------------------------- from ..lib import Source from ..db import DbTxn -from ..ggettext import sgettext as _ +from ..const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().sgettext from ..errors import MergeError #------------------------------------------------------------------------- diff --git a/gramps/gen/merge/mergesourcequery.py b/gramps/gen/merge/mergesourcequery.py index 200a6ae88..bacb0fc53 100644 --- a/gramps/gen/merge/mergesourcequery.py +++ b/gramps/gen/merge/mergesourcequery.py @@ -34,7 +34,8 @@ Provide merge capabilities for sources. from ..lib import (Person, Family, Event, Place, Source, Repository, MediaObject, Citation) from ..db import DbTxn -from ..ggettext import sgettext as _ +from ..const import GRAMPS_LOCALE as glocale +_ = glocale.get_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 86fc729e5..0a974bfc1 100644 --- a/gramps/gen/merge/test/merge_ref_test.py +++ b/gramps/gen/merge/test/merge_ref_test.py @@ -39,7 +39,8 @@ import libxslt from libgrampsxml import GRAMPS_XML_VERSION from ...const import ROOT_DIR, VERSION, USER_PLUGINS from ...lib import Name, Surname -from ...ggettext import sgettext as _ +from ...const import GRAMPS_LOCALE as glocale +_ = glocale.get_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 a06ac353b..a91b8e3eb 100644 --- a/gramps/gen/mime/_pythonmime.py +++ b/gramps/gen/mime/_pythonmime.py @@ -22,7 +22,8 @@ # import mimetypes -from ..ggettext import gettext as _ +from ..const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext _type_map = { 'application/x-gramps' : 'Gramps database', diff --git a/gramps/gen/mime/_winmime.py b/gramps/gen/mime/_winmime.py index bea477af1..eaa2cfc96 100644 --- a/gramps/gen/mime/_winmime.py +++ b/gramps/gen/mime/_winmime.py @@ -43,7 +43,8 @@ else: # #------------------------------------------------------------------------- from . import _pythonmime -from ..ggettext import gettext as _ +from ..const import GRAMPS_LOCALE as glocale +_ = glocale.get_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 23fe5a764..51d0003ee 100644 --- a/gramps/gen/plug/_gramplet.py +++ b/gramps/gen/plug/_gramplet.py @@ -30,7 +30,8 @@ if config.get('preferences.use-bsddb3') or sys.version_info[0] >= 3: else: import bsddb import types -from ..ggettext import gettext as _ +from ..const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext import logging LOG = logging.getLogger(".Gramplets") diff --git a/gramps/gen/plug/_manager.py b/gramps/gen/plug/_manager.py index 13dd9e91f..5f350da47 100644 --- a/gramps/gen/plug/_manager.py +++ b/gramps/gen/plug/_manager.py @@ -41,7 +41,8 @@ from __future__ import print_function import os import sys import re -from ..ggettext import gettext as _ +from ..const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/plug/_options.py b/gramps/gen/plug/_options.py index c7c5f4667..c04810698 100644 --- a/gramps/gen/plug/_options.py +++ b/gramps/gen/plug/_options.py @@ -58,7 +58,8 @@ from ..utils.cast import get_type_converter from .menu import Menu from ..plug import BasePluginManager PLUGMAN = BasePluginManager.get_instance() - +from ..const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # # List of options for a single module diff --git a/gramps/gen/plug/_pluginreg.py b/gramps/gen/plug/_pluginreg.py index 25bf4ec57..6b4974e29 100644 --- a/gramps/gen/plug/_pluginreg.py +++ b/gramps/gen/plug/_pluginreg.py @@ -42,9 +42,10 @@ import traceback # GRAMPS modules # #------------------------------------------------------------------------- -from ..const import VERSION as GRAMPSVERSION, VERSION_TUPLE, GRAMPS_LOCALE as glocale +from ..const import VERSION as GRAMPSVERSION, VERSION_TUPLE from ..const import IMAGE_DIR -from ..ggettext import gettext as _ +from ..const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext from ..constfunc import STRTYPE #------------------------------------------------------------------------- diff --git a/gramps/gen/plug/docbackend/docbackend.py b/gramps/gen/plug/docbackend/docbackend.py index a93136f1c..00b626c2b 100644 --- a/gramps/gen/plug/docbackend/docbackend.py +++ b/gramps/gen/plug/docbackend/docbackend.py @@ -30,7 +30,8 @@ #------------------------------------------------------------------------ from __future__ import print_function -from ...ggettext import gettext as _ +from ...const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/plug/docgen/graphdoc.py b/gramps/gen/plug/docgen/graphdoc.py index bca8cbfed..0bfa17879 100644 --- a/gramps/gen/plug/docgen/graphdoc.py +++ b/gramps/gen/plug/docgen/graphdoc.py @@ -47,7 +47,8 @@ import sys # GRAMPS modules # #------------------------------------------------------------------------------- -from ...ggettext import gettext as _ +from ...const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext from ...utils.file import search_for from . import BaseDoc from ..menu import NumberOption, TextOption, EnumeratedListOption, \ diff --git a/gramps/gen/plug/report/_book.py b/gramps/gen/plug/report/_book.py index fa137aaa5..bbc798e00 100644 --- a/gramps/gen/plug/report/_book.py +++ b/gramps/gen/plug/report/_book.py @@ -31,7 +31,8 @@ # Standard Python modules # #------------------------------------------------------------------------- -from ...ggettext import gettext as _ +from ...const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------ # diff --git a/gramps/gen/plug/report/_constants.py b/gramps/gen/plug/report/_constants.py index 3771f5c89..cabb171d4 100644 --- a/gramps/gen/plug/report/_constants.py +++ b/gramps/gen/plug/report/_constants.py @@ -29,7 +29,8 @@ # standard python modules # #------------------------------------------------------------------------- -from ...ggettext import gettext as _ +from ...const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext import os #------------------------------------------------------------------------- diff --git a/gramps/gen/plug/report/_paper.py b/gramps/gen/plug/report/_paper.py index 5513674fb..b9ae07f82 100644 --- a/gramps/gen/plug/report/_paper.py +++ b/gramps/gen/plug/report/_paper.py @@ -26,7 +26,8 @@ # Python modules # #------------------------------------------------------------------------- -from ...ggettext import sgettext as _ +from ...const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().sgettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/plug/report/endnotes.py b/gramps/gen/plug/report/endnotes.py index 692fe97f3..524bdcda9 100644 --- a/gramps/gen/plug/report/endnotes.py +++ b/gramps/gen/plug/report/endnotes.py @@ -28,7 +28,8 @@ Provide utilities for printing endnotes in text reports. """ from ..docgen import FontStyle, ParagraphStyle, FONT_SANS_SERIF from ...lib import NoteType, Citation -from ...ggettext import gettext as _ +from ...const import GRAMPS_LOCALE as glocale +_ = glocale.get_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 8b6ba4fd4..f711f403e 100644 --- a/gramps/gen/plug/report/utils.py +++ b/gramps/gen/plug/report/utils.py @@ -34,7 +34,8 @@ A collection of utilities to aid in the generation of reports. # #------------------------------------------------------------------------- import os -from ...ggettext import gettext as _ +from ...const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------ # diff --git a/gramps/gen/plug/utils.py b/gramps/gen/plug/utils.py index 77bd5d14c..0e8ca6b47 100644 --- a/gramps/gen/plug/utils.py +++ b/gramps/gen/plug/utils.py @@ -45,7 +45,8 @@ else: from ._pluginreg import make_environment from ..const import USER_PLUGINS, VERSION_TUPLE from ..utils.file import get_unicode_path_from_file_chooser -from ..ggettext import gettext as _ +from ..const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/proxy/private.py b/gramps/gen/proxy/private.py index 1a204d48f..5b2e5df6e 100644 --- a/gramps/gen/proxy/private.py +++ b/gramps/gen/proxy/private.py @@ -31,7 +31,8 @@ Proxy class for the GRAMPS databases. Filter out all data marked private. # Python libraries # #------------------------------------------------------------------------- -from ..ggettext import gettext as _ +from ..const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext import logging LOG = logging.getLogger(".citation") diff --git a/gramps/gen/relationship.py b/gramps/gen/relationship.py index 09d99b6fd..c6d344d64 100644 --- a/gramps/gen/relationship.py +++ b/gramps/gen/relationship.py @@ -41,7 +41,8 @@ from .lib import Person, ChildRefType, EventType, FamilyRelType MALE = Person.MALE FEMALE = Person.FEMALE UNKNOWN = Person.UNKNOWN -from .ggettext import sgettext as _ +from .const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().sgettext from .plug import PluginRegister, BasePluginManager #------------------------------------------------------------------------- diff --git a/gramps/gen/simple/_simpleaccess.py b/gramps/gen/simple/_simpleaccess.py index 07fefbb50..7acb41a6b 100644 --- a/gramps/gen/simple/_simpleaccess.py +++ b/gramps/gen/simple/_simpleaccess.py @@ -37,7 +37,8 @@ from ..plug.report.utils import place_name from ..display.name import displayer as name_displayer from ..lib import EventType from ..config import config -from ..ggettext import gettext as _ +from ..const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext from ..constfunc import STRTYPE #------------------------------------------------------------------------- diff --git a/gramps/gen/simple/_simpletable.py b/gramps/gen/simple/_simpletable.py index 748f77504..05cec4265 100644 --- a/gramps/gen/simple/_simpletable.py +++ b/gramps/gen/simple/_simpletable.py @@ -27,7 +27,8 @@ Provide a simplified table creation interface """ import cgi -from ..ggettext import sgettext as _ +from ..const import GRAMPS_LOCALE as glocale +_ = glocale.get_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 53c0c55dc..b2116d071 100644 --- a/gramps/gen/utils/alive.py +++ b/gramps/gen/utils/alive.py @@ -43,7 +43,8 @@ LOG = logging.getLogger(".gen.utils.alive") from ..display.name import displayer as name_displayer from ..lib.date import Date, Today from ..errors import DatabaseError -from ..ggettext import sgettext as _ +from ..const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().sgettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/utils/configmanager.py b/gramps/gen/utils/configmanager.py index d7debd7e4..6fa579b51 100644 --- a/gramps/gen/utils/configmanager.py +++ b/gramps/gen/utils/configmanager.py @@ -44,7 +44,8 @@ import copy import logging from ..constfunc import STRTYPE - +from ..const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext def safe_eval(exp): # restrict eval to empty environment return eval(exp, {}) diff --git a/gramps/gen/utils/db.py b/gramps/gen/utils/db.py index c3864c553..e54b3bdab 100644 --- a/gramps/gen/utils/db.py +++ b/gramps/gen/utils/db.py @@ -39,7 +39,8 @@ LOG = logging.getLogger(".gui.utils.db") from ..lib.nameorigintype import NameOriginType from ..lib.surname import Surname from ..display.name import displayer as name_displayer -from ..ggettext import sgettext as _ +from ..const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().sgettext from ..constfunc import cuni #------------------------------------------------------------------------- diff --git a/gramps/gen/utils/docgen/odstab.py b/gramps/gen/utils/docgen/odstab.py index 6469400b8..cc2dae6d7 100644 --- a/gramps/gen/utils/docgen/odstab.py +++ b/gramps/gen/utils/docgen/odstab.py @@ -28,7 +28,8 @@ import os import tempfile import zipfile -from ...ggettext import gettext as _ +from ...const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/utils/lds.py b/gramps/gen/utils/lds.py index 7dca98c83..ed009bb70 100644 --- a/gramps/gen/utils/lds.py +++ b/gramps/gen/utils/lds.py @@ -30,7 +30,8 @@ import sys import logging from xml.parsers.expat import ParserCreate -from ..ggettext import gettext as _ +from ..const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext LOG = logging.getLogger(".") diff --git a/gramps/gen/utils/place.py b/gramps/gen/utils/place.py index e2fe89af1..cf5bfa942 100644 --- a/gramps/gen/utils/place.py +++ b/gramps/gen/utils/place.py @@ -31,7 +31,8 @@ #------------------------------------------------------------------------- from __future__ import print_function, unicode_literals -from ..ggettext import gettext as _ +from ..const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext import math #------------------------------------------------------------------------- diff --git a/gramps/gen/utils/string.py b/gramps/gen/utils/string.py index c8e738bc3..27a1479f9 100644 --- a/gramps/gen/utils/string.py +++ b/gramps/gen/utils/string.py @@ -32,7 +32,8 @@ String mappings for constants # #------------------------------------------------------------------------- from ..lib import Person, Citation, FamilyRelType -from ..ggettext import sgettext as _ +from ..const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().sgettext #------------------------------------------------------------------------- # diff --git a/gramps/gen/utils/unknown.py b/gramps/gen/utils/unknown.py index 56d6fe927..b565e535d 100644 --- a/gramps/gen/utils/unknown.py +++ b/gramps/gen/utils/unknown.py @@ -45,7 +45,8 @@ from ..lib import (Person, Surname, Name, NameType, Family, FamilyRelType, ChildRef, ChildRefType) from .id import create_id from ..const import IMAGE_DIR -from ..ggettext import sgettext as _ +from ..const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().sgettext #------------------------------------------------------------------------- # diff --git a/gramps/gui/aboutdialog.py b/gramps/gui/aboutdialog.py index 71614105c..868dfc466 100644 --- a/gramps/gui/aboutdialog.py +++ b/gramps/gui/aboutdialog.py @@ -27,7 +27,8 @@ # Python modules # #------------------------------------------------------------------------- -from gramps.gen.ggettext import gettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext import os import sys diff --git a/gramps/gui/clipboard.py b/gramps/gui/clipboard.py index 73582a81e..303fd3880 100644 --- a/gramps/gui/clipboard.py +++ b/gramps/gui/clipboard.py @@ -56,7 +56,8 @@ from gramps.gen.lib import NoteType from gramps.gen.datehandler import get_date from .display import display_help from .managedwindow import ManagedWindow -from gramps.gen.ggettext import sgettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_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 57894487a..2b533f235 100644 --- a/gramps/gui/columnorder.py +++ b/gramps/gui/columnorder.py @@ -32,7 +32,8 @@ Handle the column ordering # python modules # #------------------------------------------------------------------------- -from gramps.gen.ggettext import gettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext import logging #------------------------------------------------------------------------- diff --git a/gramps/gui/configure.py b/gramps/gui/configure.py index 86ca4e36a..292711353 100644 --- a/gramps/gui/configure.py +++ b/gramps/gui/configure.py @@ -32,7 +32,8 @@ from __future__ import print_function import random -from gramps.gen.ggettext import gettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_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 9397a31d5..b889b2fd3 100644 --- a/gramps/gui/dbloader.py +++ b/gramps/gui/dbloader.py @@ -31,7 +31,6 @@ Handling of loading new/existing databases. # #------------------------------------------------------------------------- import os -from gramps.gen.ggettext import gettext as _ import logging #------------------------------------------------------------------------- @@ -54,6 +53,8 @@ from gi.repository import GObject # GRAMPS modules # #------------------------------------------------------------------------- +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_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 68d4af4af..2b873fef2 100644 --- a/gramps/gui/dbman.py +++ b/gramps/gui/dbman.py @@ -73,7 +73,8 @@ from gi.repository import Pango # gramps modules # #------------------------------------------------------------------------- -from gramps.gen.ggettext import gettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_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 871718f7c..8941da6de 100644 --- a/gramps/gui/dialog.py +++ b/gramps/gui/dialog.py @@ -46,7 +46,8 @@ from gi.repository import GdkPixbuf from gramps.gen.const import ICON from gramps.gen.config import config from .glade import Glade -from gramps.gen.ggettext import gettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext from gramps.gen.constfunc import cuni try: diff --git a/gramps/gui/displaystate.py b/gramps/gui/displaystate.py index 8e3890e46..d7d202b94 100644 --- a/gramps/gui/displaystate.py +++ b/gramps/gui/displaystate.py @@ -34,7 +34,8 @@ if sys.version_info[0] < 3: from StringIO import StringIO else: from io import StringIO -from gramps.gen.ggettext import gettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gui/editors/addmedia.py b/gramps/gui/editors/addmedia.py index 566d61e67..cbdc524be 100644 --- a/gramps/gui/editors/addmedia.py +++ b/gramps/gui/editors/addmedia.py @@ -36,7 +36,8 @@ import os # internationalization # #------------------------------------------------------------------------- -from gramps.gen.ggettext import gettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_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 585b9f248..9e2eb4847 100644 --- a/gramps/gui/editors/displaytabs/addrembedlist.py +++ b/gramps/gui/editors/displaytabs/addrembedlist.py @@ -29,7 +29,8 @@ Address List display tab. # Python classes # #------------------------------------------------------------------------- -from gramps.gen.ggettext import gettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext from gi.repository import GObject #------------------------------------------------------------------------- diff --git a/gramps/gui/editors/displaytabs/attrembedlist.py b/gramps/gui/editors/displaytabs/attrembedlist.py index b17c16e08..d51e60da7 100644 --- a/gramps/gui/editors/displaytabs/attrembedlist.py +++ b/gramps/gui/editors/displaytabs/attrembedlist.py @@ -25,7 +25,8 @@ # Python classes # #------------------------------------------------------------------------- -from gramps.gen.ggettext import gettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext from gi.repository import GObject #------------------------------------------------------------------------- diff --git a/gramps/gui/editors/displaytabs/backreflist.py b/gramps/gui/editors/displaytabs/backreflist.py index fa0569325..e5cde3880 100644 --- a/gramps/gui/editors/displaytabs/backreflist.py +++ b/gramps/gui/editors/displaytabs/backreflist.py @@ -27,7 +27,8 @@ # Python classes # #------------------------------------------------------------------------- -from gramps.gen.ggettext import gettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gui/editors/displaytabs/backrefmodel.py b/gramps/gui/editors/displaytabs/backrefmodel.py index 84dc3e760..651ff8c70 100644 --- a/gramps/gui/editors/displaytabs/backrefmodel.py +++ b/gramps/gui/editors/displaytabs/backrefmodel.py @@ -31,7 +31,8 @@ import sys from gi.repository import GObject from gi.repository import Gtk -from gramps.gen.ggettext import gettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gui/editors/displaytabs/buttontab.py b/gramps/gui/editors/displaytabs/buttontab.py index d6f055f4e..3d4917d67 100644 --- a/gramps/gui/editors/displaytabs/buttontab.py +++ b/gramps/gui/editors/displaytabs/buttontab.py @@ -28,7 +28,8 @@ #------------------------------------------------------------------------- from __future__ import print_function -from gramps.gen.ggettext import gettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gui/editors/displaytabs/citationembedlist.py b/gramps/gui/editors/displaytabs/citationembedlist.py index 8b2b27f39..5b8b87879 100644 --- a/gramps/gui/editors/displaytabs/citationembedlist.py +++ b/gramps/gui/editors/displaytabs/citationembedlist.py @@ -26,7 +26,8 @@ # Python classes # #------------------------------------------------------------------------- -from gramps.gen.ggettext import gettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_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 7293baaed..6c3b57b17 100644 --- a/gramps/gui/editors/displaytabs/dataembedlist.py +++ b/gramps/gui/editors/displaytabs/dataembedlist.py @@ -25,7 +25,8 @@ # Python classes # #------------------------------------------------------------------------- -from gramps.gen.ggettext import gettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gui/editors/displaytabs/embeddedlist.py b/gramps/gui/editors/displaytabs/embeddedlist.py index 0ae9abf6c..635537bbf 100644 --- a/gramps/gui/editors/displaytabs/embeddedlist.py +++ b/gramps/gui/editors/displaytabs/embeddedlist.py @@ -26,7 +26,8 @@ # python # #------------------------------------------------------------------------- -from gramps.gen.ggettext import gettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_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 5c22173ce..76556c111 100644 --- a/gramps/gui/editors/displaytabs/eventembedlist.py +++ b/gramps/gui/editors/displaytabs/eventembedlist.py @@ -26,7 +26,8 @@ # Python classes # #------------------------------------------------------------------------- -from gramps.gen.ggettext import gettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_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 413920f90..221759f9b 100644 --- a/gramps/gui/editors/displaytabs/eventrefmodel.py +++ b/gramps/gui/editors/displaytabs/eventrefmodel.py @@ -26,7 +26,8 @@ # python # #------------------------------------------------------------------------- -from gramps.gen.ggettext import gettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gui/editors/displaytabs/familyldsembedlist.py b/gramps/gui/editors/displaytabs/familyldsembedlist.py index 91c76af60..14e7c6bed 100644 --- a/gramps/gui/editors/displaytabs/familyldsembedlist.py +++ b/gramps/gui/editors/displaytabs/familyldsembedlist.py @@ -25,7 +25,8 @@ # Python classes # #------------------------------------------------------------------------- -from gramps.gen.ggettext import gettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gui/editors/displaytabs/gallerytab.py b/gramps/gui/editors/displaytabs/gallerytab.py index d65a600cf..9ebed173e 100644 --- a/gramps/gui/editors/displaytabs/gallerytab.py +++ b/gramps/gui/editors/displaytabs/gallerytab.py @@ -26,7 +26,8 @@ # Python classes # #------------------------------------------------------------------------- -from gramps.gen.ggettext import gettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_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 ce78f25da..105c4a8f1 100644 --- a/gramps/gui/editors/displaytabs/ldsembedlist.py +++ b/gramps/gui/editors/displaytabs/ldsembedlist.py @@ -25,7 +25,8 @@ # Python classes # #------------------------------------------------------------------------- -from gramps.gen.ggettext import gettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext from gi.repository import GObject #------------------------------------------------------------------------- diff --git a/gramps/gui/editors/displaytabs/locationembedlist.py b/gramps/gui/editors/displaytabs/locationembedlist.py index b566d892f..2c2f99e80 100644 --- a/gramps/gui/editors/displaytabs/locationembedlist.py +++ b/gramps/gui/editors/displaytabs/locationembedlist.py @@ -25,7 +25,8 @@ # Python classes # #------------------------------------------------------------------------- -from gramps.gen.ggettext import gettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext from gi.repository import GObject #------------------------------------------------------------------------- diff --git a/gramps/gui/editors/displaytabs/nameembedlist.py b/gramps/gui/editors/displaytabs/nameembedlist.py index e0ba6159f..09e6dfdaa 100644 --- a/gramps/gui/editors/displaytabs/nameembedlist.py +++ b/gramps/gui/editors/displaytabs/nameembedlist.py @@ -34,7 +34,8 @@ from gi.repository import GObject # Python classes # #------------------------------------------------------------------------- -from gramps.gen.ggettext import gettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gui/editors/displaytabs/namemodel.py b/gramps/gui/editors/displaytabs/namemodel.py index b7c826c01..50c71e0e2 100644 --- a/gramps/gui/editors/displaytabs/namemodel.py +++ b/gramps/gui/editors/displaytabs/namemodel.py @@ -27,7 +27,8 @@ # python libraries # #------------------------------------------------------------------------- -from gramps.gen.ggettext import gettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gui/editors/displaytabs/notetab.py b/gramps/gui/editors/displaytabs/notetab.py index e28c56caf..8c72c361b 100644 --- a/gramps/gui/editors/displaytabs/notetab.py +++ b/gramps/gui/editors/displaytabs/notetab.py @@ -25,7 +25,8 @@ # Python classes # #------------------------------------------------------------------------- -from gramps.gen.ggettext import gettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gui/editors/displaytabs/personeventembedlist.py b/gramps/gui/editors/displaytabs/personeventembedlist.py index 5136bc983..8a2b714ae 100644 --- a/gramps/gui/editors/displaytabs/personeventembedlist.py +++ b/gramps/gui/editors/displaytabs/personeventembedlist.py @@ -26,7 +26,8 @@ # python # #------------------------------------------------------------------------- -from gramps.gen.ggettext import gettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext from gi.repository import GObject #------------------------------------------------------------------------- diff --git a/gramps/gui/editors/displaytabs/personrefembedlist.py b/gramps/gui/editors/displaytabs/personrefembedlist.py index f40dba553..cd3371820 100644 --- a/gramps/gui/editors/displaytabs/personrefembedlist.py +++ b/gramps/gui/editors/displaytabs/personrefembedlist.py @@ -25,7 +25,8 @@ # Python classes # #------------------------------------------------------------------------- -from gramps.gen.ggettext import gettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext from gi.repository import GObject #------------------------------------------------------------------------- diff --git a/gramps/gui/editors/displaytabs/repoembedlist.py b/gramps/gui/editors/displaytabs/repoembedlist.py index 3de12f992..33e3964d0 100644 --- a/gramps/gui/editors/displaytabs/repoembedlist.py +++ b/gramps/gui/editors/displaytabs/repoembedlist.py @@ -25,7 +25,8 @@ # Python classes # #------------------------------------------------------------------------- -from gramps.gen.ggettext import gettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext from gi.repository import GObject #------------------------------------------------------------------------- diff --git a/gramps/gui/editors/displaytabs/surnametab.py b/gramps/gui/editors/displaytabs/surnametab.py index 2b30b20ca..c36954755 100644 --- a/gramps/gui/editors/displaytabs/surnametab.py +++ b/gramps/gui/editors/displaytabs/surnametab.py @@ -26,7 +26,8 @@ # Python classes # #------------------------------------------------------------------------- -from gramps.gen.ggettext import sgettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().sgettext import locale #------------------------------------------------------------------------- diff --git a/gramps/gui/editors/displaytabs/webembedlist.py b/gramps/gui/editors/displaytabs/webembedlist.py index 7bf582aa7..e60fdab52 100644 --- a/gramps/gui/editors/displaytabs/webembedlist.py +++ b/gramps/gui/editors/displaytabs/webembedlist.py @@ -25,7 +25,8 @@ # Python classes # #------------------------------------------------------------------------- -from gramps.gen.ggettext import gettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_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 921d790a9..1e7622d5d 100644 --- a/gramps/gui/editors/editaddress.py +++ b/gramps/gui/editors/editaddress.py @@ -33,7 +33,8 @@ mechanism for the user to edit address information. # Python modules # #------------------------------------------------------------------------- -from gramps.gen.ggettext import gettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gui/editors/editattribute.py b/gramps/gui/editors/editattribute.py index b5ec7f66b..4f0b98b21 100644 --- a/gramps/gui/editors/editattribute.py +++ b/gramps/gui/editors/editattribute.py @@ -32,7 +32,8 @@ mechanism for the user to edit attribute information. # Python modules # #------------------------------------------------------------------------- -from gramps.gen.ggettext import gettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gui/editors/editchildref.py b/gramps/gui/editors/editchildref.py index 375d440af..86970c15d 100644 --- a/gramps/gui/editors/editchildref.py +++ b/gramps/gui/editors/editchildref.py @@ -32,7 +32,8 @@ mechanism for the user to edit address information. # Python modules # #------------------------------------------------------------------------- -from gramps.gen.ggettext import gettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gui/editors/editcitation.py b/gramps/gui/editors/editcitation.py index afe51c30a..55c020208 100644 --- a/gramps/gui/editors/editcitation.py +++ b/gramps/gui/editors/editcitation.py @@ -31,7 +31,8 @@ EditCitation class for GRAMPS. # Python modules # #------------------------------------------------------------------------- -from gramps.gen.ggettext import gettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext import logging LOG = logging.getLogger(".citation") diff --git a/gramps/gui/editors/editdate.py b/gramps/gui/editors/editdate.py index 5ea2fde6c..1dcd2e089 100644 --- a/gramps/gui/editors/editdate.py +++ b/gramps/gui/editors/editdate.py @@ -61,7 +61,8 @@ from gi.repository import Gtk # gramps modules # #------------------------------------------------------------------------- -from gramps.gen.ggettext import sgettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_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 cd6cc1b20..25867f2b4 100644 --- a/gramps/gui/editors/editevent.py +++ b/gramps/gui/editors/editevent.py @@ -27,7 +27,8 @@ # Python modules # #------------------------------------------------------------------------- -from gramps.gen.ggettext import sgettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().sgettext #------------------------------------------------------------------------- # diff --git a/gramps/gui/editors/editeventref.py b/gramps/gui/editors/editeventref.py index 82dd50353..894cc3886 100644 --- a/gramps/gui/editors/editeventref.py +++ b/gramps/gui/editors/editeventref.py @@ -28,7 +28,8 @@ # Python modules # #------------------------------------------------------------------------- -from gramps.gen.ggettext import gettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gui/editors/editfamily.py b/gramps/gui/editors/editfamily.py index 9334820e8..357ed5769 100644 --- a/gramps/gui/editors/editfamily.py +++ b/gramps/gui/editors/editfamily.py @@ -53,7 +53,8 @@ log = logging.getLogger(".") # GTK/Gnome modules # #------------------------------------------------------------------------- -from gramps.gen.ggettext import gettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_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 6ecfccbf7..b7847271f 100644 --- a/gramps/gui/editors/editldsord.py +++ b/gramps/gui/editors/editldsord.py @@ -31,7 +31,8 @@ mechanism for the user to edit personal LDS information. # Python modules # #------------------------------------------------------------------------- -from gramps.gen.ggettext import gettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gui/editors/editlink.py b/gramps/gui/editors/editlink.py index e5d1c8b5e..227e57c56 100644 --- a/gramps/gui/editors/editlink.py +++ b/gramps/gui/editors/editlink.py @@ -33,7 +33,8 @@ import re # gramps modules # #------------------------------------------------------------------------- -from gramps.gen.ggettext import gettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_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 4c2283b63..61de8c2ee 100644 --- a/gramps/gui/editors/editlocation.py +++ b/gramps/gui/editors/editlocation.py @@ -30,7 +30,8 @@ from .editsecondary import EditSecondary from ..glade import Glade from ..widgets import MonitoredEntry -from gramps.gen.ggettext import gettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gui/editors/editmedia.py b/gramps/gui/editors/editmedia.py index 21837114b..47820a652 100644 --- a/gramps/gui/editors/editmedia.py +++ b/gramps/gui/editors/editmedia.py @@ -28,7 +28,8 @@ # Standard python modules # #------------------------------------------------------------------------- -from gramps.gen.ggettext import gettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gui/editors/editmediaref.py b/gramps/gui/editors/editmediaref.py index 6d14f330c..6a33cbecf 100644 --- a/gramps/gui/editors/editmediaref.py +++ b/gramps/gui/editors/editmediaref.py @@ -29,7 +29,8 @@ # Standard python modules # #------------------------------------------------------------------------- -from gramps.gen.ggettext import sgettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().sgettext #------------------------------------------------------------------------- # diff --git a/gramps/gui/editors/editname.py b/gramps/gui/editors/editname.py index 91afd035f..69b3ed971 100644 --- a/gramps/gui/editors/editname.py +++ b/gramps/gui/editors/editname.py @@ -30,7 +30,8 @@ # #------------------------------------------------------------------------- from gi.repository import GObject -from gramps.gen.ggettext import gettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext from copy import copy #------------------------------------------------------------------------- diff --git a/gramps/gui/editors/editnote.py b/gramps/gui/editors/editnote.py index 33cf623ff..1696d22c6 100644 --- a/gramps/gui/editors/editnote.py +++ b/gramps/gui/editors/editnote.py @@ -29,7 +29,8 @@ # Python classes # #------------------------------------------------------------------------- -from gramps.gen.ggettext import gettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_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 636f7914f..c35eee579 100644 --- a/gramps/gui/editors/editperson.py +++ b/gramps/gui/editors/editperson.py @@ -34,7 +34,8 @@ to edit information about a particular Person. # #------------------------------------------------------------------------- from copy import copy -from gramps.gen.ggettext import sgettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().sgettext #------------------------------------------------------------------------- # diff --git a/gramps/gui/editors/editpersonref.py b/gramps/gui/editors/editpersonref.py index dbbb53a75..88b907653 100644 --- a/gramps/gui/editors/editpersonref.py +++ b/gramps/gui/editors/editpersonref.py @@ -32,7 +32,8 @@ mechanism for the user to edit address information. # Python modules # #------------------------------------------------------------------------- -from gramps.gen.ggettext import gettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gui/editors/editplace.py b/gramps/gui/editors/editplace.py index b168c56c4..cf1fa6a06 100644 --- a/gramps/gui/editors/editplace.py +++ b/gramps/gui/editors/editplace.py @@ -30,7 +30,8 @@ #------------------------------------------------------------------------- from __future__ import unicode_literals -from gramps.gen.ggettext import gettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext import logging log = logging.getLogger(".") diff --git a/gramps/gui/editors/editprimary.py b/gramps/gui/editors/editprimary.py index 3d2d0ba64..b96cce2c5 100644 --- a/gramps/gui/editors/editprimary.py +++ b/gramps/gui/editors/editprimary.py @@ -26,7 +26,8 @@ # Python modules # #------------------------------------------------------------------------- -from gramps.gen.ggettext import gettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gui/editors/editreporef.py b/gramps/gui/editors/editreporef.py index f9d28b432..9553345bf 100644 --- a/gramps/gui/editors/editreporef.py +++ b/gramps/gui/editors/editreporef.py @@ -26,7 +26,8 @@ # Python modules # #------------------------------------------------------------------------- -from gramps.gen.ggettext import gettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gui/editors/editrepository.py b/gramps/gui/editors/editrepository.py index a3c0b23bd..6826ce80c 100644 --- a/gramps/gui/editors/editrepository.py +++ b/gramps/gui/editors/editrepository.py @@ -26,7 +26,8 @@ # Python modules # #------------------------------------------------------------------------- -from gramps.gen.ggettext import gettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gui/editors/editsource.py b/gramps/gui/editors/editsource.py index 55fa571d3..5421a5bdf 100644 --- a/gramps/gui/editors/editsource.py +++ b/gramps/gui/editors/editsource.py @@ -27,7 +27,8 @@ # Python modules # #------------------------------------------------------------------------- -from gramps.gen.ggettext import gettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_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 99d2ca65d..0d517ca42 100644 --- a/gramps/gui/editors/edittaglist.py +++ b/gramps/gui/editors/edittaglist.py @@ -33,7 +33,8 @@ from gi.repository import Gtk # Gramps modules # #------------------------------------------------------------------------- -from gramps.gen.ggettext import sgettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_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 3a126d461..277581166 100644 --- a/gramps/gui/editors/editurl.py +++ b/gramps/gui/editors/editurl.py @@ -26,7 +26,8 @@ # python modules # #------------------------------------------------------------------------- -from gramps.gen.ggettext import gettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gui/editors/filtereditor.py b/gramps/gui/editors/filtereditor.py index 82a3bdf5d..9e963d5bd 100644 --- a/gramps/gui/editors/filtereditor.py +++ b/gramps/gui/editors/filtereditor.py @@ -63,7 +63,8 @@ from ..dialog import QuestionDialog from gramps.gen.const import RULE_GLADE, URL_MANUAL_PAGE from ..display import display_help from gramps.gen.errors import WindowActiveError -from gramps.gen.ggettext import sgettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_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 04aa902fc..79cb81ff8 100644 --- a/gramps/gui/editors/objectentries.py +++ b/gramps/gui/editors/objectentries.py @@ -25,7 +25,8 @@ # Standard python modules # #------------------------------------------------------------------------- -from gramps.gen.ggettext import gettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_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 ea7e0c193..f7972cbfd 100644 --- a/gramps/gui/filters/_filterstore.py +++ b/gramps/gui/filters/_filterstore.py @@ -30,7 +30,8 @@ Package providing filtering framework for GRAMPS. # #------------------------------------------------------------------------- from gi.repository import Gtk -from gramps.gen.ggettext import gettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gui/filters/_searchbar.py b/gramps/gui/filters/_searchbar.py index 3ff2a712f..61963da7c 100644 --- a/gramps/gui/filters/_searchbar.py +++ b/gramps/gui/filters/_searchbar.py @@ -32,7 +32,8 @@ Package providing filtering framework for GRAMPS. #------------------------------------------------------------------------- from gi.repository import Gdk from gi.repository import Gtk -from gramps.gen.ggettext import gettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_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 522f02b5c..20427c698 100644 --- a/gramps/gui/filters/sidebar/_citationsidebarfilter.py +++ b/gramps/gui/filters/sidebar/_citationsidebarfilter.py @@ -26,7 +26,8 @@ # Python modules # #------------------------------------------------------------------------- -from gramps.gen.ggettext import gettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gui/filters/sidebar/_eventsidebarfilter.py b/gramps/gui/filters/sidebar/_eventsidebarfilter.py index afa67df94..20b0efa3e 100644 --- a/gramps/gui/filters/sidebar/_eventsidebarfilter.py +++ b/gramps/gui/filters/sidebar/_eventsidebarfilter.py @@ -25,7 +25,8 @@ # Python modules # #------------------------------------------------------------------------- -from gramps.gen.ggettext import gettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gui/filters/sidebar/_familysidebarfilter.py b/gramps/gui/filters/sidebar/_familysidebarfilter.py index 12b475ba9..329c9e45b 100644 --- a/gramps/gui/filters/sidebar/_familysidebarfilter.py +++ b/gramps/gui/filters/sidebar/_familysidebarfilter.py @@ -26,7 +26,8 @@ # Python modules # #------------------------------------------------------------------------- -from gramps.gen.ggettext import gettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gui/filters/sidebar/_mediasidebarfilter.py b/gramps/gui/filters/sidebar/_mediasidebarfilter.py index 9d33bbc17..dfb7d0330 100644 --- a/gramps/gui/filters/sidebar/_mediasidebarfilter.py +++ b/gramps/gui/filters/sidebar/_mediasidebarfilter.py @@ -26,7 +26,8 @@ # Python modules # #------------------------------------------------------------------------- -from gramps.gen.ggettext import gettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gui/filters/sidebar/_notesidebarfilter.py b/gramps/gui/filters/sidebar/_notesidebarfilter.py index a365691dc..f2cb706ec 100644 --- a/gramps/gui/filters/sidebar/_notesidebarfilter.py +++ b/gramps/gui/filters/sidebar/_notesidebarfilter.py @@ -26,7 +26,8 @@ # Python modules # #------------------------------------------------------------------------- -from gramps.gen.ggettext import gettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gui/filters/sidebar/_personsidebarfilter.py b/gramps/gui/filters/sidebar/_personsidebarfilter.py index b7f5586cd..366b2fe2f 100644 --- a/gramps/gui/filters/sidebar/_personsidebarfilter.py +++ b/gramps/gui/filters/sidebar/_personsidebarfilter.py @@ -26,7 +26,8 @@ # Python modules # #------------------------------------------------------------------------- -from gramps.gen.ggettext import gettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext import locale #------------------------------------------------------------------------- diff --git a/gramps/gui/filters/sidebar/_placesidebarfilter.py b/gramps/gui/filters/sidebar/_placesidebarfilter.py index f6491edcc..1a4555b46 100644 --- a/gramps/gui/filters/sidebar/_placesidebarfilter.py +++ b/gramps/gui/filters/sidebar/_placesidebarfilter.py @@ -27,7 +27,8 @@ # Python modules # #------------------------------------------------------------------------- -from gramps.gen.ggettext import gettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gui/filters/sidebar/_reposidebarfilter.py b/gramps/gui/filters/sidebar/_reposidebarfilter.py index 985406a3c..ea8d28116 100644 --- a/gramps/gui/filters/sidebar/_reposidebarfilter.py +++ b/gramps/gui/filters/sidebar/_reposidebarfilter.py @@ -25,7 +25,8 @@ # Python modules # #------------------------------------------------------------------------- -from gramps.gen.ggettext import gettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gui/filters/sidebar/_sidebarfilter.py b/gramps/gui/filters/sidebar/_sidebarfilter.py index c016f4f6d..f14bdff9a 100644 --- a/gramps/gui/filters/sidebar/_sidebarfilter.py +++ b/gramps/gui/filters/sidebar/_sidebarfilter.py @@ -21,7 +21,8 @@ # $Id$ -from gramps.gen.ggettext import gettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_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 5987c4121..8bea42ce7 100644 --- a/gramps/gui/filters/sidebar/_sourcesidebarfilter.py +++ b/gramps/gui/filters/sidebar/_sourcesidebarfilter.py @@ -25,7 +25,8 @@ # Python modules # #------------------------------------------------------------------------- -from gramps.gen.ggettext import gettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gui/grampsgui.py b/gramps/gui/grampsgui.py index 4f0dbb6e9..14f63d633 100644 --- a/gramps/gui/grampsgui.py +++ b/gramps/gui/grampsgui.py @@ -30,10 +30,20 @@ from __future__ import print_function import sys import os -from gramps.gen.ggettext import gettext as _ import logging LOG = logging.getLogger(".grampsgui") +#------------------------------------------------------------------------- +# +# GRAMPS Modules +# +#------------------------------------------------------------------------- +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 + #------------------------------------------------------------------------- # # Miscellaneous initialization @@ -91,15 +101,6 @@ except ImportError: "Gramps will terminate now."))) sys.exit(0) -#------------------------------------------------------------------------- -# -# GRAMPS Modules -# -#------------------------------------------------------------------------- -from gramps.gen.config import config -from gramps.gen.const import DATA_DIR, IMAGE_DIR -from gramps.gen.constfunc import has_display, win - #------------------------------------------------------------------------- # # Functions diff --git a/gramps/gui/logger/_errorreportassistant.py b/gramps/gui/logger/_errorreportassistant.py index 30ac5e2be..a3733585a 100644 --- a/gramps/gui/logger/_errorreportassistant.py +++ b/gramps/gui/logger/_errorreportassistant.py @@ -26,7 +26,8 @@ # Python modules # #------------------------------------------------------------------------- -from gramps.gen.ggettext import gettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_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 1b8ed0751..f96ea9b23 100644 --- a/gramps/gui/logger/_errorview.py +++ b/gramps/gui/logger/_errorview.py @@ -33,7 +33,8 @@ from gi.repository import Gtk # #------------------------------------------------------------------------- from gramps.gen.const import URL_MANUAL_PAGE -from gramps.gen.ggettext import sgettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().sgettext from ._errorreportassistant import ErrorReportAssistant from ..display import display_help diff --git a/gramps/gui/makefilter.py b/gramps/gui/makefilter.py index 4c0298c85..e8e1d85be 100644 --- a/gramps/gui/makefilter.py +++ b/gramps/gui/makefilter.py @@ -25,7 +25,8 @@ from .editors import EditFilter from gramps.gen.const import CUSTOM_FILTERS from gramps.gen.filters import (rules, FilterList, GenericFilterFactory, reload_custom_filters) -from gramps.gen.ggettext import sgettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_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 b57323123..50bacb3c6 100644 --- a/gramps/gui/merge/mergecitation.py +++ b/gramps/gui/merge/mergecitation.py @@ -30,7 +30,8 @@ Provide merge capabilities for citations. # Gramps modules # #------------------------------------------------------------------------- -from gramps.gen.ggettext import sgettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_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 8b357a6fe..1a84a18ba 100644 --- a/gramps/gui/merge/mergeevent.py +++ b/gramps/gui/merge/mergeevent.py @@ -29,7 +29,8 @@ Provide merge capabilities for events. # Gramps modules # #------------------------------------------------------------------------- -from gramps.gen.ggettext import sgettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_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 54d13a9df..3cc18c6d6 100644 --- a/gramps/gui/merge/mergefamily.py +++ b/gramps/gui/merge/mergefamily.py @@ -29,7 +29,8 @@ Provide merge capabilities for families. # Gramps modules # #------------------------------------------------------------------------- -from gramps.gen.ggettext import sgettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_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 15f7c18f4..4dca62f07 100644 --- a/gramps/gui/merge/mergemedia.py +++ b/gramps/gui/merge/mergemedia.py @@ -29,7 +29,8 @@ Provide merge capabilities for media objects. # Gramps modules # #------------------------------------------------------------------------- -from gramps.gen.ggettext import sgettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_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 f18087244..fee47aa2c 100644 --- a/gramps/gui/merge/mergenote.py +++ b/gramps/gui/merge/mergenote.py @@ -29,7 +29,8 @@ Provide merge capabilities for notes. # Gramps modules # #------------------------------------------------------------------------- -from gramps.gen.ggettext import sgettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_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 e3dc692bd..a2393818a 100644 --- a/gramps/gui/merge/mergeperson.py +++ b/gramps/gui/merge/mergeperson.py @@ -38,7 +38,8 @@ from gi.repository import Pango # Gramps modules # #------------------------------------------------------------------------- -from gramps.gen.ggettext import sgettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_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 d19fab358..9050daea6 100644 --- a/gramps/gui/merge/mergeplace.py +++ b/gramps/gui/merge/mergeplace.py @@ -37,7 +37,8 @@ from gi.repository import Gtk # Gramps modules # #------------------------------------------------------------------------- -from gramps.gen.ggettext import sgettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_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 ffc76d070..238380fde 100644 --- a/gramps/gui/merge/mergerepository.py +++ b/gramps/gui/merge/mergerepository.py @@ -29,7 +29,8 @@ Provide merge capabilities for repositories. # Gramps modules # #------------------------------------------------------------------------- -from gramps.gen.ggettext import sgettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_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 e909d93a9..cd017d090 100644 --- a/gramps/gui/merge/mergesource.py +++ b/gramps/gui/merge/mergesource.py @@ -31,7 +31,8 @@ Provide merge capabilities for sources. # Gramps modules # #------------------------------------------------------------------------- -from gramps.gen.ggettext import sgettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_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 773d05bca..31c990dd4 100644 --- a/gramps/gui/plug/_dialogs.py +++ b/gramps/gui/plug/_dialogs.py @@ -33,7 +33,8 @@ from gi.repository import Gtk # Standard Python modules # #------------------------------------------------------------------------- -from gramps.gen.ggettext import gettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext from collections import defaultdict #------------------------------------------------------------------------- diff --git a/gramps/gui/plug/_guioptions.py b/gramps/gui/plug/_guioptions.py index 56d7da438..4e881a623 100644 --- a/gramps/gui/plug/_guioptions.py +++ b/gramps/gui/plug/_guioptions.py @@ -35,7 +35,8 @@ from __future__ import unicode_literals # python modules # #------------------------------------------------------------------------ -from gramps.gen.ggettext import gettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext import os import sys diff --git a/gramps/gui/plug/_windows.py b/gramps/gui/plug/_windows.py index a26deeac1..08e424764 100644 --- a/gramps/gui/plug/_windows.py +++ b/gramps/gui/plug/_windows.py @@ -52,7 +52,8 @@ from gi.repository import GObject 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.ggettext import gettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_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 9457ceb1c..103d070e2 100644 --- a/gramps/gui/plug/export/_exportassistant.py +++ b/gramps/gui/plug/export/_exportassistant.py @@ -33,7 +33,8 @@ #------------------------------------------------------------------------- import os import sys -from gramps.gen.ggettext import gettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gui/plug/export/_exportoptions.py b/gramps/gui/plug/export/_exportoptions.py index 111a9ab80..56016b4ec 100644 --- a/gramps/gui/plug/export/_exportoptions.py +++ b/gramps/gui/plug/export/_exportoptions.py @@ -35,8 +35,9 @@ # GRAMPS modules # #------------------------------------------------------------------------- -from gramps.gen.ggettext import gettext as _ -from gramps.gen.ggettext import ngettext +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext +ngettext = glocale.get_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 f4a7036da..151efc880 100644 --- a/gramps/gui/plug/quick/_quickreports.py +++ b/gramps/gui/plug/quick/_quickreports.py @@ -33,7 +33,8 @@ This module provides the functions to build the quick report context menu's #------------------------------------------------------------------------ from __future__ import print_function -from gramps.gen.ggettext import gettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_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 10c868097..c20605086 100644 --- a/gramps/gui/plug/quick/_quicktable.py +++ b/gramps/gui/plug/quick/_quicktable.py @@ -53,7 +53,8 @@ from gi.repository import Gtk # #------------------------------------------------------------------------- from gramps.gen.const import GRAMPS_LOCALE as glocale -from gramps.gen.ggettext import sgettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_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 a99b4c9db..5a899f17f 100644 --- a/gramps/gui/plug/quick/_textbufdoc.py +++ b/gramps/gui/plug/quick/_textbufdoc.py @@ -26,7 +26,8 @@ # python modules # #------------------------------------------------------------------------ -from gramps.gen.ggettext import gettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_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 a1134c709..240f2c255 100644 --- a/gramps/gui/plug/report/_bookdialog.py +++ b/gramps/gui/plug/report/_bookdialog.py @@ -33,7 +33,8 @@ #------------------------------------------------------------------------- from __future__ import print_function -from gramps.gen.ggettext import gettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------ # diff --git a/gramps/gui/plug/report/_docreportdialog.py b/gramps/gui/plug/report/_docreportdialog.py index 65bda2f63..fe3923e8a 100644 --- a/gramps/gui/plug/report/_docreportdialog.py +++ b/gramps/gui/plug/report/_docreportdialog.py @@ -28,7 +28,8 @@ # #------------------------------------------------------------------------- import os -from gramps.gen.ggettext import gettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gui/plug/report/_graphvizreportdialog.py b/gramps/gui/plug/report/_graphvizreportdialog.py index 233496f4f..41759042c 100644 --- a/gramps/gui/plug/report/_graphvizreportdialog.py +++ b/gramps/gui/plug/report/_graphvizreportdialog.py @@ -30,7 +30,8 @@ # #------------------------------------------------------------------------ import os -from gramps.gen.ggettext import gettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------------- # diff --git a/gramps/gui/plug/report/_papermenu.py b/gramps/gui/plug/report/_papermenu.py index 0e22b3844..6aab25b3f 100644 --- a/gramps/gui/plug/report/_papermenu.py +++ b/gramps/gui/plug/report/_papermenu.py @@ -26,7 +26,8 @@ # Python modules # #------------------------------------------------------------------------- -from gramps.gen.ggettext import sgettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().sgettext #------------------------------------------------------------------------- # diff --git a/gramps/gui/plug/report/_reportdialog.py b/gramps/gui/plug/report/_reportdialog.py index 1636972af..7d5ad9a78 100644 --- a/gramps/gui/plug/report/_reportdialog.py +++ b/gramps/gui/plug/report/_reportdialog.py @@ -47,7 +47,8 @@ from gi.repository import Gtk # GRAMPS modules # #------------------------------------------------------------------------- -from gramps.gen.ggettext import gettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext 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 c7f78a08e..92a66f588 100644 --- a/gramps/gui/plug/report/_stylecombobox.py +++ b/gramps/gui/plug/report/_stylecombobox.py @@ -21,7 +21,8 @@ # $Id$ -from gramps.gen.ggettext import gettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_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 049d70aa8..37bd2079f 100644 --- a/gramps/gui/plug/report/_styleeditor.py +++ b/gramps/gui/plug/report/_styleeditor.py @@ -33,7 +33,8 @@ Paragraph/Font style editor # Python modules # #------------------------------------------------------------------------ -from gramps.gen.ggettext import sgettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().sgettext import logging log = logging.getLogger(".") import re diff --git a/gramps/gui/plug/tool.py b/gramps/gui/plug/tool.py index 0dc767ba4..8da3baf4a 100644 --- a/gramps/gui/plug/tool.py +++ b/gramps/gui/plug/tool.py @@ -31,7 +31,8 @@ #------------------------------------------------------------------------- from __future__ import print_function -from gramps.gen.ggettext import gettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext import logging log = logging.getLogger(".") diff --git a/gramps/gui/selectors/selectcitation.py b/gramps/gui/selectors/selectcitation.py index 9508eac55..a74df538b 100644 --- a/gramps/gui/selectors/selectcitation.py +++ b/gramps/gui/selectors/selectcitation.py @@ -31,7 +31,8 @@ SelectCitation class for GRAMPS. # internationalization # #------------------------------------------------------------------------- -from gramps.gen.ggettext import gettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gui/selectors/selectevent.py b/gramps/gui/selectors/selectevent.py index b94e0caa7..391301e09 100644 --- a/gramps/gui/selectors/selectevent.py +++ b/gramps/gui/selectors/selectevent.py @@ -26,7 +26,8 @@ # internationalization # #------------------------------------------------------------------------- -from gramps.gen.ggettext import gettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gui/selectors/selectfamily.py b/gramps/gui/selectors/selectfamily.py index 520220bfb..e2d411da1 100644 --- a/gramps/gui/selectors/selectfamily.py +++ b/gramps/gui/selectors/selectfamily.py @@ -26,7 +26,8 @@ # internationalization # #------------------------------------------------------------------------- -from gramps.gen.ggettext import gettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gui/selectors/selectnote.py b/gramps/gui/selectors/selectnote.py index 49356bb05..ce11b7822 100644 --- a/gramps/gui/selectors/selectnote.py +++ b/gramps/gui/selectors/selectnote.py @@ -29,7 +29,8 @@ # Python Modules # #------------------------------------------------------------------------- -from gramps.gen.ggettext import gettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gui/selectors/selectobject.py b/gramps/gui/selectors/selectobject.py index 3873d5d00..51e4750f0 100644 --- a/gramps/gui/selectors/selectobject.py +++ b/gramps/gui/selectors/selectobject.py @@ -30,7 +30,8 @@ # #------------------------------------------------------------------------- import gc -from gramps.gen.ggettext import gettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gui/selectors/selectperson.py b/gramps/gui/selectors/selectperson.py index bae478be4..7790a442d 100644 --- a/gramps/gui/selectors/selectperson.py +++ b/gramps/gui/selectors/selectperson.py @@ -26,7 +26,8 @@ # internationalization # #------------------------------------------------------------------------- -from gramps.gen.ggettext import gettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_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 62acf51d7..842ba3a64 100644 --- a/gramps/gui/selectors/selectplace.py +++ b/gramps/gui/selectors/selectplace.py @@ -27,7 +27,8 @@ # internationalization # #------------------------------------------------------------------------- -from gramps.gen.ggettext import gettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gui/selectors/selectrepository.py b/gramps/gui/selectors/selectrepository.py index 6c0a913aa..419b4d292 100644 --- a/gramps/gui/selectors/selectrepository.py +++ b/gramps/gui/selectors/selectrepository.py @@ -26,7 +26,8 @@ # internationalization # #------------------------------------------------------------------------- -from gramps.gen.ggettext import gettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gui/selectors/selectsource.py b/gramps/gui/selectors/selectsource.py index a5b28f0c4..59b3e8ae5 100644 --- a/gramps/gui/selectors/selectsource.py +++ b/gramps/gui/selectors/selectsource.py @@ -26,7 +26,8 @@ # internationalization # #------------------------------------------------------------------------- -from gramps.gen.ggettext import gettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gui/spell.py b/gramps/gui/spell.py index cbb8b51e9..a44bfe10f 100644 --- a/gramps/gui/spell.py +++ b/gramps/gui/spell.py @@ -32,8 +32,6 @@ present, we default to no spell checking. # Python classes # #------------------------------------------------------------------------- -from gramps.gen.ggettext import gettext as _ -import locale #------------------------------------------------------------------------- # @@ -51,6 +49,9 @@ LOG = logging.getLogger(".Spell") from gi.repository import Gtk from gi import Repository +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext + HAVE_GTKSPELL = False # Attempting to import gtkspell gives an error dialog if gtkspell is not diff --git a/gramps/gui/tipofday.py b/gramps/gui/tipofday.py index ecc828200..5b746987b 100644 --- a/gramps/gui/tipofday.py +++ b/gramps/gui/tipofday.py @@ -31,7 +31,8 @@ Handles the Tip of the Day dialog #------------------------------------------------------------------------- from xml.parsers.expat import ParserCreate, ExpatError from random import Random -from gramps.gen.ggettext import gettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext import os import sys diff --git a/gramps/gui/undohistory.py b/gramps/gui/undohistory.py index 7dbac3fab..ea92676c1 100644 --- a/gramps/gui/undohistory.py +++ b/gramps/gui/undohistory.py @@ -28,7 +28,8 @@ # #------------------------------------------------------------------------ import time -from gramps.gen.ggettext import gettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext from itertools import chain #------------------------------------------------------------------------- diff --git a/gramps/gui/utils.py b/gramps/gui/utils.py index 541a4f61d..ee6bdf4eb 100644 --- a/gramps/gui/utils.py +++ b/gramps/gui/utils.py @@ -33,7 +33,8 @@ from __future__ import print_function, division #------------------------------------------------------------------------- import os import sys -from gramps.gen.ggettext import gettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_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 03999e968..5db4e885c 100644 --- a/gramps/gui/viewmanager.py +++ b/gramps/gui/viewmanager.py @@ -42,8 +42,6 @@ import os import sys import time import datetime -from gramps.gen.ggettext import sgettext as _ -from gramps.gen.ggettext import ngettext if sys.version_info[0] < 3: from cStringIO import StringIO else: @@ -70,6 +68,8 @@ from gi.repository import Gtk # GRAMPS modules # #------------------------------------------------------------------------- +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_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" % (ngettext("%d addon was installed.", + "%s %s" % (glocale.get_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 09be7c0b0..3d9d77e2e 100644 --- a/gramps/gui/views/bookmarks.py +++ b/gramps/gui/views/bookmarks.py @@ -58,7 +58,8 @@ from ..display import display_help from ..listmodel import ListModel from gramps.gen.utils.db import navigation_label from gramps.gen.const import URL_MANUAL_PAGE -from gramps.gen.ggettext import sgettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().sgettext #------------------------------------------------------------------------- # diff --git a/gramps/gui/views/listview.py b/gramps/gui/views/listview.py index 520901419..252255027 100644 --- a/gramps/gui/views/listview.py +++ b/gramps/gui/views/listview.py @@ -69,7 +69,8 @@ from gramps.gen.utils.string import data_recover_msg from gramps.gen.utils.file import get_unicode_path_from_file_chooser from ..dialog import QuestionDialog, QuestionDialog2 from ..editors import FilterEditor -from gramps.gen.ggettext import sgettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_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 578f075e4..215ea7c65 100644 --- a/gramps/gui/views/navigationview.py +++ b/gramps/gui/views/navigationview.py @@ -48,7 +48,8 @@ from gi.repository import Gtk # #---------------------------------------------------------------- from .pageview import PageView -from gramps.gen.ggettext import sgettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_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 7a885c1a5..ceaf0804d 100644 --- a/gramps/gui/views/pageview.py +++ b/gramps/gui/views/pageview.py @@ -40,7 +40,8 @@ _LOG = logging.getLogger('.pageview') #---------------------------------------------------------------- from gi.repository import Gtk from gi.repository import Gdk -from gramps.gen.ggettext import gettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #---------------------------------------------------------------- # diff --git a/gramps/gui/views/tags.py b/gramps/gui/views/tags.py index 96ca0000d..6b0fd1374 100644 --- a/gramps/gui/views/tags.py +++ b/gramps/gui/views/tags.py @@ -42,7 +42,8 @@ from gi.repository import Gdk # Gramps modules # #------------------------------------------------------------------------- -from gramps.gen.ggettext import sgettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_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 ce2552f6d..c0b99e4ff 100644 --- a/gramps/gui/views/treemodels/citationtreemodel.py +++ b/gramps/gui/views/treemodels/citationtreemodel.py @@ -38,7 +38,8 @@ LOG = logging.getLogger(".citation") # internationalization # #------------------------------------------------------------------------- -from gramps.gen.ggettext import gettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gui/views/treemodels/mediamodel.py b/gramps/gui/views/treemodels/mediamodel.py index 500d1a8fd..12802d357 100644 --- a/gramps/gui/views/treemodels/mediamodel.py +++ b/gramps/gui/views/treemodels/mediamodel.py @@ -25,7 +25,8 @@ # python modules # #------------------------------------------------------------------------- -from gramps.gen.ggettext import gettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext import logging log = logging.getLogger(".") import locale diff --git a/gramps/gui/views/treemodels/peoplemodel.py b/gramps/gui/views/treemodels/peoplemodel.py index 4ffafd90b..3c70e9364 100644 --- a/gramps/gui/views/treemodels/peoplemodel.py +++ b/gramps/gui/views/treemodels/peoplemodel.py @@ -32,7 +32,6 @@ TreeModel for the GRAMPS Person tree. # Standard python modules # #------------------------------------------------------------------------- -from gramps.gen.ggettext import gettext as _ import cgi import locale @@ -56,6 +55,8 @@ _LOG = logging.getLogger(".") # GRAMPS modules # #------------------------------------------------------------------------- +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_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 922c3a814..cb3584344 100644 --- a/gramps/gui/views/treemodels/placemodel.py +++ b/gramps/gui/views/treemodels/placemodel.py @@ -57,7 +57,8 @@ from .treebasemodel import TreeBaseModel # internationalization # #------------------------------------------------------------------------- -from gramps.gen.ggettext import gettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gui/views/treemodels/treebasemodel.py b/gramps/gui/views/treemodels/treebasemodel.py index 5293961b0..8369329ba 100644 --- a/gramps/gui/views/treemodels/treebasemodel.py +++ b/gramps/gui/views/treemodels/treebasemodel.py @@ -38,7 +38,8 @@ This module provides the model that is used for all hierarchical treeviews. import time import locale import sys -from gramps.gen.ggettext import gettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext import logging _LOG = logging.getLogger(".gui.treebasemodel") diff --git a/gramps/gui/widgets/buttons.py b/gramps/gui/widgets/buttons.py index ce1aea243..c4953e254 100644 --- a/gramps/gui/widgets/buttons.py +++ b/gramps/gui/widgets/buttons.py @@ -27,7 +27,8 @@ __all__ = ["IconButton", "WarnButton", "SimpleButton", "PrivacyButton"] # Standard python modules # #------------------------------------------------------------------------- -from gramps.gen.ggettext import gettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext import logging _LOG = logging.getLogger(".widgets.buttons") diff --git a/gramps/gui/widgets/expandcollapsearrow.py b/gramps/gui/widgets/expandcollapsearrow.py index c856767aa..f040fa59d 100644 --- a/gramps/gui/widgets/expandcollapsearrow.py +++ b/gramps/gui/widgets/expandcollapsearrow.py @@ -27,7 +27,8 @@ __all__ = ["ExpandCollapseArrow"] # Standard python modules # #------------------------------------------------------------------------- -from gramps.gen.ggettext import gettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext import logging _LOG = logging.getLogger(".widgets.expandcollapsearrow") diff --git a/gramps/gui/widgets/fanchart.py b/gramps/gui/widgets/fanchart.py index b6a8ac79a..28fad531e 100644 --- a/gramps/gui/widgets/fanchart.py +++ b/gramps/gui/widgets/fanchart.py @@ -70,7 +70,8 @@ from gramps.gen.utils.alive import probably_alive 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.ggettext import gettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gui/widgets/grampletbar.py b/gramps/gui/widgets/grampletbar.py index 41eba4299..8f0852712 100644 --- a/gramps/gui/widgets/grampletbar.py +++ b/gramps/gui/widgets/grampletbar.py @@ -31,7 +31,8 @@ Module that implements the gramplet bar fuctionality. #------------------------------------------------------------------------- from __future__ import print_function -from gramps.gen.ggettext import gettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext import time import os import sys diff --git a/gramps/gui/widgets/grampletpane.py b/gramps/gui/widgets/grampletpane.py index 92bc889b2..de91c7a7e 100644 --- a/gramps/gui/widgets/grampletpane.py +++ b/gramps/gui/widgets/grampletpane.py @@ -38,7 +38,8 @@ from gi.repository import Gtk from gi.repository import Pango import time import os -from gramps.gen.ggettext import gettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext import sys if sys.version_info[0] < 3: import ConfigParser as configparser diff --git a/gramps/gui/widgets/labels.py b/gramps/gui/widgets/labels.py index d5500fac6..22123801b 100644 --- a/gramps/gui/widgets/labels.py +++ b/gramps/gui/widgets/labels.py @@ -30,7 +30,8 @@ __all__ = ["LinkLabel", "EditLabel", "BasicLabel", "GenderLabel", #------------------------------------------------------------------------- import os import cgi -from gramps.gen.ggettext import gettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext import logging _LOG = logging.getLogger(".widgets.labels") diff --git a/gramps/gui/widgets/monitoredwidgets.py b/gramps/gui/widgets/monitoredwidgets.py index 43fb95be0..643e5fb72 100644 --- a/gramps/gui/widgets/monitoredwidgets.py +++ b/gramps/gui/widgets/monitoredwidgets.py @@ -52,7 +52,8 @@ from gi.repository import Pango # Gramps modules # #------------------------------------------------------------------------- -from gramps.gen.ggettext import gettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_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 9002ddbea..a985d4625 100644 --- a/gramps/gui/widgets/photo.py +++ b/gramps/gui/widgets/photo.py @@ -35,7 +35,8 @@ 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.ggettext import gettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/gui/widgets/progressdialog.py b/gramps/gui/widgets/progressdialog.py index 117ce230a..01416c95e 100644 --- a/gramps/gui/widgets/progressdialog.py +++ b/gramps/gui/widgets/progressdialog.py @@ -30,7 +30,8 @@ from __future__ import print_function # #------------------------------------------------------------------------- import time -from gramps.gen.ggettext import gettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext import logging log = logging.getLogger("gen.progressdialog") diff --git a/gramps/gui/widgets/reorderfam.py b/gramps/gui/widgets/reorderfam.py index 4eba112af..25a20c80c 100644 --- a/gramps/gui/widgets/reorderfam.py +++ b/gramps/gui/widgets/reorderfam.py @@ -25,7 +25,8 @@ # Python modules # #------------------------------------------------------------------------- -from gramps.gen.ggettext import sgettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().sgettext #------------------------------------------------------------------------- # diff --git a/gramps/gui/widgets/styledtextbuffer.py b/gramps/gui/widgets/styledtextbuffer.py index c64b271ca..6f88496b8 100644 --- a/gramps/gui/widgets/styledtextbuffer.py +++ b/gramps/gui/widgets/styledtextbuffer.py @@ -30,7 +30,8 @@ __all__ = ["ALLOWED_STYLES", "MATCH_START", "MATCH_END", "MATCH_FLAVOR", # Python modules # #------------------------------------------------------------------------- -from gramps.gen.ggettext import gettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext import re import logging diff --git a/gramps/gui/widgets/styledtexteditor.py b/gramps/gui/widgets/styledtexteditor.py index 7938a0cab..998598248 100644 --- a/gramps/gui/widgets/styledtexteditor.py +++ b/gramps/gui/widgets/styledtexteditor.py @@ -30,7 +30,8 @@ __all__ = ["StyledTextEditor"] # Python modules # #------------------------------------------------------------------------- -from gramps.gen.ggettext import gettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext import logging _LOG = logging.getLogger(".widgets.styledtexteditor") diff --git a/gramps/gui/widgets/undoableentry.py b/gramps/gui/widgets/undoableentry.py index 1cb93f44a..caf179f30 100644 --- a/gramps/gui/widgets/undoableentry.py +++ b/gramps/gui/widgets/undoableentry.py @@ -29,7 +29,8 @@ __all__ = ["UndoableEntry"] # Standard python modules # #------------------------------------------------------------------------- -from gramps.gen.ggettext import gettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext import logging _LOG = logging.getLogger(".widgets.undoableentry") diff --git a/gramps/gui/widgets/validatedmaskedentry.py b/gramps/gui/widgets/validatedmaskedentry.py index e22d6518d..cfa4060b2 100644 --- a/gramps/gui/widgets/validatedmaskedentry.py +++ b/gramps/gui/widgets/validatedmaskedentry.py @@ -28,7 +28,8 @@ __all__ = ["MaskedEntry", "ValidatableMaskedEntry"] # Standard python modules # #------------------------------------------------------------------------- -from gramps.gen.ggettext import gettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext import string import sys diff --git a/gramps/guiQML/viewmanager.py b/gramps/guiQML/viewmanager.py index 4193c15fc..33cabb6f8 100644 --- a/gramps/guiQML/viewmanager.py +++ b/gramps/guiQML/viewmanager.py @@ -63,7 +63,8 @@ from PySide import QtOpenGL #------------------------------------------------------------------------- from gramps.gen.const import ROOT_DIR from gramps.cli.grampscli import CLIManager, CLIDbLoader -from gramps.gen.ggettext import gettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_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 fc35bc22a..7dee2ce0f 100644 --- a/gramps/guiQML/views/centralview.py +++ b/gramps/guiQML/views/centralview.py @@ -64,7 +64,8 @@ from PySide import QtOpenGL # #------------------------------------------------------------------------- from gramps.gen.const import ROOT_DIR -from gramps.gen.ggettext import gettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext from gramps.gen.constfunc import cuni, UNITYPE diff --git a/gramps/guiQML/views/dbman.py b/gramps/guiQML/views/dbman.py index 07be1293e..a831df7bf 100644 --- a/gramps/guiQML/views/dbman.py +++ b/gramps/guiQML/views/dbman.py @@ -65,7 +65,8 @@ 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.ggettext import gettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext from gramps.gen.constfunc import cuni, UNITYPE #------------------------------------------------------------------------- diff --git a/gramps/guiQML/views/personview.py b/gramps/guiQML/views/personview.py index d39b0d5ba..1583ece8c 100644 --- a/gramps/guiQML/views/personview.py +++ b/gramps/guiQML/views/personview.py @@ -59,7 +59,8 @@ from PySide import QtOpenGL 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.ggettext import gettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_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 99ef89b27..e1be61018 100644 --- a/gramps/plugins/docgen/asciidoc.py +++ b/gramps/plugins/docgen/asciidoc.py @@ -30,13 +30,15 @@ # python modules # #------------------------------------------------------------------------ -from gramps.gen.ggettext import gettext as _ - +import io +import sys #------------------------------------------------------------------------ # # Gramps modules # #------------------------------------------------------------------------ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_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 c53a5aaa9..0216a8f30 100644 --- a/gramps/plugins/docgen/gtkprint.py +++ b/gramps/plugins/docgen/gtkprint.py @@ -29,7 +29,8 @@ from __future__ import division # Python modules # #------------------------------------------------------------------------ -from gramps.gen.ggettext import gettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext from math import radians #------------------------------------------------------------------------ diff --git a/gramps/plugins/docgen/htmldoc.py b/gramps/plugins/docgen/htmldoc.py index d1bdbe459..e027c3c71 100644 --- a/gramps/plugins/docgen/htmldoc.py +++ b/gramps/plugins/docgen/htmldoc.py @@ -39,13 +39,14 @@ Report output generator for html documents, based on Html and HtmlBackend import os import shutil import time -from gramps.gen.ggettext import gettext as _ #------------------------------------------------------------------------ # # GRAMPS modules # #------------------------------------------------------------------------ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_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, VERSION from gramps.gen.plug.docgen import BaseDoc, TextDoc, FONT_SANS_SERIF, URL_PATTERN diff --git a/gramps/plugins/docgen/latexdoc.py b/gramps/plugins/docgen/latexdoc.py index 962838f1c..4eda5a6d9 100644 --- a/gramps/plugins/docgen/latexdoc.py +++ b/gramps/plugins/docgen/latexdoc.py @@ -37,7 +37,8 @@ # python modules # #------------------------------------------------------------------------ -from gramps.gen.ggettext import gettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_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 6e07d46f1..832df55f8 100644 --- a/gramps/plugins/docgen/odfdoc.py +++ b/gramps/plugins/docgen/odfdoc.py @@ -101,7 +101,8 @@ from gramps.gen.errors import ReportError # internationalization # #------------------------------------------------------------------------- -from gramps.gen.ggettext import gettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext _apptype = 'application/vnd.oasis.opendocument.text' diff --git a/gramps/plugins/docgen/pdfdoc.py b/gramps/plugins/docgen/pdfdoc.py index 748c2fbda..9177c0b95 100644 --- a/gramps/plugins/docgen/pdfdoc.py +++ b/gramps/plugins/docgen/pdfdoc.py @@ -29,7 +29,8 @@ # Python modules # #------------------------------------------------------------------------ -from gramps.gen.ggettext import gettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext import sys #------------------------------------------------------------------------ diff --git a/gramps/plugins/docgen/psdrawdoc.py b/gramps/plugins/docgen/psdrawdoc.py index 03922ae3f..84cfe5140 100644 --- a/gramps/plugins/docgen/psdrawdoc.py +++ b/gramps/plugins/docgen/psdrawdoc.py @@ -32,11 +32,12 @@ PostScript document generator. # python modules # #------------------------------------------------------------------------- -from gramps.gen.ggettext import gettext as _ - + #------------------------------------------------------------------------- #Gramps modules #------------------------------------------------------------------------- +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_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 66c24dc14..1e36e7b38 100644 --- a/gramps/plugins/docgen/rtfdoc.py +++ b/gramps/plugins/docgen/rtfdoc.py @@ -31,7 +31,8 @@ #------------------------------------------------------------------------ from __future__ import print_function -from gramps.gen.ggettext import gettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext import logging LOG = logging.getLogger(".rtfdoc") diff --git a/gramps/plugins/docgen/svgdrawdoc.py b/gramps/plugins/docgen/svgdrawdoc.py index f6a7e108c..ef17972d4 100644 --- a/gramps/plugins/docgen/svgdrawdoc.py +++ b/gramps/plugins/docgen/svgdrawdoc.py @@ -31,7 +31,6 @@ SVG document generator. # python modules # #------------------------------------------------------------------------- -from gramps.gen.ggettext import gettext as _ import sys if sys.version_info[0] < 3: from StringIO import StringIO @@ -43,6 +42,8 @@ else: # Gramps modules # #------------------------------------------------------------------------- +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext from gramps.gen.plug.docgen import BaseDoc, DrawDoc, SOLID, FONT_SANS_SERIF from gramps.gen.errors import ReportError diff --git a/gramps/plugins/drawreport/ancestortree.py b/gramps/plugins/drawreport/ancestortree.py index ca297a263..2381530a7 100644 --- a/gramps/plugins/drawreport/ancestortree.py +++ b/gramps/plugins/drawreport/ancestortree.py @@ -39,7 +39,8 @@ def log2(val): X_INDEX = log2 -from gramps.gen.ggettext import sgettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().sgettext #------------------------------------------------------------------------ # diff --git a/gramps/plugins/drawreport/calendarreport.py b/gramps/plugins/drawreport/calendarreport.py index 2f40fc62b..8f623e24a 100644 --- a/gramps/plugins/drawreport/calendarreport.py +++ b/gramps/plugins/drawreport/calendarreport.py @@ -26,8 +26,8 @@ # python modules # #------------------------------------------------------------------------ -from gramps.gen.ggettext import gettext as _ -from gramps.gen.ggettext import ngettext +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext from functools import partial import datetime import time @@ -322,7 +322,7 @@ class Calendar(Report): 'person' : short_name, 'relation' : ""} else: - text = (ngettext('%(person)s, %(age)d%(relation)s', + text = (glocale.get_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 = (ngettext("%(spouse)s and\n %(person)s, %(nyears)d", + text = (glocale.get_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 696803898..53ad67649 100644 --- a/gramps/plugins/drawreport/descendtree.py +++ b/gramps/plugins/drawreport/descendtree.py @@ -34,7 +34,8 @@ from __future__ import division # GRAMPS modules # #------------------------------------------------------------------------ -from gramps.gen.ggettext import sgettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().sgettext from gramps.gen.errors import ReportError diff --git a/gramps/plugins/drawreport/fanchart.py b/gramps/plugins/drawreport/fanchart.py index 61de2ec32..f74db8c4d 100644 --- a/gramps/plugins/drawreport/fanchart.py +++ b/gramps/plugins/drawreport/fanchart.py @@ -28,7 +28,8 @@ # python modules # #------------------------------------------------------------------------ -from gramps.gen.ggettext import gettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_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 d35d2191e..311a96cac 100644 --- a/gramps/plugins/drawreport/statisticschart.py +++ b/gramps/plugins/drawreport/statisticschart.py @@ -34,7 +34,8 @@ from __future__ import division # #------------------------------------------------------------------------ import time -from gramps.gen.ggettext import sgettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().sgettext from functools import partial #------------------------------------------------------------------------ diff --git a/gramps/plugins/drawreport/timeline.py b/gramps/plugins/drawreport/timeline.py index 4148b5b42..a0dc4a12d 100644 --- a/gramps/plugins/drawreport/timeline.py +++ b/gramps/plugins/drawreport/timeline.py @@ -33,7 +33,8 @@ from __future__ import division # python modules # #------------------------------------------------------------------------ -from gramps.gen.ggettext import sgettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().sgettext #------------------------------------------------------------------------ # diff --git a/gramps/plugins/export/exportcsv.py b/gramps/plugins/export/exportcsv.py index 30b161021..e8d0e3f15 100644 --- a/gramps/plugins/export/exportcsv.py +++ b/gramps/plugins/export/exportcsv.py @@ -32,7 +32,8 @@ #------------------------------------------------------------------------- import os import sys -from gramps.gen.ggettext import sgettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_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 1b3a82baf..c030d0ead 100644 --- a/gramps/plugins/export/exportftree.py +++ b/gramps/plugins/export/exportftree.py @@ -30,7 +30,8 @@ # #------------------------------------------------------------------------- import os -from gramps.gen.ggettext import gettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------ # diff --git a/gramps/plugins/export/exportgedcom.py b/gramps/plugins/export/exportgedcom.py index 5af52f266..9ff276dfc 100644 --- a/gramps/plugins/export/exportgedcom.py +++ b/gramps/plugins/export/exportgedcom.py @@ -33,7 +33,8 @@ # Standard Python Modules # #------------------------------------------------------------------------- -from gramps.gen.ggettext import gettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext import os import time diff --git a/gramps/plugins/export/exportgeneweb.py b/gramps/plugins/export/exportgeneweb.py index c722f346f..e068e5638 100644 --- a/gramps/plugins/export/exportgeneweb.py +++ b/gramps/plugins/export/exportgeneweb.py @@ -31,7 +31,8 @@ # #------------------------------------------------------------------------- import os -from gramps.gen.ggettext import gettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------ # diff --git a/gramps/plugins/export/exportpkg.py b/gramps/plugins/export/exportpkg.py index 57f7d5297..7f2ec37fb 100644 --- a/gramps/plugins/export/exportpkg.py +++ b/gramps/plugins/export/exportpkg.py @@ -39,8 +39,9 @@ import tarfile if sys.version_info[0] < 3: from cStringIO import StringIO else: - import io -from gramps.gen.ggettext import gettext as _ + from io import StringIO +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------ # diff --git a/gramps/plugins/export/exportvcalendar.py b/gramps/plugins/export/exportvcalendar.py index 1deb7c49f..428e15c34 100644 --- a/gramps/plugins/export/exportvcalendar.py +++ b/gramps/plugins/export/exportvcalendar.py @@ -32,7 +32,6 @@ import os import sys from time import localtime -from gramps.gen.ggettext import gettext as _ #------------------------------------------------------------------------ # @@ -48,6 +47,8 @@ log = logging.getLogger(".ExportVCal") # GRAMPS modules # #------------------------------------------------------------------------- +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_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 853c3ec56..83303d541 100644 --- a/gramps/plugins/export/exportvcard.py +++ b/gramps/plugins/export/exportvcard.py @@ -47,7 +47,8 @@ log = logging.getLogger(".ExportVCard") # GRAMPS modules # #------------------------------------------------------------------------- -from gramps.gen.ggettext import gettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext from gramps.gui.plug.export import WriterOptionBox from gramps.gen.const import PROGRAM_NAME, VERSION from gramps.gen.lib import Date diff --git a/gramps/plugins/export/exportxml.py b/gramps/plugins/export/exportxml.py index 16d775775..69a05b764 100644 --- a/gramps/plugins/export/exportxml.py +++ b/gramps/plugins/export/exportxml.py @@ -41,7 +41,8 @@ import shutil import os import codecs from xml.sax.saxutils import escape -from gramps.gen.ggettext import gettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------ diff --git a/gramps/plugins/gramplet/ageondategramplet.py b/gramps/plugins/gramplet/ageondategramplet.py index c34145af4..b03287f0b 100644 --- a/gramps/plugins/gramplet/ageondategramplet.py +++ b/gramps/plugins/gramplet/ageondategramplet.py @@ -35,7 +35,8 @@ on a particular date. # #------------------------------------------------------------------------ from gramps.gen.plug import Gramplet -from gramps.gen.ggettext import sgettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_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 1a20956ec..560525b37 100644 --- a/gramps/plugins/gramplet/agestats.py +++ b/gramps/plugins/gramplet/agestats.py @@ -28,7 +28,8 @@ import locale from collections import defaultdict from gramps.gen.plug import Gramplet -from gramps.gen.ggettext import gettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_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 69e6f6e95..6f98dd183 100644 --- a/gramps/plugins/gramplet/attributes.py +++ b/gramps/plugins/gramplet/attributes.py @@ -22,7 +22,8 @@ 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.ggettext import gettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_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 51876bac0..31c426f8c 100644 --- a/gramps/plugins/gramplet/attributesgramplet.py +++ b/gramps/plugins/gramplet/attributesgramplet.py @@ -21,7 +21,8 @@ from gramps.gen.plug import Gramplet from gramps.gen.display.name import displayer as name_displayer -from gramps.gen.ggettext import gettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext class AttributesGramplet(Gramplet): """ diff --git a/gramps/plugins/gramplet/backlinks.py b/gramps/plugins/gramplet/backlinks.py index dc90974d5..c0d1a341d 100644 --- a/gramps/plugins/gramplet/backlinks.py +++ b/gramps/plugins/gramplet/backlinks.py @@ -23,7 +23,8 @@ from gramps.gui.listmodel import ListModel, NOSORT from gramps.gen.utils.db import navigation_label from gramps.gen.plug import Gramplet -from gramps.gen.ggettext import gettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_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 c21d31444..39013268f 100644 --- a/gramps/plugins/gramplet/calendargramplet.py +++ b/gramps/plugins/gramplet/calendargramplet.py @@ -24,7 +24,8 @@ # #------------------------------------------------------------------------ from gramps.gen.plug import Gramplet -from gramps.gen.ggettext import sgettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_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 54c749d7d..618bbb6ea 100644 --- a/gramps/plugins/gramplet/children.py +++ b/gramps/plugins/gramplet/children.py @@ -22,7 +22,8 @@ from gramps.gui.editors import EditPerson from gramps.gui.listmodel import ListModel, NOSORT from gramps.gen.plug import Gramplet -from gramps.gen.ggettext import gettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_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 10b5ddb7f..9e627ccb6 100644 --- a/gramps/plugins/gramplet/citations.py +++ b/gramps/plugins/gramplet/citations.py @@ -23,7 +23,8 @@ from gramps.gui.editors import EditSource, EditCitation from gramps.gui.listmodel import ListModel, NOSORT from gramps.gen.plug import Gramplet -from gramps.gen.ggettext import gettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_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 19519009d..8ebc69eb4 100644 --- a/gramps/plugins/gramplet/descendgramplet.py +++ b/gramps/plugins/gramplet/descendgramplet.py @@ -30,7 +30,8 @@ # standard python modules # #------------------------------------------------------------------------ -from gramps.gen.ggettext import gettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------ # diff --git a/gramps/plugins/gramplet/editexifmetadata.py b/gramps/plugins/gramplet/editexifmetadata.py index 9ff5ee091..6b8ab929a 100644 --- a/gramps/plugins/gramplet/editexifmetadata.py +++ b/gramps/plugins/gramplet/editexifmetadata.py @@ -49,7 +49,8 @@ from gi.repository import Gtk # ----------------------------------------------------------------------------- from gramps.gui.display import display_help -from gramps.gen.ggettext import gettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext from gramps.gen.datehandler import displayer as _dd from gramps.gen.datehandler import parser as _dp diff --git a/gramps/plugins/gramplet/events.py b/gramps/plugins/gramplet/events.py index 9d991d214..0048277f2 100644 --- a/gramps/plugins/gramplet/events.py +++ b/gramps/plugins/gramplet/events.py @@ -22,7 +22,8 @@ from gramps.gui.editors import EditEvent from gramps.gui.listmodel import ListModel, NOSORT from gramps.gen.plug import Gramplet -from gramps.gen.ggettext import gettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_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 0f58202ec..2465c1cfc 100644 --- a/gramps/plugins/gramplet/fanchartdescgramplet.py +++ b/gramps/plugins/gramplet/fanchartdescgramplet.py @@ -42,7 +42,8 @@ except ImportError: # GRAMPS modules # #------------------------------------------------------------------------- -from gramps.gen.ggettext import gettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_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 b37a0e926..ffa52b756 100644 --- a/gramps/plugins/gramplet/fanchartgramplet.py +++ b/gramps/plugins/gramplet/fanchartgramplet.py @@ -48,7 +48,8 @@ except ImportError: # GRAMPS modules # #------------------------------------------------------------------------- -from gramps.gen.ggettext import gettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_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 eb68fad07..9f20c2d00 100644 --- a/gramps/plugins/gramplet/faqgramplet.py +++ b/gramps/plugins/gramplet/faqgramplet.py @@ -24,7 +24,8 @@ # #------------------------------------------------------------------------ from gramps.gen.plug import Gramplet -from gramps.gen.ggettext import sgettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_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 3c3eb26a3..4e5e9bb95 100644 --- a/gramps/plugins/gramplet/givennamegramplet.py +++ b/gramps/plugins/gramplet/givennamegramplet.py @@ -21,7 +21,8 @@ # # from collections import defaultdict -from gramps.gen.ggettext import gettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_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 6ece6d83a..ae6777fe2 100644 --- a/gramps/plugins/gramplet/notes.py +++ b/gramps/plugins/gramplet/notes.py @@ -24,7 +24,8 @@ from gramps.gen.plug import Gramplet from gramps.gui.widgets.styledtexteditor import StyledTextEditor from gramps.gui.widgets import SimpleButton from gramps.gen.lib import StyledText -from gramps.gen.ggettext import gettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_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 230e417d9..88550d6da 100644 --- a/gramps/plugins/gramplet/pedigreegramplet.py +++ b/gramps/plugins/gramplet/pedigreegramplet.py @@ -35,8 +35,8 @@ import locale # #------------------------------------------------------------------------ from gramps.gen.plug import Gramplet -from gramps.gen.ggettext import sgettext as _ -from gramps.gen.ggettext import ngettext +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_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(ngettext( + self.append_text(glocale.get_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(ngettext( + self.append_text(glocale.get_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 41dba8e5b..940119a36 100644 --- a/gramps/plugins/gramplet/persondetails.py +++ b/gramps/plugins/gramplet/persondetails.py @@ -23,7 +23,8 @@ from gramps.gen.lib import EventType, EventRoleType 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.ggettext import gettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_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 42a657fb8..704eaa5e7 100644 --- a/gramps/plugins/gramplet/personresidence.py +++ b/gramps/plugins/gramplet/personresidence.py @@ -23,7 +23,8 @@ from gramps.gen.lib import EventType, EventRoleType from gramps.gui.editors import EditEvent from gramps.gui.listmodel import ListModel, NOSORT from gramps.gen.plug import Gramplet -from gramps.gen.ggettext import gettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_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 6fc5949c0..13fcebf2b 100644 --- a/gramps/plugins/gramplet/placedetails.py +++ b/gramps/plugins/gramplet/placedetails.py @@ -21,7 +21,8 @@ from gramps.gen.plug import Gramplet from gramps.gui.widgets import Photo -from gramps.gen.ggettext import gettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_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 7e5f63112..4ab31e70f 100644 --- a/gramps/plugins/gramplet/quickviewgramplet.py +++ b/gramps/plugins/gramplet/quickviewgramplet.py @@ -32,7 +32,8 @@ # #------------------------------------------------------------------------ from gramps.gen.plug import Gramplet -from gramps.gen.ggettext import sgettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_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 1caef5349..015558958 100644 --- a/gramps/plugins/gramplet/recordsgramplet.py +++ b/gramps/plugins/gramplet/recordsgramplet.py @@ -27,7 +27,8 @@ # Standard Python modules # #------------------------------------------------------------------------ -from gramps.gen.ggettext import sgettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().sgettext #------------------------------------------------------------------------ # diff --git a/gramps/plugins/gramplet/relativegramplet.py b/gramps/plugins/gramplet/relativegramplet.py index e0b9dbeaf..5f785dbd5 100644 --- a/gramps/plugins/gramplet/relativegramplet.py +++ b/gramps/plugins/gramplet/relativegramplet.py @@ -24,7 +24,8 @@ # #------------------------------------------------------------------------ from gramps.gen.plug import Gramplet -from gramps.gen.ggettext import sgettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_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 dffd6cde7..9a1257f99 100644 --- a/gramps/plugins/gramplet/repositorydetails.py +++ b/gramps/plugins/gramplet/repositorydetails.py @@ -21,7 +21,8 @@ from gramps.gen.lib import UrlType from gramps.gen.plug import Gramplet -from gramps.gen.ggettext import gettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_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 3e7e41e31..04b05f082 100644 --- a/gramps/plugins/gramplet/sessionloggramplet.py +++ b/gramps/plugins/gramplet/sessionloggramplet.py @@ -28,7 +28,8 @@ import time 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.ggettext import sgettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_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 6f6a2ba55..d06362154 100644 --- a/gramps/plugins/gramplet/statsgramplet.py +++ b/gramps/plugins/gramplet/statsgramplet.py @@ -31,7 +31,8 @@ import posixpath # #------------------------------------------------------------------------ from gramps.gen.plug import Gramplet -from gramps.gen.ggettext import sgettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_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 c1f2162e1..9270be3a2 100644 --- a/gramps/plugins/gramplet/surnamecloudgramplet.py +++ b/gramps/plugins/gramplet/surnamecloudgramplet.py @@ -26,7 +26,8 @@ from collections import defaultdict # #------------------------------------------------------------------------ from gramps.gen.plug import Gramplet -from gramps.gen.ggettext import sgettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().sgettext from gramps.gen.config import config #------------------------------------------------------------------------ diff --git a/gramps/plugins/gramplet/todogramplet.py b/gramps/plugins/gramplet/todogramplet.py index ae1e1f31c..160fd23a4 100644 --- a/gramps/plugins/gramplet/todogramplet.py +++ b/gramps/plugins/gramplet/todogramplet.py @@ -29,6 +29,8 @@ from gramps.gen.utils.db import navigation_label from gramps.gen.db import DbTxn from gramps.gen.ggettext import gettext as _ from gi.repository import Gtk +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().sgettext class ToDoGramplet(Gramplet): """ diff --git a/gramps/plugins/gramplet/topsurnamesgramplet.py b/gramps/plugins/gramplet/topsurnamesgramplet.py index 4fd7afadf..bc50f6b73 100644 --- a/gramps/plugins/gramplet/topsurnamesgramplet.py +++ b/gramps/plugins/gramplet/topsurnamesgramplet.py @@ -26,7 +26,8 @@ from collections import defaultdict # #------------------------------------------------------------------------ from gramps.gen.plug import Gramplet -from gramps.gen.ggettext import sgettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().sgettext from gramps.gen.config import config #------------------------------------------------------------------------ diff --git a/gramps/plugins/gramplet/welcomegramplet.py b/gramps/plugins/gramplet/welcomegramplet.py index 9a6fe6b41..47807662d 100644 --- a/gramps/plugins/gramplet/welcomegramplet.py +++ b/gramps/plugins/gramplet/welcomegramplet.py @@ -35,7 +35,8 @@ from gramps.gen.plug import Gramplet from gramps.gui.widgets.styledtexteditor import StyledTextEditor from gramps.gui.widgets import SimpleButton from gramps.gen.lib import StyledText, StyledTextTag, StyledTextTagType -from gramps.gen.ggettext import sgettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().sgettext #------------------------------------------------------------------------ # diff --git a/gramps/plugins/gramplet/whatsnext.py b/gramps/plugins/gramplet/whatsnext.py index db09c6757..1926fd8be 100644 --- a/gramps/plugins/gramplet/whatsnext.py +++ b/gramps/plugins/gramplet/whatsnext.py @@ -31,7 +31,8 @@ from gramps.gen.lib import EventType, FamilyRelType 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.ggettext import sgettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().sgettext #------------------------------------------------------------------------ # diff --git a/gramps/plugins/graph/gvfamilylines.py b/gramps/plugins/graph/gvfamilylines.py index 7c7aea774..04c2e95c4 100644 --- a/gramps/plugins/graph/gvfamilylines.py +++ b/gramps/plugins/graph/gvfamilylines.py @@ -36,7 +36,8 @@ from __future__ import unicode_literals # python modules # #------------------------------------------------------------------------ -from gramps.gen.ggettext import gettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext from functools import partial #------------------------------------------------------------------------ diff --git a/gramps/plugins/graph/gvhourglass.py b/gramps/plugins/graph/gvhourglass.py index 18f54f6e8..304a585f4 100644 --- a/gramps/plugins/graph/gvhourglass.py +++ b/gramps/plugins/graph/gvhourglass.py @@ -31,7 +31,8 @@ Generate an hourglass graph using the GraphViz generator. # python modules # #------------------------------------------------------------------------ -from gramps.gen.ggettext import gettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------ # diff --git a/gramps/plugins/graph/gvrelgraph.py b/gramps/plugins/graph/gvrelgraph.py index 9958ca76e..0bbade82b 100644 --- a/gramps/plugins/graph/gvrelgraph.py +++ b/gramps/plugins/graph/gvrelgraph.py @@ -39,7 +39,8 @@ Create a relationship graph using Graphviz # python modules # #------------------------------------------------------------------------ -from gramps.gen.ggettext import sgettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().sgettext from functools import partial #------------------------------------------------------------------------ diff --git a/gramps/plugins/importer/importcsv.py b/gramps/plugins/importer/importcsv.py index fb22ea224..1765edd15 100644 --- a/gramps/plugins/importer/importcsv.py +++ b/gramps/plugins/importer/importcsv.py @@ -48,8 +48,8 @@ LOG = logging.getLogger(".ImportCSV") # GRAMPS modules # #------------------------------------------------------------------------- -from gramps.gen.ggettext import sgettext as _ -from gramps.gen.ggettext import ngettext +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_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 = ngettext('Import Complete: %d second', + msg = glocale.get_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 ac5ee084a..70d53c838 100644 --- a/gramps/plugins/importer/importgedcom.py +++ b/gramps/plugins/importer/importgedcom.py @@ -29,7 +29,6 @@ # #------------------------------------------------------------------------ import sys -from gramps.gen.ggettext import gettext as _ #------------------------------------------------------------------------ # @@ -44,6 +43,8 @@ LOG = logging.getLogger(".GedcomImport") # GRAMPS modules # #------------------------------------------------------------------------ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_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 4cea4da82..78b9ebf36 100644 --- a/gramps/plugins/importer/importgeneweb.py +++ b/gramps/plugins/importer/importgeneweb.py @@ -33,8 +33,8 @@ from __future__ import print_function import re import time import sys -from gramps.gen.ggettext import gettext as _ -from gramps.gen.ggettext import ngettext +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------ # @@ -187,7 +187,7 @@ class GeneWebParser(object): self.errmsg(str(err)) t = time.time() - t - msg = ngettext('Import Complete: %d second','Import Complete: %d seconds', t ) % t + msg = glocale.get_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 7f6266530..43d816cf8 100644 --- a/gramps/plugins/importer/importgpkg.py +++ b/gramps/plugins/importer/importgpkg.py @@ -31,7 +31,8 @@ #------------------------------------------------------------------------- import os import tarfile -from gramps.gen.ggettext import gettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------ # diff --git a/gramps/plugins/importer/importgrdb.py b/gramps/plugins/importer/importgrdb.py index 27a1551b4..a62983fbb 100644 --- a/gramps/plugins/importer/importgrdb.py +++ b/gramps/plugins/importer/importgrdb.py @@ -35,7 +35,8 @@ LOG = logging.getLogger(".Db") # Gramps Modules # #------------------------------------------------------------------------- -from gramps.gen.ggettext import gettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/plugins/importer/importprogen.py b/gramps/plugins/importer/importprogen.py index f8b565ea3..d560aee84 100644 --- a/gramps/plugins/importer/importprogen.py +++ b/gramps/plugins/importer/importprogen.py @@ -31,7 +31,6 @@ from __future__ import unicode_literals # #------------------------------------------------------------------------- import re -from gramps.gen.ggettext import gettext as _ import os import struct @@ -48,6 +47,8 @@ log = logging.getLogger('.ImportProGen') # GRAMPS modules # #------------------------------------------------------------------------- +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_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 4d12f241f..b11c7be97 100644 --- a/gramps/plugins/importer/importvcard.py +++ b/gramps/plugins/importer/importvcard.py @@ -32,8 +32,8 @@ import sys import re import time -from gramps.gen.ggettext import gettext as _ -from gramps.gen.ggettext import ngettext +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------ # @@ -228,7 +228,7 @@ class VCardParser(object): self.database.enable_signals() self.database.request_rebuild() tym = time.time() - tym - msg = ngettext('Import Complete: %d second', + msg = glocale.get_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 9cf089f19..71f6dc14b 100644 --- a/gramps/plugins/importer/importxml.py +++ b/gramps/plugins/importer/importxml.py @@ -33,7 +33,8 @@ import os import sys import time from xml.parsers.expat import ExpatError, ParserCreate -from gramps.gen.ggettext import gettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext import re import logging import collections diff --git a/gramps/plugins/lib/libcairodoc.py b/gramps/plugins/lib/libcairodoc.py index 92f9bb168..5ef596060 100644 --- a/gramps/plugins/lib/libcairodoc.py +++ b/gramps/plugins/lib/libcairodoc.py @@ -37,7 +37,8 @@ from __future__ import division, print_function # #------------------------------------------------------------------------ -from gramps.gen.ggettext import gettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext from math import radians import re diff --git a/gramps/plugins/lib/libgedcom.py b/gramps/plugins/lib/libgedcom.py index 9fe68dfa4..2a1e40bec 100644 --- a/gramps/plugins/lib/libgedcom.py +++ b/gramps/plugins/lib/libgedcom.py @@ -96,7 +96,6 @@ import sys import re import time import codecs -from gramps.gen.ggettext import gettext as _ from xml.parsers.expat import ParserCreate from collections import defaultdict if sys.version_info[0] < 3: @@ -121,6 +120,8 @@ LOG = logging.getLogger(".libgedcom") # GRAMPS modules # #------------------------------------------------------------------------- +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_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/libgrdb.py b/gramps/plugins/lib/libgrdb.py index e6a5f854b..0a7944199 100644 --- a/gramps/plugins/lib/libgrdb.py +++ b/gramps/plugins/lib/libgrdb.py @@ -45,7 +45,8 @@ if config.get('preferences.use-bsddb3') or sys.version_info[0] >= 3: from bsddb3 import db else: from bsddb import db -from gramps.gen.ggettext import gettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext import logging LOG = logging.getLogger(".Db") diff --git a/gramps/plugins/lib/libholiday.py b/gramps/plugins/lib/libholiday.py index 11f5a2194..7ec1c52a8 100644 --- a/gramps/plugins/lib/libholiday.py +++ b/gramps/plugins/lib/libholiday.py @@ -27,7 +27,8 @@ #------------------------------------------------------------------------ from __future__ import print_function -from gramps.gen.ggettext import gettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_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 bd303b2bf..de1bc798d 100644 --- a/gramps/plugins/lib/libhtmlconst.py +++ b/gramps/plugins/lib/libhtmlconst.py @@ -32,7 +32,8 @@ General constants used in different html enabled plugins """ -from gramps.gen.ggettext import gettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------ # diff --git a/gramps/plugins/lib/libmetadata.py b/gramps/plugins/lib/libmetadata.py index 5179897bb..5b62133e0 100644 --- a/gramps/plugins/lib/libmetadata.py +++ b/gramps/plugins/lib/libmetadata.py @@ -36,7 +36,8 @@ from gi.repository import Gtk #------------------------------------------------------------------------- from gramps.gui.listmodel import ListModel -from gramps.gen.ggettext import gettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_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 3a8257345..10840570b 100644 --- a/gramps/plugins/lib/libnarrate.py +++ b/gramps/plugins/lib/libnarrate.py @@ -72,7 +72,8 @@ def _get_empty_endnote_numbers(obj): return "" # avoid normal translation! -##from gramps.gen.ggettext import gettext as _ +##from gramps.gen.const import GRAMPS_LOCALE as glocale +##_ = glocale.get_translation().gettext def _(message): return message #------------------------------------------------------------------------ diff --git a/gramps/plugins/lib/libpersonview.py b/gramps/plugins/lib/libpersonview.py index 1b6b479e5..8f7c6a5d8 100644 --- a/gramps/plugins/lib/libpersonview.py +++ b/gramps/plugins/lib/libpersonview.py @@ -67,7 +67,8 @@ from gramps.gen.plug import CATEGORY_QR_PERSON # Python modules # #------------------------------------------------------------------------- -from gramps.gen.ggettext import sgettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().sgettext #------------------------------------------------------------------------- # diff --git a/gramps/plugins/lib/libplaceview.py b/gramps/plugins/lib/libplaceview.py index b65276dc1..0d3f6374b 100644 --- a/gramps/plugins/lib/libplaceview.py +++ b/gramps/plugins/lib/libplaceview.py @@ -65,7 +65,8 @@ from gramps.gen.plug import CATEGORY_QR_PLACE # internationalization # #------------------------------------------------------------------------- -from gramps.gen.ggettext import gettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- diff --git a/gramps/plugins/lib/librecords.py b/gramps/plugins/lib/librecords.py index 584766821..fb7347ed5 100644 --- a/gramps/plugins/lib/librecords.py +++ b/gramps/plugins/lib/librecords.py @@ -28,7 +28,8 @@ # #------------------------------------------------------------------------ import datetime -from gramps.gen.ggettext import sgettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().sgettext #------------------------------------------------------------------------ # diff --git a/gramps/plugins/lib/libtranslate.py b/gramps/plugins/lib/libtranslate.py index 9c582267d..436e62894 100644 --- a/gramps/plugins/lib/libtranslate.py +++ b/gramps/plugins/lib/libtranslate.py @@ -30,14 +30,13 @@ Translator class for use by plugins. # #------------------------------------------------------------------------ -from gramps.gen.const import GRAMPS_LOCALE as glocale -from gramps.gen.ggettext import gettext as _ #------------------------------------------------------------------------ # # GRAMPS modules # #------------------------------------------------------------------------ from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext from gramps.gen.datehandler import displayer, LANG_TO_DISPLAY from gramps.gen.config import config from gramps.gen.lib.grampstype import GrampsType diff --git a/gramps/plugins/lib/libtreebase.py b/gramps/plugins/lib/libtreebase.py index 9d1aa8647..f5dbf3601 100644 --- a/gramps/plugins/lib/libtreebase.py +++ b/gramps/plugins/lib/libtreebase.py @@ -27,7 +27,8 @@ # python modules # #------------------------------------------------------------------------ -from gramps.gen.ggettext import sgettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().sgettext from gramps.gen.plug.report import utils as ReportUtils diff --git a/gramps/plugins/lib/maps/geography.py b/gramps/plugins/lib/maps/geography.py index 385b2ee7f..e4d34eb8e 100644 --- a/gramps/plugins/lib/maps/geography.py +++ b/gramps/plugins/lib/maps/geography.py @@ -27,7 +27,8 @@ # Python modules # #------------------------------------------------------------------------- -from gramps.gen.ggettext import sgettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_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 0b380552f..88be59fe9 100644 --- a/gramps/plugins/lib/maps/osmgps.py +++ b/gramps/plugins/lib/maps/osmgps.py @@ -60,7 +60,8 @@ from .lifewaylayer import LifeWayLayer from .markerlayer import MarkerLayer from .datelayer import DateLayer from .messagelayer import MessageLayer -from gramps.gen.ggettext import sgettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_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 01abaa617..df7a92f52 100644 --- a/gramps/plugins/lib/maps/placeselection.py +++ b/gramps/plugins/lib/maps/placeselection.py @@ -27,7 +27,8 @@ # Python modules # #------------------------------------------------------------------------- -from gramps.gen.ggettext import sgettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_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 05b317809..260a2c896 100644 --- a/gramps/plugins/mapservices/eniroswedenmap.py +++ b/gramps/plugins/mapservices/eniroswedenmap.py @@ -31,7 +31,8 @@ Eniro Sweden (Denmark) map service plugin. Opens place in kartor.eniro.se # python modules # #------------------------------------------------------------------------ -from gramps.gen.ggettext import gettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------ # diff --git a/gramps/plugins/mapservices/googlemap.py b/gramps/plugins/mapservices/googlemap.py index 30e084069..dd5f96366 100644 --- a/gramps/plugins/mapservices/googlemap.py +++ b/gramps/plugins/mapservices/googlemap.py @@ -28,7 +28,8 @@ Google Maps map service plugin. Open place in maps.google.com # python modules # #------------------------------------------------------------------------ -from gramps.gen.ggettext import gettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------ # diff --git a/gramps/plugins/mapservices/openstreetmap.py b/gramps/plugins/mapservices/openstreetmap.py index cf19d00f0..e33554a34 100644 --- a/gramps/plugins/mapservices/openstreetmap.py +++ b/gramps/plugins/mapservices/openstreetmap.py @@ -28,7 +28,8 @@ OpenStreetMap map service plugin. Open place in openstreetmap.org # python modules # #------------------------------------------------------------------------ -from gramps.gen.ggettext import gettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------ # diff --git a/gramps/plugins/quickview/ageondate.py b/gramps/plugins/quickview/ageondate.py index 90e319a5e..e17e16e71 100644 --- a/gramps/plugins/quickview/ageondate.py +++ b/gramps/plugins/quickview/ageondate.py @@ -30,7 +30,8 @@ Display references for any object 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.ggettext import gettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_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 9189517d0..d2d7934d9 100644 --- a/gramps/plugins/quickview/all_events.py +++ b/gramps/plugins/quickview/all_events.py @@ -28,7 +28,8 @@ 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.ggettext import gettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext def run(database, document, person): """ diff --git a/gramps/plugins/quickview/all_relations.py b/gramps/plugins/quickview/all_relations.py index 147b59101..495361fce 100644 --- a/gramps/plugins/quickview/all_relations.py +++ b/gramps/plugins/quickview/all_relations.py @@ -32,7 +32,8 @@ Display a person's relations to the home person #------------------------------------------------------------------------- from gramps.gen.simple import SimpleAccess, SimpleDoc -from gramps.gen.ggettext import gettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_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 dbe94c6d9..a485a3b57 100644 --- a/gramps/plugins/quickview/attributematch.py +++ b/gramps/plugins/quickview/attributematch.py @@ -24,7 +24,8 @@ from gramps.gen.simple import SimpleAccess, SimpleDoc from gramps.gui.plug.quick import QuickTable -from gramps.gen.ggettext import gettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_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 ed9537155..abb745e1d 100644 --- a/gramps/plugins/quickview/filterbyname.py +++ b/gramps/plugins/quickview/filterbyname.py @@ -36,8 +36,8 @@ from gramps.gen.datehandler import get_date import posixpath from collections import defaultdict -from gramps.gen.ggettext import sgettext as _ -from gramps.gen.ggettext import ngettext +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_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(ngettext("Filter matched %d record." + sdoc.paragraph(glocale.get_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 ef79c7c4e..dae274117 100644 --- a/gramps/plugins/quickview/lineage.py +++ b/gramps/plugins/quickview/lineage.py @@ -35,7 +35,8 @@ Display a person's father or mother lineage from gramps.gen.lib import ChildRefType, Person from gramps.gen.simple import SimpleAccess, SimpleDoc from gramps.gui.plug.quick import QuickTable -from gramps.gen.ggettext import gettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_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 16ba8d4e9..fe458ef02 100644 --- a/gramps/plugins/quickview/linkreferences.py +++ b/gramps/plugins/quickview/linkreferences.py @@ -28,7 +28,8 @@ Display link references for a note from gramps.gen.simple import SimpleAccess, SimpleDoc from gramps.gui.plug.quick import QuickTable from gramps.gen.lib import StyledTextTagType -from gramps.gen.ggettext import gettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext def run(database, document, obj): """ diff --git a/gramps/plugins/quickview/onthisday.py b/gramps/plugins/quickview/onthisday.py index 7780401cb..94dbfe21d 100644 --- a/gramps/plugins/quickview/onthisday.py +++ b/gramps/plugins/quickview/onthisday.py @@ -28,7 +28,8 @@ 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.ggettext import gettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_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 092636dd2..fb9752c01 100644 --- a/gramps/plugins/quickview/references.py +++ b/gramps/plugins/quickview/references.py @@ -29,7 +29,8 @@ Display references for any object from gramps.gen.simple import SimpleAccess, SimpleDoc from gramps.gui.plug.quick import QuickTable -from gramps.gen.ggettext import gettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext def get_ref(db, objclass, handle): """ diff --git a/gramps/plugins/quickview/reporef.py b/gramps/plugins/quickview/reporef.py index 12a57c2f0..77f22d3ce 100755 --- a/gramps/plugins/quickview/reporef.py +++ b/gramps/plugins/quickview/reporef.py @@ -36,7 +36,8 @@ 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.ggettext import gettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext def run(database, document, repo): """ diff --git a/gramps/plugins/quickview/samesurnames.py b/gramps/plugins/quickview/samesurnames.py index 881215ee6..f2bb963bb 100644 --- a/gramps/plugins/quickview/samesurnames.py +++ b/gramps/plugins/quickview/samesurnames.py @@ -29,8 +29,8 @@ 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.ggettext import gettext as _ -from gramps.gen.ggettext import ngettext +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_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(ngettext("There is %d person with a matching name, or alternate name.\n" + sdoc.paragraph(glocale.get_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(ngettext("There is %d person with a matching name, or alternate name.\n" + sdoc.paragraph(glocale.get_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 d1c1094b0..d0ba1cab6 100644 --- a/gramps/plugins/quickview/siblings.py +++ b/gramps/plugins/quickview/siblings.py @@ -29,7 +29,8 @@ Display a person's siblings in a report window 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.ggettext import gettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext def run(database, document, person): """ diff --git a/gramps/plugins/sidebar/dropdownsidebar.py b/gramps/plugins/sidebar/dropdownsidebar.py index 1873e942f..74d1204f4 100644 --- a/gramps/plugins/sidebar/dropdownsidebar.py +++ b/gramps/plugins/sidebar/dropdownsidebar.py @@ -37,7 +37,8 @@ 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 #------------------------------------------------------------------------- # # DropdownSidebar class diff --git a/gramps/plugins/textreport/alphabeticalindex.py b/gramps/plugins/textreport/alphabeticalindex.py index 557e57b1d..328c4271c 100644 --- a/gramps/plugins/textreport/alphabeticalindex.py +++ b/gramps/plugins/textreport/alphabeticalindex.py @@ -24,7 +24,8 @@ # Python modules # #------------------------------------------------------------------------ -from gramps.gen.ggettext import sgettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().sgettext #------------------------------------------------------------------------ # diff --git a/gramps/plugins/textreport/ancestorreport.py b/gramps/plugins/textreport/ancestorreport.py index 68d74138a..e1301122b 100644 --- a/gramps/plugins/textreport/ancestorreport.py +++ b/gramps/plugins/textreport/ancestorreport.py @@ -32,7 +32,8 @@ #------------------------------------------------------------------------ import math import copy -from gramps.gen.ggettext import gettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------ # diff --git a/gramps/plugins/textreport/birthdayreport.py b/gramps/plugins/textreport/birthdayreport.py index 07c04fc2d..462172e58 100644 --- a/gramps/plugins/textreport/birthdayreport.py +++ b/gramps/plugins/textreport/birthdayreport.py @@ -29,8 +29,9 @@ # #------------------------------------------------------------------------ import copy -from gramps.gen.ggettext import gettext as _ -from gramps.gen.ggettext import ngettext +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext +ngettext = glocale.get_translation().ngettext import datetime, time #------------------------------------------------------------------------ diff --git a/gramps/plugins/textreport/custombooktext.py b/gramps/plugins/textreport/custombooktext.py index 60a43ee34..c6539ba8c 100644 --- a/gramps/plugins/textreport/custombooktext.py +++ b/gramps/plugins/textreport/custombooktext.py @@ -30,7 +30,8 @@ # python modules # #------------------------------------------------------------------------ -from gramps.gen.ggettext import gettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------ # diff --git a/gramps/plugins/textreport/descendreport.py b/gramps/plugins/textreport/descendreport.py index b91e854e4..7334fa3bb 100644 --- a/gramps/plugins/textreport/descendreport.py +++ b/gramps/plugins/textreport/descendreport.py @@ -35,7 +35,8 @@ Reports/Text Reports/Descendant Report. # #------------------------------------------------------------------------ import copy -from gramps.gen.ggettext import gettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------ # diff --git a/gramps/plugins/textreport/detancestralreport.py b/gramps/plugins/textreport/detancestralreport.py index d12195c84..6515b621c 100644 --- a/gramps/plugins/textreport/detancestralreport.py +++ b/gramps/plugins/textreport/detancestralreport.py @@ -35,7 +35,8 @@ # #------------------------------------------------------------------------ import copy -from gramps.gen.ggettext import gettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------ # diff --git a/gramps/plugins/textreport/detdescendantreport.py b/gramps/plugins/textreport/detdescendantreport.py index 09b11bd75..47d32f94e 100644 --- a/gramps/plugins/textreport/detdescendantreport.py +++ b/gramps/plugins/textreport/detdescendantreport.py @@ -37,7 +37,6 @@ # #------------------------------------------------------------------------ import copy -from gramps.gen.ggettext import gettext as _ from functools import partial #------------------------------------------------------------------------ @@ -46,6 +45,8 @@ from functools import partial # #------------------------------------------------------------------------ from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_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 from gramps.gen.lib import FamilyRelType, Person, NoteType diff --git a/gramps/plugins/textreport/endoflinereport.py b/gramps/plugins/textreport/endoflinereport.py index 989483ea9..4c3f1583a 100644 --- a/gramps/plugins/textreport/endoflinereport.py +++ b/gramps/plugins/textreport/endoflinereport.py @@ -29,7 +29,8 @@ # #------------------------------------------------------------------------ import copy -from gramps.gen.ggettext import gettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------ # diff --git a/gramps/plugins/textreport/familygroup.py b/gramps/plugins/textreport/familygroup.py index fbe24e70a..5d6bb0e73 100644 --- a/gramps/plugins/textreport/familygroup.py +++ b/gramps/plugins/textreport/familygroup.py @@ -46,7 +46,8 @@ from gramps.gen.plug.docgen import (IndexMark, FontStyle, ParagraphStyle, TableS TableCellStyle, FONT_SANS_SERIF, FONT_SERIF, INDEX_TYPE_TOC, PARA_ALIGN_CENTER) from gramps.gen.datehandler import get_date -from gramps.gen.ggettext import sgettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_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 5ffa044d8..7734b6786 100644 --- a/gramps/plugins/textreport/indivcomplete.py +++ b/gramps/plugins/textreport/indivcomplete.py @@ -33,7 +33,8 @@ #------------------------------------------------------------------------ import os import copy -from gramps.gen.ggettext import gettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext from collections import defaultdict #------------------------------------------------------------------------ diff --git a/gramps/plugins/textreport/kinshipreport.py b/gramps/plugins/textreport/kinshipreport.py index 749fde37c..947a71322 100644 --- a/gramps/plugins/textreport/kinshipreport.py +++ b/gramps/plugins/textreport/kinshipreport.py @@ -31,7 +31,8 @@ # #------------------------------------------------------------------------ import copy -from gramps.gen.ggettext import gettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------ # diff --git a/gramps/plugins/textreport/numberofancestorsreport.py b/gramps/plugins/textreport/numberofancestorsreport.py index 72c358543..dc2a07b57 100644 --- a/gramps/plugins/textreport/numberofancestorsreport.py +++ b/gramps/plugins/textreport/numberofancestorsreport.py @@ -32,8 +32,8 @@ # #------------------------------------------------------------------------ import copy -from gramps.gen.ggettext import gettext as _ -from gramps.gen.ggettext import ngettext +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_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 = ngettext( + text = glocale.get_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 350397b5b..cdddfec8e 100644 --- a/gramps/plugins/textreport/placereport.py +++ b/gramps/plugins/textreport/placereport.py @@ -29,7 +29,8 @@ # python modules # #------------------------------------------------------------------------ -from gramps.gen.ggettext import gettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------ # diff --git a/gramps/plugins/textreport/recordsreport.py b/gramps/plugins/textreport/recordsreport.py index f55e61593..f19269f0b 100644 --- a/gramps/plugins/textreport/recordsreport.py +++ b/gramps/plugins/textreport/recordsreport.py @@ -27,7 +27,8 @@ # Standard Python modules # #------------------------------------------------------------------------ -from gramps.gen.ggettext import sgettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().sgettext #------------------------------------------------------------------------ # diff --git a/gramps/plugins/textreport/simplebooktitle.py b/gramps/plugins/textreport/simplebooktitle.py index c0a8a38c0..192ac6066 100644 --- a/gramps/plugins/textreport/simplebooktitle.py +++ b/gramps/plugins/textreport/simplebooktitle.py @@ -28,7 +28,8 @@ # #------------------------------------------------------------------------ import time -from gramps.gen.ggettext import sgettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().sgettext import os #------------------------------------------------------------------------ diff --git a/gramps/plugins/textreport/summary.py b/gramps/plugins/textreport/summary.py index 4a22bb403..72c7cc2dc 100644 --- a/gramps/plugins/textreport/summary.py +++ b/gramps/plugins/textreport/summary.py @@ -32,7 +32,8 @@ Reports/Text Reports/Database Summary Report. # #------------------------------------------------------------------------ import posixpath -from gramps.gen.ggettext import gettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------ # diff --git a/gramps/plugins/textreport/tableofcontents.py b/gramps/plugins/textreport/tableofcontents.py index f70562ab9..a897bd63c 100644 --- a/gramps/plugins/textreport/tableofcontents.py +++ b/gramps/plugins/textreport/tableofcontents.py @@ -24,7 +24,8 @@ # Python modules # #------------------------------------------------------------------------ -from gramps.gen.ggettext import sgettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().sgettext #------------------------------------------------------------------------ # diff --git a/gramps/plugins/textreport/tagreport.py b/gramps/plugins/textreport/tagreport.py index 9561cafd8..858fe2cc4 100644 --- a/gramps/plugins/textreport/tagreport.py +++ b/gramps/plugins/textreport/tagreport.py @@ -30,7 +30,8 @@ # standard python modules # #------------------------------------------------------------------------ -from gramps.gen.ggettext import gettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------ # diff --git a/gramps/plugins/tool/changenames.py b/gramps/plugins/tool/changenames.py index 9385914cb..40c7ed4df 100644 --- a/gramps/plugins/tool/changenames.py +++ b/gramps/plugins/tool/changenames.py @@ -45,7 +45,8 @@ from gramps.gui.managedwindow import ManagedWindow from gramps.gui.dialog import OkDialog from gramps.gui.plug import tool -from gramps.gen.ggettext import sgettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().sgettext from gramps.gui.glade import Glade #------------------------------------------------------------------------- diff --git a/gramps/plugins/tool/changetypes.py b/gramps/plugins/tool/changetypes.py index 2173c4e99..20f06a7f2 100644 --- a/gramps/plugins/tool/changetypes.py +++ b/gramps/plugins/tool/changetypes.py @@ -31,8 +31,8 @@ #------------------------------------------------------------------------ from __future__ import print_function -from gramps.gen.ggettext import gettext as _ -from gramps.gen.ggettext import ngettext +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------ # @@ -135,7 +135,7 @@ class ChangeTypes(tool.BatchTool, ManagedWindow): if modified == 0: msg = _("No event record was modified.") else: - msg = ngettext("%d event record was modified." + msg = glocale.get_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 1972cc9d1..da9cb77a3 100644 --- a/gramps/plugins/tool/check.py +++ b/gramps/plugins/tool/check.py @@ -41,8 +41,9 @@ else: from io import StringIO import time -from gramps.gen.ggettext import gettext as _ -from gramps.gen.ggettext import ngettext +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext +ngettext = glocale.get_translation().ngettext from collections import defaultdict #------------------------------------------------------------------------ diff --git a/gramps/plugins/tool/dateparserdisplaytest.py b/gramps/plugins/tool/dateparserdisplaytest.py index af4b29e66..53710b7ec 100644 --- a/gramps/plugins/tool/dateparserdisplaytest.py +++ b/gramps/plugins/tool/dateparserdisplaytest.py @@ -36,7 +36,8 @@ Tools/Debug/Check Localized Date Parser and Displayer #------------------------------------------------------------------------- import traceback import sys -from gramps.gen.ggettext import gettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/plugins/tool/desbrowser.py b/gramps/plugins/tool/desbrowser.py index c56a271aa..c3f7326f6 100644 --- a/gramps/plugins/tool/desbrowser.py +++ b/gramps/plugins/tool/desbrowser.py @@ -42,7 +42,8 @@ from gramps.gen.display.name import displayer as name_displayer from gramps.gui.plug import tool from gramps.gui.display import display_help from gramps.gui.managedwindow import ManagedWindow -from gramps.gen.ggettext import sgettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_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 1692a778f..d91f34ea0 100644 --- a/gramps/plugins/tool/dumpgenderstats.py +++ b/gramps/plugins/tool/dumpgenderstats.py @@ -28,7 +28,8 @@ """ from __future__ import print_function -from gramps.gen.ggettext import gettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_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 c89fed959..b94c866b9 100644 --- a/gramps/plugins/tool/eval.py +++ b/gramps/plugins/tool/eval.py @@ -35,7 +35,8 @@ if sys.version_info[0] < 3: from cStringIO import StringIO else: from io import StringIO -from gramps.gen.ggettext import gettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext import traceback #------------------------------------------------------------------------ diff --git a/gramps/plugins/tool/eventcmp.py b/gramps/plugins/tool/eventcmp.py index 63acf2850..142e9f306 100644 --- a/gramps/plugins/tool/eventcmp.py +++ b/gramps/plugins/tool/eventcmp.py @@ -58,7 +58,8 @@ from gramps.gui.plug import tool 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.ggettext import sgettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_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 fcba3eb2b..26dd615e6 100644 --- a/gramps/plugins/tool/eventnames.py +++ b/gramps/plugins/tool/eventnames.py @@ -29,8 +29,9 @@ # python modules # #------------------------------------------------------------------------- -from gramps.gen.ggettext import gettext as _ -from gramps.gen.ggettext import ngettext +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext + #------------------------------------------------------------------------- # @@ -111,7 +112,7 @@ class EventNames(tool.BatchTool, ManagedWindow): if self.change == True: OkDialog(_('Modifications made'), - ngettext("%s event description has been added", + glocale.get_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 475227f49..5cb5906d6 100644 --- a/gramps/plugins/tool/extractcity.py +++ b/gramps/plugins/tool/extractcity.py @@ -32,7 +32,8 @@ from __future__ import unicode_literals # #------------------------------------------------------------------------- import re -from gramps.gen.ggettext import gettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/plugins/tool/finddupes.py b/gramps/plugins/tool/finddupes.py index 8c6305fe4..0f6655e98 100644 --- a/gramps/plugins/tool/finddupes.py +++ b/gramps/plugins/tool/finddupes.py @@ -49,7 +49,8 @@ from gramps.gui.merge import MergePerson from gramps.gui.display import display_help from gramps.gui.managedwindow import ManagedWindow from gramps.gui.dialog import RunDatabaseRepair -from gramps.gen.ggettext import sgettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().sgettext from gramps.gui.glade import Glade #------------------------------------------------------------------------- diff --git a/gramps/plugins/tool/leak.py b/gramps/plugins/tool/leak.py index 061e9e297..5540f1bfc 100644 --- a/gramps/plugins/tool/leak.py +++ b/gramps/plugins/tool/leak.py @@ -32,7 +32,8 @@ Show uncollected objects in a window. # #------------------------------------------------------------------------ import sys -from gramps.gen.ggettext import gettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_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 2698ea44c..e41d42e92 100644 --- a/gramps/plugins/tool/mediamanager.py +++ b/gramps/plugins/tool/mediamanager.py @@ -58,7 +58,8 @@ from gramps.gen.db import DbTxn 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.ggettext import sgettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_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 259f3a288..22a11c1d2 100644 --- a/gramps/plugins/tool/mergecitations.py +++ b/gramps/plugins/tool/mergecitations.py @@ -55,8 +55,9 @@ from gramps.gui.dialog import OkDialog from gramps.gui.display import display_help from gramps.gen.datehandler import get_date from gramps.gui.managedwindow import ManagedWindow -from gramps.gen.ggettext import sgettext as _ -from gramps.gen.ggettext import ngettext +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().sgettext + from gramps.gui.glade import Glade from gramps.gen.db import DbTxn from gramps.gen.lib import (Person, Family, Event, Place, MediaObject, Citation, @@ -225,7 +226,7 @@ class MergeCitations(tool.BatchTool,ManagedWindow): self.progress.close() OkDialog( _("Number of merges done"), - ngettext("%(num)d citation merged", + glocale.get_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 e8221b375..823349856 100644 --- a/gramps/plugins/tool/notrelated.py +++ b/gramps/plugins/tool/notrelated.py @@ -46,14 +46,15 @@ from gi.repository import GObject # #------------------------------------------------------------------------ from gramps.gen.const import URL_MANUAL_PAGE -from gramps.gen.ggettext import ngettext from gramps.gui.plug import tool from gramps.gen.plug.report import utils as ReportUtils from gramps.gui.editors import EditPerson, EditFamily from gramps.gui.managedwindow import ManagedWindow from gramps.gui.utils import ProgressMeter from gramps.gui.display import display_help -from gramps.gen.ggettext import sgettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().sgettext +ngettext = glocale.get_translation().ngettext from gramps.gui.glade import Glade from gramps.gen.lib import Tag from gramps.gen.db import DbTxn @@ -261,7 +262,7 @@ class NotRelated(tool.ActivePersonTool, ManagedWindow) : if rows > 1: progress = ProgressMeter(self.title,_('Starting')) #TRANS: no singular form needed, as rows is always > 1 - progress.set_pass(ngettext("Setting tag for %d person", + progress.set_passngettext("Setting tag for %d person", "Setting tag for %d people", rows) % rows, rows) @@ -302,7 +303,7 @@ class NotRelated(tool.ActivePersonTool, ManagedWindow) : #TRANS: No singular form is needed. self.progress.set_pass( - ngettext("Finding relationships between %d person", + ngettext("Finding relationships between %d person", "Finding relationships between %d people", self.numberOfPeopleInDatabase) % self.numberOfPeopleInDatabase, @@ -372,7 +373,7 @@ class NotRelated(tool.ActivePersonTool, ManagedWindow) : # we have at least 1 "unrelated" person to find self.progress.set_pass( - ngettext("Looking for %d person", "Looking for %d people", + ngettext("Looking for %d person", "Looking for %d people", self.numberOfUnrelatedPeople) % self.numberOfUnrelatedPeople, self.numberOfPeopleInDatabase) @@ -398,7 +399,7 @@ class NotRelated(tool.ActivePersonTool, ManagedWindow) : def populateModel(self) : self.progress.set_pass( - ngettext("Looking up the name of %d person", + ngettext("Looking up the name of %d person", "Looking up the names of %d people", self.numberOfUnrelatedPeople) % self.numberOfUnrelatedPeople, diff --git a/gramps/plugins/tool/ownereditor.py b/gramps/plugins/tool/ownereditor.py index 3468f711f..1bfdeb6f2 100644 --- a/gramps/plugins/tool/ownereditor.py +++ b/gramps/plugins/tool/ownereditor.py @@ -44,7 +44,8 @@ from gramps.gui.display import display_help from gramps.gui.widgets import MonitoredEntry from gramps.gui.managedwindow import ManagedWindow from gramps.gui.plug import tool -from gramps.gen.ggettext import sgettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_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 9e3abb4c5..073d2ad4b 100644 --- a/gramps/plugins/tool/patchnames.py +++ b/gramps/plugins/tool/patchnames.py @@ -52,7 +52,8 @@ from gramps.gui.managedwindow import ManagedWindow from gramps.gui.display import display_help from gramps.gen.lib import NameOriginType, Surname from gramps.gen.db import DbTxn -from gramps.gen.ggettext import sgettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().sgettext from gramps.gui.glade import Glade #------------------------------------------------------------------------- diff --git a/gramps/plugins/tool/phpgedviewconnector.py b/gramps/plugins/tool/phpgedviewconnector.py index 4fe660a8f..7010a773a 100644 --- a/gramps/plugins/tool/phpgedviewconnector.py +++ b/gramps/plugins/tool/phpgedviewconnector.py @@ -37,7 +37,8 @@ else: from gi.repository import Gtk import os from tempfile import mkstemp -from gramps.gen.ggettext import gettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_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 dba9bfaff..b882d04ab 100644 --- a/gramps/plugins/tool/rebuild.py +++ b/gramps/plugins/tool/rebuild.py @@ -31,7 +31,8 @@ #------------------------------------------------------------------------- from __future__ import print_function -from gramps.gen.ggettext import gettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------ # diff --git a/gramps/plugins/tool/rebuildgenderstat.py b/gramps/plugins/tool/rebuildgenderstat.py index 7b1b1b408..0da7143e6 100644 --- a/gramps/plugins/tool/rebuildgenderstat.py +++ b/gramps/plugins/tool/rebuildgenderstat.py @@ -31,7 +31,8 @@ #------------------------------------------------------------------------- from __future__ import print_function -from gramps.gen.ggettext import gettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------ # diff --git a/gramps/plugins/tool/rebuildrefmap.py b/gramps/plugins/tool/rebuildrefmap.py index 329b26001..946382cea 100644 --- a/gramps/plugins/tool/rebuildrefmap.py +++ b/gramps/plugins/tool/rebuildrefmap.py @@ -33,7 +33,8 @@ #------------------------------------------------------------------------- from __future__ import print_function -from gramps.gen.ggettext import gettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------ # diff --git a/gramps/plugins/tool/relcalc.py b/gramps/plugins/tool/relcalc.py index f7a899b9e..4b1ac028e 100644 --- a/gramps/plugins/tool/relcalc.py +++ b/gramps/plugins/tool/relcalc.py @@ -30,7 +30,8 @@ # Standard python modules # #------------------------------------------------------------------------- -from gramps.gen.ggettext import gettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/plugins/tool/removeunused.py b/gramps/plugins/tool/removeunused.py index 6b788adaa..cb1a49761 100644 --- a/gramps/plugins/tool/removeunused.py +++ b/gramps/plugins/tool/removeunused.py @@ -31,7 +31,8 @@ # #------------------------------------------------------------------------- from __future__ import with_statement -from gramps.gen.ggettext import gettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------ # diff --git a/gramps/plugins/tool/reorderids.py b/gramps/plugins/tool/reorderids.py index 82d49dfa0..8d13a6b50 100644 --- a/gramps/plugins/tool/reorderids.py +++ b/gramps/plugins/tool/reorderids.py @@ -35,7 +35,8 @@ scheme specified in the database's prefix ids from __future__ import print_function import re -from gramps.gen.ggettext import gettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------ # diff --git a/gramps/plugins/tool/sortevents.py b/gramps/plugins/tool/sortevents.py index d9252ee9d..f4960fdd7 100644 --- a/gramps/plugins/tool/sortevents.py +++ b/gramps/plugins/tool/sortevents.py @@ -28,7 +28,8 @@ # python modules # #------------------------------------------------------------------------- -from gramps.gen.ggettext import gettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/plugins/tool/soundgen.py b/gramps/plugins/tool/soundgen.py index b0e8a1a27..69c722702 100644 --- a/gramps/plugins/tool/soundgen.py +++ b/gramps/plugins/tool/soundgen.py @@ -34,7 +34,8 @@ from gramps.gen.soundex import soundex from gramps.gui.display import display_help from gramps.gui.managedwindow import ManagedWindow from gramps.gui.autocomp import fill_combo -from gramps.gen.ggettext import sgettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_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 8e416e277..d98385d4d 100644 --- a/gramps/plugins/tool/testcasegenerator.py +++ b/gramps/plugins/tool/testcasegenerator.py @@ -35,7 +35,8 @@ from __future__ import unicode_literals from __future__ import print_function from random import randint,choice,random -from gramps.gen.ggettext import gettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext import time #------------------------------------------------------------------------- diff --git a/gramps/plugins/tool/verify.py b/gramps/plugins/tool/verify.py index 8731ecee4..0a7a0670f 100644 --- a/gramps/plugins/tool/verify.py +++ b/gramps/plugins/tool/verify.py @@ -71,7 +71,8 @@ from gramps.gui.display import display_help from gramps.gui.managedwindow import ManagedWindow from gramps.gen.updatecallback import UpdateCallback from gramps.gui.plug import tool -from gramps.gen.ggettext import sgettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().sgettext from gramps.gui.glade import Glade #------------------------------------------------------------------------- diff --git a/gramps/plugins/view/citationlistview.py b/gramps/plugins/view/citationlistview.py index 315808d20..148ab1745 100644 --- a/gramps/plugins/view/citationlistview.py +++ b/gramps/plugins/view/citationlistview.py @@ -63,7 +63,8 @@ from gramps.gui.merge import MergeCitation # internationalization # #------------------------------------------------------------------------- -from gramps.gen.ggettext import gettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- diff --git a/gramps/plugins/view/citationtreeview.py b/gramps/plugins/view/citationtreeview.py index aa538be9c..999618bb6 100644 --- a/gramps/plugins/view/citationtreeview.py +++ b/gramps/plugins/view/citationtreeview.py @@ -66,7 +66,8 @@ from gramps.gui.merge import MergeCitation, MergeSource # Internationalization # #------------------------------------------------------------------------- -from gramps.gen.ggettext import gettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/plugins/view/dashboardview.py b/gramps/plugins/view/dashboardview.py index 1c9e23896..625802e1f 100644 --- a/gramps/plugins/view/dashboardview.py +++ b/gramps/plugins/view/dashboardview.py @@ -37,7 +37,8 @@ from gi.repository import Gtk # #------------------------------------------------------------------------- from gramps.gui.views.pageview import PageView -from gramps.gen.ggettext import gettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_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 c7b902364..21e48f215 100644 --- a/gramps/plugins/view/eventview.py +++ b/gramps/plugins/view/eventview.py @@ -30,7 +30,8 @@ Provide the event view. # Standard python modules # #------------------------------------------------------------------------- -from gramps.gen.ggettext import gettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext import logging _LOG = logging.getLogger(".plugins.eventview") diff --git a/gramps/plugins/view/familyview.py b/gramps/plugins/view/familyview.py index 051beabf9..72b85ed8e 100644 --- a/gramps/plugins/view/familyview.py +++ b/gramps/plugins/view/familyview.py @@ -30,7 +30,8 @@ Family View. # Standard python modules # #------------------------------------------------------------------------- -from gramps.gen.ggettext import gettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext import logging _LOG = logging.getLogger(".plugins.eventview") #------------------------------------------------------------------------- diff --git a/gramps/plugins/view/fanchartdescview.py b/gramps/plugins/view/fanchartdescview.py index 0b13912c7..348118ee1 100644 --- a/gramps/plugins/view/fanchartdescview.py +++ b/gramps/plugins/view/fanchartdescview.py @@ -35,7 +35,8 @@ from gi.repository import Gdk from gi.repository import Gtk import cairo -from gramps.gen.ggettext import gettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/plugins/view/fanchartview.py b/gramps/plugins/view/fanchartview.py index b6f51c637..3aafd4ed1 100644 --- a/gramps/plugins/view/fanchartview.py +++ b/gramps/plugins/view/fanchartview.py @@ -35,7 +35,8 @@ from gi.repository import Gdk from gi.repository import Gtk import cairo -from gramps.gen.ggettext import gettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/plugins/view/geoclose.py b/gramps/plugins/view/geoclose.py index 331423717..c68b92f2c 100644 --- a/gramps/plugins/view/geoclose.py +++ b/gramps/plugins/view/geoclose.py @@ -30,7 +30,8 @@ Geography for two persons # Python modules # #------------------------------------------------------------------------- -from gramps.gen.ggettext import gettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_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 76b69c9cd..dacb3553c 100644 --- a/gramps/plugins/view/geoevents.py +++ b/gramps/plugins/view/geoevents.py @@ -30,7 +30,8 @@ Geography for events # Python modules # #------------------------------------------------------------------------- -from gramps.gen.ggettext import gettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext import os import sys import operator diff --git a/gramps/plugins/view/geofamclose.py b/gramps/plugins/view/geofamclose.py index 05a619ab1..a47de235b 100644 --- a/gramps/plugins/view/geofamclose.py +++ b/gramps/plugins/view/geofamclose.py @@ -30,7 +30,8 @@ Geography for two families # Python modules # #------------------------------------------------------------------------- -from gramps.gen.ggettext import gettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_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 c2d7cb0ef..406f47969 100644 --- a/gramps/plugins/view/geofamily.py +++ b/gramps/plugins/view/geofamily.py @@ -30,7 +30,8 @@ Geography for one family # Python modules # #------------------------------------------------------------------------- -from gramps.gen.ggettext import gettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext import os import sys import operator diff --git a/gramps/plugins/view/geomoves.py b/gramps/plugins/view/geomoves.py index de79e1f1f..8e0138e7f 100644 --- a/gramps/plugins/view/geomoves.py +++ b/gramps/plugins/view/geomoves.py @@ -30,7 +30,8 @@ Geography for one person and all his descendant # Python modules # #------------------------------------------------------------------------- -from gramps.gen.ggettext import gettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_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 ad0dfc572..cd4103b2a 100644 --- a/gramps/plugins/view/geoperson.py +++ b/gramps/plugins/view/geoperson.py @@ -30,7 +30,8 @@ Geography for one person # Python modules # #------------------------------------------------------------------------- -from gramps.gen.ggettext import gettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext import os import sys import operator diff --git a/gramps/plugins/view/geoplaces.py b/gramps/plugins/view/geoplaces.py index 7fd3cf3ca..659c098b8 100644 --- a/gramps/plugins/view/geoplaces.py +++ b/gramps/plugins/view/geoplaces.py @@ -30,7 +30,8 @@ Geography for places # Python modules # #------------------------------------------------------------------------- -from gramps.gen.ggettext import gettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext import os import sys import time diff --git a/gramps/plugins/view/htmlrenderer.py b/gramps/plugins/view/htmlrenderer.py index c5736a54e..4d48a48cd 100644 --- a/gramps/plugins/view/htmlrenderer.py +++ b/gramps/plugins/view/htmlrenderer.py @@ -32,7 +32,8 @@ Can use the Webkit or Gecko ( Mozilla ) library # Python modules # #------------------------------------------------------------------------- -from gramps.gen.ggettext import gettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext import os import sys import locale diff --git a/gramps/plugins/view/mediaview.py b/gramps/plugins/view/mediaview.py index b8eb36a1e..9c0fa679a 100644 --- a/gramps/plugins/view/mediaview.py +++ b/gramps/plugins/view/mediaview.py @@ -31,7 +31,8 @@ Media View. # Python modules # #------------------------------------------------------------------------- -from gramps.gen.ggettext import gettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_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 7c3fab126..03b24b4ff 100644 --- a/gramps/plugins/view/noteview.py +++ b/gramps/plugins/view/noteview.py @@ -29,7 +29,8 @@ Note View. # python modules # #------------------------------------------------------------------------- -from gramps.gen.ggettext import gettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext import logging _LOG = logging.getLogger(".plugins.noteview") diff --git a/gramps/plugins/view/pedigreeview.py b/gramps/plugins/view/pedigreeview.py index 26b7a4f26..980d2958a 100644 --- a/gramps/plugins/view/pedigreeview.py +++ b/gramps/plugins/view/pedigreeview.py @@ -31,8 +31,8 @@ #------------------------------------------------------------------------- from __future__ import unicode_literals, division -from gramps.gen.ggettext import sgettext as _ -from gramps.gen.ggettext import ngettext +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_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 308619ad3..c78c45076 100644 --- a/gramps/plugins/view/personlistview.py +++ b/gramps/plugins/view/personlistview.py @@ -39,7 +39,8 @@ from gramps.gui.views.treemodels.peoplemodel import PersonListModel # Internationalization # #------------------------------------------------------------------------- -from gramps.gen.ggettext import gettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/plugins/view/persontreeview.py b/gramps/plugins/view/persontreeview.py index 0b6d65838..e00696598 100644 --- a/gramps/plugins/view/persontreeview.py +++ b/gramps/plugins/view/persontreeview.py @@ -51,7 +51,8 @@ from gramps.gen.utils.db import preset_name # Internationalization # #------------------------------------------------------------------------- -from gramps.gen.ggettext import gettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/plugins/view/placelistview.py b/gramps/plugins/view/placelistview.py index ba8c8232c..c14a3f9a0 100644 --- a/gramps/plugins/view/placelistview.py +++ b/gramps/plugins/view/placelistview.py @@ -36,7 +36,8 @@ from gramps.gui.views.treemodels.placemodel import PlaceListModel # Internationalization # #------------------------------------------------------------------------- -from gramps.gen.ggettext import gettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/plugins/view/placetreeview.py b/gramps/plugins/view/placetreeview.py index 16819dc40..923d83046 100644 --- a/gramps/plugins/view/placetreeview.py +++ b/gramps/plugins/view/placetreeview.py @@ -42,7 +42,8 @@ from gramps.gui.editors import EditPlace # Internationalization # #------------------------------------------------------------------------- -from gramps.gen.ggettext import gettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- # diff --git a/gramps/plugins/view/relview.py b/gramps/plugins/view/relview.py index a5e7dd6de..4886c6414 100644 --- a/gramps/plugins/view/relview.py +++ b/gramps/plugins/view/relview.py @@ -30,8 +30,9 @@ from __future__ import unicode_literals # Python modules # #------------------------------------------------------------------------- -from gramps.gen.ggettext import sgettext as _ -from gramps.gen.ggettext import ngettext +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().sgettext +ngettext = glocale.get_translation().ngettext import cgi #------------------------------------------------------------------------- diff --git a/gramps/plugins/view/repoview.py b/gramps/plugins/view/repoview.py index 0ebda2cc2..52473b386 100644 --- a/gramps/plugins/view/repoview.py +++ b/gramps/plugins/view/repoview.py @@ -54,7 +54,8 @@ from gramps.gen.plug import CATEGORY_QR_REPOSITORY # internationalization # #------------------------------------------------------------------------- -from gramps.gen.ggettext import gettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- diff --git a/gramps/plugins/view/sourceview.py b/gramps/plugins/view/sourceview.py index 444c71cf7..fee0e2c09 100644 --- a/gramps/plugins/view/sourceview.py +++ b/gramps/plugins/view/sourceview.py @@ -58,7 +58,8 @@ from gramps.gen.plug import CATEGORY_QR_SOURCE # internationalization # #------------------------------------------------------------------------- -from gramps.gen.ggettext import gettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().gettext #------------------------------------------------------------------------- diff --git a/gramps/plugins/webreport/narrativeweb.py b/gramps/plugins/webreport/narrativeweb.py index f1b367363..eaa484db0 100644 --- a/gramps/plugins/webreport/narrativeweb.py +++ b/gramps/plugins/webreport/narrativeweb.py @@ -106,7 +106,8 @@ log = logging.getLogger(".NarrativeWeb") #------------------------------------------------ # GRAMPS module #------------------------------------------------ -from gramps.gen.ggettext import sgettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_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 c70bab99a..e91ec0337 100644 --- a/gramps/plugins/webreport/webcal.py +++ b/gramps/plugins/webreport/webcal.py @@ -36,9 +36,8 @@ Web Calendar generator. from functools import partial import os, codecs, shutil, re import datetime, calendar -from gramps.gen.ggettext import sgettext as _ -from gramps.gen.ggettext import ngettext - +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().sgettext #------------------------------------------------------------------------ # Set up logging @@ -1689,10 +1688,11 @@ def get_day_list(event_date, holiday_list, bday_anniv_list): txt_str = _('%(couple)s, wedding') % { 'couple' : text} else: - txt_str = (ngettext('%(couple)s, %(years)d' - ' year anniversary', - '%(couple)s, %(years)d' - ' year anniversary', nyears) + txt_str = (glocale.get_translation().ngettext( + '%(couple)s, %(years)d' + ' year anniversary', + '%(couple)s, %(years)d' + ' year anniversary', nyears) % {'couple' : text, 'years' : nyears}) txt_str = Html('span', txt_str, class_ = "yearsmarried") diff --git a/gramps/plugins/webstuff/webstuff.py b/gramps/plugins/webstuff/webstuff.py index 3220e367b..5be4ca0ee 100644 --- a/gramps/plugins/webstuff/webstuff.py +++ b/gramps/plugins/webstuff/webstuff.py @@ -26,7 +26,8 @@ #------------------------------------------------ import os from gramps.gen.const import VERSION_DIR -from gramps.gen.ggettext import sgettext as _ +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.get_translation().sgettext def make_css_dict(tup): """