Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Browse files

Fixed #5011 -- Fixed usage of ungettext in hasNoProfanities validator…

…. Thanks,

git-svn-id: bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit f128c7bbb787be670a1a827c5bf810d0ea78ce20 1 parent 9ee6326
@adrianholovaty adrianholovaty authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  django/core/
2  django/core/
@@ -269,7 +269,7 @@ def hasNoProfanities(field_data, all_data):
words_seen = [w for w in settings.PROFANITIES_LIST if w in field_data]
if words_seen:
from django.utils.text import get_text_list
- plural = len(words_seen) > 1
+ plural = len(words_seen)
raise 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 words_seen], 'and')

0 comments on commit f128c7b

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