diff --git a/src/plugins/gramplet/PedigreeGramplet.py b/src/plugins/gramplet/PedigreeGramplet.py index a8a9d2fb8..51407036b 100644 --- a/src/plugins/gramplet/PedigreeGramplet.py +++ b/src/plugins/gramplet/PedigreeGramplet.py @@ -239,6 +239,7 @@ class PedigreeGramplet(Gramplet): gens.sort() self.append_text(_("\nBreakdown by generation:\n")) all = [active_person.handle] + percent_sign = _("percent sign or text string|%") for g in gens: count = len(self._generations[g]) handles = self._generations[g] @@ -246,12 +247,15 @@ class PedigreeGramplet(Gramplet): if g == 0: self.link(_("Generation 1"), 'PersonList', handles, tooltip=_("Double-click to see people in generation")) - self.append_text(_(" has 1 of 1 individual (100.00% complete)\n")) + percent = '%.2f%s' % ( 100, percent_sign) + print percent_sign, percent + self.append_text(_(" has 1 of 1 individual (%(percent)s complete)\n") % {'percent': percent}) else: all.extend(handles) self.link(_("Generation %d") % g, 'PersonList', handles, - tooltip=_("Double-click to see people in generation")) - percent = '%.2f%%' % ( float(count)/2**(g-1) * 100) + tooltip=_("Double-click to see people in generation %d") % g) + percent = '%.2f%s' % ( float(count)/2**(g-1) * 100, percent_sign) + print "plural", percent_sign, percent self.append_text(ngettext( " has %(count_person)d of %(max_count_person)d individuals (%(percent)s complete)\n", " has %(count_person)d of %(max_count_person)d individuals (%(percent)s complete)\n",