From b3a55830f12502c9d5087071e63934fda2a51d3d Mon Sep 17 00:00:00 2001 From: Telonor Date: Wed, 30 Mar 2016 13:40:41 +0300 Subject: [PATCH] ZXCVBNValidator error message fix --- django_zxcvbn/locale/ru/LC_MESSAGES/django.mo | Bin 1020 -> 804 bytes django_zxcvbn/locale/ru/LC_MESSAGES/django.po | 13 ++++--------- django_zxcvbn/validators.py | 3 +-- 3 files changed, 5 insertions(+), 11 deletions(-) diff --git a/django_zxcvbn/locale/ru/LC_MESSAGES/django.mo b/django_zxcvbn/locale/ru/LC_MESSAGES/django.mo index 3198c1b1f3f2930aa46ce55b1cefa6018bfff71d..2dd5ec93a1552c1fabc2f2910f80af6e46c7eddb 100644 GIT binary patch delta 169 zcmeyvzJ#s*o)F7a1|VPoVi_Q|0b*7ljsap2C;(zvATET`{Xkj-h}Qz~Rz?PfLqOUY zh%1;F7@UCg9w4m(r2hkHpfuQAAd`U^h{3?Ow75heDOEwWSRpwhapH8B$%>4j9L5F; ehQ?Ng=9}vn6B#GZV3wHtok<5sTTYH)Rs#SSEE?_r delta 308 zcmZ3&_J_Uxo)F7a1|VPsVi_QI0b+I_&H-W&=m26_Ant_H%Yn2A5FZ6%S0KIx#9J8| z7!-im8OXlI#K7PLq@|b{7*v3CERe1Q(oH}bsDyz9h(UIN08l9#n87?TH_RomxVSvO zD5Y2-x3suKAt_ZMu|y#!H4(^GEmla*NGwWBE=esaR!GcCQOHkIC@xJ)%S_Hp%_~tz z&d)8#Nv+5%shoH)oWsac!O+yo)NHc?V+N&o-= diff --git a/django_zxcvbn/locale/ru/LC_MESSAGES/django.po b/django_zxcvbn/locale/ru/LC_MESSAGES/django.po index f62b810..7d86a87 100644 --- a/django_zxcvbn/locale/ru/LC_MESSAGES/django.po +++ b/django_zxcvbn/locale/ru/LC_MESSAGES/django.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2016-03-29 15:56+0300\n" +"POT-Creation-Date: 2016-03-30 13:17+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -22,18 +22,13 @@ msgstr "" #: validators.py:23 #, python-format msgid "Must be %s characters or more" -msgstr "Должно содержать минимум %s символов" +msgstr "Должен содержать минимум %s символов" #: validators.py:27 #, python-format msgid "Must be %s characters or less" -msgstr "Должно содержать не более %s символов" +msgstr "Должен содержать не более %s символов" -#: validators.py:32 -#, python-format -msgid "Passwords must be at least %s characters and of sufficient complexity" -msgstr "Пароль должен содержать минимум %s символов достаточной сложности" - -#: validators.py:39 +#: validators.py:38 msgid "Password is too weak" msgstr "Пароль слишком слаб" diff --git a/django_zxcvbn/validators.py b/django_zxcvbn/validators.py index 0effe7c..879aaaf 100644 --- a/django_zxcvbn/validators.py +++ b/django_zxcvbn/validators.py @@ -29,14 +29,13 @@ def __call__(self, value): class ZXCVBNValidator(object): - message = _("Passwords must be at least %s characters and of sufficient complexity") code = "zxcvbn" def __call__(self,value): res = zxcvbn.password_strength(value) if res.get('entropy') < PASSWORD_MIN_ENTROPY: raise ValidationError( - self.message % _("Password is too weak"), + _("Password is too weak"), code=self.code)