Code

Ticket #3410: ticket-3410.2.diff

File ticket-3410.2.diff, 1.1 KB (added by Michael Radziej <mir@…>, 7 years ago)

revised patch

Line 
1--- a/django/conf/locale/de/LC_MESSAGES/django.po
2+++ b/django/conf/locale/de/LC_MESSAGES/django.po
3@@ -2021,8 +2021,8 @@ msgid "Duplicate values are not allowed.
4 msgstr "Doppelte Werte sind hier nicht erlaubt."
5 
6 #: core/validators.py:364
7-msgid "This value must be between %s and %s."
8-msgstr "Dieser Wert muss zwischen %s und %s sein."
9+msgid "This value must be between %(lower)s and %(upper)s."
10+msgstr "Dieser Wert muss zwischen %(lower)s und %(upper)s sein."
11 
12 #: core/validators.py:366
13 msgid "This value must be at least %s."
14
15--- a/django/core/validators.py
16+++ b/django/core/validators.py
17@@ -361,7 +361,7 @@ class NumberIsInRange(object):
18         self.lower, self.upper = lower, upper
19         if not error_message:
20             if lower and upper:
21-                self.error_message = gettext("This value must be between %s and %s.") % (lower, upper)
22+                self.error_message = gettext("This value must be between %(lower)s and %(upper)s.") % {'lower': lower, 'upper': upper}
23             elif lower:
24                 self.error_message = gettext("This value must be at least %s.") % lower
25             elif upper: