diff options
| author | Andrew Godwin <andrew@aeracode.org> | 2013-05-10 12:55:30 +0100 |
|---|---|---|
| committer | Andrew Godwin <andrew@aeracode.org> | 2013-05-10 12:55:30 +0100 |
| commit | cb4b0de49e027f09f8abe63e2fa43f60fc1ef13f (patch) | |
| tree | 712da07b2b80fc503aea683c096a8774dceaad01 /django/forms/formsets.py | |
| parent | f6801a234fb9460eac80d146534ac340e178c466 (diff) | |
| parent | bdd285723f9b0044eca690634c412c1c3eec76c0 (diff) | |
Merge branch 'master' into schema-alteration
Diffstat (limited to 'django/forms/formsets.py')
| -rw-r--r-- | django/forms/formsets.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/django/forms/formsets.py b/django/forms/formsets.py index 2ab197dee2..2bd11d9f53 100644 --- a/django/forms/formsets.py +++ b/django/forms/formsets.py @@ -9,7 +9,7 @@ from django.utils.encoding import python_2_unicode_compatible from django.utils.safestring import mark_safe from django.utils import six from django.utils.six.moves import xrange -from django.utils.translation import ugettext as _ +from django.utils.translation import ungettext, ugettext as _ __all__ = ('BaseFormSet', 'all_valid') @@ -302,7 +302,9 @@ class BaseFormSet(object): try: if (self.validate_max and self.total_form_count() > self.max_num) or \ self.management_form.cleaned_data[TOTAL_FORM_COUNT] > self.absolute_max: - raise ValidationError(_("Please submit %s or fewer forms." % self.max_num)) + raise ValidationError(ungettext( + "Please submit %d or fewer forms.", + "Please submit %d or fewer forms.", self.max_num) % self.max_num) # Give self.clean() a chance to do cross-form validation. self.clean() except ValidationError as e: |
