7212: convert invalid dates to text on import

Make log message from [dfc3cc] use named arguments for l10n.
Thanks to Paul Franklin for finding this during code review.
This commit is contained in:
Vassilii Khachaturov 2013-11-25 10:55:07 +02:00
parent aaa250f7fc
commit 182c0f3437

View File

@ -2401,8 +2401,10 @@ class GrampsParser(UpdateCallback):
attrs = " ".join(
['{}="{}"'.format(k,escape(v, entities={'"' : """}))
for k,v in xml_attrs.iteritems()]))
LOG.warning(_("Invalid date {} in XML {}, preserving XML as text"
).format(date_error.date.to_struct(), xml))
# TRANSLATORS: leave the {date} and {xml} untranslated in the format string,
# but you may re-order them if needed.
LOG.warning(_("Invalid date {date} in XML {xml}, preserving XML as text"
).format(date=date_error.date.to_struct(), xml=xml))
date_value.set(modifier=Date.MOD_TEXTONLY, text=xml)
def start_datestr(self, attrs):