Issue 4293, problems with LagecyGedcom and empty events.
svn: r15996
This commit is contained in:
parent
43fa619ebc
commit
1cb6f2f3c8
@ -41,6 +41,10 @@ def gettext(msgid):
|
|||||||
:returns: Translation or the original.
|
:returns: Translation or the original.
|
||||||
:rtype: unicode
|
:rtype: unicode
|
||||||
"""
|
"""
|
||||||
|
# If msgid =="" then gettext will return po file header
|
||||||
|
# and that's not what we want.
|
||||||
|
if len(msgid.strip()) == 0:
|
||||||
|
return msgid
|
||||||
return unicode(pgettext.gettext(msgid))
|
return unicode(pgettext.gettext(msgid))
|
||||||
|
|
||||||
def ngettext(singular, plural, n):
|
def ngettext(singular, plural, n):
|
||||||
@ -82,4 +86,4 @@ def sgettext(msgid, sep='|'):
|
|||||||
if msgval == msgid:
|
if msgval == msgid:
|
||||||
sep_idx = msgid.rfind(sep)
|
sep_idx = msgid.rfind(sep)
|
||||||
msgval = msgid[sep_idx+1:]
|
msgval = msgid[sep_idx+1:]
|
||||||
return unicode(msgval)
|
return unicode(msgval)
|
||||||
|
@ -118,6 +118,7 @@ import LdsUtils
|
|||||||
import Utils
|
import Utils
|
||||||
from DateHandler._DateParser import DateParser
|
from DateHandler._DateParser import DateParser
|
||||||
from gen.db.dbconst import EVENT_KEY
|
from gen.db.dbconst import EVENT_KEY
|
||||||
|
from QuestionDialog import WarningDialog
|
||||||
|
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
@ -5433,7 +5434,12 @@ class GedcomParser(UpdateCallback):
|
|||||||
"""
|
"""
|
||||||
if state.genby == "GRAMPS":
|
if state.genby == "GRAMPS":
|
||||||
self.gedsource = self.gedmap.get_from_source_tag(line.data)
|
self.gedsource = self.gedmap.get_from_source_tag(line.data)
|
||||||
|
|
||||||
|
if state.genby.upper() == "LEGACY":
|
||||||
|
fname = os.path.basename(self.filename)
|
||||||
|
WarningDialog(_("Import of GEDCOM file %s with DEST=%s, could cause errors in the resulting database!") % \
|
||||||
|
(fname, state.genby), _("Look for nameless events."))
|
||||||
|
|
||||||
def __header_plac(self, line, state):
|
def __header_plac(self, line, state):
|
||||||
"""
|
"""
|
||||||
@param line: The current line in GedLine format
|
@param line: The current line in GedLine format
|
||||||
|
Loading…
x
Reference in New Issue
Block a user