From 37193c86a084ff920d3c401415b71ecd210d428c Mon Sep 17 00:00:00 2001 From: Paul Franklin Date: Tue, 18 Mar 2014 17:27:12 -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 347de7602..2b980f7c2 100644 --- a/gramps/plugins/graph/gvfamilylines.py +++ b/gramps/plugins/graph/gvfamilylines.py @@ -361,7 +361,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 = {} @@ -933,10 +934,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: