Ticket #16403: django-comments-ungettext.diff
File django-comments-ungettext.diff, 904 bytes (added by , 13 years ago) |
---|
-
django/contrib/comments/forms.py
173 173 if settings.COMMENTS_ALLOW_PROFANITIES == False: 174 174 bad_words = [w for w in settings.PROFANITIES_LIST if w in comment.lower()] 175 175 if bad_words: 176 plural = len(bad_words) > 1177 176 raise forms.ValidationError(ungettext( 178 177 "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)) % \ 180 179 get_text_list(['"%s%s%s"' % (i[0], '-'*(len(i)-2), i[-1]) for i in bad_words], 'and')) 181 180 return comment 182 181