diff --git a/src/docgen/PdfDoc.py b/src/docgen/PdfDoc.py index a1a509902..b398d7abb 100644 --- a/src/docgen/PdfDoc.py +++ b/src/docgen/PdfDoc.py @@ -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") #------------------------------------------------------------------------ # diff --git a/src/docgen/PdfDrawDoc.py b/src/docgen/PdfDrawDoc.py index 071fdc1ef..0f0237d5c 100644 --- a/src/docgen/PdfDrawDoc.py +++ b/src/docgen/PdfDrawDoc.py @@ -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, diff --git a/src/plugins/ReadGedcom.py b/src/plugins/ReadGedcom.py index 1bc8d2381..85aa17944 100644 --- a/src/plugins/ReadGedcom.py +++ b/src/plugins/ReadGedcom.py @@ -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) #------------------------------------------------------------------------- #