diff --git a/src/plugins/gramplet/StatsGramplet.py b/src/plugins/gramplet/StatsGramplet.py index daf266c29..f6cacbf42 100644 --- a/src/plugins/gramplet/StatsGramplet.py +++ b/src/plugins/gramplet/StatsGramplet.py @@ -152,8 +152,8 @@ class StatsGramplet(Gramplet): 'Filter', 'people with unknown gender') self.append_text(" %s" % unknowns) self.append_text("\n") - self.link("%s:" % _("Individuals with incomplete names"), - 'Filter', 'people with incomplete names') + self.link("%s:" % _("Incomplete names"), + 'Filter', 'incomplete names') self.append_text(" %s" % incomp_names) self.append_text("\n") self.link("%s:" % _("Individuals missing birth dates"), diff --git a/src/plugins/quickview/FilterByName.py b/src/plugins/quickview/FilterByName.py index 1bf8943c1..885d99ada 100644 --- a/src/plugins/quickview/FilterByName.py +++ b/src/plugins/quickview/FilterByName.py @@ -59,8 +59,8 @@ fname_map = {'all': _('Filtering_on|all'), 'females': _('Filtering_on|females'), 'people with unknown gender': _('Filtering_on|people with unknown gender'), - 'people with incomplete names': - _('Filtering_on|people with incomplete names'), + 'incomplete names': + _('Filtering_on|incomplete names'), 'people with missing birth dates': _('Filtering_on|people with missing birth dates'), 'disconnected people': _('Filtering_on|disconnected people'), @@ -277,7 +277,7 @@ def run(database, document, filter_name, *args, **kwargs): str(person.get_primary_name().get_type())) matches += 1 - elif (filter_name == 'people with incomplete names'): + elif (filter_name == 'incomplete names'): stab.columns(_("Name"), _("Birth Date"), _("Name type")) for person in database.iter_people(): for name in [person.get_primary_name()] + person.get_alternate_names(): diff --git a/src/plugins/textreport/Summary.py b/src/plugins/textreport/Summary.py index fd8640118..75edf8fe6 100644 --- a/src/plugins/textreport/Summary.py +++ b/src/plugins/textreport/Summary.py @@ -113,10 +113,17 @@ class SummaryReport(Report): with_media += 1 # Count people with incomplete names. - name = person.get_primary_name() - if name.get_first_name() == "" or name.get_surname() == "": - incomp_names += 1 - + for name in [person.get_primary_name()] + person.get_alternate_names(): + if name.get_first_name().strip() == "": + incomp_names += 1 + else: + if name.get_surname_list(): + for surname in name.get_surname_list(): + if surname.get_surname().strip() == "": + incomp_names += 1 + else: + incomp_names += 1 + # Count people without families. if (not person.get_main_parents_family_handle() and not len(person.get_family_handle_list())): @@ -160,7 +167,7 @@ class SummaryReport(Report): self.doc.end_paragraph() self.doc.start_paragraph("SR-Normal") - self.doc.write_text(_("Individuals with incomplete names: %d") % + self.doc.write_text(_("Incomplete names: %d") % incomp_names) self.doc.end_paragraph()