registration fixes
This commit is contained in:
@@ -99,8 +99,8 @@ class MinimumLengthValidator:
|
||||
if len(password) < self.min_length:
|
||||
raise ValidationError(
|
||||
ngettext(
|
||||
"This password is too short. It must contain at least %(min_length)d character.",
|
||||
"This password is too short. It must contain at least %(min_length)d characters.",
|
||||
"Hasło jest zbyt krótkie - musi zawierać przynajmniej %(min_length)d znaków.",
|
||||
"Hasło jest zbyt krótkie - musi zawierać przynajmniej %(min_length)d znaków.",
|
||||
self.min_length
|
||||
),
|
||||
code='password_too_short',
|
||||
@@ -109,8 +109,8 @@ class MinimumLengthValidator:
|
||||
|
||||
def get_help_text(self):
|
||||
return ngettext(
|
||||
"Your password must contain at least %(min_length)d character.",
|
||||
"Your password must contain at least %(min_length)d characters.",
|
||||
"Hasło musi zawierać przynajmniej %(min_length)d znaków.",
|
||||
"Hasło musi zawierać przynajmniej %(min_length)d znaków.",
|
||||
self.min_length
|
||||
) % {'min_length': self.min_length}
|
||||
|
||||
@@ -148,7 +148,7 @@ class UserAttributeSimilarityValidator:
|
||||
except FieldDoesNotExist:
|
||||
verbose_name = attribute_name
|
||||
raise ValidationError(
|
||||
_("The password is too similar to the %(verbose_name)s."),
|
||||
_("Hasło jest zbyt podobne do %(verbose_name)s."),
|
||||
code='password_too_similar',
|
||||
params={'verbose_name': verbose_name},
|
||||
)
|
||||
@@ -180,7 +180,7 @@ class CommonPasswordValidator:
|
||||
def validate(self, password, user=None):
|
||||
if password.lower().strip() in self.passwords:
|
||||
raise ValidationError(
|
||||
_("This password is too common."),
|
||||
_("To hasło jest zbyt powszechne."),
|
||||
code='password_too_common',
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user