summaryrefslogtreecommitdiff
path: root/django/forms/models.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/forms/models.py
parent4353640ea9495d58fabd0357253b82de3b069408 (diff)
Converted usage of ugettext* functions to their gettext* aliases
Thanks Tim Graham for the review.
Diffstat (limited to 'django/forms/models.py')
-rw-r--r--django/forms/models.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/django/forms/models.py b/django/forms/models.py
index 0368839415..cf4775169e 100644
--- a/django/forms/models.py
+++ b/django/forms/models.py
@@ -18,7 +18,7 @@ from django.forms.widgets import (
)
from django.utils.encoding import force_text
from django.utils.text import capfirst, get_text_list
-from django.utils.translation import ugettext, ugettext_lazy as _
+from django.utils.translation import gettext, gettext_lazy as _
__all__ = (
'ModelForm', 'BaseModelForm', 'model_to_dict', 'fields_for_model',
@@ -719,16 +719,16 @@ class BaseModelFormSet(BaseFormSet):
def get_unique_error_message(self, unique_check):
if len(unique_check) == 1:
- return ugettext("Please correct the duplicate data for %(field)s.") % {
+ return gettext("Please correct the duplicate data for %(field)s.") % {
"field": unique_check[0],
}
else:
- return ugettext("Please correct the duplicate data for %(field)s, which must be unique.") % {
+ return gettext("Please correct the duplicate data for %(field)s, which must be unique.") % {
"field": get_text_list(unique_check, _("and")),
}
def get_date_error_message(self, date_check):
- return ugettext(
+ return gettext(
"Please correct the duplicate data for %(field_name)s "
"which must be unique for the %(lookup)s in %(date_field)s."
) % {
@@ -738,7 +738,7 @@ class BaseModelFormSet(BaseFormSet):
}
def get_form_error(self):
- return ugettext("Please correct the duplicate values below.")
+ return gettext("Please correct the duplicate values below.")
def save_existing_objects(self, commit=True):
self.changed_objects = []