summaryrefslogtreecommitdiff
path: root/django/core/validators.py
diff options
context:
space:
mode:
authorClaude Paroz <claude@2xlibre.net>2017-01-26 20:58:33 +0100
committerClaude Paroz <claude@2xlibre.net>2017-02-07 09:04:04 +0100
commitc651331b34b7c3841c126959e6e52879bc6f0834 (patch)
tree3f93aeb92fc91dcc61649b46d9f26f7aaaff978b /django/core/validators.py
parent4353640ea9495d58fabd0357253b82de3b069408 (diff)
downloaddjango-c651331b34b7c3841c126959e6e52879bc6f0834.tar.gz
Converted usage of ugettext* functions to their gettext* aliases
Thanks Tim Graham for the review.
Diffstat (limited to 'django/core/validators.py')
-rw-r--r--django/core/validators.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/django/core/validators.py b/django/core/validators.py
index 365c6a7f15..44db6c00f0 100644
--- a/django/core/validators.py
+++ b/django/core/validators.py
@@ -8,7 +8,7 @@ from django.utils.deconstruct import deconstructible
from django.utils.encoding import force_text
from django.utils.functional import SimpleLazyObject
from django.utils.ipv6 import is_valid_ipv6_address
-from django.utils.translation import ugettext_lazy as _, ungettext_lazy
+from django.utils.translation import gettext_lazy as _, ngettext_lazy
# These values, if given to validate(), will trigger the self.required check.
EMPTY_VALUES = (None, '', [], (), {})
@@ -359,7 +359,7 @@ class MinValueValidator(BaseValidator):
@deconstructible
class MinLengthValidator(BaseValidator):
- message = ungettext_lazy(
+ message = ngettext_lazy(
'Ensure this value has at least %(limit_value)d character (it has %(show_value)d).',
'Ensure this value has at least %(limit_value)d characters (it has %(show_value)d).',
'limit_value')
@@ -374,7 +374,7 @@ class MinLengthValidator(BaseValidator):
@deconstructible
class MaxLengthValidator(BaseValidator):
- message = ungettext_lazy(
+ message = ngettext_lazy(
'Ensure this value has at most %(limit_value)d character (it has %(show_value)d).',
'Ensure this value has at most %(limit_value)d characters (it has %(show_value)d).',
'limit_value')
@@ -394,17 +394,17 @@ class DecimalValidator:
expected, otherwise raise ValidationError.
"""
messages = {
- 'max_digits': ungettext_lazy(
+ 'max_digits': ngettext_lazy(
'Ensure that there are no more than %(max)s digit in total.',
'Ensure that there are no more than %(max)s digits in total.',
'max'
),
- 'max_decimal_places': ungettext_lazy(
+ 'max_decimal_places': ngettext_lazy(
'Ensure that there are no more than %(max)s decimal place.',
'Ensure that there are no more than %(max)s decimal places.',
'max'
),
- 'max_whole_digits': ungettext_lazy(
+ 'max_whole_digits': ngettext_lazy(
'Ensure that there are no more than %(max)s digit before the decimal point.',
'Ensure that there are no more than %(max)s digits before the decimal point.',
'max'