* src/plugins/FilterByName.py (run):

fixed a couple of missing translations; name counts were slightly off

2008-03-05  Douglas S. Blank  <dblank@cs.brynmawr.edu>


svn: r10198
This commit is contained in:
Doug Blank 2008-03-06 01:36:54 +00:00
parent 0e0733c5aa
commit fb875bd69e
2 changed files with 11 additions and 8 deletions

View File

@ -1,3 +1,7 @@
2008-03-05 Douglas S. Blank <dblank@cs.brynmawr.edu>
* src/plugins/FilterByName.py (run):
fixed a couple of missing translations; name counts were slightly off
2008-03-05 Douglas S. Blank <dblank@cs.brynmawr.edu> 2008-03-05 Douglas S. Blank <dblank@cs.brynmawr.edu>
* src/DataViews/GrampletView.py (make_requested_gramplet): * src/DataViews/GrampletView.py (make_requested_gramplet):
fixed bug in showing options with new gramplets fixed bug in showing options with new gramplets

View File

@ -101,10 +101,10 @@ def run(database, document, filter_name):
if birth_ref: if birth_ref:
birth = database.get_event_from_handle(birth_ref.ref) birth = database.get_event_from_handle(birth_ref.ref)
if not DateHandler.get_date(birth): if not DateHandler.get_date(birth):
stab.row(person, "birth event but no date") stab.row(person, _("birth event but no date"))
matches += 1 matches += 1
else: else:
stab.row(person, "missing birth event") stab.row(person, _("missing birth event"))
matches += 1 matches += 1
elif (filter_name == 'disconnected people'): elif (filter_name == 'disconnected people'):
stab.columns(_("Person"), _("Birth Date"), _("Name type")) stab.columns(_("Person"), _("Birth Date"), _("Name type"))
@ -131,11 +131,10 @@ def run(database, document, filter_name):
for person_handle in people: for person_handle in people:
person = database.get_person_from_handle(person_handle) person = database.get_person_from_handle(person_handle)
if person: if person:
name = person.get_primary_name() names = [person.get_primary_name()] + person.get_alternate_names()
if name: surnames = list(set([name.get_surname() for name in names]))
surname = name.get_surname() for surname in surnames:
if surname: namelist[surname] = namelist.get(surname, 0) + 1
namelist[surname] = namelist.get(surname, 0) + 1
surnames = namelist.keys() surnames = namelist.keys()
surnames.sort() surnames.sort()
stab.columns(_("Surname"), _("Count")) stab.columns(_("Surname"), _("Count"))
@ -167,7 +166,7 @@ def run(database, document, filter_name):
continue continue
medialist = person.get_media_list() medialist = person.get_media_list()
for item in medialist: for item in medialist:
stab.row(person, "media") stab.row(person, _("media"))
matches += 1 matches += 1
elif (filter_name == 'unique media'): elif (filter_name == 'unique media'):
stab.columns(_("Unique Media")) stab.columns(_("Unique Media"))