#2657,#1718 use ngettext (contribution by josip)

svn: r11828
This commit is contained in:
Jérôme Rapinat
2009-02-03 16:21:42 +00:00
parent bf94a6b84a
commit 017b32ebe0
5 changed files with 26 additions and 7 deletions

View File

@@ -791,7 +791,7 @@ class RelationshipView(PageView.PersonNavView):
else:
count = 0
if count > 1 :
childmsg = ngettext(" (1 sibling)", " (%d siblings)", count) % count
childmsg = ngettext(" (%d sibling)", " (%d siblings)", count) % count
elif count == 1 :
gender = self.dbstate.db.get_person_from_handle(\
child_list[0]).gender
@@ -847,7 +847,7 @@ class RelationshipView(PageView.PersonNavView):
else:
count = 0
if count > 1 :
childmsg = ngettext(" (1 sibling)"," (%d siblings)", count) % count
childmsg = ngettext(" (%d sibling)"," (%d siblings)", count) % count
elif count == 1 :
gender = self.dbstate.db.get_person_from_handle(\
child_list[0]).gender
@@ -1267,7 +1267,7 @@ class RelationshipView(PageView.PersonNavView):
else:
count = 0
if count >= 1 :
childmsg = ngettext(" (1 child)"," (%d children)", count) % count
childmsg = ngettext(" (%d child)"," (%d children)", count) % count
else :
childmsg = _(" (no children)")
box = self.get_people_box(handle, post_msg=childmsg)
@@ -1313,7 +1313,7 @@ class RelationshipView(PageView.PersonNavView):
else:
count = 0
if count >= 1 :
childmsg = ngettext(" (1 child)"," (%d children)", count) % count
childmsg = ngettext(" (%d child)"," (%d children)", count) % count
else :
childmsg = _(" (no children)")
box = self.get_people_box(post_msg=childmsg)