From bbdf6d80cc0b63afaa4f1c638ecb31ef0a1d7465 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Rapinat?= Date: Tue, 29 Dec 2009 16:56:27 +0000 Subject: [PATCH] 3485: A better message for date validator on AgeOnDate Gramplet. svn: r13939 --- src/gui/widgets/validatedmaskedentry.py | 3 ++- src/plugins/gramplet/AgeOnDateGramplet.py | 10 +++++----- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/gui/widgets/validatedmaskedentry.py b/src/gui/widgets/validatedmaskedentry.py index f70c4ab16..b43b7309e 100644 --- a/src/gui/widgets/validatedmaskedentry.py +++ b/src/gui/widgets/validatedmaskedentry.py @@ -1689,7 +1689,8 @@ def main(args): def on_validate(widget, text): myDate = parser.parse(text) if not myDate.is_regular(): - return ValidationError("'%s' is not a valid date value") + # used on AgeOnDateGramplet + return ValidationError(_("'%s' is not a valid date value")) win = gtk.Window() win.set_title('ValidatableMaskedEntry test window') diff --git a/src/plugins/gramplet/AgeOnDateGramplet.py b/src/plugins/gramplet/AgeOnDateGramplet.py index 12185c35c..e0d83fd09 100644 --- a/src/plugins/gramplet/AgeOnDateGramplet.py +++ b/src/plugins/gramplet/AgeOnDateGramplet.py @@ -64,11 +64,11 @@ class AgeOnDateGramplet(Gramplet): description.set_wrap_mode(gtk.WRAP_WORD) description.set_editable(False) buffer = description.get_buffer() - buffer.set_text(_("Enter a date in the entry below and click Run." - " This will compute the ages for everyone in your" - " Family Tree on that date. You can then sort by" - " the age column, and double-click the row to view" - " or edit.")) + buffer.set_text(_("Enter a date (YYYY-MM-DD) in the entry below" + " and click Run. This will compute the ages for" + " everyone in your Family Tree on that date." + " You can then sort by the age column, and" + " double-click the row to view or edit.")) label = gtk.Label() label.set_text(_("Date") + ":") self.entry = gtk.Entry()