fix translation of children count to use ngettext
This commit is contained in:
parent
eefb9feb24
commit
38125ac611
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user