diff options
| author | Malcolm Tredinnick <malcolm.tredinnick@gmail.com> | 2008-10-05 05:05:32 +0000 |
|---|---|---|
| committer | Malcolm Tredinnick <malcolm.tredinnick@gmail.com> | 2008-10-05 05:05:32 +0000 |
| commit | 18f13aeeab7ab667df0d9c2ae556fd2f4fce3ad4 (patch) | |
| tree | b17beacbc5bc69acba80b14b765de960111159a0 | |
| parent | cf34d1f6870b0651c52f50a670f31f33201cd7a3 (diff) | |
Fixed #8879 -- Used ungettext instead of ngettext in the comments framework.
Patch from zgoda.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9116 bcc190cf-cafb-0310-a4f2-bffc1f526a37
| -rw-r--r-- | django/contrib/comments/forms.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/django/contrib/comments/forms.py b/django/contrib/comments/forms.py index 39016d84cf..713269fbe2 100644 --- a/django/contrib/comments/forms.py +++ b/django/contrib/comments/forms.py @@ -11,8 +11,7 @@ from models import Comment from django.utils.encoding import force_unicode from django.utils.hashcompat import sha_constructor from django.utils.text import get_text_list -from django.utils.translation import ngettext -from django.utils.translation import ugettext_lazy as _ +from django.utils.translation import ungettext, ugettext_lazy as _ COMMENT_MAX_LENGTH = getattr(settings,'COMMENT_MAX_LENGTH', 3000) @@ -122,7 +121,7 @@ class CommentForm(forms.Form): bad_words = [w for w in settings.PROFANITIES_LIST if w in comment.lower()] if bad_words: plural = len(bad_words) > 1 - raise forms.ValidationError(ngettext( + raise forms.ValidationError(ungettext( "Watch your mouth! The word %s is not allowed here.", "Watch your mouth! The words %s are not allowed here.", plural) % \ get_text_list(['"%s%s%s"' % (i[0], '-'*(len(i)-2), i[-1]) for i in bad_words], 'and')) |
