Skip to content

Commit

Permalink
Replace deprecated method ungettext_lazy
Browse files Browse the repository at this point in the history
  • Loading branch information
Naartti authored Oct 15, 2020
1 parent 1585da8 commit aef2719
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions url_filter/validators.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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",
Expand All @@ -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",
Expand Down

0 comments on commit aef2719

Please sign in to comment.