Remove extraneous whitespace before assignment

This commit is contained in:
Nick Hall
2019-01-07 19:25:08 +00:00
parent 2a5fee85c5
commit 976edfbf1d
364 changed files with 1613 additions and 1613 deletions

View File

@@ -51,9 +51,9 @@ class DateParserDE(DateParser):
# Always add german and austrian name variants no matter what the current
# locale is
month_to_int["januar"] = 1
month_to_int["jan"] = 1
month_to_int["jan"] = 1
month_to_int["jänner"] = 1
month_to_int["jän"] = 1
month_to_int["jän"] = 1
# Add other common latin,
@@ -121,14 +121,14 @@ class DateParserDE(DateParser):
# local and historical variants
month_to_int["jenner"] = 1
month_to_int["feber"] = 2
month_to_int["merz"] = 3
month_to_int["augst"] = 8
month_to_int["7ber"] = 9
month_to_int["8ber"] = 10
month_to_int["9ber"] = 11
month_to_int["10ber"] = 12
month_to_int["xber"] = 12
month_to_int["feber"] = 2
month_to_int["merz"] = 3
month_to_int["augst"] = 8
month_to_int["7ber"] = 9
month_to_int["8ber"] = 10
month_to_int["9ber"] = 11
month_to_int["10ber"] = 12
month_to_int["xber"] = 12
# old german names

View File

@@ -55,7 +55,7 @@ class DateParserHU(DateParser):
month_to_int["-"]=0 #to make the Zero month to work
month_to_int["január"] = 1
month_to_int["jan"] = 1
month_to_int["jan"] = 1
month_to_int["jan."] = 1
month_to_int["I"] = 1
# month_to_int["i"] = 1
@@ -64,67 +64,67 @@ class DateParserHU(DateParser):
month_to_int["feb"] = 2
month_to_int["feb."] = 2
month_to_int["II"] = 2
# month_to_int["ii"] = 2
# month_to_int["ii"] = 2
month_to_int["március"] = 3
month_to_int["márc"] = 3
month_to_int["márc."] = 3
month_to_int["III"] = 3
# month_to_int["iii"] = 3
# month_to_int["iii"] = 3
month_to_int["április"] = 4
month_to_int["ápr"] = 4
month_to_int["ápr."] = 4
month_to_int["IV"] = 4
# month_to_int["iv"] = 4
month_to_int["IV"] = 4
# month_to_int["iv"] = 4
month_to_int["május"] = 5
month_to_int["máj"] = 5
month_to_int["máj."] = 5
month_to_int["V"] = 5
# month_to_int["v"] = 5
month_to_int["V"] = 5
# month_to_int["v"] = 5
month_to_int["június"] = 6
month_to_int["jún"] = 6
month_to_int["jún."] = 6
month_to_int["VI"] = 6
# month_to_int["vi"] = 6
month_to_int["VI"] = 6
# month_to_int["vi"] = 6
month_to_int["július"] = 7
month_to_int["júl"] = 7
month_to_int["júl."] = 7
month_to_int["VII"] = 7
# month_to_int["vii"] = 7
month_to_int["július"] = 7
month_to_int["júl"] = 7
month_to_int["júl."] = 7
month_to_int["VII"] = 7
# month_to_int["vii"] = 7
month_to_int["augusztus"] = 8
month_to_int["aug"] = 8
month_to_int["aug."] = 8
month_to_int["VIII"] = 8
# month_to_int["viii"] = 8
month_to_int["augusztus"] = 8
month_to_int["aug"] = 8
month_to_int["aug."] = 8
month_to_int["VIII"] = 8
# month_to_int["viii"] = 8
month_to_int["szeptember"] = 9
month_to_int["szept"] = 9
month_to_int["szeptember"] = 9
month_to_int["szept"] = 9
month_to_int["szept."] = 9
month_to_int["IX"] = 9
# month_to_int["ix"] = 9
month_to_int["IX"] = 9
# month_to_int["ix"] = 9
month_to_int["október"] = 10
month_to_int["okt"] = 10
month_to_int["okt."] = 10
month_to_int["X"] = 10
# month_to_int["x"] = 10
month_to_int["október"] = 10
month_to_int["okt"] = 10
month_to_int["okt."] = 10
month_to_int["X"] = 10
# month_to_int["x"] = 10
month_to_int["november"] = 11
month_to_int["nov"] = 11
month_to_int["november"] = 11
month_to_int["nov"] = 11
month_to_int["nov."] = 11
month_to_int["XI"] = 11
# month_to_int["xi"] = 11
month_to_int["XI"] = 11
# month_to_int["xi"] = 11
month_to_int["december"] = 12
month_to_int["dec"] = 12
month_to_int["dec."] = 12
month_to_int["XII"] = 12
# month_to_int["xii"] = 12
month_to_int["december"] = 12
month_to_int["dec"] = 12
month_to_int["dec."] = 12
month_to_int["XII"] = 12
# month_to_int["xii"] = 12
#-----------------------------------------------------------------------

View File

@@ -57,30 +57,30 @@ class DateParserNL(DateParser):
# Always add dutch and flemish name variants
# no matter what the current locale is
month_to_int["januari"] = 1
month_to_int["jan"] = 1
month_to_int["jan"] = 1
# Add other common latin, local and historical variants
month_to_int["januaris"] = 1
month_to_int["feber"] = 2
month_to_int["februaris"] = 2
month_to_int["merz"] = 3
month_to_int["feber"] = 2
month_to_int["februaris"] = 2
month_to_int["merz"] = 3
#make sure on all distro mrt and maa are accepted
month_to_int["maa"] = 3
month_to_int["mrt"] = 3
month_to_int["aprilis"] = 4
month_to_int["maius"] = 5
month_to_int["junius"] = 6
month_to_int["julius"] = 7
month_to_int["augst"] = 8
month_to_int["7ber"] = 9
month_to_int["7bris"] = 9
month_to_int["8ber"] = 10
month_to_int["8bris"] = 10
month_to_int["9ber"] = 11
month_to_int["9bris"] = 11
month_to_int["10ber"] = 12
month_to_int["10bris"] = 12
month_to_int["xber"] = 12
month_to_int["xbris"] = 12
month_to_int["maa"] = 3
month_to_int["mrt"] = 3
month_to_int["aprilis"] = 4
month_to_int["maius"] = 5
month_to_int["junius"] = 6
month_to_int["julius"] = 7
month_to_int["augst"] = 8
month_to_int["7ber"] = 9
month_to_int["7bris"] = 9
month_to_int["8ber"] = 10
month_to_int["8bris"] = 10
month_to_int["9ber"] = 11
month_to_int["9bris"] = 11
month_to_int["10ber"] = 12
month_to_int["10bris"] = 12
month_to_int["xber"] = 12
month_to_int["xbris"] = 12
modifier_to_int = {
'voor' : Date.MOD_BEFORE,

View File

@@ -54,38 +54,38 @@ class DateParserPL(DateParser):
month_to_int["styczeń"] = 1
month_to_int["sty"] = 1
month_to_int["I"] = 1
month_to_int["luty"] = 2
month_to_int["lut"] = 2
month_to_int["II"] = 2
month_to_int["marzec"] = 3
month_to_int["mar"] = 3
month_to_int["III"] = 3
month_to_int["kwiecień"] = 4
month_to_int["kwi"] = 4
month_to_int["IV"] = 4
month_to_int["maj"] = 5
month_to_int["V"] = 5
month_to_int["czerwiec"] = 6
month_to_int["cze"] = 6
month_to_int["VI"] = 6
month_to_int["lipiec"] = 7
month_to_int["lip"] = 7
month_to_int["VII"] = 7
month_to_int["sierpień"] = 8
month_to_int["sie"] = 8
month_to_int["VIII"] = 8
month_to_int["wrzesień"] = 9
month_to_int["wrz"] = 9
month_to_int["IX"] = 9
month_to_int["październik"] = 10
month_to_int["paź"] = 10
month_to_int["X"] = 10
month_to_int["listopad"] = 11
month_to_int["lis"] = 11
month_to_int["XI"] = 11
month_to_int["grudzień"] = 12
month_to_int["gru"] = 12
month_to_int["XII"] = 12
month_to_int["luty"] = 2
month_to_int["lut"] = 2
month_to_int["II"] = 2
month_to_int["marzec"] = 3
month_to_int["mar"] = 3
month_to_int["III"] = 3
month_to_int["kwiecień"] = 4
month_to_int["kwi"] = 4
month_to_int["IV"] = 4
month_to_int["maj"] = 5
month_to_int["V"] = 5
month_to_int["czerwiec"] = 6
month_to_int["cze"] = 6
month_to_int["VI"] = 6
month_to_int["lipiec"] = 7
month_to_int["lip"] = 7
month_to_int["VII"] = 7
month_to_int["sierpień"] = 8
month_to_int["sie"] = 8
month_to_int["VIII"] = 8
month_to_int["wrzesień"] = 9
month_to_int["wrz"] = 9
month_to_int["IX"] = 9
month_to_int["październik"] = 10
month_to_int["paź"] = 10
month_to_int["X"] = 10
month_to_int["listopad"] = 11
month_to_int["lis"] = 11
month_to_int["XI"] = 11
month_to_int["grudzień"] = 12
month_to_int["gru"] = 12
month_to_int["XII"] = 12
# Alternative forms: declined nouns
month_to_int["stycznia"] = 1
month_to_int["lutego"] = 2

View File

@@ -54,95 +54,95 @@ class DateParserSR(DateParser):
"""
month_to_int = DateParser.month_to_int
month_to_int["januar"] = 1
month_to_int["januar"] = 1
month_to_int["januara"] = 1
month_to_int["jan"] = 1
month_to_int["јан"] = 1
month_to_int["jan"] = 1
month_to_int["јан"] = 1
month_to_int["јануара"] = 1
month_to_int["јануар"] = 1
month_to_int["i"] = 1
month_to_int["јануар"] = 1
month_to_int["i"] = 1
month_to_int["februar"] = 2
month_to_int["februar"] = 2
month_to_int["februara"] = 2
month_to_int["feb"] = 2
month_to_int["феб"] = 2
month_to_int["фебруар"] = 2
month_to_int["feb"] = 2
month_to_int["феб"] = 2
month_to_int["фебруар"] = 2
month_to_int["фебруара"] = 2
month_to_int["ii"] = 2
month_to_int["ii"] = 2
month_to_int["mart"] = 3
month_to_int["mart"] = 3
month_to_int["marta"] = 3
month_to_int["mar"] = 3
month_to_int["мар"] = 3
month_to_int["март"] = 3
month_to_int["mar"] = 3
month_to_int["мар"] = 3
month_to_int["март"] = 3
month_to_int["марта"] = 3
month_to_int["iii"] = 3
month_to_int["iii"] = 3
month_to_int["april"] = 4
month_to_int["april"] = 4
month_to_int["aprila"] = 4
month_to_int["apr"] = 4
month_to_int["апр"] = 4
month_to_int["април"] = 4
month_to_int["apr"] = 4
month_to_int["апр"] = 4
month_to_int["април"] = 4
month_to_int["априла"] = 4
month_to_int["iv"] = 4
month_to_int["iv"] = 4
month_to_int["maj"] = 5
month_to_int["maj"] = 5
month_to_int["maja"] = 5
month_to_int["мај"] = 5
month_to_int["мај"] = 5
month_to_int["маја"] = 5
month_to_int["v"] = 5
month_to_int["v"] = 5
month_to_int["jun"] = 6
month_to_int["jun"] = 6
month_to_int["juna"] = 6
month_to_int["јун"] = 6
month_to_int["јун"] = 6
month_to_int["јуна"] = 6
month_to_int["vi"] = 6
month_to_int["vi"] = 6
month_to_int["jul"] = 7
month_to_int["jul"] = 7
month_to_int["jula"] = 7
month_to_int["јул"] = 7
month_to_int["јул"] = 7
month_to_int["јула"] = 7
month_to_int["vii"] = 7
month_to_int["vii"] = 7
month_to_int["avgust"] = 8
month_to_int["avgust"] = 8
month_to_int["avgusta"] = 8
month_to_int["avg"] = 8
month_to_int["авг"] = 8
month_to_int["август"] = 8
month_to_int["avg"] = 8
month_to_int["авг"] = 8
month_to_int["август"] = 8
month_to_int["августа"] = 8
month_to_int["viii"] = 8
month_to_int["viii"] = 8
month_to_int["septembar"] = 9
month_to_int["septembra"] = 9
month_to_int["sep"] = 9
month_to_int["сеп"] = 9
month_to_int["sep"] = 9
month_to_int["сеп"] = 9
month_to_int["септембар"] = 9
month_to_int["септембра"] = 9
month_to_int["ix"] = 9
month_to_int["ix"] = 9
month_to_int["oktobar"] = 10
month_to_int["oktobra"] = 10
month_to_int["okt"] = 10
month_to_int["окт"] = 10
month_to_int["октобар"] = 10
month_to_int["октобра"] = 10
month_to_int["x"] = 10
month_to_int["oktobar"] = 10
month_to_int["oktobra"] = 10
month_to_int["okt"] = 10
month_to_int["окт"] = 10
month_to_int["октобар"] = 10
month_to_int["октобра"] = 10
month_to_int["x"] = 10
month_to_int["novembar"] = 11
month_to_int["novembra"] = 11
month_to_int["nov"] = 11
month_to_int["нов"] = 11
month_to_int["новембар"] = 11
month_to_int["новембра"] = 11
month_to_int["xi"] = 11
month_to_int["novembar"] = 11
month_to_int["novembra"] = 11
month_to_int["nov"] = 11
month_to_int["нов"] = 11
month_to_int["новембар"] = 11
month_to_int["новембра"] = 11
month_to_int["xi"] = 11
month_to_int["decembar"] = 12
month_to_int["decembra"] = 12
month_to_int["dec"] = 12
month_to_int["дец"] = 12
month_to_int["децембар"] = 12
month_to_int["децембра"] = 12
month_to_int["xii"] = 12
month_to_int["decembar"] = 12
month_to_int["decembra"] = 12
month_to_int["dec"] = 12
month_to_int["дец"] = 12
month_to_int["децембар"] = 12
month_to_int["децембра"] = 12
month_to_int["xii"] = 12
modifier_to_int = {
'pre' : Date.MOD_BEFORE,

View File

@@ -56,7 +56,7 @@ from ._datestrings import DateStrings
# Top-level module functions
#
#-------------------------------------------------------------------------
_max_days = [ 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 ]
_max_days = [ 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 ]
_leap_days = [ 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 ]
def gregorian_valid(date_tuple):
@@ -400,8 +400,8 @@ class DateParser:
_ = self._locale.translation.gettext
self.__init_prefix_tables()
self._rfc_mon_str = '(' + '|'.join(list(self._rfc_mons_to_int.keys())) + ')'
self._rfc_day_str = '(' + '|'.join(self._rfc_days) + ')'
self._rfc_mon_str = '(' + '|'.join(list(self._rfc_mons_to_int.keys())) + ')'
self._rfc_day_str = '(' + '|'.join(self._rfc_days) + ')'
self._bce_str = self.re_longest_first(self.bce)
self._qual_str = self.re_longest_first(list(self.quality_to_int.keys()))
@@ -409,14 +409,14 @@ class DateParser:
self._mod_after_str = self.re_longest_first(
list(self.modifier_after_to_int.keys()))
self._mon_str = self.re_longest_first(list(self.month_to_int.keys()))
self._mon_str = self.re_longest_first(list(self.month_to_int.keys()))
self._jmon_str = self.re_longest_first(list(self.hebrew_to_int.keys()))
self._fmon_str = self.re_longest_first(list(self.french_to_int.keys()))
self._pmon_str = self.re_longest_first(list(self.persian_to_int.keys()))
self._imon_str = self.re_longest_first(list(self.islamic_to_int.keys()))
self._smon_str = self.re_longest_first(list(self.swedish_to_int.keys()))
self._cal_str = self.re_longest_first(list(self.calendar_to_int.keys()))
self._ny_str = self.re_longest_first(list(self.newyear_to_int.keys()))
self._cal_str = self.re_longest_first(list(self.calendar_to_int.keys()))
self._ny_str = self.re_longest_first(list(self.newyear_to_int.keys()))
self._today_str = self.re_longest_first(self.today + [_("today"),])
@@ -911,7 +911,7 @@ class DateParser:
text = text.strip() # otherwise spaces can make it a bad date
date.set_text_value(text)
qual = Date.QUAL_NONE
cal = Date.CAL_GREGORIAN
cal = Date.CAL_GREGORIAN
newyear = Date.NEWYEAR_JAN1
(text, cal, newyear) = self.match_calendar_newyear(text, cal, newyear)

View File

@@ -39,36 +39,36 @@ __all__ = ( 'DBPAGE', 'DBMODE', 'DBCACHE', 'DBLOCKS', 'DBOBJECTS', 'DBUNDO',
"CLASS_TO_KEY_MAP", "KEY_TO_CLASS_MAP", "KEY_TO_NAME_MAP"
)
DBEXT = ".db" # File extension to be used for database files
DBUNDOFN = "undo.db" # File name of 'undo' database
DBLOCKFN = "lock" # File name of lock file
DBEXT = ".db" # File extension to be used for database files
DBUNDOFN = "undo.db" # File name of 'undo' database
DBLOCKFN = "lock" # File name of lock file
DBRECOVFN = "need_recover" # File name of recovery file
BDBVERSFN = "bdbversion.txt"# File name of Berkeley DB version file
DBBACKEND = "database.txt" # File name of Database backend file
SCHVERSFN = "schemaversion.txt"# File name of schema version file
PCKVERSFN = "pickleupgrade.txt" # Indicator that pickle has been upgrade t Python3
DBLOGNAME = ".Db" # Name of logger
DBMODE_R = "r" # Read-only access
DBMODE_W = "w" # Full Read/Write access
DBPAGE = 16384 # Size of the pages used to hold items in the database
DBMODE = 0o666 # Unix mode for database creation
DBCACHE = 0x4000000 # Size of the shared memory buffer pool
DBLOCKS = 100000 # Maximum number of locks supported
DBMODE_R = "r" # Read-only access
DBMODE_W = "w" # Full Read/Write access
DBPAGE = 16384 # Size of the pages used to hold items in the database
DBMODE = 0o666 # Unix mode for database creation
DBCACHE = 0x4000000 # Size of the shared memory buffer pool
DBLOCKS = 100000 # Maximum number of locks supported
DBOBJECTS = 100000 # Maximum number of simultaneously locked objects
DBUNDO = 1000 # Maximum size of undo buffer
DBUNDO = 1000 # Maximum size of undo buffer
ARRAYSIZE = 1000 # The arraysize for a SQL cursor
PERSON_KEY = 0
FAMILY_KEY = 1
SOURCE_KEY = 2
EVENT_KEY = 3
MEDIA_KEY = 4
PLACE_KEY = 5
PERSON_KEY = 0
FAMILY_KEY = 1
SOURCE_KEY = 2
EVENT_KEY = 3
MEDIA_KEY = 4
PLACE_KEY = 5
REPOSITORY_KEY = 6
REFERENCE_KEY = 7
NOTE_KEY = 8
TAG_KEY = 9
CITATION_KEY = 10
REFERENCE_KEY = 7
NOTE_KEY = 8
TAG_KEY = 9
CITATION_KEY = 10
TXNADD, TXNUPD, TXNDEL = 0, 1, 2

View File

@@ -120,7 +120,7 @@ class DbTxn(defaultdict):
data = Python list where:
list element = (handle, data) where:
handle = handle (database key) of the object in the transaction
data = pickled representation of the object
data = pickled representation of the object
"""
# Conditional on __debug__ because all that frame stuff may be slow

View File

@@ -83,21 +83,21 @@ except ImportError:
# Constants
#
#-------------------------------------------------------------------------
_FIRSTNAME = 4
_FIRSTNAME = 4
_SURNAME_LIST = 5
_SUFFIX = 6
_TITLE = 7
_TYPE = 8
_GROUP = 9
_SORT = 10
_DISPLAY = 11
_CALL = 12
_NICK = 13
_FAMNICK = 14
_SURNAME_IN_LIST = 0
_PREFIX_IN_LIST = 1
_PRIMARY_IN_LIST = 2
_TYPE_IN_LIST = 3
_SUFFIX = 6
_TITLE = 7
_TYPE = 8
_GROUP = 9
_SORT = 10
_DISPLAY = 11
_CALL = 12
_NICK = 13
_FAMNICK = 14
_SURNAME_IN_LIST = 0
_PREFIX_IN_LIST = 1
_PRIMARY_IN_LIST = 2
_TYPE_IN_LIST = 3
_CONNECTOR_IN_LIST = 4
_ORIGINPATRO = NameOriginType.PATRONYMIC
_ORIGINMATRO = NameOriginType.MATRONYMIC
@@ -570,13 +570,13 @@ class NameDisplay:
raw_data[_SUFFIX])
Specific symbols for parts of a name are defined (keywords given):
't' : title = title
'f' : given = given (first names)
'l' : surname = full surname (lastname)
'c' : call = callname
'x' : common = nick name, call, otherwise first first name (common name)
'i' : initials = initials of the first names
'm' : primary = primary surname (main)
't' : title = title
'f' : given = given (first names)
'l' : surname = full surname (lastname)
'c' : call = callname
'x' : common = nick name, call, otherwise first first name (common name)
'i' : initials = initials of the first names
'm' : primary = primary surname (main)
'0m': primary[pre]= prefix primary surname (main)
'1m': primary[sur]= surname primary surname (main)
'2m': primary[con]= connector primary surname (main)
@@ -585,11 +585,11 @@ class NameDisplay:
'1y': patronymic[sur] = surname "
'2y': patronymic[con] = connector "
'o' : notpatronymic = surnames without pa/matronymic and primary
'r' : rest = non primary surnames
'p' : prefix = list of all prefixes
'r' : rest = non primary surnames
'p' : prefix = list of all prefixes
'q' : rawsurnames = surnames without prefixes and connectors
's' : suffix = suffix
'n' : nickname = nick name
's' : suffix = suffix
'n' : nickname = nick name
'g' : familynick = family nick name
@@ -671,13 +671,13 @@ class NameDisplay:
return "%s %s" % (first,suffix)
Specific symbols for parts of a name are defined (keywords given):
't' : title = title
'f' : given = given (first names)
'l' : surname = full surname (lastname)
'c' : call = callname
'x' : common = nick name, call, or otherwise first first name (common name)
'i' : initials = initials of the first names
'm' : primary = primary surname (main)
't' : title = title
'f' : given = given (first names)
'l' : surname = full surname (lastname)
'c' : call = callname
'x' : common = nick name, call, or otherwise first first name (common name)
'i' : initials = initials of the first names
'm' : primary = primary surname (main)
'0m': primary[pre]= prefix primary surname (main)
'1m': primary[sur]= surname primary surname (main)
'2m': primary[con]= connector primary surname (main)
@@ -686,11 +686,11 @@ class NameDisplay:
'1y': patronymic[sur] = surname "
'2y': patronymic[con] = connector "
'o' : notpatronymic = surnames without pa/matronymic and primary
'r' : rest = non primary surnames
'p' : prefix = list of all prefixes
'r' : rest = non primary surnames
'p' : prefix = list of all prefixes
'q' : rawsurnames = surnames without prefixes and connectors
's' : suffix = suffix
'n' : nickname = nick name
's' : suffix = suffix
'n' : nickname = nick name
'g' : familynick = family nick name
"""

View File

@@ -48,12 +48,12 @@ class ChangedSinceBase(Rule):
Rule that checks for primary objects changed since a specific time.
"""
labels = [ 'Changed after:', 'but before:' ]
name = 'Objects changed after <date time>'
labels = [ 'Changed after:', 'but before:' ]
name = 'Objects changed after <date time>'
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(r"\d.*\s+\d{1,2}:\d{2}:\d{2}", date):

View File

@@ -41,8 +41,8 @@ from . import Rule
class Everything(Rule):
"""Match Everyone."""
name = 'Every object'
category = _('General filters')
name = 'Every object'
category = _('General filters')
description = 'Matches every object in the database'
def is_empty(self):

View File

@@ -44,11 +44,11 @@ class HasAttributeBase(Rule):
Rule that checks for an object with a particular attribute.
"""
labels = [ 'Attribute:', 'Value:' ]
name = 'Objects with the <attribute>'
labels = [ 'Attribute:', 'Value:' ]
name = 'Objects with the <attribute>'
description = "Matches objects with the given attribute " \
"of a particular value"
category = _('General filters')
category = _('General filters')
allow_regex = True
def apply(self, db, obj):

View File

@@ -46,12 +46,12 @@ class HasCitationBase(Rule):
First parameter is [Volume/page, Date, Confidence]
"""
labels = [ _('Volume/Page:'),
labels = [ _('Volume/Page:'),
_('Date:'),
_('Confidence:') ]
name = _('Citations matching parameters')
name = _('Citations matching parameters')
description = _("Matches citations with particular parameters")
category = _('Citation/source filters')
category = _('Citation/source filters')
allow_regex = True
def prepare(self, db, user):

View File

@@ -46,14 +46,14 @@ class HasEventBase(Rule):
"""Rule that checks for an event with a particular value."""
labels = [ 'Event type:',
labels = [ 'Event type:',
'Date:',
'Place:',
'Description:',
'Main Participants:' ]
name = 'Events matching parameters'
name = 'Events matching parameters'
description = "Matches events with particular parameters"
category = _('Event filters')
category = _('Event filters')
allow_regex = True
def prepare(self, db, user):

View File

@@ -42,10 +42,10 @@ from . import Rule
class HasGalleryBase(Rule):
"""Objects who have Media Object"""
labels = [ _('Number of instances:'), _('Number must be:')]
name = 'Object with <count> Media references'
labels = [ _('Number of instances:'), _('Number must be:')]
name = 'Object with <count> Media references'
description = "Matches objects with certain number of items in the gallery"
category = _('General filters')
category = _('General filters')
def prepare(self, db, user):
# things we want to do just once, not for every handle

View File

@@ -42,10 +42,10 @@ from . import Rule
class HasGrampsId(Rule):
"""Rule that checks for an object with a specific Gramps ID."""
labels = [ _('ID:') ]
name = 'Object with <Id>'
labels = [ _('ID:') ]
name = 'Object with <Id>'
description = "Matches objects with a specified Gramps ID"
category = _('General filters')
category = _('General filters')
def apply(self, db, obj):
"""

View File

@@ -45,10 +45,10 @@ from . import Rule
class HasLDSBase(Rule):
"""Rule that checks for object with a LDS event"""
labels = [ _('Number of instances:'), _('Number must be:')]
name = 'Objects with LDS events'
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, user):
# things we want to do just once, not for every handle

View File

@@ -43,10 +43,10 @@ from . import Rule
class HasNoteBase(Rule):
"""Objects having notes"""
labels = [ _('Number of instances:'), _('Number must be:')]
name = 'Object with notes'
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, use_regex=False):
# Upgrade from pre 3.1 HasNote filter, use defaults that correspond

View File

@@ -40,11 +40,11 @@ from . import Rule
class HasNoteRegexBase(Rule):
"""Objects having notes containing <text>."""
labels = [ _('Text:')]
name = 'Objects having notes containing <text>'
labels = [ _('Text:')]
name = 'Objects having notes containing <text>'
description = ("Matches objects whose notes contain a substring "
"or match a regular expression")
category = _('General filters')
category = _('General filters')
allow_regex = True
def apply(self, db, person):

View File

@@ -39,11 +39,11 @@ from . import Rule
class HasNoteSubstrBase(Rule):
"""People having notes containing <substring>."""
labels = [ _('Substring:')]
name = 'Objects having notes containing <substring>'
labels = [ _('Substring:')]
name = 'Objects having notes containing <substring>'
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()

View File

@@ -39,10 +39,10 @@ from . import Rule
class HasReferenceCountBase(Rule):
"""Objects with a reference count of <count>."""
labels = [ _('Reference count must be:'), _('Reference count:')]
name = 'Objects with a reference count of <count>'
labels = [ _('Reference count must be:'), _('Reference count:')]
name = 'Objects with a reference count of <count>'
description = "Matches objects with a certain reference count"
category = _('General filters')
category = _('General filters')
def prepare(self, db, user):

View File

@@ -43,13 +43,13 @@ class HasSourceBase(Rule):
"""Rule that checks for a source with a particular value"""
labels = [ 'Title:',
labels = [ 'Title:',
'Author:',
'Abbreviation:',
'Publication:' ]
name = 'Sources matching parameters'
name = 'Sources matching parameters'
description = "Matches sources with particular parameters"
category = _('Citation/source filters')
category = _('Citation/source filters')
allow_regex = True
def apply(self,db,source):

View File

@@ -42,11 +42,11 @@ from . import Rule
class HasSourceCountBase(Rule):
"""Objects having sources"""
labels = [ _('Number of instances:'), _('Number must be:')]
name = 'Objects with <count> sources'
labels = [ _('Number of instances:'), _('Number must be:')]
name = 'Objects with <count> 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, user):
# things we want to do just once, not for every handle

View File

@@ -42,9 +42,9 @@ from . import Rule
class HasSourceOfBase(Rule):
"""Rule that checks for objects that have a particular source."""
labels = [ _('Source ID:') ]
name = 'Object with the <source>'
category = _('Citation/source filters')
labels = [ _('Source ID:') ]
name = 'Object with the <source>'
category = _('Citation/source filters')
description = 'Matches objects who have a particular source'
def prepare(self, db, user):

View File

@@ -46,10 +46,10 @@ class HasTagBase(Rule):
Rule that checks for an object with a particular tag.
"""
labels = [ 'Tag:' ]
name = 'Objects with the <tag>'
labels = [ 'Tag:' ]
name = 'Objects with the <tag>'
description = "Matches objects with the given tag"
category = _('General filters')
category = _('General filters')
def prepare(self, db, user):
"""

View File

@@ -39,13 +39,13 @@ from . import Rule
class HasTextMatchingSubstringOf(Rule):
"""Rule that checks for string matches in any textual information."""
labels = [ 'Substring:',
labels = [ 'Substring:',
'Case sensitive:',
'Regular-Expression matching:']
name = 'Objects with records containing <substring>'
name = 'Objects with records containing <substring>'
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

View File

@@ -37,9 +37,9 @@ from . import Rule
class IsPrivate(Rule):
"""Objects marked private."""
name = 'Objects marked private'
name = 'Objects marked private'
description = "Matches objects that are indicated as private"
category = _('General filters')
category = _('General filters')
def apply(self, db, obj):
return obj.get_privacy()

View File

@@ -34,9 +34,9 @@ _ = glocale.translation.gettext
class IsPublic(Rule):
"""Objects not marked private."""
name = 'Objects not marked private'
name = 'Objects not marked private'
description = "Matches objects that are not indicated as private"
category = _('General filters')
category = _('General filters')
def apply(self, db, obj):
return not obj.get_privacy()

View File

@@ -47,14 +47,14 @@ class MatchesEventFilterBase(MatchesFilterBase):
"""
labels = ['Event filter name:']
name = 'Objects with events matching the <event filter>'
labels = ['Event filter name:']
name = 'Objects with events matching the <event filter>'
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'
namespace = 'Event'
def prepare(self, db, user):
MatchesFilterBase.prepare(self, db, user)

View File

@@ -51,10 +51,10 @@ class MatchesFilterBase(Rule):
Subclasses need to define the namespace class attribute.
"""
labels = [_('Filter name:')]
name = 'Objects matching the <filter>'
labels = [_('Filter name:')]
name = 'Objects matching the <filter>'
description = "Matches objects matched by the specified filter name"
category = _('General filters')
category = _('General filters')
def prepare(self, db, user):
if gramps.gen.filters.CustomFilters:

View File

@@ -44,10 +44,10 @@ from . import Rule
class MatchesSourceConfidenceBase(Rule):
"""Objects with a specific confidence level on 'direct' Source references"""
labels = ['Confidence level:']
name = 'Object with at least one direct source >= <confidence level>'
labels = ['Confidence level:']
name = 'Object with at least one direct source >= <confidence level>'
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])

View File

@@ -44,14 +44,14 @@ class MatchesSourceFilterBase(MatchesFilterBase):
Rule that checks against another filter.
"""
labels = [_('Source filter name:')]
name = 'Objects with source matching the <source filter>'
labels = [_('Source filter name:')]
name = 'Objects with source matching the <source filter>'
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'
namespace = 'Source'
def prepare(self, db, user):
MatchesFilterBase.prepare(self, db, user)

View File

@@ -45,11 +45,11 @@ class RegExpIdBase(Rule):
regular expression.
"""
labels = [ _('Text:') ]
name = 'Objects with <Id>'
labels = [ _('Text:') ]
name = 'Objects with <Id>'
description = "Matches objects whose Gramps ID contains a substring " \
"or matches a regular expression"
category = _('General filters')
category = _('General filters')
allow_regex = True
def apply(self, db, obj):

View File

@@ -50,9 +50,9 @@ LOG = logging.getLogger(".")
class Rule:
"""Base rule class."""
labels = []
name = ''
category = _('Miscellaneous filters')
labels = []
name = ''
category = _('Miscellaneous filters')
description = _('No description')
allow_regex = False

View File

@@ -42,5 +42,5 @@ from .._everything import Everything
class AllCitations(Everything):
"""Matches every citation"""
name = _('Every citation')
name = _('Every citation')
description = _('Matches every citation in the database')

View File

@@ -42,8 +42,8 @@ from .._changedsincebase import ChangedSinceBase
class ChangedSince(ChangedSinceBase):
"""Rule that checks for citations changed since a specific time."""
labels = [ _('Changed after:'), _('but before:') ]
name = _('Citations changed after <date time>')
labels = [ _('Changed after:'), _('but before:') ]
name = _('Citations changed after <date time>')
description = _("Matches citation records changed after a specified "
"date-time (yyyy-mm-dd hh:mm:ss) or in the range, if a second "
"date-time is given.")

View File

@@ -40,5 +40,5 @@ from .._isprivate import IsPrivate
class CitationPrivate(IsPrivate):
"""Citation marked private"""
name = _('Citations marked private')
name = _('Citations marked private')
description = _("Matches citations that are indicated as private")

View File

@@ -45,11 +45,11 @@ from ....datehandler import parser
class HasCitation(Rule):
"""Rule that checks for a citations with a particular value"""
labels = [ _('Volume/Page:'),
labels = [ _('Volume/Page:'),
_('Date:'),
_('Confidence level:')]
name = _('Citations matching parameters')
category = _('General filters')
name = _('Citations matching parameters')
category = _('General filters')
description = _("Matches citations with particular parameters")
allow_regex = True

View File

@@ -42,5 +42,5 @@ from .._hasgallerybase import HasGalleryBase
class HasGallery(HasGalleryBase):
"""Rule that checks for citation who has media object reference"""
name = _('Citations with <count> media')
name = _('Citations with <count> media')
description = _("Matches citations with a certain number of items in the gallery")

View File

@@ -42,5 +42,5 @@ from .. import HasGrampsId
class HasIdOf(HasGrampsId):
"""Rule that checks for a citation with a specific Gramps ID"""
name = _('Citation with <Id>')
name = _('Citation with <Id>')
description = _("Matches a citation with a specified Gramps ID")

View File

@@ -43,5 +43,5 @@ from .._hasnotebase import HasNoteBase
class HasNote(HasNoteBase):
"""Citations having notes"""
name = _('Citations having <count> notes')
name = _('Citations having <count> notes')
description = _("Matches citations having a certain number of notes")

View File

@@ -40,7 +40,7 @@ from .._hasnotesubstrbase import HasNoteSubstrBase
class HasNoteMatchingSubstringOf(HasNoteSubstrBase):
"""Citations having notes containing <substring>"""
name = _('Citations having notes containing <substring>')
name = _('Citations having notes containing <substring>')
description = _("Matches citations whose notes contain text "
"matching a substring")

View File

@@ -39,6 +39,6 @@ from .._hasnoteregexbase import HasNoteRegexBase
#-------------------------------------------------------------------------
class HasNoteRegexp(HasNoteRegexBase):
name = _('Citations having notes containing <text>')
name = _('Citations having notes containing <text>')
description = _("Matches citations whose notes contain text "
"matching a regular expression")

View File

@@ -40,6 +40,6 @@ from .._hasreferencecountbase import HasReferenceCountBase
class HasReferenceCountOf(HasReferenceCountBase):
"""Citation objects with a reference count of <count>"""
name = _('Citations with a reference count of <count>')
name = _('Citations with a reference count of <count>')
description = _("Matches citations with a certain reference count")

View File

@@ -45,14 +45,14 @@ from .._hassourcebase import HasSourceBase
class HasSource(HasSourceBase):
"""Rule that checks for an citation with a particular value"""
labels = [ _('Title:'),
labels = [ _('Title:'),
_('Author:'),
_('Abbreviation:'),
_('Publication:') ]
name = _('Sources matching parameters')
name = _('Sources matching parameters')
description = _("Matches citations with a source of a particular "
"value")
category = _('Source filters')
category = _('Source filters')
def apply(self, dbase, citation):
source = dbase.get_source_from_handle(

View File

@@ -43,10 +43,10 @@ class HasSourceIdOf(HasGrampsId):
"""Rule that checks for a citation with a source which has a specific
Gramps ID"""
name = _('Citation with Source <Id>')
name = _('Citation with Source <Id>')
description = _("Matches a citation with a source with a specified Gramps "
"ID")
category = _('Source filters')
category = _('Source filters')
def apply(self, dbase, citation):
source = dbase.get_source_from_handle(

View File

@@ -49,10 +49,10 @@ class HasSourceNoteRegexp(HasNoteRegexBase):
substring or matches a regular expression.
"""
name = _('Citations having source notes containing <text>')
name = _('Citations having source notes containing <text>')
description = _("Matches citations whose source notes contain a substring "
"or match a regular expression")
category = _('Source filters')
category = _('Source filters')
def apply(self, db, citation):
source = db.get_source_from_handle(citation.get_reference_handle())

View File

@@ -45,6 +45,6 @@ class HasTag(HasTagBase):
"""
Rule that checks for a citation with a particular tag.
"""
labels = [ _('Tag:') ]
name = _('Citations with the <tag>')
labels = [ _('Tag:') ]
name = _('Citations with the <tag>')
description = _("Matches citations with the particular tag")

View File

@@ -42,6 +42,6 @@ from .._matchesfilterbase import MatchesFilterBase
class MatchesFilter(MatchesFilterBase):
"""Rule that checks against another filter"""
name = _('Citations matching the <filter>')
name = _('Citations matching the <filter>')
description = _("Matches citations matched by the specified filter name")
namespace = 'Citation'
namespace = 'Citation'

View File

@@ -39,11 +39,11 @@ from .. import Rule
class MatchesPageSubstringOf(Rule):
"""Citation Volume/Page title containing <substring>"""
labels = [ _('Text:')]
name = _('Citations with Volume/Page containing <text>')
labels = [ _('Text:')]
name = _('Citations with Volume/Page containing <text>')
description = _("Matches citations whose Volume/Page contains a "
"certain substring")
category = _('General filters')
category = _('General filters')
allow_regex = True
def apply(self, db, object):

View File

@@ -42,12 +42,12 @@ from .. import MatchesFilterBase
class MatchesRepositoryFilter(MatchesFilterBase):
"""Citations which have a source which references the selected repository"""
labels = [ _('Repository filter name:') ]
name = _('Citations with a source with a repository reference '
labels = [ _('Repository filter name:') ]
name = _('Citations with a source with a repository reference '
'matching the <repository filter>')
description = _("Matches citations with sources with a repository "
"reference that match a certain repository filter")
category = _('General filters')
category = _('General filters')
# we want to have this filter show repository filters
namespace = 'Repository'

View File

@@ -45,14 +45,14 @@ class MatchesSourceFilter(MatchesFilterBase):
Rule that checks against another filter.
"""
labels = [_('Source filter name:')]
name = _('Citations with source matching the <source filter>')
labels = [_('Source filter name:')]
name = _('Citations with source matching the <source filter>')
description = _("Matches citations with sources that match the "
"specified source filter name")
category = _('General filters')
category = _('General filters')
# we want to have this filter show source filters
namespace = 'Source'
namespace = 'Source'
def prepare(self, db, user):
MatchesFilterBase.prepare(self, db, user)

View File

@@ -45,6 +45,6 @@ class RegExpIdOf(RegExpIdBase):
matches regular expression.
"""
name = _('Citations with Id containing <text>')
name = _('Citations with Id containing <text>')
description = _("Matches citations whose Gramps ID matches "
"the regular expression")

View File

@@ -45,10 +45,10 @@ class RegExpSourceIdOf(RegExpIdBase):
matches regular expression.
"""
name = _('Citations with Source Id containing <text>')
name = _('Citations with Source Id containing <text>')
description = _("Matches citations whose source has a Gramps ID that "
"matches the regular expression")
category = _('Source filters')
category = _('Source filters')
def apply(self, dbase, citation):
source = dbase.get_source_from_handle(

View File

@@ -41,5 +41,5 @@ from .._everything import Everything
class AllEvents(Everything):
"""Matches Everyone"""
name = _('Every event')
name = _('Every event')
description = _('Matches every event in the database')

View File

@@ -43,8 +43,8 @@ from .._changedsincebase import ChangedSinceBase
class ChangedSince(ChangedSinceBase):
"""Rule that checks for an event changed since a specific time."""
labels = [ _('Changed after:'), _('but before:') ]
name = _('Events changed after <date time>')
labels = [ _('Changed after:'), _('but before:') ]
name = _('Events changed after <date time>')
description = _("Matches event records changed after a specified "
"date/time (yyyy-mm-dd hh:mm:ss) or in the range, if a second "
"date/time is given.")

View File

@@ -39,5 +39,5 @@ from .._isprivate import IsPrivate
class EventPrivate(IsPrivate):
"""Event marked private"""
name = _('Events marked private')
name = _('Events marked private')
description = _("Matches events that are indicated as private")

View File

@@ -41,7 +41,7 @@ from .._hasattributebase import HasAttributeBase
class HasAttribute(HasAttributeBase):
"""Rule that checks for an event with a particular event attribute"""
labels = [ _('Event attribute:'), _('Value:') ]
name = _('Events with the attribute <attribute>')
labels = [ _('Event attribute:'), _('Value:') ]
name = _('Events with the attribute <attribute>')
description = _("Matches events with the event attribute "
"of a particular value")

View File

@@ -45,9 +45,9 @@ from .._hascitationbase import HasCitationBase
class HasCitation(HasCitationBase):
"""Rule that checks for an event with a particular value"""
labels = [ _('Volume/Page:'),
labels = [ _('Volume/Page:'),
_('Date:'),
_('Confidence level:')]
name = _('Events with the <citation>')
name = _('Events with the <citation>')
description = _("Matches events with a citation of a particular "
"value")

View File

@@ -44,11 +44,11 @@ from .. import Rule
class HasData(Rule):
"""Rule that checks for an event containing particular values"""
labels = [ _('Event type:'), _('Date:'), _('Place:'),
labels = [ _('Event type:'), _('Date:'), _('Place:'),
_('Description:') ]
name = _('Events with <data>')
name = _('Events with <data>')
description = _("Matches events with data of a particular value")
category = _('General filters')
category = _('General filters')
allow_regex = True
def prepare(self, db, user):

View File

@@ -35,10 +35,10 @@ _ = glocale.translation.gettext
class HasDayOfWeek(Rule):
"""Rule that matches an event occurring on a particular day of the week."""
labels = [ _('Day of Week:') ]
name = _('Events occurring on a particular day of the week')
labels = [ _('Day of Week:') ]
name = _('Events occurring on a particular day of the week')
description = _('Matches events occurring on a particular day of the week')
category = _('General filters')
category = _('General filters')
def apply(self, db, event):
if not self.list[0]:

View File

@@ -42,5 +42,5 @@ from .._hasgallerybase import HasGalleryBase
class HasGallery(HasGalleryBase):
"""Rule that checks for event who has media object reference"""
name = _('Events with <count> media')
name = _('Events with <count> media')
description = _("Matches events with a certain number of items in the gallery")

View File

@@ -41,5 +41,5 @@ from .. import HasGrampsId
class HasIdOf(HasGrampsId):
"""Rule that checks for a family with a specific Gramps ID"""
name = _('Event with <Id>')
name = _('Event with <Id>')
description = _("Matches an event with a specified Gramps ID")

View File

@@ -42,5 +42,5 @@ from .._hasnotebase import HasNoteBase
class HasNote(HasNoteBase):
"""Events having notes"""
name = _('Events having <count> notes')
name = _('Events having <count> notes')
description = _("Matches events having a certain number of notes")

View File

@@ -39,7 +39,7 @@ from .._hasnotesubstrbase import HasNoteSubstrBase
class HasNoteMatchingSubstringOf(HasNoteSubstrBase):
"""People having notes containing <substring>"""
name = _('Events having notes containing <substring>')
name = _('Events having notes containing <substring>')
description = _("Matches events whose notes contain text "
"matching a substring")

View File

@@ -38,6 +38,6 @@ from .._hasnoteregexbase import HasNoteRegexBase
#-------------------------------------------------------------------------
class HasNoteRegexp(HasNoteRegexBase):
name = _('Events having notes containing <text>')
name = _('Events having notes containing <text>')
description = _("Matches events whose notes contain text "
"matching a regular expression")

View File

@@ -39,6 +39,6 @@ from .._hasreferencecountbase import HasReferenceCountBase
class HasReferenceCountOf(HasReferenceCountBase):
"""Events with a reference count of <count>"""
name = _('Events with a reference count of <count>')
name = _('Events with a reference count of <count>')
description = _("Matches events with a certain reference count")

View File

@@ -41,5 +41,5 @@ from .._hassourcecountbase import HasSourceCountBase
class HasSourceCount(HasSourceCountBase):
"""Events with sources"""
name = _('Events with <count> sources')
name = _('Events with <count> sources')
description = _("Matches events with a certain number of sources connected to it")

View File

@@ -45,6 +45,6 @@ class HasTag(HasTagBase):
"""
Rule that checks for an event with a particular tag.
"""
labels = [ _('Tag:') ]
name = _('Events with the <tag>')
labels = [ _('Tag:') ]
name = _('Events with the <tag>')
description = _("Matches events with the particular tag")

View File

@@ -42,10 +42,10 @@ from .. import Rule
class HasType(Rule):
"""Rule that checks for an event of a particular type."""
labels = [ _('Event type:') ]
name = _('Events with the particular type')
labels = [ _('Event type:') ]
name = _('Events with the particular type')
description = _("Matches events with the particular type ")
category = _('General filters')
category = _('General filters')
def apply(self, db, event):
if not self.list[0]:

View File

@@ -41,6 +41,6 @@ from .. import MatchesFilterBase
class MatchesFilter(MatchesFilterBase):
"""Rule that checks against another filter."""
name = _('Events matching the <filter>')
name = _('Events matching the <filter>')
description = _("Matches events matched by the specified filter name")
namespace = 'Event'
namespace = 'Event'

View File

@@ -47,14 +47,14 @@ class MatchesPersonFilter(MatchesFilterBase):
"""
labels = [_('Person filter name:'), _('Include Family events:')]
name = _('Events of persons matching the <person filter>')
labels = [_('Person filter name:'), _('Include Family events:')]
name = _('Events of persons matching the <person filter>')
description = _("Matches events of persons matched by the specified "
"person filter name")
category = _('General filters')
category = _('General filters')
# we want to have this filter show person filters
namespace = 'Person'
namespace = 'Person'
def prepare(self, db, user):
MatchesFilterBase.prepare(self, db, user)

View File

@@ -46,13 +46,13 @@ class MatchesPlaceFilter(MatchesFilterBase):
Subclasses need to define the namespace class attribute.
"""
labels = [_('Place filter name:')]
name = _('Events of places matching the <place filter>')
labels = [_('Place filter name:')]
name = _('Events of places matching the <place filter>')
description = _("Matches events that occurred at places that match the "
"specified place filter name")
category = _('General filters')
category = _('General filters')
# we want to have this filter show place filters
namespace = 'Place'
namespace = 'Place'
def apply(self, db, event):
filt = self.find_filter()

View File

@@ -41,7 +41,7 @@ from .._matchessourceconfidencebase import MatchesSourceConfidenceBase
class MatchesSourceConfidence(MatchesSourceConfidenceBase):
"""Events matching a specific confidence level on its 'direct' source references"""
labels = [_('Confidence level:')]
name = _('Events with at least one direct source >= <confidence level>')
labels = [_('Confidence level:')]
name = _('Events with at least one direct source >= <confidence level>')
description = _("Matches events with at least one direct source with confidence level(s)")

View File

@@ -45,11 +45,11 @@ class MatchesSourceFilter(MatchesSourceFilterBase):
Rule that checks against another filter.
"""
labels = [_('Source filter name:')]
name = _('Events with source matching the <source filter>')
labels = [_('Source filter name:')]
name = _('Events with source matching the <source filter>')
description = _("Matches events 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'
namespace = 'Source'

View File

@@ -44,6 +44,6 @@ class RegExpIdOf(RegExpIdBase):
matches regular expression.
"""
name = _('Events with Id containing <text>')
name = _('Events with Id containing <text>')
description = _("Matches events whose Gramps ID matches "
"the regular expression")

View File

@@ -41,6 +41,6 @@ from .._everything import Everything
class AllFamilies(Everything):
"""Matches Everyone"""
name = _('Every family')
name = _('Every family')
description = _('Matches every family in the database')

View File

@@ -43,8 +43,8 @@ from .._changedsincebase import ChangedSinceBase
class ChangedSince(ChangedSinceBase):
"""Rule that checks for families changed since a specific time."""
labels = [ _('Changed after:'), _('but before:') ]
name = _('Families changed after <date time>')
labels = [ _('Changed after:'), _('but before:') ]
name = _('Families changed after <date time>')
description = _("Matches family records changed after a specified "
"date-time (yyyy-mm-dd hh:mm:ss) or in the range, if a second "
"date-time is given.")

View File

@@ -42,10 +42,10 @@ from ._memberbase import child_base
class ChildHasIdOf(RegExpIdBase):
"""Rule that checks for a person with a specific Gramps ID"""
labels = [ _('Person ID:') ]
name = _('Families having child with Id containing <text>')
labels = [ _('Person ID:') ]
name = _('Families having child with Id containing <text>')
description = _("Matches families where child has a specified "
"Gramps ID")
category = _('Child filters')
category = _('Child filters')
base_class = RegExpIdBase
apply = child_base

View File

@@ -42,9 +42,9 @@ from ._memberbase import child_base
class ChildHasNameOf(HasNameOf):
"""Rule that checks for full or partial name matches"""
name = _('Families with child with the <name>')
name = _('Families with child with the <name>')
description = _("Matches families where child has a specified "
"(partial) name")
category = _('Child filters')
category = _('Child filters')
base_class = HasNameOf
apply = child_base

View File

@@ -39,5 +39,5 @@ from .._isprivate import IsPrivate
class FamilyPrivate(IsPrivate):
"""Family marked private"""
name = _('Families marked private')
name = _('Families marked private')
description = _("Matches families that are indicated as private")

View File

@@ -42,10 +42,10 @@ from ._memberbase import father_base
class FatherHasIdOf(RegExpIdBase):
"""Rule that checks for a person with a specific Gramps ID"""
labels = [ _('Person ID:') ]
name = _('Families having father with Id containing <text>')
labels = [ _('Person ID:') ]
name = _('Families having father with Id containing <text>')
description = _("Matches families whose father has a specified "
"Gramps ID")
category = _('Father filters')
category = _('Father filters')
base_class = RegExpIdBase
apply = father_base

View File

@@ -42,9 +42,9 @@ from ._memberbase import father_base
class FatherHasNameOf(HasNameOf):
"""Rule that checks for full or partial name matches"""
name = _('Families with father with the <name>')
name = _('Families with father with the <name>')
description = _("Matches families whose father has a specified "
"(partial) name")
category = _('Father filters')
category = _('Father filters')
base_class = HasNameOf
apply = father_base

View File

@@ -41,7 +41,7 @@ from .._hasattributebase import HasAttributeBase
class HasAttribute(HasAttributeBase):
"""Rule that checks for a family with a particular family attribute"""
labels = [ _('Family attribute:'), _('Value:') ]
name = _('Families with the family <attribute>')
labels = [ _('Family attribute:'), _('Value:') ]
name = _('Families with the family <attribute>')
description = _("Matches families with the family attribute "
"of a particular value")

View File

@@ -45,9 +45,9 @@ from .._hascitationbase import HasCitationBase
class HasCitation(HasCitationBase):
"""Rule that checks for a family with a particular value"""
labels = [ _('Volume/Page:'),
labels = [ _('Volume/Page:'),
_('Date:'),
_('Confidence level:')]
name = _('Families with the <citation>')
name = _('Families with the <citation>')
description = _("Matches families with a citation of a particular "
"value")

View File

@@ -44,12 +44,12 @@ from .._haseventbase import HasEventBase
class HasEvent(HasEventBase):
"""Rule that checks for a family event with a particular value"""
labels = [ _('Family event:'),
labels = [ _('Family event:'),
_('Date:'),
_('Place:'),
_('Description:'),
_('Main Participants') ]
name = _('Families with the <event>')
name = _('Families with the <event>')
description = _("Matches families with an event of a particular value")
def apply(self, dbase, family):

View File

@@ -42,5 +42,5 @@ from .._hasgallerybase import HasGalleryBase
class HasGallery(HasGalleryBase):
"""Rule that checks for family who has media object reference"""
name = _('Families with <count> media')
name = _('Families with <count> media')
description = _("Matches families with a certain number of items in the gallery")

View File

@@ -41,5 +41,5 @@ from .. import HasGrampsId
class HasIdOf(HasGrampsId):
"""Rule that checks for a family with a specific Gramps ID"""
name = _('Family with <Id>')
name = _('Family with <Id>')
description = _("Matches a family with a specified Gramps ID")

View File

@@ -45,5 +45,5 @@ from .._hasldsbase import HasLDSBase
class HasLDS(HasLDSBase):
"""Rule that checks for family with a LDS event"""
name = _('Families with <count> LDS events')
name = _('Families with <count> LDS events')
description = _("Matches families with a certain number of LDS events")

View File

@@ -42,5 +42,5 @@ from .._hasnotebase import HasNoteBase
class HasNote(HasNoteBase):
"""Families having notes"""
name = _('Families having <count> notes')
name = _('Families having <count> notes')
description = _("Matches families having a certain number notes")

View File

@@ -39,6 +39,6 @@ from .._hasnotesubstrbase import HasNoteSubstrBase
class HasNoteMatchingSubstringOf(HasNoteSubstrBase):
"""People having notes containing <substring>"""
name = _('Families having notes containing <substring>')
name = _('Families having notes containing <substring>')
description = _("Matches families whose notes contain text matching a substring")

View File

@@ -38,7 +38,7 @@ from .._hasnoteregexbase import HasNoteRegexBase
#-------------------------------------------------------------------------
class HasNoteRegexp(HasNoteRegexBase):
name = _('Families having notes containing <text>')
name = _('Families having notes containing <text>')
description = _("Matches families whose notes contain text "
"matching a regular expression")

View File

@@ -39,6 +39,6 @@ from .._hasreferencecountbase import HasReferenceCountBase
class HasReferenceCountOf(HasReferenceCountBase):
"""Family objects with a reference count of <count>"""
name = _('Families with a reference count of <count>')
name = _('Families with a reference count of <count>')
description = _("Matches family objects with a certain reference count")

View File

@@ -42,11 +42,11 @@ from .. import Rule
class HasRelType(Rule):
"""Rule that checks for a person with a particular personal attribute"""
labels = [ _('Relationship type:') ]
name = _('Families with the relationship type')
labels = [ _('Relationship type:') ]
name = _('Families with the relationship type')
description = _("Matches families with the relationship type "
"of a particular value")
category = _('General filters')
category = _('General filters')
def prepare(self, db, user):
if self.list[0]:

View File

@@ -42,5 +42,5 @@ from .._hassourcecountbase import HasSourceCountBase
class HasSourceCount(HasSourceCountBase):
"""Families with sources"""
name = _('Families with <count> sources')
name = _('Families with <count> sources')
description = _("Matches families with a certain number of sources connected to it")

View File

@@ -42,7 +42,7 @@ from .._hassourceofbase import HasSourceOfBase
class HasSourceOf(HasSourceOfBase):
"""Rule that checks family that have a particular source."""
labels = [ _('Source ID:') ]
name = _('Families with the <source>')
category = _('Citation/source filters')
labels = [ _('Source ID:') ]
name = _('Families with the <source>')
category = _('Citation/source filters')
description = _('Matches families who have a particular source')

View File

@@ -45,6 +45,6 @@ class HasTag(HasTagBase):
"""
Rule that checks for a family with a particular tag.
"""
labels = [ _('Tag:') ]
name = _('Families with the <tag>')
labels = [ _('Tag:') ]
name = _('Families with the <tag>')
description = _("Matches families with the particular tag")

View File

@@ -42,9 +42,9 @@ _ = glocale.translation.gettext
class HasTwins(Rule):
"""Rule that checks for a family with twins"""
name = _('Families with twins')
name = _('Families with twins')
description = _("Matches families with twins")
category = _('Child filters')
category = _('Child filters')
def apply(self, db, family):
date_list = []

View File

@@ -41,8 +41,8 @@ from .. import Rule
class IsBookmarked(Rule):
"""Rule that checks for the bookmark list in the database"""
name = _('Bookmarked families')
category = _('General filters')
name = _('Bookmarked families')
category = _('General filters')
description = _("Matches the families on the bookmark list")
def prepare(self, db, user):

View File

@@ -41,6 +41,6 @@ from .. import MatchesFilterBase
class MatchesFilter(MatchesFilterBase):
"""Rule that checks against another filter."""
name = _('Families matching the <filter>')
name = _('Families matching the <filter>')
description = _("Matches families matched by the specified filter name")
namespace = 'Family'
namespace = 'Family'

Some files were not shown because too many files have changed in this diff Show More