Better handling of REFNs on GEDCOM import, translation of exceptions
svn: r805
This commit is contained in:
parent
ed164388e1
commit
59224a4024
@ -43,7 +43,7 @@ try:
|
||||
from reportlab.lib.enums import TA_LEFT, TA_RIGHT, TA_CENTER, TA_JUSTIFY
|
||||
import reportlab.lib.styles
|
||||
except:
|
||||
raise "Missing Libraries", "The ReportLab modules are not installed"
|
||||
raise _("Missing Libraries"), _("The ReportLab modules are not installed")
|
||||
|
||||
#------------------------------------------------------------------------
|
||||
#
|
||||
|
@ -32,7 +32,7 @@ try:
|
||||
from reportlab.lib.units import cm
|
||||
from reportlab.lib.colors import Color
|
||||
except:
|
||||
raise "Missing Libraries", "The ReportLab modules are not installed"
|
||||
raise _("Missing Libraries"), _("The ReportLab modules are not installed")
|
||||
|
||||
def make_color(color):
|
||||
return Color(float(color[0])/255.0, float(color[1])/255.0,
|
||||
|
@ -1651,9 +1651,9 @@ class GedcomParser:
|
||||
|
||||
# new ID is not used
|
||||
if not pmap.has_key(new_key):
|
||||
del pmap[person.getId()]
|
||||
pmap[new_key] = person
|
||||
person.setId(new_key)
|
||||
del pmap[person.getId()]
|
||||
pmap[new_key] = person
|
||||
person.setId(new_key)
|
||||
else:
|
||||
tp = pmap[new_key]
|
||||
# same person, just change it
|
||||
@ -1663,16 +1663,12 @@ class GedcomParser:
|
||||
person.setId(new_key)
|
||||
# person currently using it was just added, change it
|
||||
elif tp in self.added:
|
||||
if not self.refn.has_key(tp):
|
||||
renamed.append(tp)
|
||||
del pmap[person.getId()]
|
||||
pmap[new_key] = person
|
||||
person.setId(new_key)
|
||||
self.db.addPerson(tp)
|
||||
|
||||
self.db.pmapIndex = new_pmax
|
||||
for person in renamed:
|
||||
del pmap[person]
|
||||
self.db.addPerson(person)
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
|
Loading…
Reference in New Issue
Block a user