2003-07-22 Tim Waugh <twaugh@redhat.com>
* src/plugins/Ancestors.py: Mark translation strings. svn: r1922
This commit is contained in:
parent
0acc01c46c
commit
aafca6b2cd
@ -1,6 +1,5 @@
|
|||||||
2003-07-22 Tim Waugh <twaugh@redhat.com>
|
2003-07-22 Tim Waugh <twaugh@redhat.com>
|
||||||
* src/plugins/Ancestors.py: Mark the easy translation strings.
|
* src/plugins/Ancestors.py: Mark translation strings.
|
||||||
Start tentative work on making the rest translatable.
|
|
||||||
* src/RelLib.py: Made Person.probablyAlive() take partners into
|
* src/RelLib.py: Made Person.probablyAlive() take partners into
|
||||||
consideration if all else fails.
|
consideration if all else fails.
|
||||||
* src/plugins/WriteGedcom.py, src/plugins/gedcomexport.glade: New
|
* src/plugins/WriteGedcom.py, src/plugins/gedcomexport.glade: New
|
||||||
|
@ -388,18 +388,19 @@ class ComprehensiveAncestorsReport (Report.Report):
|
|||||||
info += ' ' + text[0].lower() + text[1:]
|
info += ' ' + text[0].lower() + text[1:]
|
||||||
elif dateobj.getValid ():
|
elif dateobj.getValid ():
|
||||||
if dateobj.isRange ():
|
if dateobj.isRange ():
|
||||||
info += ' '
|
info += ' ' + dateobj.getDate ()
|
||||||
elif (dateobj.getDayValid () and
|
elif (dateobj.getDayValid () and
|
||||||
dateobj.getMonthValid () and
|
dateobj.getMonthValid () and
|
||||||
dateobj.getYearValid ()):
|
dateobj.getYearValid ()):
|
||||||
info += ' on '
|
info += _(' on %(specific_date)s') % \
|
||||||
|
{'specific_date': dateobj.getDate ()}
|
||||||
else:
|
else:
|
||||||
info += ' in '
|
info += _(' in %(month_or_year)s') % \
|
||||||
|
{'month_or_year': dateobj.getDate ()}
|
||||||
|
|
||||||
info += dateobj.getDate ()
|
|
||||||
placename = event.getPlaceName ()
|
placename = event.getPlaceName ()
|
||||||
if placename:
|
if placename:
|
||||||
info += ' in ' + placename
|
info += _(' in %(place)s') % {'place': placename}
|
||||||
note = event.getNote ()
|
note = event.getNote ()
|
||||||
if note or description:
|
if note or description:
|
||||||
info += ' ('
|
info += ' ('
|
||||||
@ -433,13 +434,13 @@ class ComprehensiveAncestorsReport (Report.Report):
|
|||||||
birth = person.getBirth ()
|
birth = person.getBirth ()
|
||||||
date = birth.getDate ()
|
date = birth.getDate ()
|
||||||
if date:
|
if date:
|
||||||
ret += " b. " + date
|
ret += _(" b. %(date)s") % {'date': date}
|
||||||
ret += self.cite_sources (birth.getSourceRefList ())
|
ret += self.cite_sources (birth.getSourceRefList ())
|
||||||
|
|
||||||
death = person.getDeath ()
|
death = person.getDeath ()
|
||||||
date = death.getDate ()
|
date = death.getDate ()
|
||||||
if date:
|
if date:
|
||||||
ret += " d. " + date
|
ret += _(" d. %(date)s)") % {'date': date}
|
||||||
ret += self.cite_sources (death.getSourceRefList ())
|
ret += self.cite_sources (death.getSourceRefList ())
|
||||||
|
|
||||||
return ret
|
return ret
|
||||||
@ -474,10 +475,14 @@ class ComprehensiveAncestorsReport (Report.Report):
|
|||||||
return 'son'
|
return 'son'
|
||||||
|
|
||||||
def parents_of (self, person):
|
def parents_of (self, person):
|
||||||
childof = ('. ' + self.Pronoun (person) + ' is the ' +
|
gender = person.getGender ()
|
||||||
self.son_or_daughter (person) + ' of ')
|
if gender == RelLib.Person.female:
|
||||||
|
childof = '. ' + _("She is the daughter of ")
|
||||||
|
else:
|
||||||
|
childof = '. ' + _("He is the son of ")
|
||||||
|
|
||||||
family = person.getMainParents ()
|
family = person.getMainParents ()
|
||||||
ret = ''
|
ret = '. '
|
||||||
if family:
|
if family:
|
||||||
fathername = mothername = None
|
fathername = mothername = None
|
||||||
father = family.getFather ()
|
father = family.getFather ()
|
||||||
@ -490,13 +495,31 @@ class ComprehensiveAncestorsReport (Report.Report):
|
|||||||
if not mother and not father:
|
if not mother and not father:
|
||||||
pass
|
pass
|
||||||
elif not father:
|
elif not father:
|
||||||
ret = childof + mothername
|
if gender == RelLib.Person.female:
|
||||||
|
ret += _("She is the daughter of %(mother)s.") % \
|
||||||
|
{'mother': mothername}
|
||||||
|
else:
|
||||||
|
ret += _("He is the son of %(mother)s.") % \
|
||||||
|
{'mother': mothername}
|
||||||
elif not mother:
|
elif not mother:
|
||||||
ret = childof + fathername
|
if gender == RelLib.Person.female:
|
||||||
|
ret += _("She is the daughter of %(father)s.") % \
|
||||||
|
{'father': fathername}
|
||||||
|
else:
|
||||||
|
ret += _("He is the son of %(father)s.") % \
|
||||||
|
{'father': fathername}
|
||||||
else:
|
else:
|
||||||
ret = childof + fathername + ' and ' + mothername
|
if gender == RelLib.Person.female:
|
||||||
|
ret += \
|
||||||
|
_("She is the daughter of %(father)s and %(mother)s.")%\
|
||||||
|
{'father': fathername,
|
||||||
|
'mother': mothername}
|
||||||
|
else:
|
||||||
|
ret +=_("He is the son of %(father)s and %(mother)s.") % \
|
||||||
|
{'father': fathername,
|
||||||
|
'mother': mothername}
|
||||||
|
|
||||||
return ret + '.'
|
return ret
|
||||||
|
|
||||||
def first_name_or_nick (self, person):
|
def first_name_or_nick (self, person):
|
||||||
nickname = person.getNickName ()
|
nickname = person.getNickName ()
|
||||||
@ -515,13 +538,13 @@ class ComprehensiveAncestorsReport (Report.Report):
|
|||||||
gender = person.getGender ()
|
gender = person.getGender ()
|
||||||
if gender == RelLib.Person.female:
|
if gender == RelLib.Person.female:
|
||||||
if name.getType () == 'Married Name':
|
if name.getType () == 'Married Name':
|
||||||
return 'Mrs.'
|
return _('Mrs.')
|
||||||
|
|
||||||
return 'Miss'
|
return _('Miss')
|
||||||
elif gender == RelLib.Person.male:
|
elif gender == RelLib.Person.male:
|
||||||
return 'Mr.'
|
return _('Mr.')
|
||||||
else:
|
else:
|
||||||
return '(gender unknown)'
|
return _('(gender unknown)')
|
||||||
|
|
||||||
def cite_sources (self, sourcereflist):
|
def cite_sources (self, sourcereflist):
|
||||||
citation = ""
|
citation = ""
|
||||||
@ -569,7 +592,7 @@ class ComprehensiveAncestorsReport (Report.Report):
|
|||||||
|
|
||||||
if last.replace ('?', '') == '':
|
if last.replace ('?', '') == '':
|
||||||
if first_replaced == '':
|
if first_replaced == '':
|
||||||
name += ' (unknown)'
|
name += _(' (unknown)')
|
||||||
else:
|
else:
|
||||||
name += ' ' + last
|
name += ' ' + last
|
||||||
|
|
||||||
@ -599,11 +622,11 @@ class ComprehensiveAncestorsReport (Report.Report):
|
|||||||
child_count = len (childlist)
|
child_count = len (childlist)
|
||||||
if ((listing_children or family != from_family) and
|
if ((listing_children or family != from_family) and
|
||||||
child_count > 0):
|
child_count > 0):
|
||||||
children = ', and they had '
|
|
||||||
if child_count == 1:
|
if child_count == 1:
|
||||||
children += 'a child named '
|
children = _(', and they had a child named ')
|
||||||
else:
|
else:
|
||||||
children += str (child_count) + ' children: '
|
children += _(', and they had %d children: ') % \
|
||||||
|
child_count
|
||||||
|
|
||||||
count = 1
|
count = 1
|
||||||
for child in childlist:
|
for child in childlist:
|
||||||
@ -614,7 +637,7 @@ class ComprehensiveAncestorsReport (Report.Report):
|
|||||||
if child_count - count > 1:
|
if child_count - count > 1:
|
||||||
children += ', '
|
children += ', '
|
||||||
elif child_count - count == 1:
|
elif child_count - count == 1:
|
||||||
children += ' and '
|
children += _(' and ')
|
||||||
|
|
||||||
count += 1
|
count += 1
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user