From 80fa9b19b895e80cd160b6c0936a83ad850ca086 Mon Sep 17 00:00:00 2001 From: Vassilii Khachaturov Date: Mon, 25 Nov 2013 11:09:24 +0200 Subject: [PATCH] 7212: convert invalid dates to text on import Back-ported [4d9381] - use named format strings to enable l10n. --- src/plugins/import/ImportXml.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/plugins/import/ImportXml.py b/src/plugins/import/ImportXml.py index 29eddabb4..dfe37768c 100644 --- a/src/plugins/import/ImportXml.py +++ b/src/plugins/import/ImportXml.py @@ -2347,8 +2347,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.dateval, 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.dateval, xml=xml)) date_value.set(modifier=gen.lib.Date.MOD_TEXTONLY, text=xml) def start_datestr(self, attrs):