* src/DateDisplay.py: properly encode french republican dates as unicode

svn: r4682
This commit is contained in:
Don Allingham 2005-05-26 00:12:34 +00:00
parent 745585d93c
commit 2fa9ffc7fe
2 changed files with 19 additions and 7 deletions

View File

@ -1,3 +1,6 @@
2005-05-25 Don Allingham <don@gramps-project.org>
* src/DateDisplay.py: properly encode french republican dates as unicode
2005-05-26 Martin Hawlisch <Martin.Hawlisch@gmx.de> 2005-05-26 Martin Hawlisch <Martin.Hawlisch@gmx.de>
* src/EditSource.py (DelSrcQuery.query_response), * src/EditSource.py (DelSrcQuery.query_response),
src/EditPlace.py (DeletePlaceQuery.query_response), src/EditPlace.py (DeletePlaceQuery.query_response),

View File

@ -83,11 +83,20 @@ class DateDisplay:
) )
_french = ( _french = (
'', u'Vend\xc3\xa9miaire', 'Brumaire', '',
'Frimaire', u'Niv\xc3\xb4se', u'Pluvi\xc3\xb4se', unicode("Vendémiaire",'latin-1'),
u'Vent\xc3\xb4se', 'Germinal', u'Flor\xc3\xa9al', 'Brumaire',
'Prairial', 'Messidor', 'Thermidor', 'Frimaire',
'Fructidor', 'Extra' unicode("Nivôse",'latin-1'),
unicode("Pluviôse",'latin-1'),
unicode("Ventôse",'latin-1'),
'Germinal',
unicode("Floréal",'latin-1'),
'Prairial',
'Messidor',
'Thermidor',
'Fructidor',
'Extra'
) )
_persian = ( _persian = (
@ -271,9 +280,9 @@ class DateDisplay:
if date_val[1] == 0: if date_val[1] == 0:
return year return year
else: else:
return "%s %d" % (month_list[date_val[1]],year) return u"%s %d" % (month_list[date_val[1]],year)
else: else:
return "%s %d, %s" % (month_list[date_val[1]],date_val[0],year) return u"%s %d, %s" % (month_list[date_val[1]],date_val[0],year)
def _display_french(self,date_val): def _display_french(self,date_val):
return self._display_calendar(date_val,self._french) return self._display_calendar(date_val,self._french)