From e09ce92323de5e5b5f2127bd6abfb8e09bfbab30 Mon Sep 17 00:00:00 2001 From: aitzol76 Date: Sat, 10 Sep 2022 23:00:29 +0200 Subject: [PATCH] pwd-pattern --- index.tpl | 2 +- libs/localization.py | 4 ++-- locales/base.pot | 2 +- locales/en/LC_MESSAGES/base.po | 4 ++-- locales/eu/LC_MESSAGES/base.po | 6 +++--- signup.tpl | 4 ++-- 6 files changed, 11 insertions(+), 11 deletions(-) diff --git a/index.tpl b/index.tpl index fc912c4..393e37b 100644 --- a/index.tpl +++ b/index.tpl @@ -20,7 +20,7 @@ - + {{ str['or-sign-up'] }} diff --git a/libs/localization.py b/libs/localization.py index 6322f98..84256c0 100644 --- a/libs/localization.py +++ b/libs/localization.py @@ -45,7 +45,7 @@ class LocalizeTo(object): msg_05 = _("Not allowed characters for the surname field.") msg_06 = _("The code is invalid or has expired.") msg_07 = _("Passwords do not match!") - msg_08 = _("The password must contain at least 8 characters, at least one number, uppercase and lowercase letters and special characters.") + msg_08 = _("The password must contain at least 8 characters, at least one number, a capital letter and a special character.") msg_09 = _("Congratulations, your account has been created!") msg_10 = _("Your first and last name have not been changed.") msg_11 = _("Your firstname is a bit short, don't you think?") @@ -66,5 +66,5 @@ class LocalizeTo(object): msg_26 = _("Forgot your password? Please try again.") msg_27 = _("The session has expired.") - self.str = {'usr':str_00, 'usrn':str_01, 'fn':str_02, 'sn':str_03, 'pwd':str_04, 'old-pwd':str_05, 'new-pwd':str_06, 'conf-pwd':str_07, 'email':str_08, 'edit':str_09, 'login':str_10, 'log-out':str_11, 'del':str_12, 'sign-up':str_13, 'back':str_14, 'update':str_15, 'or-sign-in':str_16, 'or-sign-up':str_17, 'inv-code':str_18, 'edit-fn':str_19, 'edit-email':str_20, 'ch-pwd':str_21, 'del-account':str_22, 'welcome':str_23} + self.str = {'usr':str_00, 'usrn':str_01, 'fn':str_02, 'sn':str_03, 'pwd':str_04, 'old-pwd':str_05, 'new-pwd':str_06, 'conf-pwd':str_07, 'email':str_08, 'edit':str_09, 'login':str_10, 'log-out':str_11, 'del':str_12, 'sign-up':str_13, 'back':str_14, 'update':str_15, 'or-sign-in':str_16, 'or-sign-up':str_17, 'inv-code':str_18, 'edit-fn':str_19, 'edit-email':str_20, 'ch-pwd':str_21, 'del-account':str_22, 'welcome':str_23, 'pwd-pattern': msg_08} self.msg = (msg_00, msg_01, msg_02, msg_03, msg_04, msg_05, msg_06, msg_07, msg_08, msg_09, msg_10, msg_11, msg_12, msg_13, msg_14, msg_15, msg_16, msg_17, msg_18, msg_19, msg_20, msg_21, msg_22, msg_23, msg_24, msg_25, msg_26, msg_27) diff --git a/locales/base.pot b/locales/base.pot index 0ed2b78..40847dd 100644 --- a/locales/base.pot +++ b/locales/base.pot @@ -144,7 +144,7 @@ msgstr "" #: libs/localization.py:46 msgid "" "The password must contain at least 8 characters, at least one number, " -"uppercase and lowercase letters and special characters." +"a capital letter and a special character." msgstr "" #: libs/localization.py:47 diff --git a/locales/en/LC_MESSAGES/base.po b/locales/en/LC_MESSAGES/base.po index 53b0d7c..499f018 100644 --- a/locales/en/LC_MESSAGES/base.po +++ b/locales/en/LC_MESSAGES/base.po @@ -144,10 +144,10 @@ msgstr "Passwords do not match!" #: libs/localization.py:46 msgid "" "The password must contain at least 8 characters, at least one number, " -"uppercase and lowercase letters and special characters." +"a capital letter and a special character." msgstr "" "The password must contain at least 8 characters, at least one number, " -"uppercase and lowercase letters and special characters." +"a capital letter and a special character." #: libs/localization.py:47 msgid "Congratulations, your account has been created!" diff --git a/locales/eu/LC_MESSAGES/base.po b/locales/eu/LC_MESSAGES/base.po index d14fa89..d47ebc5 100644 --- a/locales/eu/LC_MESSAGES/base.po +++ b/locales/eu/LC_MESSAGES/base.po @@ -144,10 +144,10 @@ msgstr "Pasahitzak ez datoz bat!" #: libs/localization.py:46 msgid "" "The password must contain at least 8 characters, at least one number, " -"uppercase and lowercase letters and special characters." +"a capital letter and a special character." msgstr "" -"Pasahitzak gutxienez 8 karaktere izan behar ditu, zenbakiren bat gutxienez, " -"hizki txiki zein larriak eta baita karaktere bereziak ere." +"Pasahitzak gutxienez 8 karaktere izan behar ditu, zenbaki bat, hizki larri bat " +"eta karaktere berezi bat." #: libs/localization.py:47 msgid "Congratulations, your account has been created!" diff --git a/signup.tpl b/signup.tpl index eb542bf..8086e5c 100644 --- a/signup.tpl +++ b/signup.tpl @@ -33,11 +33,11 @@ - + + pattern="^(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[!@#$%^&*_=+-]).{8,24}$" oninvalid="setCustomValidity('{{ str['pwd-pattern'] }}')" oninput="setCustomValidity('')" required> {{ str['or-sign-in'] }}