diff --git a/src/Filters/Rules/_ChangedSinceBase.py b/src/Filters/Rules/_ChangedSinceBase.py index 05ce6dec3..18f05a50f 100644 --- a/src/Filters/Rules/_ChangedSinceBase.py +++ b/src/Filters/Rules/_ChangedSinceBase.py @@ -26,6 +26,7 @@ # Standard Python modules # #------------------------------------------------------------------------- +from gen.ggettext import gettext as _ import re import time @@ -51,7 +52,7 @@ class ChangedSinceBase(Rule): description = "Matches object records changed after a specified " \ "date/time (yyyy-mm-dd hh:mm:ss) or in range, if a second " \ "date/time is given." - category = 'General filters' + category = _('General filters') def add_time(self, date): if re.search("\d.*\s+\d{1,2}:\d{2}:\d{2}", date): diff --git a/src/Filters/Rules/_Everything.py b/src/Filters/Rules/_Everything.py index 44efb105f..11a0801f8 100644 --- a/src/Filters/Rules/_Everything.py +++ b/src/Filters/Rules/_Everything.py @@ -20,6 +20,13 @@ # $Id$ +#------------------------------------------------------------------------- +# +# Standard Python modules +# +#------------------------------------------------------------------------- +from gen.ggettext import gettext as _ + #------------------------------------------------------------------------- # # GRAMPS modules @@ -36,7 +43,7 @@ class Everything(Rule): """Match Everyone.""" name = 'Every object' - category = 'General filters' + category = _('General filters') description = 'Matches every object in the database' def is_empty(self): diff --git a/src/Filters/Rules/_HasAttributeBase.py b/src/Filters/Rules/_HasAttributeBase.py index 1ad8f96ad..4ec92a733 100644 --- a/src/Filters/Rules/_HasAttributeBase.py +++ b/src/Filters/Rules/_HasAttributeBase.py @@ -20,6 +20,13 @@ # $Id$ +#------------------------------------------------------------------------- +# +# Standard Python modules +# +#------------------------------------------------------------------------- +from gen.ggettext import gettext as _ + #------------------------------------------------------------------------- # # GRAMPS modules @@ -42,7 +49,7 @@ class HasAttributeBase(Rule): name = 'Objects with the ' description = "Matches objects with the given attribute " \ "of a particular value" - category = 'General filters' + category = _('General filters') def apply(self, db, obj): if not self.list[0]: diff --git a/src/Filters/Rules/_HasCitationBase.py b/src/Filters/Rules/_HasCitationBase.py index e850cbff5..bb0855bdf 100644 --- a/src/Filters/Rules/_HasCitationBase.py +++ b/src/Filters/Rules/_HasCitationBase.py @@ -21,6 +21,13 @@ # $Id$ +#------------------------------------------------------------------------- +# +# Standard Python modules +# +#------------------------------------------------------------------------- +from gen.ggettext import gettext as _ + #------------------------------------------------------------------------- # # GRAMPS modules @@ -46,7 +53,7 @@ class HasCitationBase(Rule): 'Confidence:' ] name = 'Citations matching parameters' description = "Matches citations with particular parameters" - category = 'Citation/source filters' + category = _('Citation/source filters') def prepare(self, db): self.date = None diff --git a/src/Filters/Rules/_HasEventBase.py b/src/Filters/Rules/_HasEventBase.py index 7bf10101b..cec5f4db2 100644 --- a/src/Filters/Rules/_HasEventBase.py +++ b/src/Filters/Rules/_HasEventBase.py @@ -20,6 +20,13 @@ # $Id$ +#------------------------------------------------------------------------- +# +# Standard Python modules +# +#------------------------------------------------------------------------- +from gen.ggettext import gettext as _ + #------------------------------------------------------------------------- # # GRAMPS modules @@ -46,7 +53,7 @@ class HasEventBase(Rule): 'Main Participants' ] name = 'Events matching parameters' description = "Matches events with particular parameters" - category = 'Event filters' + category = _('Event filters') def prepare(self, db): self.date = None diff --git a/src/Filters/Rules/_HasGalleryBase.py b/src/Filters/Rules/_HasGalleryBase.py index 1901fd2da..caa7d4434 100755 --- a/src/Filters/Rules/_HasGalleryBase.py +++ b/src/Filters/Rules/_HasGalleryBase.py @@ -23,6 +23,13 @@ # $Id$ # +#------------------------------------------------------------------------- +# +# Standard Python modules +# +#------------------------------------------------------------------------- +from gen.ggettext import gettext as _ + #------------------------------------------------------------------------- # # GRAMPS modules @@ -36,10 +43,10 @@ from Filters.Rules import Rule class HasGalleryBase(Rule): """Objects who have Media Object""" - labels = [ 'Number of instances:', 'Number must be:'] + labels = [ _('Number of instances:'), _('Number must be:')] name = 'Object with Media references' description = "Matches objects with certain number of items in the gallery" - category = 'General filters' + category = _('General filters') def prepare(self, db): # things we want to do just once, not for every handle diff --git a/src/Filters/Rules/_HasGrampsId.py b/src/Filters/Rules/_HasGrampsId.py index bb5935367..e65d03b33 100644 --- a/src/Filters/Rules/_HasGrampsId.py +++ b/src/Filters/Rules/_HasGrampsId.py @@ -21,6 +21,13 @@ # $Id$ +#------------------------------------------------------------------------- +# +# Standard Python modules +# +#------------------------------------------------------------------------- +from gen.ggettext import gettext as _ + #------------------------------------------------------------------------- # # GRAMPS modules @@ -36,10 +43,10 @@ from Filters.Rules import Rule class HasGrampsId(Rule): """Rule that checks for an object with a specific GRAMPS ID.""" - labels = [ 'ID:' ] + labels = [ _('ID:') ] name = 'Object with ' description = "Matches objects with a specified Gramps ID" - category = 'General filters' + category = _('General filters') def apply(self, db, obj): """ diff --git a/src/Filters/Rules/_HasLDSBase.py b/src/Filters/Rules/_HasLDSBase.py index 38c324b78..cb3e2a311 100755 --- a/src/Filters/Rules/_HasLDSBase.py +++ b/src/Filters/Rules/_HasLDSBase.py @@ -23,6 +23,13 @@ # $Id$ # +#------------------------------------------------------------------------- +# +# Standard Python modules +# +#------------------------------------------------------------------------- +from gen.ggettext import gettext as _ + #------------------------------------------------------------------------- # # GRAMPS modules @@ -39,10 +46,10 @@ from Filters.Rules import Rule class HasLDSBase(Rule): """Rule that checks for object with a LDS event""" - labels = [ 'Number of instances:', 'Number must be:'] + labels = [ _('Number of instances:'), _('Number must be:')] name = 'Objects with LDS events' description = "Matches objects with LDS events" - category = 'General filters' + category = _('General filters') def prepare(self, db): # things we want to do just once, not for every handle diff --git a/src/Filters/Rules/_HasNoteBase.py b/src/Filters/Rules/_HasNoteBase.py index 6c9a9f99a..5be11ccd4 100755 --- a/src/Filters/Rules/_HasNoteBase.py +++ b/src/Filters/Rules/_HasNoteBase.py @@ -24,6 +24,13 @@ # $Id$ # +#------------------------------------------------------------------------- +# +# Standard Python modules +# +#------------------------------------------------------------------------- +from gen.ggettext import gettext as _ + #------------------------------------------------------------------------- # # GRAMPS modules @@ -37,10 +44,10 @@ from Filters.Rules._Rule import Rule class HasNoteBase(Rule): """Objects having notes""" - labels = [ 'Number of instances:', 'Number must be:'] + labels = [ _('Number of instances:'), _('Number must be:')] name = 'Object with notes' description = "Matches objects that have a certain number of notes" - category = 'General filters' + category = _('General filters') def __init__(self, arg): # Upgrade from pre 3.1 HasNote filter, use defaults that correspond diff --git a/src/Filters/Rules/_HasNoteRegexBase.py b/src/Filters/Rules/_HasNoteRegexBase.py index a3d1b2fc8..1e62fdb9b 100644 --- a/src/Filters/Rules/_HasNoteRegexBase.py +++ b/src/Filters/Rules/_HasNoteRegexBase.py @@ -26,6 +26,7 @@ # #------------------------------------------------------------------------- import re +from gen.ggettext import gettext as _ #------------------------------------------------------------------------- # @@ -40,11 +41,11 @@ from Filters.Rules import Rule class HasNoteRegexBase(Rule): """People having notes containing .""" - labels = [ 'Regular expression:'] + labels = [ _('Regular expression:')] name = 'Objects having notes containing ' description = "Matches objects whose notes contain text " \ "matching a regular expression" - category = 'General filters' + category = _('General filters') def __init__(self, list): Rule.__init__(self, list) diff --git a/src/Filters/Rules/_HasNoteSubstrBase.py b/src/Filters/Rules/_HasNoteSubstrBase.py index 678258868..737008d42 100644 --- a/src/Filters/Rules/_HasNoteSubstrBase.py +++ b/src/Filters/Rules/_HasNoteSubstrBase.py @@ -20,6 +20,13 @@ # $Id$ +#------------------------------------------------------------------------- +# +# Standard Python modules +# +#------------------------------------------------------------------------- +from gen.ggettext import gettext as _ + #------------------------------------------------------------------------- # # GRAMPS modules @@ -33,11 +40,11 @@ from Filters.Rules import Rule class HasNoteSubstrBase(Rule): """People having notes containing .""" - labels = [ 'Substring:'] + labels = [ _('Substring:')] name = 'Objects having notes containing ' description = "Matches objects whose notes contain text matching a " \ "substring" - category = 'General filters' + category = _('General filters') def apply(self, db, person): notelist = person.get_note_list() diff --git a/src/Filters/Rules/_HasReferenceCountBase.py b/src/Filters/Rules/_HasReferenceCountBase.py index 99a60a10c..e2aa7dd68 100644 --- a/src/Filters/Rules/_HasReferenceCountBase.py +++ b/src/Filters/Rules/_HasReferenceCountBase.py @@ -20,6 +20,13 @@ # $Id$ +#------------------------------------------------------------------------- +# +# Standard Python modules +# +#------------------------------------------------------------------------- +from gen.ggettext import gettext as _ + #------------------------------------------------------------------------- # # GRAMPS modules @@ -33,10 +40,10 @@ from Filters.Rules import Rule class HasReferenceCountBase(Rule): """Objects with a reference count of .""" - labels = [ 'Reference count must be:', 'Reference count:'] + labels = [ _('Reference count must be:'), _('Reference count:')] name = 'Objects with a reference count of ' description = "Matches objects with a certain reference count" - category = 'General filters' + category = _('General filters') def prepare(self, db): diff --git a/src/Filters/Rules/_HasSourceBase.py b/src/Filters/Rules/_HasSourceBase.py index 4c9b2ce42..3b531ce29 100644 --- a/src/Filters/Rules/_HasSourceBase.py +++ b/src/Filters/Rules/_HasSourceBase.py @@ -21,6 +21,13 @@ # $Id$ +#------------------------------------------------------------------------- +# +# Standard Python modules +# +#------------------------------------------------------------------------- +from gen.ggettext import gettext as _ + #------------------------------------------------------------------------- # # GRAMPS modules @@ -43,7 +50,7 @@ class HasSourceBase(Rule): 'Publication:' ] name = 'Sources matching parameters' description = "Matches sources with particular parameters" - category = 'Citation/source filters' + category = _('Citation/source filters') def apply(self,db,source): if not self.match_substring(0,source.get_title()): diff --git a/src/Filters/Rules/_HasSourceCountBase.py b/src/Filters/Rules/_HasSourceCountBase.py index cfdd0b815..b6dc75e33 100755 --- a/src/Filters/Rules/_HasSourceCountBase.py +++ b/src/Filters/Rules/_HasSourceCountBase.py @@ -23,6 +23,13 @@ # $Id$ +#------------------------------------------------------------------------- +# +# Standard Python modules +# +#------------------------------------------------------------------------- +from gen.ggettext import gettext as _ + #------------------------------------------------------------------------- # # GRAMPS modules @@ -36,11 +43,11 @@ from Filters.Rules._Rule import Rule class HasSourceCountBase(Rule): """Objects having sources""" - labels = [ 'Number of instances:', 'Number must be:'] + labels = [ _('Number of instances:'), _('Number must be:')] name = 'Objects with sources' description = "Matches objects that have a certain number of sources " \ "connected to it (actually citations are counted)" - category = 'Citation/source filters' + category = _('Citation/source filters') def prepare(self, db): # things we want to do just once, not for every handle diff --git a/src/Filters/Rules/_HasTagBase.py b/src/Filters/Rules/_HasTagBase.py index cc91237b2..6c6ab742c 100644 --- a/src/Filters/Rules/_HasTagBase.py +++ b/src/Filters/Rules/_HasTagBase.py @@ -22,6 +22,13 @@ Rule that checks for an object with a particular tag. """ +#------------------------------------------------------------------------- +# +# Standard Python modules +# +#------------------------------------------------------------------------- +from gen.ggettext import gettext as _ + #------------------------------------------------------------------------- # # GRAMPS modules @@ -42,7 +49,7 @@ class HasTagBase(Rule): labels = [ 'Tag:' ] name = 'Objects with the ' description = "Matches objects with the given tag" - category = 'General filters' + category = _('General filters') def prepare(self, db): """ diff --git a/src/Filters/Rules/_HasTextMatchingRegexpOf.py b/src/Filters/Rules/_HasTextMatchingRegexpOf.py index a35f7b409..8b38b2ef5 100644 --- a/src/Filters/Rules/_HasTextMatchingRegexpOf.py +++ b/src/Filters/Rules/_HasTextMatchingRegexpOf.py @@ -20,12 +20,6 @@ # $Id$ -#------------------------------------------------------------------------- -# -# Standard Python modules -# -#------------------------------------------------------------------------- - #------------------------------------------------------------------------- # # GRAMPS modules diff --git a/src/Filters/Rules/_HasTextMatchingSubstringOf.py b/src/Filters/Rules/_HasTextMatchingSubstringOf.py index 8453b6588..51512e502 100644 --- a/src/Filters/Rules/_HasTextMatchingSubstringOf.py +++ b/src/Filters/Rules/_HasTextMatchingSubstringOf.py @@ -20,6 +20,13 @@ # $Id$ +#------------------------------------------------------------------------- +# +# Standard Python modules +# +#------------------------------------------------------------------------- +from gen.ggettext import gettext as _ + #------------------------------------------------------------------------- # # GRAMPS modules @@ -39,7 +46,7 @@ class HasTextMatchingSubstringOf(Rule): name = 'Objects with records containing ' description = "Matches objects whose records contain text " \ "matching a substring" - category = 'General filters' + category = _('General filters') # FIXME: This needs to be written for an arbitrary object # if possible diff --git a/src/Filters/Rules/_MatchesEventFilterBase.py b/src/Filters/Rules/_MatchesEventFilterBase.py index 1482646e0..bca9a1ba2 100644 --- a/src/Filters/Rules/_MatchesEventFilterBase.py +++ b/src/Filters/Rules/_MatchesEventFilterBase.py @@ -20,6 +20,13 @@ # $Id$ +#------------------------------------------------------------------------- +# +# Standard Python modules +# +#------------------------------------------------------------------------- +from gen.ggettext import gettext as _ + #------------------------------------------------------------------------- # # GRAMPS modules @@ -45,7 +52,7 @@ class MatchesEventFilterBase(MatchesFilterBase): name = 'Objects with events matching the ' description = "Matches objects who have events that match a certain" \ " event filter" - category = 'General filters' + category = _('General filters') # we want to have this filter show event filters namespace = 'Event' diff --git a/src/Filters/Rules/_MatchesFilterBase.py b/src/Filters/Rules/_MatchesFilterBase.py index ca9207ddf..76040ebb2 100644 --- a/src/Filters/Rules/_MatchesFilterBase.py +++ b/src/Filters/Rules/_MatchesFilterBase.py @@ -20,6 +20,13 @@ # $Id$ +#------------------------------------------------------------------------- +# +# Standard Python modules +# +#------------------------------------------------------------------------- +from gen.ggettext import gettext as _ + #------------------------------------------------------------------------- # # GRAMPS modules @@ -42,10 +49,10 @@ class MatchesFilterBase(Rule): """ - labels = ['Filter name:'] + labels = [_('Filter name:')] name = 'Objects matching the ' description = "Matches objects matched by the specified filter name" - category = 'General filters' + category = _('General filters') def prepare(self, db): if Filters.CustomFilters: diff --git a/src/Filters/Rules/_MatchesSourceConfidenceBase.py b/src/Filters/Rules/_MatchesSourceConfidenceBase.py index 70d2b10da..29385e8e6 100644 --- a/src/Filters/Rules/_MatchesSourceConfidenceBase.py +++ b/src/Filters/Rules/_MatchesSourceConfidenceBase.py @@ -24,6 +24,13 @@ # $Id$ # +#------------------------------------------------------------------------- +# +# Standard Python modules +# +#------------------------------------------------------------------------- +from gen.ggettext import gettext as _ + #------------------------------------------------------------------------- # # GRAMPS modules @@ -41,7 +48,7 @@ class MatchesSourceConfidenceBase(Rule): labels = ['Confidence level:'] name = 'Object with at least one direct source >= ' description = "Matches objects with at least one direct source with confidence level(s)" - category = 'Citation/source filters' + category = _('Citation/source filters') def apply(self, db, obj): required_conf = int(self.list[0]) diff --git a/src/Filters/Rules/_MatchesSourceFilterBase.py b/src/Filters/Rules/_MatchesSourceFilterBase.py index e60faee00..0f5958241 100644 --- a/src/Filters/Rules/_MatchesSourceFilterBase.py +++ b/src/Filters/Rules/_MatchesSourceFilterBase.py @@ -21,6 +21,13 @@ # $Id$ +#------------------------------------------------------------------------- +# +# Standard Python modules +# +#------------------------------------------------------------------------- +from gen.ggettext import gettext as _ + #------------------------------------------------------------------------- # # GRAMPS modules @@ -38,11 +45,11 @@ class MatchesSourceFilterBase(MatchesFilterBase): Rule that checks against another filter. """ - labels = ['Source filter name:'] + labels = [_('Source filter name:')] name = 'Objects with source matching the ' description = "Matches objects with sources that match the " \ "specified source filter name" - category = 'Citation/source filters' + category = _('Citation/source filters') # we want to have this filter show source filters namespace = 'Source' diff --git a/src/Filters/Rules/_RegExpIdBase.py b/src/Filters/Rules/_RegExpIdBase.py index 06ff7a753..bb682078c 100644 --- a/src/Filters/Rules/_RegExpIdBase.py +++ b/src/Filters/Rules/_RegExpIdBase.py @@ -26,6 +26,7 @@ # #------------------------------------------------------------------------- import re +from gen.ggettext import gettext as _ #------------------------------------------------------------------------- # @@ -44,11 +45,11 @@ class RegExpIdBase(Rule): Rule that checks for an object whose GRAMPS ID matches regular expression. """ - labels = [ 'Regular expression:' ] + labels = [ _('Regular expression:') ] name = 'Objects with ' description = "Matches objects whose Gramps ID matches " \ "the regular expression" - category = 'General filters' + category = _('General filters') def __init__(self, list): Rule.__init__(self, list)