Commit c63c33c1 authored by Jerome Flesch's avatar Jerome Flesch

GTK: Doc properties: When an invalid date is typed, show an example of what is expected.

Closes #844Signed-off-by: Jerome Flesch's avatarJerome Flesch <jflesch@openpaper.work>
parent bae7227e
......@@ -1414,7 +1414,11 @@ class DocPropertiesPanel(object):
date = BasicDoc.parse_name(date_txt)
except ValueError:
logger.warning("Invalid date format: {}".format(date_txt))
msg = _("Invalid date format: {}").format(date_txt)
msg = _("Invalid date format: {}\nExpected format: {}").format(
date_txt,
# TODO(Jflesch): Ugly. Example should come from the backend.
datetime.datetime(2019, 8, 17, 12, 0, 0, 0).strftime("%x")
)
dialog = Gtk.MessageDialog(
parent=self.__main_win.window,
flags=Gtk.DialogFlags.MODAL,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment