Use correct method of translating number-based items (ngettext)

svn: r15511
This commit is contained in:
Doug Blank 2010-05-30 13:15:14 +00:00
parent 8110ef8eda
commit 546272f1bb

View File

@ -142,9 +142,9 @@ class WriterOptionBox(object):
full_database_row = gtk.HBox()
full_database_row.pack_start(gtk.Label("Unfiltered Family Tree:"), False)
button = gtk.Button(
ngettext("%d Person", "%d People",
len(self.dbstate.db.get_person_handles())))
people_count = len(self.dbstate.db.get_person_handles())
button = gtk.Button(ngettext("%d Person", "%d People", people_count) %
people_count)
button.set_tooltip_text(_("Click to see preview of unfiltered data"))
button.set_size_request(100, -1)
button.connect("clicked", self.show_preview_data)
@ -283,9 +283,7 @@ class WriterOptionBox(object):
Build a frame for a proxy option. proxy_name is a string.
"""
# Make a box and put the option in it:
button = gtk.Button(
ngettext("%d Person", "%d People",
0))
button = gtk.Button(ngettext("%d Person", "%d People", 0) % 0)
button.set_size_request(100, -1)
button.connect("clicked", self.show_preview_data)
button.proxy_name = proxy_name
@ -548,9 +546,10 @@ class WriterOptionBox(object):
if preview:
self.proxy_dbase[proxy_name] = dbase
self.preview_proxy_button[proxy_name].set_sensitive(1)
people_count = len(dbase.get_person_handles())
self.preview_proxy_button[proxy_name].set_label(
ngettext("%d Person", "%d People",
len(dbase.get_person_handles())))
ngettext("%d Person", "%d People", people_count) %
people_count)
return dbase
def apply_proxy(self, proxy_name, dbase, progress=None):