From e3acd8279196d2155c0f2af2bac8af471cc83be5 Mon Sep 17 00:00:00 2001 From: Nick Hall Date: Sat, 2 Mar 2024 22:33:54 +0000 Subject: [PATCH] Fix display of invalid dates in editor citation tabs Fixes #13192. --- .../editors/displaytabs/citationrefmodel.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/gramps/gui/editors/displaytabs/citationrefmodel.py b/gramps/gui/editors/displaytabs/citationrefmodel.py index d007871b6ba..3ce654947ef 100644 --- a/gramps/gui/editors/displaytabs/citationrefmodel.py +++ b/gramps/gui/editors/displaytabs/citationrefmodel.py @@ -19,12 +19,22 @@ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. # + +# ------------------------------------------------------------------------- +# +# Python +# +# ------------------------------------------------------------------------- +from html import escape + + # ------------------------------------------------------------------------- # # GTK libraries # # ------------------------------------------------------------------------- from gi.repository import Gtk +from gramps.gen.config import config from gramps.gen.utils.string import conf_strings from gramps.gen.datehandler import get_date, get_date_valid from gramps.gen.const import GRAMPS_LOCALE as glocale @@ -32,6 +42,14 @@ _ = glocale.translation.gettext +# ------------------------------------------------------------------------- +# +# Globals +# +# ------------------------------------------------------------------------- +invalid_date_format = config.get("preferences.invalid-date-format") + + # ------------------------------------------------------------------------- # # CitationModel