From 546272f1bbef2d12f870f06de24f60ad1303d93a Mon Sep 17 00:00:00 2001 From: Doug Blank Date: Sun, 30 May 2010 13:15:14 +0000 Subject: [PATCH] Use correct method of translating number-based items (ngettext) svn: r15511 --- src/ExportOptions.py | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/src/ExportOptions.py b/src/ExportOptions.py index 683cdf317..d73858689 100644 --- a/src/ExportOptions.py +++ b/src/ExportOptions.py @@ -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):