From 8fd1eae38590043055ea55db9dc9677285321dbe Mon Sep 17 00:00:00 2001 From: Brian Matherly Date: Thu, 15 Jan 2009 21:04:52 +0000 Subject: [PATCH] 0002432: Detailed reports place dots where they do not belong. svn: r11627 --- 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 9c63d2c1c..313db9bd5 100644 --- a/src/plugins/DetAncestralReport.py +++ b/src/plugins/DetAncestralReport.py @@ -377,28 +377,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 d9b6fe851..caf0b24fa 100644 --- a/src/plugins/DetDescendantReport.py +++ b/src/plugins/DetDescendantReport.py @@ -276,30 +276,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()