Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Browse files

Fixed #17597 -- Marked a word for translation in the comments app's f…

…orm class. Thanks, Claude Paroz.

git-svn-id: bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
1 parent 2b0c1ea commit 928f605efe0af2362c368e4bd9c280c7620abf3f @jezdez jezdez committed
Showing with 5 additions and 3 deletions.
  1. +5 −3 django/contrib/comments/
8 django/contrib/comments/
@@ -8,7 +8,7 @@
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 @@ def clean_comment(self):
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):

0 comments on commit 928f605

Please sign in to comment.
Something went wrong with that request. Please try again.