diff options
| author | Jannis Leidel <jannis@leidel.info> | 2012-02-04 18:26:58 +0000 |
|---|---|---|
| committer | Jannis Leidel <jannis@leidel.info> | 2012-02-04 18:26:58 +0000 |
| commit | 928f605efe0af2362c368e4bd9c280c7620abf3f (patch) | |
| tree | 9ebb80bc51060f78443a076f6e0294629cfff717 | |
| parent | 2b0c1ea64155bd3f825b06e266d73c00dbf4196f (diff) | |
Fixed #17597 -- Marked a word for translation in the comments app's form class. Thanks, Claude Paroz.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17438 bcc190cf-cafb-0310-a4f2-bffc1f526a37
| -rw-r--r-- | django/contrib/comments/forms.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/django/contrib/comments/forms.py b/django/contrib/comments/forms.py index 05c4afebe1..830e24bca9 100644 --- a/django/contrib/comments/forms.py +++ b/django/contrib/comments/forms.py @@ -8,7 +8,7 @@ from django.utils.crypto import salted_hmac, constant_time_compare from django.utils.encoding import force_unicode from django.utils.text import get_text_list from django.utils import timezone -from django.utils.translation import ungettext, ugettext_lazy as _ +from django.utils.translation import ungettext, ugettext, ugettext_lazy as _ COMMENT_MAX_LENGTH = getattr(settings,'COMMENT_MAX_LENGTH', 3000) @@ -175,8 +175,10 @@ class CommentDetailsForm(CommentSecurityForm): if bad_words: raise forms.ValidationError(ungettext( "Watch your mouth! The word %s is not allowed here.", - "Watch your mouth! The words %s are not allowed here.", len(bad_words)) - % get_text_list(['"%s%s%s"' % (i[0], '-'*(len(i)-2), i[-1]) for i in bad_words], 'and')) + "Watch your mouth! The words %s are not allowed here.", + len(bad_words)) % get_text_list( + ['"%s%s%s"' % (i[0], '-'*(len(i)-2), i[-1]) + for i in bad_words], ugettext('and'))) return comment class CommentForm(CommentDetailsForm): |
