fix translation of children count to use ngettext
This commit is contained in:
parent
03c995f52f
commit
37193c86a0
@ -361,7 +361,8 @@ class FamilyLinesReport(Report):
|
|||||||
if name_format != 0:
|
if name_format != 0:
|
||||||
self._name_display.set_default_format(name_format)
|
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
|
# convert the 'surnamecolors' string to a dictionary of names and colors
|
||||||
self._surnamecolors = {}
|
self._surnamecolors = {}
|
||||||
@ -933,10 +934,9 @@ class FamilyLinesReport(Report):
|
|||||||
childrenStr = None
|
childrenStr = None
|
||||||
if self._incchildcount:
|
if self._incchildcount:
|
||||||
child_count = len(family.get_child_ref_list())
|
child_count = len(family.get_child_ref_list())
|
||||||
# if child_count == 1:
|
if child_count >= 1:
|
||||||
# childrenStr = _('1 child')
|
childrenStr = self._locale.translation.ngettext(
|
||||||
if child_count > 1:
|
"%d child", "%d children", child_count) % child_count
|
||||||
childrenStr = self._('%d children') % child_count
|
|
||||||
|
|
||||||
label = ''
|
label = ''
|
||||||
if weddingDate:
|
if weddingDate:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user