* src/plugins/DetAncestralReport.py: fix endnotes for null sources

* src/plugins/DetDescendantReport.py: fix endnotes for null sources
* src/plugins/FtmStyleAncestors.py: fix endnotes for null sources


svn: r5212
This commit is contained in:
Don Allingham 2005-09-21 17:13:26 +00:00
parent 8e49c55017
commit e1ae9c619e
5 changed files with 12 additions and 6 deletions

View File

@ -1,4 +1,7 @@
2005-09-21 Don Allingham <don@gramps-project.org>
* src/plugins/DetAncestralReport.py: fix endnotes for null sources
* src/plugins/DetDescendantReport.py: fix endnotes for null sources
* src/plugins/FtmStyleAncestors.py: fix endnotes for null sources
* src/ReportUtils.py: fix typo
* src/plugins/NavWebPage.py: handle contact page issues, including
random commas and missing image.

View File

@ -1314,7 +1314,7 @@ def married_rel_str(database,person,family,is_first=True):
if person.get_gender() == RelLib.Person.MALE:
text = _('He had an unmarried relationship with %(spouse)s.') % values
else:
text = _('She hand an unmarried relationship with %(spouse)s.') % values
text = _('She had an unmarried relationship with %(spouse)s.') % values
else:
if person.get_gender() == RelLib.Person.MALE:
text = _('He had relationship with %(spouse)s.') % values
@ -1330,7 +1330,7 @@ def married_rel_str(database,person,family,is_first=True):
if person.get_gender() == RelLib.Person.MALE:
text = _('He had an unmarried relationship with %(spouse)s.') % values
else:
text = _('She hand an unmarried relationship with %(spouse)s.') % values
text = _('She had an unmarried relationship with %(spouse)s.') % values
else:
if person.get_gender() == RelLib.Person.MALE:
text = _('He also had relationship with %(spouse)s.') % values

View File

@ -520,7 +520,7 @@ class DetAncestorReport(Report.Report):
self.doc.end_paragraph()
def endnotes(self,obj):
if not self.includeSources:
if not obj or not self.includeSources:
return ""
msg = cStringIO.StringIO()
slist = obj.get_source_references()

View File

@ -545,8 +545,9 @@ class DetDescendantReport(Report.Report):
self.doc.end_paragraph()
def endnotes(self,obj):
if not self.includeSources:
if not obj or not self.includeSources:
return ""
msg = cStringIO.StringIO()
slist = obj.get_source_references()
if slist:

View File

@ -175,6 +175,8 @@ class FtmAncestorReport(Report.Report):
self.doc.end_paragraph()
def endnotes(self,obj):
if not obj:
return ""
msg = cStringIO.StringIO()
slist = obj.get_source_references()
if slist:
@ -197,9 +199,9 @@ class FtmAncestorReport(Report.Report):
self.sref_map[self.sref_index] = ref
msg.write("%d" % self.sref_index)
msg.write('</super>')
str = msg.getvalue()
value = msg.getvalue()
msg.close()
return str
return value
def print_notes(self,person):
note = person.get_note()