Restored 0 years, but with word 'birth' or 'wedding'; removed extra words as they are too long for calendar
svn: r11741
This commit is contained in:
parent
b2b0573d36
commit
470ad5d62e
@ -309,8 +309,6 @@ class Calendar(Report):
|
||||
"""
|
||||
This method runs through the data, and collects the relevant dates
|
||||
and text.
|
||||
|
||||
age and years must be greater than zero, else why do it???
|
||||
"""
|
||||
people = self.database.get_person_handles(sort_handles=False)
|
||||
self.progress.set_pass(_('Applying Filter...'), len(people))
|
||||
@ -351,7 +349,7 @@ class Calendar(Report):
|
||||
if father is not None:
|
||||
father_lastname = father.get_primary_name().get_surname()
|
||||
short_name = self.get_name(person, father_lastname)
|
||||
if age > 0:
|
||||
if age >= 0:
|
||||
alive = probably_alive(person, self.database, make_date(self.year, month, day))
|
||||
if ((self.alive and alive) or not self.alive):
|
||||
comment = ""
|
||||
@ -362,6 +360,9 @@ class Calendar(Report):
|
||||
person)
|
||||
if relation:
|
||||
comment = " --- %s" % relation
|
||||
if age == 0:
|
||||
self.add_day_item("%s, birth%s" % (short_name, comment), self.year, month, day)
|
||||
else:
|
||||
self.add_day_item("%s, %d%s" % (short_name, age, comment), self.year, month, day)
|
||||
if self.anniversaries:
|
||||
family_list = person.get_family_handle_list()
|
||||
@ -399,8 +400,14 @@ class Calendar(Report):
|
||||
month = event_obj.get_month()
|
||||
day = event_obj.get_day()
|
||||
years = self.year - year
|
||||
if years > 0:
|
||||
text = _("%(spouse)s and\n %(person)s, %(nyears)d year anniversary") % {
|
||||
if years >= 0:
|
||||
if years == 0:
|
||||
text = _("%(spouse)s and\n %(person)s, wedding") % {
|
||||
'spouse' : spouse_name,
|
||||
'person' : short_name,
|
||||
}
|
||||
else:
|
||||
text = _("%(spouse)s and\n %(person)s, %(nyears)d") % {
|
||||
'spouse' : spouse_name,
|
||||
'person' : short_name,
|
||||
'nyears' : years,
|
||||
|
Loading…
Reference in New Issue
Block a user