summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMalcolm Tredinnick <malcolm.tredinnick@gmail.com>2007-03-11 10:37:33 +0000
committerMalcolm Tredinnick <malcolm.tredinnick@gmail.com>2007-03-11 10:37:33 +0000
commit5c2e83eef59c9591d1b5c65e5f265fc80271f283 (patch)
treef596d6ad4bfde83d801d9396bf57c3ec9b921033
parent2cf448152eaff0a5fbcf078ccf5a62f7a91ef3e1 (diff)
Fixed some i18n markup on date error messages. Thanks, Bastian Kleineidam. Refs
#3069. git-svn-id: http://code.djangoproject.com/svn/django/trunk@4702 bcc190cf-cafb-0310-a4f2-bffc1f526a37
-rw-r--r--django/core/validators.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/django/core/validators.py b/django/core/validators.py
index ebfbd3961e..6985228a00 100644
--- a/django/core/validators.py
+++ b/django/core/validators.py
@@ -140,7 +140,8 @@ def _isValidDate(date_string):
try:
date(year, month, day)
except ValueError, e:
- raise ValidationError, gettext('Invalid date: %s.' % e)
+ msg = gettext('Invalid date: %s') % gettext(str(e))
+ raise ValidationError, msg
def isValidANSIDate(field_data, all_data):
if not ansi_date_re.search(field_data):