From 89bf35e3425407d7d59b92140c08a0b7bcc865d8 Mon Sep 17 00:00:00 2001 From: Brian Matherly Date: Thu, 15 Jan 2009 21:09:07 +0000 Subject: [PATCH] 0002432: Detailed reports place dots where they do not belong. svn: r11628 --- src/plugins/DetAncestralReport.py | 24 ++++++++++------------ src/plugins/DetDescendantReport.py | 33 +++++++++++++++--------------- 2 files changed, 27 insertions(+), 30 deletions(-) diff --git a/src/plugins/DetAncestralReport.py b/src/plugins/DetAncestralReport.py index 8cde4974f..10aac3f55 100644 --- a/src/plugins/DetAncestralReport.py +++ b/src/plugins/DetAncestralReport.py @@ -376,28 +376,26 @@ class DetAncestorReport(Report): self.doc.start_paragraph('DAR-MoreDetails') evtName = str( event.get_type() ) if date and place: - text += _('%(event_name)s: %(date)s, %(place)s') % { - 'event_name' : _(evtName), - 'date' : date, - 'place' : place } + text += _('%(date)s, %(place)s') % { + 'date' : date, 'place' : place } elif date: - text += _('%(event_name)s: %(date)s') % { - 'event_name' : _(evtName), - 'date' : date} + text += _('%(date)s') % {'date' : date} elif place: - text += _('%(event_name)s: %(place)s') % { - 'event_name' : _(evtName), - 'place' : place } - else: - text += _('%(event_name)s: ') % {'event_name' : _(evtName)} + text += _('%(place)s') % { 'place' : place } if event.get_description(): if text: text += ". " text += event.get_description() + text += self.endnotes(event) + if text: - text += _('%(endnotes)s.') % { 'endnotes' : self.endnotes(event) } + text += ". " + + text = _('%(event_name)s: %(event_text)s') % { + 'event_name' : _(evtName), + 'event_text' : text } self.doc.write_text(text) diff --git a/src/plugins/DetDescendantReport.py b/src/plugins/DetDescendantReport.py index 604162c92..2fc1e587e 100644 --- a/src/plugins/DetDescendantReport.py +++ b/src/plugins/DetDescendantReport.py @@ -309,30 +309,29 @@ class DetDescendantReport(Report): self.doc.start_paragraph('DDR-MoreDetails') evtName = str( event.get_type() ) if date and place: - text += _('%(event_name)s: %(date)s, %(place)s') % { - 'event_name' : _(evtName), - 'date' : date, - 'place' : place } + text += _('%(date)s, %(place)s') % { + 'date' : date, 'place' : place } elif date: - text += _('%(event_name)s: %(date)s') % { - 'event_name' : _(evtName), - 'date' : date} + text += _('%(date)s') % {'date' : date} elif place: - text += _('%(event_name)s: %(place)s') % { - 'event_name' : _(evtName), - 'place' : place } - else: - text += _('%(event_name)s: ') % {'event_name' : _(evtName)} + text += _('%(place)s') % { 'place' : place } if event.get_description(): - if text and (date or place): + if text: text += ". " text += event.get_description() - - text += "%s. " % self.endnotes(event) - + + text += self.endnotes(event) + + if text: + text += ". " + + text = _('%(event_name)s: %(event_text)s') % { + 'event_name' : _(evtName), + 'event_text' : text } + self.doc.write_text(text) - + if self.inc_attrs: text = "" attr_list = event.get_attribute_list()