Use correct method of translating number-based items (ngettext)
svn: r15511
This commit is contained in:
parent
8110ef8eda
commit
546272f1bb
@ -142,9 +142,9 @@ class WriterOptionBox(object):
|
|||||||
|
|
||||||
full_database_row = gtk.HBox()
|
full_database_row = gtk.HBox()
|
||||||
full_database_row.pack_start(gtk.Label("Unfiltered Family Tree:"), False)
|
full_database_row.pack_start(gtk.Label("Unfiltered Family Tree:"), False)
|
||||||
button = gtk.Button(
|
people_count = len(self.dbstate.db.get_person_handles())
|
||||||
ngettext("%d Person", "%d People",
|
button = gtk.Button(ngettext("%d Person", "%d People", people_count) %
|
||||||
len(self.dbstate.db.get_person_handles())))
|
people_count)
|
||||||
button.set_tooltip_text(_("Click to see preview of unfiltered data"))
|
button.set_tooltip_text(_("Click to see preview of unfiltered data"))
|
||||||
button.set_size_request(100, -1)
|
button.set_size_request(100, -1)
|
||||||
button.connect("clicked", self.show_preview_data)
|
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.
|
Build a frame for a proxy option. proxy_name is a string.
|
||||||
"""
|
"""
|
||||||
# Make a box and put the option in it:
|
# Make a box and put the option in it:
|
||||||
button = gtk.Button(
|
button = gtk.Button(ngettext("%d Person", "%d People", 0) % 0)
|
||||||
ngettext("%d Person", "%d People",
|
|
||||||
0))
|
|
||||||
button.set_size_request(100, -1)
|
button.set_size_request(100, -1)
|
||||||
button.connect("clicked", self.show_preview_data)
|
button.connect("clicked", self.show_preview_data)
|
||||||
button.proxy_name = proxy_name
|
button.proxy_name = proxy_name
|
||||||
@ -548,9 +546,10 @@ class WriterOptionBox(object):
|
|||||||
if preview:
|
if preview:
|
||||||
self.proxy_dbase[proxy_name] = dbase
|
self.proxy_dbase[proxy_name] = dbase
|
||||||
self.preview_proxy_button[proxy_name].set_sensitive(1)
|
self.preview_proxy_button[proxy_name].set_sensitive(1)
|
||||||
|
people_count = len(dbase.get_person_handles())
|
||||||
self.preview_proxy_button[proxy_name].set_label(
|
self.preview_proxy_button[proxy_name].set_label(
|
||||||
ngettext("%d Person", "%d People",
|
ngettext("%d Person", "%d People", people_count) %
|
||||||
len(dbase.get_person_handles())))
|
people_count)
|
||||||
return dbase
|
return dbase
|
||||||
|
|
||||||
def apply_proxy(self, proxy_name, dbase, progress=None):
|
def apply_proxy(self, proxy_name, dbase, progress=None):
|
||||||
|
Loading…
Reference in New Issue
Block a user