Internationalization fixes, support for PDF generation

svn: r45
This commit is contained in:
Don Allingham
2001-05-22 22:30:13 +00:00
parent 175f7224a8
commit 0432e0998e
30 changed files with 454 additions and 199 deletions

View File

@@ -101,10 +101,10 @@ def loadData(database, filename, callback):
else:
xml_file = EncodedFile(gzip.open(filename,"rb"),'utf-8','latin-1')
except IOError,msg:
GnomeErrorDialog(filename + _(" could not be opened\n") + str(msg))
GnomeErrorDialog(_("%s could not be opened\n") % filename + str(msg))
return 0
except:
GnomeErrorDialog(filename + _(" could not be opened\n"))
GnomeErrorDialog(_("%s could not be opened\n") % filename)
return 0
try:
@@ -113,14 +113,13 @@ def loadData(database, filename, callback):
else:
parser.parse(xml_file)
except xml.sax.SAXParseException:
GnomeErrorDialog(filename + _(" is a corrupt file"))
GnomeErrorDialog(_("%s is a corrupt file") % filename)
return 0
except IOError,msg:
GnomeErrorDialog(filename + _(" is not a valid gramps file\n") + \
str(msg))
GnomeErrorDialog(_("Error reading %s") % filename + "\n" + str(msg))
return 0
except:
GnomeErrorDialog(_("Could not read ") + filename)
GnomeErrorDialog(_("Error reading %s") % filename)
return 0