diff --git a/ChangeLog b/ChangeLog index 72b06c014..865fc5a1f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2006-12-21 Stefan Bjork + * src/plugins/DetAncestralReport.py, + * src/plugins/DetDescendantReport.py: Add dot (".") after event + descriptions. + * src/DateHandler/_Date_sv.py: Use en-dash in time spans. + 2006-12-20 Alex Roitman * src/PluginUtils/_Plugins.py (PluginDialog.__init__): Connect to signal in the parent class. diff --git a/src/DateHandler/_Date_sv.py b/src/DateHandler/_Date_sv.py index 9f2b28cee..99f196b7a 100644 --- a/src/DateHandler/_Date_sv.py +++ b/src/DateHandler/_Date_sv.py @@ -60,6 +60,8 @@ class DateParserSv(DateParser): u'innan' : Date.MOD_BEFORE, u'efter' : Date.MOD_AFTER, u'omkring' : Date.MOD_ABOUT, + u'ca' : Date.MOD_ABOUT, + u'c:a' : Date.MOD_ABOUT } bce = ["f Kr"] @@ -92,7 +94,7 @@ class DateParserSv(DateParser): def init_strings(self): DateParser.init_strings(self) - self._span = re.compile(u"(från)\s+(?P.+)\s+till\s+(?P.+)", + self._span = re.compile(u"(från)?\s*(?P.+)\s*(till|--|–)\s*(?P.+)", re.IGNORECASE) self._range = re.compile(u"(mellan)\s+(?P.+)\s+och\s+(?P.+)", re.IGNORECASE) @@ -125,7 +127,7 @@ class DateDisplaySv(DateDisplay): " (islamisk)" ) - _mod_str = ("",u"före ",u"efter ",u"omkring ","","","") + _mod_str = ("",u"före ",u"efter ",u"c:a ","","","") _qual_str = ("",u"uppskattat ",u"beräknat ") @@ -149,7 +151,7 @@ class DateDisplaySv(DateDisplay): elif mod == Date.MOD_SPAN: d1 = self.display_cal[cal](start) d2 = self.display_cal[cal](date.get_stop_date()) - return u"%sfrån %s till %s%s" % (qual_str,d1,d2,self.calendar[cal]) + return u"%s%s – %s%s" % (qual_str,d1,d2,self.calendar[cal]) elif mod == Date.MOD_RANGE: d1 = self.display_cal[cal](start) d2 = self.display_cal[cal](date.get_stop_date()) diff --git a/src/plugins/DetAncestralReport.py b/src/plugins/DetAncestralReport.py index 603bbba82..a92aeece3 100644 --- a/src/plugins/DetAncestralReport.py +++ b/src/plugins/DetAncestralReport.py @@ -347,6 +347,7 @@ class DetAncestorReport(Report): 'event_name' : _(evtName)}) if event.get_description(): self.doc.write_text(event.get_description()) + self.doc.write_text(".") self.doc.end_paragraph() def write_parents(self, person, firstName): diff --git a/src/plugins/DetDescendantReport.py b/src/plugins/DetDescendantReport.py index 5bf8d8d18..d3a1f76b1 100644 --- a/src/plugins/DetDescendantReport.py +++ b/src/plugins/DetDescendantReport.py @@ -375,6 +375,7 @@ class DetDescendantReport(Report): 'event_name' : _(evtName)}) if event.get_description(): self.doc.write_text(event.get_description()) + self.doc.write_text(".") self.doc.end_paragraph() def write_parents(self, person, firstName):