From aef2719c3a43fc160458283660e74ed7c1385e11 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mattias=20Naarttij=C3=A4rvi?= Date: Thu, 15 Oct 2020 08:31:23 +0200 Subject: [PATCH] Replace deprecated method ungettext_lazy Fixes #102 --- url_filter/validators.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/url_filter/validators.py b/url_filter/validators.py index d40d0ca..fa6c5d8 100644 --- a/url_filter/validators.py +++ b/url_filter/validators.py @@ -6,7 +6,7 @@ MinLengthValidator as _MinLengthValidator, ) from django.utils.deconstruct import deconstructible -from django.utils.translation import ungettext_lazy +from django.utils.translation import ngettext_lazy @deconstructible @@ -16,7 +16,7 @@ class MinLengthValidator(_MinLengthValidator): """ code = "min_length" - message = ungettext_lazy( + message = ngettext_lazy( "Ensure this value has at least %(limit_value)d items (it has %(show_value)d).", "Ensure this value has at least %(limit_value)d items (it has %(show_value)d).", "limit_value", @@ -36,7 +36,7 @@ class MaxLengthValidator(_MaxLengthValidator): """ code = "max_length" - message = ungettext_lazy( + message = ngettext_lazy( "Ensure this value has at most %(limit_value)d items (it has %(show_value)d).", "Ensure this value has at most %(limit_value)d items (it has %(show_value)d).", "limit_value",