summaryrefslogtreecommitdiff
path: root/django/contrib/postgres/utils.py
diff options
context:
space:
mode:
Diffstat (limited to 'django/contrib/postgres/utils.py')
-rw-r--r--django/contrib/postgres/utils.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/django/contrib/postgres/utils.py b/django/contrib/postgres/utils.py
index 1563149c7e..a2bbb72f36 100644
--- a/django/contrib/postgres/utils.py
+++ b/django/contrib/postgres/utils.py
@@ -2,7 +2,7 @@ from __future__ import unicode_literals
from django.core.exceptions import ValidationError
from django.utils.functional import SimpleLazyObject
-from django.utils.translation import string_concat
+from django.utils.text import format_lazy
def prefix_validation_error(error, prefix, code, params):
@@ -15,10 +15,11 @@ def prefix_validation_error(error, prefix, code, params):
return ValidationError(
# We can't simply concatenate messages since they might require
# their associated parameters to be expressed correctly which
- # is not something `string_concat` does. For example, proxied
+ # is not something `format_lazy` does. For example, proxied
# ungettext calls require a count parameter and are converted
# to an empty string if they are missing it.
- message=string_concat(
+ message=format_lazy(
+ '{}{}',
SimpleLazyObject(lambda: prefix % params),
SimpleLazyObject(lambda: error.message % error_params),
),