Ticket #16403: django-comments-ungettext.diff

File django-comments-ungettext.diff, 904 bytes (added by Dan Poirier, 13 years ago)
  • django/contrib/comments/forms.py

     
    173173        if settings.COMMENTS_ALLOW_PROFANITIES == False:
    174174            bad_words = [w for w in settings.PROFANITIES_LIST if w in comment.lower()]
    175175            if bad_words:
    176                 plural = len(bad_words) > 1
    177176                raise forms.ValidationError(ungettext(
    178177                    "Watch your mouth! The word %s is not allowed here.",
    179                     "Watch your mouth! The words %s are not allowed here.", plural) % \
     178                    "Watch your mouth! The words %s are not allowed here.", len(bad_words)) % \
    180179                    get_text_list(['"%s%s%s"' % (i[0], '-'*(len(i)-2), i[-1]) for i in bad_words], 'and'))
    181180        return comment
    182181
Back to Top