diff options
| author | Claude Paroz <claude@2xlibre.net> | 2017-01-26 20:58:33 +0100 |
|---|---|---|
| committer | Claude Paroz <claude@2xlibre.net> | 2017-02-07 09:04:04 +0100 |
| commit | c651331b34b7c3841c126959e6e52879bc6f0834 (patch) | |
| tree | 3f93aeb92fc91dcc61649b46d9f26f7aaaff978b /django/forms/formsets.py | |
| parent | 4353640ea9495d58fabd0357253b82de3b069408 (diff) | |
Converted usage of ugettext* functions to their gettext* aliases
Thanks Tim Graham for the review.
Diffstat (limited to 'django/forms/formsets.py')
| -rw-r--r-- | django/forms/formsets.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/django/forms/formsets.py b/django/forms/formsets.py index 4d8259c2c5..60feb618db 100644 --- a/django/forms/formsets.py +++ b/django/forms/formsets.py @@ -6,7 +6,7 @@ from django.forms.widgets import HiddenInput from django.utils.functional import cached_property from django.utils.html import html_safe from django.utils.safestring import mark_safe -from django.utils.translation import ugettext as _, ungettext +from django.utils.translation import gettext as _, ngettext __all__ = ('BaseFormSet', 'formset_factory', 'all_valid') @@ -341,14 +341,14 @@ class BaseFormSet: if (self.validate_max and self.total_form_count() - len(self.deleted_forms) > self.max_num) or \ self.management_form.cleaned_data[TOTAL_FORM_COUNT] > self.absolute_max: - raise ValidationError(ungettext( + raise ValidationError(ngettext( "Please submit %d or fewer forms.", "Please submit %d or fewer forms.", self.max_num) % self.max_num, code='too_many_forms', ) if (self.validate_min and self.total_form_count() - len(self.deleted_forms) - empty_forms_count < self.min_num): - raise ValidationError(ungettext( + raise ValidationError(ngettext( "Please submit %d or more forms.", "Please submit %d or more forms.", self.min_num) % self.min_num, code='too_few_forms') |
