add Gramps type name on translator class
svn: r16113
This commit is contained in:
@ -157,6 +157,8 @@ class DetAncestorReport(Report):
|
||||
|
||||
self.__get_date = translator.get_date
|
||||
|
||||
self.__get_type = translator.get_type
|
||||
|
||||
self.bibli = Bibliography(Bibliography.MODE_PAGE)
|
||||
|
||||
def apply_filter(self, person_handle, index):
|
||||
@ -219,6 +221,7 @@ class DetAncestorReport(Report):
|
||||
if self.inc_sources:
|
||||
if self.pgbrkenotes:
|
||||
self.doc.page_break()
|
||||
# it ignores language set for Note type (use locale)
|
||||
endnotes.write_endnotes(self.bibli, self.database, self.doc,
|
||||
printnotes=self.inc_srcnotes)
|
||||
|
||||
@ -314,10 +317,10 @@ class DetAncestorReport(Report):
|
||||
self.doc.end_paragraph()
|
||||
first = False
|
||||
self.doc.start_paragraph('DAR-MoreDetails')
|
||||
atype = str( alt_name.get_type() )
|
||||
atype = self.__get_type(alt_name.get_type())
|
||||
self.doc.write_text_citation(
|
||||
self._('%(name_kind)s: %(name)s%(endnotes)s') % {
|
||||
'name_kind' : atype,
|
||||
'name_kind' : self._(atype),
|
||||
'name' : alt_name.get_regular_name(),
|
||||
'endnotes' : self.endnotes(alt_name),
|
||||
})
|
||||
@ -374,7 +377,7 @@ class DetAncestorReport(Report):
|
||||
|
||||
for attr in attrs:
|
||||
self.doc.start_paragraph('DAR-MoreDetails')
|
||||
attrName = str(attr.get_type())
|
||||
attrName = self.__get_type(attr.get_type())
|
||||
text = self._("%(type)s: %(value)s%(endnotes)s") % {
|
||||
'type' : self._(attrName),
|
||||
'value' : attr.get_value(),
|
||||
@ -400,7 +403,7 @@ class DetAncestorReport(Report):
|
||||
place = u''
|
||||
|
||||
self.doc.start_paragraph('DAR-MoreDetails')
|
||||
evtName = str( event.get_type() )
|
||||
evtName = self.__get_type(event.get_type())
|
||||
if date and place:
|
||||
text += self._('%(date)s, %(place)s') % {
|
||||
'date' : date, 'place' : place }
|
||||
@ -432,7 +435,7 @@ class DetAncestorReport(Report):
|
||||
for attr in attr_list:
|
||||
if text:
|
||||
text += "; "
|
||||
attrName = str(attr.get_type())
|
||||
attrName = self.__get_type(attr.get_type())
|
||||
text += self._("%(type)s: %(value)s%(endnotes)s") % {
|
||||
'type' : self._(attrName),
|
||||
'value' : attr.get_value(),
|
||||
|
Reference in New Issue
Block a user