From 4d9381589a7a64428d398ac6c57b2df92e8cde02 Mon Sep 17 00:00:00 2001 From: Vassilii Khachaturov Date: Mon, 25 Nov 2013 10:55:07 +0200 Subject: [PATCH] 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. --- gramps/plugins/importer/importxml.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/gramps/plugins/importer/importxml.py b/gramps/plugins/importer/importxml.py index 13ff9394b..c6cc622a4 100644 --- a/gramps/plugins/importer/importxml.py +++ b/gramps/plugins/importer/importxml.py @@ -2492,8 +2492,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):