From 38125ac6114a3526534a55e262bad6826592165a Mon Sep 17 00:00:00 2001 From: Paul Franklin Date: Tue, 18 Mar 2014 17:29:01 -0700 Subject: [PATCH] fix translation of children count to use ngettext --- gramps/plugins/graph/gvfamilylines.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/gramps/plugins/graph/gvfamilylines.py b/gramps/plugins/graph/gvfamilylines.py index 0b1ea1aef..2478b4ea9 100644 --- a/gramps/plugins/graph/gvfamilylines.py +++ b/gramps/plugins/graph/gvfamilylines.py @@ -362,7 +362,8 @@ class FamilyLinesReport(Report): if name_format != 0: self._name_display.set_default_format(name_format) - self.set_locale(menu.get_option_by_name('trans').get_value()) + lang = menu.get_option_by_name('trans').get_value() + self._locale = self.set_locale(lang) # convert the 'surnamecolors' string to a dictionary of names and colors self._surnamecolors = {} @@ -934,10 +935,9 @@ class FamilyLinesReport(Report): childrenStr = None if self._incchildcount: child_count = len(family.get_child_ref_list()) -# if child_count == 1: -# childrenStr = _('1 child') - if child_count > 1: - childrenStr = self._('%d children') % child_count + if child_count >= 1: + childrenStr = self._locale.translation.ngettext( + "%d child", "%d children", child_count) % child_count label = '' if weddingDate: