5621: do not need to call gettext if strings are not used and displayed (TODO: check strings used on sidebar filters)
svn: r19193
This commit is contained in:
parent
6c7f3d65bc
commit
08581e7ca8
@ -26,7 +26,6 @@
|
|||||||
# Standard Python modules
|
# Standard Python modules
|
||||||
#
|
#
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
from gen.ggettext import gettext as _
|
|
||||||
import re
|
import re
|
||||||
import time
|
import time
|
||||||
|
|
||||||
@ -47,12 +46,12 @@ class ChangedSinceBase(Rule):
|
|||||||
Rule that checks for primary objects changed since a specific time.
|
Rule that checks for primary objects changed since a specific time.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
labels = [ _('Changed after:'), _('but before:') ]
|
labels = [ 'Changed after:', 'but before:' ]
|
||||||
name = _('Objects changed after <date time>')
|
name = 'Objects changed after <date time>'
|
||||||
description = _("Matches object records changed after a specified "
|
description = "Matches object records changed after a specified " \
|
||||||
"date/time (yyyy-mm-dd hh:mm:ss) or in range, if a second "
|
"date/time (yyyy-mm-dd hh:mm:ss) or in range, if a second " \
|
||||||
"date/time is given.")
|
"date/time is given."
|
||||||
category = _('General filters')
|
category = 'General filters'
|
||||||
|
|
||||||
def add_time(self, date):
|
def add_time(self, date):
|
||||||
if re.search("\d.*\s+\d{1,2}:\d{2}:\d{2}", date):
|
if re.search("\d.*\s+\d{1,2}:\d{2}:\d{2}", date):
|
||||||
|
@ -23,13 +23,6 @@
|
|||||||
# $Id$
|
# $Id$
|
||||||
#
|
#
|
||||||
|
|
||||||
#-------------------------------------------------------------------------
|
|
||||||
#
|
|
||||||
# Standard Python modules
|
|
||||||
#
|
|
||||||
#-------------------------------------------------------------------------
|
|
||||||
from gen.ggettext import gettext as _
|
|
||||||
|
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
# GRAMPS modules
|
# GRAMPS modules
|
||||||
@ -46,10 +39,10 @@ from Filters.Rules import Rule
|
|||||||
class HasLDSBase(Rule):
|
class HasLDSBase(Rule):
|
||||||
"""Rule that checks for object with a LDS event"""
|
"""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')
|
name = 'Objects with LDS events'
|
||||||
description = _("Matches objects with LDS events")
|
description = "Matches objects with LDS events"
|
||||||
category = _('General filters')
|
category = 'General filters'
|
||||||
|
|
||||||
def prepare(self, db):
|
def prepare(self, db):
|
||||||
# things we want to do just once, not for every handle
|
# things we want to do just once, not for every handle
|
||||||
|
@ -24,13 +24,6 @@
|
|||||||
# $Id$
|
# $Id$
|
||||||
#
|
#
|
||||||
|
|
||||||
#-------------------------------------------------------------------------
|
|
||||||
#
|
|
||||||
# Standard Python modules
|
|
||||||
#
|
|
||||||
#-------------------------------------------------------------------------
|
|
||||||
from gen.ggettext import gettext as _
|
|
||||||
|
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
# GRAMPS modules
|
# GRAMPS modules
|
||||||
@ -44,10 +37,10 @@ from Filters.Rules._Rule import Rule
|
|||||||
class HasNoteBase(Rule):
|
class HasNoteBase(Rule):
|
||||||
"""Objects having notes"""
|
"""Objects having notes"""
|
||||||
|
|
||||||
labels = [ _('Number of instances:'), _('Number must be:')]
|
labels = [ 'Number of instances:', 'Number must be:']
|
||||||
name = _('Object with notes')
|
name = 'Object with notes'
|
||||||
description = _("Matches objects that have a certain number of notes")
|
description = "Matches objects that have a certain number of notes"
|
||||||
category = _('General filters')
|
category = 'General filters'
|
||||||
|
|
||||||
def __init__(self, arg):
|
def __init__(self, arg):
|
||||||
# Upgrade from pre 3.1 HasNote filter, use defaults that correspond
|
# Upgrade from pre 3.1 HasNote filter, use defaults that correspond
|
||||||
|
@ -26,7 +26,6 @@
|
|||||||
#
|
#
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
import re
|
import re
|
||||||
from gen.ggettext import gettext as _
|
|
||||||
|
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
@ -41,11 +40,11 @@ from Filters.Rules import Rule
|
|||||||
class HasNoteRegexBase(Rule):
|
class HasNoteRegexBase(Rule):
|
||||||
"""People having notes containing <substring>."""
|
"""People having notes containing <substring>."""
|
||||||
|
|
||||||
labels = [ _('Regular expression:')]
|
labels = [ 'Regular expression:']
|
||||||
name = _('Objects having notes containing <regular expression>')
|
name = 'Objects having notes containing <regular expression>'
|
||||||
description = _("Matches objects whose notes contain text "
|
description = "Matches objects whose notes contain text " \
|
||||||
"matching a regular expression")
|
"matching a regular expression"
|
||||||
category = _('General filters')
|
category = 'General filters'
|
||||||
|
|
||||||
def __init__(self, list):
|
def __init__(self, list):
|
||||||
Rule.__init__(self, list)
|
Rule.__init__(self, list)
|
||||||
|
@ -20,13 +20,6 @@
|
|||||||
|
|
||||||
# $Id$
|
# $Id$
|
||||||
|
|
||||||
#-------------------------------------------------------------------------
|
|
||||||
#
|
|
||||||
# Standard Python modules
|
|
||||||
#
|
|
||||||
#-------------------------------------------------------------------------
|
|
||||||
from gen.ggettext import gettext as _
|
|
||||||
|
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
# GRAMPS modules
|
# GRAMPS modules
|
||||||
@ -40,11 +33,11 @@ from Filters.Rules import Rule
|
|||||||
class HasNoteSubstrBase(Rule):
|
class HasNoteSubstrBase(Rule):
|
||||||
"""People having notes containing <substring>."""
|
"""People having notes containing <substring>."""
|
||||||
|
|
||||||
labels = [ _('Substring:')]
|
labels = [ 'Substring:']
|
||||||
name = _('Objects having notes containing <substring>')
|
name = 'Objects having notes containing <substring>'
|
||||||
description = _("Matches objects whose notes contain text matching a "
|
description = "Matches objects whose notes contain text matching a " \
|
||||||
"substring")
|
"substring"
|
||||||
category = _('General filters')
|
category = 'General filters'
|
||||||
|
|
||||||
def apply(self, db, person):
|
def apply(self, db, person):
|
||||||
notelist = person.get_note_list()
|
notelist = person.get_note_list()
|
||||||
|
@ -20,13 +20,6 @@
|
|||||||
|
|
||||||
# $Id$
|
# $Id$
|
||||||
|
|
||||||
#-------------------------------------------------------------------------
|
|
||||||
#
|
|
||||||
# Standard Python modules
|
|
||||||
#
|
|
||||||
#-------------------------------------------------------------------------
|
|
||||||
from gen.ggettext import gettext as _
|
|
||||||
|
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
# GRAMPS modules
|
# GRAMPS modules
|
||||||
@ -40,10 +33,10 @@ from Filters.Rules import Rule
|
|||||||
class HasReferenceCountBase(Rule):
|
class HasReferenceCountBase(Rule):
|
||||||
"""Objects with a reference count of <count>."""
|
"""Objects with a reference count of <count>."""
|
||||||
|
|
||||||
labels = [ _('Reference count must be:'), _('Reference count:')]
|
labels = [ 'Reference count must be:', 'Reference count:']
|
||||||
name = _('Objects with a reference count of <count>')
|
name = 'Objects with a reference count of <count>'
|
||||||
description = _("Matches objects with a certain reference count")
|
description = "Matches objects with a certain reference count"
|
||||||
category = _('General filters')
|
category = 'General filters'
|
||||||
|
|
||||||
|
|
||||||
def prepare(self, db):
|
def prepare(self, db):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user