svn: r3126
This commit is contained in:
Alex Roitman 2004-05-04 21:43:50 +00:00
parent aad9127cc4
commit 00ec822374

View File

@ -129,13 +129,13 @@ class IndivComplete(Report.Report):
else: else:
place = "" place = ""
description = event.get_description() description = event.get_description()
if date == "": if not date:
if place == "": if not place:
return return
else: else:
text = '%s. %s' % (place,description) text = '%s. %s' % (place,description)
else: else:
if place == "": if not place:
text = '%s. %s' % (date,description) text = '%s. %s' % (date,description)
else: else:
text = _('%(date)s in %(place)s.') % { 'date' : date, text = _('%(date)s in %(place)s.') % { 'date' : date,
@ -202,20 +202,23 @@ class IndivComplete(Report.Report):
self.d.end_cell() self.d.end_cell()
self.d.end_row() self.d.end_row()
for (family,mrel,frel) in self.person.get_parent_family_id_list(): for (family_id,mrel,frel) in self.person.get_parent_family_id_list():
if family == self.person.get_main_parents_family_id(): if family_id == self.person.get_main_parents_family_id():
continue continue
father = family.get_father_id() family = self.database.find_family_from_id(family_id)
if father: father_id = family.get_father_id()
if father_id:
father = self.database.find_person_from_id(father_id)
fname = father.get_primary_name().get_regular_name() fname = father.get_primary_name().get_regular_name()
frel = const.child_relations.find_value(frel) frel = const.child_relations.find_value(frel)
self.write_p_entry(_('Father'),fname,frel) self.write_p_entry(_('Father'),fname,frel)
else: else:
self.write_p_entry(_('Father'),'','') self.write_p_entry(_('Father'),'','')
mother = family.get_mother_id() mother_id = family.get_mother_id()
if mother: if mother_id:
mother = self.database.find_person_from_id(mother_id)
fname = mother.get_primary_name().get_regular_name() fname = mother.get_primary_name().get_regular_name()
frel = const.child_relations.find_value(frel) frel = const.child_relations.find_value(frel)
self.write_p_entry(_('Mother'),fname,frel) self.write_p_entry(_('Mother'),fname,frel)
@ -257,7 +260,7 @@ class IndivComplete(Report.Report):
def write_families(self): def write_families(self):
if len(self.person.get_family_id_list()) == 0: if not len(self.person.get_family_id_list()):
return return
self.d.start_table("three","IDS-IndTable") self.d.start_table("three","IDS-IndTable")
@ -294,7 +297,7 @@ class IndivComplete(Report.Report):
self.write_fact(event) self.write_fact(event)
child_id_list = family.get_child_id_list() child_id_list = family.get_child_id_list()
if len(child_id_list) > 0: if len(child_id_list):
self.d.start_row() self.d.start_row()
self.normal_cell(_("Children")) self.normal_cell(_("Children"))