Better handling of REFNs on GEDCOM import, translation of exceptions

svn: r805
This commit is contained in:
Don Allingham 2002-02-28 03:07:26 +00:00
parent ed164388e1
commit 59224a4024
3 changed files with 6 additions and 10 deletions

View File

@ -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")
#------------------------------------------------------------------------
#

View File

@ -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,

View File

@ -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)
#-------------------------------------------------------------------------
#