* src/plugins/PatchNames.py: handle multiple titles (bug 1196056)
* src/plugins/ReorderIDs.py: bring up to speed with new handle/id methodology, svn: r4490
This commit is contained in:
parent
40cb50ac8c
commit
8f8a0bb642
@ -1,5 +1,6 @@
|
||||
2005-05-05 Don Allingham <don@gramps-project.org>
|
||||
* src/ReorderIDs.py: bring up to speed with new handle/id methodology,
|
||||
* src/plugins/PatchNames.py: handle multiple titles (bug 1196056)
|
||||
* src/plugins/ReorderIDs.py: bring up to speed with new handle/id methodology,
|
||||
|
||||
2005-05-05 Martin Hawlisch <Martin.Hawlisch@gmx.de>
|
||||
* src/GenericFilter.py: Fix copy-n-paste errors;
|
||||
|
@ -106,13 +106,25 @@ class PatchNames:
|
||||
for key in self.db.get_person_handles(sort_handles=False):
|
||||
|
||||
person = self.db.get_person_from_handle(key)
|
||||
first = person.get_primary_name().get_first_name()
|
||||
sname = person.get_primary_name().get_surname()
|
||||
name = person.get_primary_name()
|
||||
first = name.get_first_name()
|
||||
sname = name.get_surname()
|
||||
|
||||
match = _title_re.match(first)
|
||||
if match:
|
||||
if name.get_title():
|
||||
current_title = [name.get_title()]
|
||||
else:
|
||||
current_title = []
|
||||
while match:
|
||||
groups = match.groups()
|
||||
self.title_list.append((key,groups[0],groups[1]))
|
||||
first = groups[1]
|
||||
current_title.append(groups[0])
|
||||
match = _title_re.match(first)
|
||||
|
||||
if current_title:
|
||||
self.title_list.append((key," ".join(current_title),first))
|
||||
continue
|
||||
|
||||
match = _nick_re.match(first)
|
||||
if match:
|
||||
groups = match.groups()
|
||||
|
Loading…
x
Reference in New Issue
Block a user