Various reports treat an unknown gender differently (#0001113)

svn: r8767
This commit is contained in:
Brian Matherly
2007-07-24 04:09:35 +00:00
parent e622d63503
commit 7cba49c1a4
3 changed files with 13 additions and 2 deletions

View File

@@ -468,8 +468,10 @@ class IndivCompleteReport(Report):
self.normal_cell("%s:" % _("Gender"))
if self.start_person.get_gender() == RelLib.Person.MALE:
self.normal_cell(_("Male"))
else:
elif self.start_person.get_gender() == RelLib.Person.FEMALE:
self.normal_cell(_("Female"))
else:
self.normal_cell(_("Unknown"))
self.doc.end_row()
family_handle = self.start_person.get_main_parents_family_handle()

View File

@@ -66,6 +66,7 @@ def build_report(database,person):
missing_bday = 0
males = 0
females = 0
unknowns = 0
bytes = 0
namelist = []
notfound = []
@@ -102,8 +103,10 @@ def build_report(database,person):
missing_bday = missing_bday + 1
if person.get_gender() == RelLib.Person.FEMALE:
females = females + 1
else:
elif person.get_gender() == RelLib.Person.MALE:
males = males + 1
else:
unknowns += 1
if name.get_surname() not in namelist:
namelist.append(name.get_surname())
@@ -112,6 +115,7 @@ def build_report(database,person):
text = text + "%s: %d\n" % (_("Number of individuals"),len(personList))
text = text + "%s: %d\n" % (_("Males"),males)
text = text + "%s: %d\n" % (_("Females"),females)
text = text + "%s: %d\n" % (_("Individuals with unknown gender"),unknowns)
text = text + "%s: %d\n" % (_("Individuals with incomplete names"),incomp_names)
text = text + "%s: %d\n" % (_("Individuals missing birth dates"),missing_bday)
text = text + "%s: %d\n" % (_("Disconnected individuals"),disconnected)