From: Benoît Pin Date: Thu, 16 Apr 2015 14:40:24 +0000 (+0200) Subject: Inscription avec validation de l'email et email en tant que login opérationnelle. X-Git-Url: https://scm.cri.ensmp.fr/git/Plinn.git/commitdiff_plain/8477d1d3bd27406257f7d1834ed69216440c56bd Inscription avec validation de l'email et email en tant que login opérationnelle. --- diff --git a/Products/Plinn/RegistrationTool.py b/Products/Plinn/RegistrationTool.py index 3cd5e4d..3451d37 100644 --- a/Products/Plinn/RegistrationTool.py +++ b/Products/Plinn/RegistrationTool.py @@ -233,7 +233,7 @@ class RegistrationTool(BaseRegistrationTool) : return str(uuid4()) security.declarePublic('requestPasswordReset') - def requestPasswordReset(self, userid, initialize=False): + def requestPasswordReset(self, userid, initial=False): """ add uuid / (userid, expiration) pair if ok: send an email to member. returns error message otherwise. """ @@ -263,12 +263,15 @@ class RegistrationTool(BaseRegistrationTool) : mailhost = portal.MailHost sender = encodeQuopriEmail(ptool.getProperty('email_from_name'), ptool.getProperty('email_from_address')) to = encodeQuopriEmail(member.getMemberFullName(nameBefore=0), member.getProperty('email')) - if initialize : - subject = translate(_('How to initialize your password on the %s website')) % ptool.getProperty('title') + if initial : + subject = translate(_('Complete your registration on the %s website')) % ptool.getProperty('title') else : subject = translate(_('How to reset your password on the %s website')) % ptool.getProperty('title') subject = encodeMailHeader(subject) - options = {'fullName' : member.getMemberFullName(nameBefore=0), + options = {'initial' : initial, + 'fullName' : member.getMemberFullName(nameBefore=0), + 'member_id' : member.getId(), + 'loginIsNotEmail' : member.getId() != member.getProperty('email'), 'siteName' : ptool.getProperty('title'), 'resetPasswordUrl' : '%s/password_reset_form/%s' % (utool(), uuid)} body = self.password_reset_mail(options) diff --git a/Products/Plinn/locales/en/LC_MESSAGES/plinn.mo b/Products/Plinn/locales/en/LC_MESSAGES/plinn.mo index 4279cc3..d79bd63 100644 Binary files a/Products/Plinn/locales/en/LC_MESSAGES/plinn.mo and b/Products/Plinn/locales/en/LC_MESSAGES/plinn.mo differ diff --git a/Products/Plinn/locales/en/LC_MESSAGES/plinn.po b/Products/Plinn/locales/en/LC_MESSAGES/plinn.po index 60e2dc4..6a1d966 100644 --- a/Products/Plinn/locales/en/LC_MESSAGES/plinn.po +++ b/Products/Plinn/locales/en/LC_MESSAGES/plinn.po @@ -14,7 +14,7 @@ msgid "" msgstr "" "Project-Id-Version: 2.0 beta 1\n" -"POT-Creation-Date: Wed Apr 15 17:38:57 2015\n" +"POT-Creation-Date: Thu Apr 16 16:35:11 2015\n" "PO-Revision-Date: 2015-04-15 17:00+0200\n" "Last-Translator: FULL NAME \n" "Language-Team: Zope 3 Developers \n" @@ -32,27 +32,31 @@ msgstr "Object deleted" msgid "Please rename each listed object." msgstr "Please rename each listed object." -#: n/RegistrationTool.py:254 +#: n/RegistrationTool.py:267 +msgid "Complete your registration on the %s website" +msgstr "Complete your registration on the %s website" + +#: n/RegistrationTool.py:269 msgid "How to reset your password on the %s website" msgstr "How to reset your password on the %s website" -#: n/RegistrationTool.py:269 +#: n/RegistrationTool.py:287 msgid "Unknown user name. Please retry." msgstr "Unknown user name. Please retry." -#: n/RegistrationTool.py:284 +#: n/RegistrationTool.py:302 msgid "Invalid reset password request." msgstr "Invalid reset password request." -#: n/RegistrationTool.py:290 +#: n/RegistrationTool.py:308 msgid "Your reset password request has expired. You can ask a new one." msgstr "Your reset password request has expired. You can ask a new one." -#: n/RegistrationTool.py:299 +#: n/RegistrationTool.py:317 msgid "Password successfully updated." msgstr "Password successfully updated." -#: n/RegistrationTool.py:301 +#: n/RegistrationTool.py:319 msgid "\"%s\" username not found." msgstr "\"%s\" username not found." @@ -592,7 +596,11 @@ msgstr "No news is no news." msgid "More..." msgstr "More..." -#: n/skins/custom_generic/join_form.py:60 +#: n/skins/custom_generic/join_form.py:41 +msgid "Success!" +msgstr "Success!" + +#: n/skins/custom_generic/join_form.py:67 #: n/skins/photo_theme/photo_main_macros.pt:28 msgid "Join" msgstr "Join" @@ -619,11 +627,11 @@ msgstr "You have been registered as a member." #: n/skins/custom_generic/join_template.pt:24 msgid "" -"You will receive an email shortly containing your password and instructions " -"on how to activate your membership." +"You will receive an email shortly. Please follow sent instructions to " +"complete your registration." msgstr "" -"You will receive an email shortly containing your password and instructions " -"on how to activate your membership." +"You will receive an email shortly. Please follow sent instructions to " +"complete your registration." #: n/skins/custom_generic/join_template.pt:29 msgid "Click the button to log in immediately." @@ -655,57 +663,35 @@ msgstr "" msgid "Return to homepage" msgstr "Return to homepage" -#: n/skins/custom_generic/join_template.pt:56 -msgid "" -"Becoming a member gives you the ability to personalize the site and " -"participate in the community." -msgstr "" -"Becoming a member gives you the ability to personalize the site and " -"participate in the community." - -#: n/skins/custom_generic/join_template.pt:60 -msgid "" -"It does not cost any money to become a member and your email and other " -"personal information will remain private." -msgstr "" -"It does not cost any money to become a member and your email and other " -"personal information will remain private." - -#: n/skins/custom_generic/join_template.pt:64 -msgid "" -"You must submit a valid email address. This address will be used to send you " -"a randomly-generated password. Once you have logged in with this password, " -"you may change it to anything you like." -msgstr "" -"You must submit a valid email address. This address will be used to send you " -"a randomly-generated password. Once you have logged in with this password, " -"you may change it to anything you like." - -#: n/skins/custom_generic/join_template.pt:76 +#: n/skins/custom_generic/join_template.pt:61 msgid "First name" msgstr "First name" -#: n/skins/custom_generic/join_template.pt:81 +#: n/skins/custom_generic/join_template.pt:66 msgid "Last name" msgstr "Last name" -#: n/skins/custom_generic/join_template.pt:88 +#: n/skins/custom_generic/join_template.pt:73 #: n/skins/custom_generic/personalize_form.pt:39 #: n/skins/generic/gruf_macros.pt:280 n/skins/generic/gruf_macros.pt:402 msgid "Email address" msgstr "Email address" -#: n/skins/custom_generic/join_template.pt:94 +#: n/skins/custom_generic/join_template.pt:79 msgid "use as login" msgstr "use as login" -#: n/skins/custom_generic/join_template.pt:101 +#: n/skins/custom_generic/join_template.pt:85 +msgid "login" +msgstr "login" + +#: n/skins/custom_generic/join_template.pt:93 #: n/skins/custom_generic/login_form.pt:28 n/skins/generic/gruf_macros.pt:268 #: n/skins/generic/gruf_macros.pt:390 msgid "Password" msgstr "Password" -#: n/skins/custom_generic/join_template.pt:107 +#: n/skins/custom_generic/join_template.pt:99 msgid "Password (confirm)" msgstr "Password (confirm)" @@ -799,7 +785,7 @@ msgid "Remember my name." msgstr "Remember my name." #: n/skins/custom_generic/login_form.pt:43 -#: n/skins/generic/password_reset_form.py:26 +#: n/skins/generic/password_reset_form.py:25 msgid " Login " msgstr " Login " @@ -1564,19 +1550,19 @@ msgstr "Paste" msgid "Exit boxes editing" msgstr "Exit boxes editing" -#: n/skins/generic/password_reset_form.py:30 +#: n/skins/generic/password_reset_form.py:29 msgid "Update Password" msgstr "Update Password" -#: n/skins/generic/password_reset_mail.py:4 +#: n/skins/generic/password_reset_mail.py:5 msgid "Hi %(fullName)s," msgstr "Hi %(fullName)s," -#: n/skins/generic/password_reset_mail.py:6 +#: n/skins/generic/password_reset_mail.py:8 msgid "You recently asked to reset your password." msgstr "You recently asked to reset your password." -#: n/skins/generic/password_reset_mail.py:8 +#: n/skins/generic/password_reset_mail.py:10 msgid "" "To get back into your account on the %(siteName)s website, you'll need to " "create a new password." @@ -1584,18 +1570,40 @@ msgstr "" "To get back into your account on the %(siteName)s website, you'll need to " "create a new password." -#: n/skins/generic/password_reset_mail.py:9 +#: n/skins/generic/password_reset_mail.py:11 +#: n/skins/generic/password_reset_mail.py:18 msgid "It's easy:" msgstr "It's easy:" -#: n/skins/generic/password_reset_mail.py:10 +#: n/skins/generic/password_reset_mail.py:12 +#: n/skins/generic/password_reset_mail.py:19 msgid "Click the link below to open a browser window." msgstr "Click the link below to open a browser window." -#: n/skins/generic/password_reset_mail.py:11 +#: n/skins/generic/password_reset_mail.py:13 msgid "Fill the form with your new password." msgstr "Fill the form with your new password." +#: n/skins/generic/password_reset_mail.py:16 +msgid "You just sign up on the %(siteName)s website." +msgstr "You just sign up on the %(siteName)s website." + +#: n/skins/generic/password_reset_mail.py:17 +msgid "Now you have to create your password to complete your registration." +msgstr "Now you have to create your password to complete your registration." + +#: n/skins/generic/password_reset_mail.py:20 +msgid "Choose a password and enter it in the form." +msgstr "Choose a password and enter it in the form." + +#: n/skins/generic/password_reset_mail.py:25 +msgid "Please note:" +msgstr "Please note:" + +#: n/skins/generic/password_reset_mail.py:26 +msgid "Your personal login to sign in later is:" +msgstr "Your personal login to sign in later is:" + #: n/skins/generic/password_reset_template.pt:16 msgid "Password resetting" msgstr "Password resetting" @@ -2533,7 +2541,9 @@ msgid "Member properties" msgstr "Member properties" msgid "member_creation_area_explanations" -msgstr "This function determines if a personal folder will be created at the first user entrance." +msgstr "" +"This function determines if a personal folder will be created at the first " +"user entrance." msgid "member_creation_area_title" msgstr "Creation of member areas" @@ -2542,7 +2552,9 @@ msgid "Membership role mappings" msgstr "Membership role mappings" msgid "membership_role_mapping_explanations" -msgstr "Use this screen if you are using a userfolder other than the built-in folder to map existing role names to roles understood by the CMF." +msgstr "" +"Use this screen if you are using a userfolder other than the built-in folder " +"to map existing role names to roles understood by the CMF." msgid "Metadata" msgstr "Metadata" @@ -2929,6 +2941,45 @@ msgstr "Directory" msgid "Configure portal" msgstr "Configure portal" +#~ msgid "Your personal login to log in later is:" +#~ msgstr "Your personal login to log in later is:" + +#~ msgid "%(member_id)s" +#~ msgstr "%(member_id)s" + +#~ msgid "How to initialize your password on the %s website" +#~ msgstr "How to initialize your password on the %s website" + +#~ msgid "" +#~ "You will receive an email shortly containing your password and " +#~ "instructions on how to activate your membership." +#~ msgstr "" +#~ "You will receive an email shortly containing your password and " +#~ "instructions on how to activate your membership." + +#~ msgid "" +#~ "Becoming a member gives you the ability to personalize the site and " +#~ "participate in the community." +#~ msgstr "" +#~ "Becoming a member gives you the ability to personalize the site and " +#~ "participate in the community." + +#~ msgid "" +#~ "It does not cost any money to become a member and your email and other " +#~ "personal information will remain private." +#~ msgstr "" +#~ "It does not cost any money to become a member and your email and other " +#~ "personal information will remain private." + +#~ msgid "" +#~ "You must submit a valid email address. This address will be used to send " +#~ "you a randomly-generated password. Once you have logged in with this " +#~ "password, you may change it to anything you like." +#~ msgstr "" +#~ "You must submit a valid email address. This address will be used to send " +#~ "you a randomly-generated password. Once you have logged in with this " +#~ "password, you may change it to anything you like." + #~ msgid "" #~ "You are already a member. You may use the personalization form to change your membership information." diff --git a/Products/Plinn/locales/fr/LC_MESSAGES/plinn.mo b/Products/Plinn/locales/fr/LC_MESSAGES/plinn.mo index 0942bc6..065fa18 100644 Binary files a/Products/Plinn/locales/fr/LC_MESSAGES/plinn.mo and b/Products/Plinn/locales/fr/LC_MESSAGES/plinn.mo differ diff --git a/Products/Plinn/locales/fr/LC_MESSAGES/plinn.po b/Products/Plinn/locales/fr/LC_MESSAGES/plinn.po index 8747019..f07a60a 100644 --- a/Products/Plinn/locales/fr/LC_MESSAGES/plinn.po +++ b/Products/Plinn/locales/fr/LC_MESSAGES/plinn.po @@ -1,7 +1,7 @@ msgid "" msgstr "" "Project-Id-Version: Plinn 2.0\n" -"POT-Creation-Date: Wed Apr 15 17:26:41 2015\n" +"POT-Creation-Date: Thu Apr 16 16:35:11 2015\n" "PO-Revision-Date: 2015-04-15 15:06+0200\n" "Last-Translator: Benoît PIN\n" "Language-Team: CRI http://cri.ensmp.fr\n" @@ -24,29 +24,33 @@ msgstr "Objet supprimé" msgid "Please rename each listed object." msgstr "Veuillez renommer tous les éléments listés." -#: n/RegistrationTool.py:254 +#: n/RegistrationTool.py:267 +msgid "Complete your registration on the %s website" +msgstr "Terminer votre inscription sur le site %s" + +#: n/RegistrationTool.py:269 msgid "How to reset your password on the %s website" msgstr "Comment réinitialiser votre mot de passe sur le site %s" -#: n/RegistrationTool.py:269 +#: n/RegistrationTool.py:287 msgid "Unknown user name. Please retry." msgstr "Nom d'utilisateur inconnu. Veuillez réessayer." -#: n/RegistrationTool.py:284 +#: n/RegistrationTool.py:302 msgid "Invalid reset password request." msgstr "Demande de réinitialisation de mot de passe invalide." -#: n/RegistrationTool.py:290 +#: n/RegistrationTool.py:308 msgid "Your reset password request has expired. You can ask a new one." msgstr "" "Votre demande de réinitialisation de mot de passe a expiré. Vous pouvez en " "demander une nouvelle." -#: n/RegistrationTool.py:299 +#: n/RegistrationTool.py:317 msgid "Password successfully updated." msgstr "Mot de passe correctement mis à jour." -#: n/RegistrationTool.py:301 +#: n/RegistrationTool.py:319 msgid "\"%s\" username not found." msgstr "Nom : « %s » non trouvé." @@ -585,7 +589,11 @@ msgstr "Pas de nouvelle bonne nouvelle !" msgid "More..." msgstr "Plus…" -#: n/skins/custom_generic/join_form.py:60 +#: n/skins/custom_generic/join_form.py:41 +msgid "Success!" +msgstr "Succès !" + +#: n/skins/custom_generic/join_form.py:67 #: n/skins/photo_theme/photo_main_macros.pt:28 msgid "Join" msgstr "S'inscrire" @@ -598,7 +606,9 @@ msgstr "Devenir membre" msgid "" "You are already authenticated. You may use the ${personalize_form} to change " "your personal informations." -msgstr "Vous êtes déjà authentifié. Vous pouvez utiliser le ${personalize_form} pour modifier vos informations personnelles." +msgstr "" +"Vous êtes déjà authentifié. Vous pouvez utiliser le ${personalize_form} pour " +"modifier vos informations personnelles." #: n/skins/custom_generic/join_template.pt:16 msgid "personalization form" @@ -610,11 +620,11 @@ msgstr "Vous avez été enregistré en tant que membre." #: n/skins/custom_generic/join_template.pt:24 msgid "" -"You will receive an email shortly containing your password and instructions " -"on how to activate your membership." +"You will receive an email shortly. Please follow sent instructions to " +"complete your registration." msgstr "" -"Vous allez recevoir sous peu un e-mail qui contiendra votre mot de passe " -"ainsi que les instructions pour activer votre inscription." +"Vous allez recevoir un e-mail sous peu. Veuillez suivre les instructions " +"envoyées afin de terminer votre inscription." #: n/skins/custom_generic/join_template.pt:29 msgid "Click the button to log in immediately." @@ -646,57 +656,35 @@ msgstr "" msgid "Return to homepage" msgstr "Retour à la page d'accueil" -#: n/skins/custom_generic/join_template.pt:56 -msgid "" -"Becoming a member gives you the ability to personalize the site and " -"participate in the community." -msgstr "" -"Devenir membre vous donne la possibilité de personaliser le site et de " -"participer à la communauté." - -#: n/skins/custom_generic/join_template.pt:60 -msgid "" -"It does not cost any money to become a member and your email and other " -"personal information will remain private." -msgstr "" -"Devenir membre est complètement gratuit. Votre e-mail ainsi que toutes vos " -"données personnelles resteront privées." - -#: n/skins/custom_generic/join_template.pt:64 -msgid "" -"You must submit a valid email address. This address will be used to send you " -"a randomly-generated password. Once you have logged in with this password, " -"you may change it to anything you like." -msgstr "" -"Vous devez entrer une adresse e-mail valide qui sera utilisée pour vous " -"envoyer votre mot de passe généré automatiquement. Vous pourrez le changer " -"dès votre première connexion." - -#: n/skins/custom_generic/join_template.pt:76 +#: n/skins/custom_generic/join_template.pt:61 msgid "First name" msgstr "Prénom" -#: n/skins/custom_generic/join_template.pt:81 +#: n/skins/custom_generic/join_template.pt:66 msgid "Last name" msgstr "Nom" -#: n/skins/custom_generic/join_template.pt:88 +#: n/skins/custom_generic/join_template.pt:73 #: n/skins/custom_generic/personalize_form.pt:39 #: n/skins/generic/gruf_macros.pt:280 n/skins/generic/gruf_macros.pt:402 msgid "Email address" msgstr "Adresse e-mail" -#: n/skins/custom_generic/join_template.pt:94 +#: n/skins/custom_generic/join_template.pt:79 msgid "use as login" msgstr "utiliser comme identifiant" -#: n/skins/custom_generic/join_template.pt:101 +#: n/skins/custom_generic/join_template.pt:85 +msgid "login" +msgstr "identifiant" + +#: n/skins/custom_generic/join_template.pt:93 #: n/skins/custom_generic/login_form.pt:28 n/skins/generic/gruf_macros.pt:268 #: n/skins/generic/gruf_macros.pt:390 msgid "Password" msgstr "Mot de passe" -#: n/skins/custom_generic/join_template.pt:107 +#: n/skins/custom_generic/join_template.pt:99 msgid "Password (confirm)" msgstr "Confirmation" @@ -794,7 +782,7 @@ msgid "Remember my name." msgstr "Se souvenir de mon login." #: n/skins/custom_generic/login_form.pt:43 -#: n/skins/generic/password_reset_form.py:26 +#: n/skins/generic/password_reset_form.py:25 msgid " Login " msgstr "Connexion" @@ -1282,12 +1270,13 @@ msgstr "Partager" msgid "Submit: \"${objectid}\" for Review." msgstr "Soumettre : « ${objectid} Â» pour validation." +#. Default: "Submit this content to request a validation by a reviewer." #: n/skins/generic/content_submit_form.pt:9 msgid "submit_transition_explanations" msgstr "" "Soumettre ce document en vue d'une validation accordée par un modérateur." -#: n/skins/generic/content_submit_form.pt:15 +#: n/skins/generic/content_submit_form.pt:17 msgid "Submit" msgstr "Soumettre" @@ -1567,19 +1556,19 @@ msgstr "Coller" msgid "Exit boxes editing" msgstr "Quitter l'édition des boîtes" -#: n/skins/generic/password_reset_form.py:30 +#: n/skins/generic/password_reset_form.py:29 msgid "Update Password" msgstr "Mettre à jour le mot de passe" -#: n/skins/generic/password_reset_mail.py:4 +#: n/skins/generic/password_reset_mail.py:5 msgid "Hi %(fullName)s," msgstr "Bonjour %(fullName)s," -#: n/skins/generic/password_reset_mail.py:6 +#: n/skins/generic/password_reset_mail.py:8 msgid "You recently asked to reset your password." msgstr "Vous avez récemment demandé de réinitialiser votre mot de passe." -#: n/skins/generic/password_reset_mail.py:8 +#: n/skins/generic/password_reset_mail.py:10 msgid "" "To get back into your account on the %(siteName)s website, you'll need to " "create a new password." @@ -1587,18 +1576,42 @@ msgstr "" "Pour accéder à nouveau à votre compte sur le site %(siteName)s, vous devez " "créer un nouveau mot de passe." -#: n/skins/generic/password_reset_mail.py:9 +#: n/skins/generic/password_reset_mail.py:11 +#: n/skins/generic/password_reset_mail.py:18 msgid "It's easy:" msgstr "Rien de plus simple :" -#: n/skins/generic/password_reset_mail.py:10 +#: n/skins/generic/password_reset_mail.py:12 +#: n/skins/generic/password_reset_mail.py:19 msgid "Click the link below to open a browser window." msgstr "Cliquez sur le lien ci-dessous pour ouvrir une fenêtre de navigateur." -#: n/skins/generic/password_reset_mail.py:11 +#: n/skins/generic/password_reset_mail.py:13 msgid "Fill the form with your new password." msgstr "Remplissez le formulaire avec votre nouveau mot de passe." +#: n/skins/generic/password_reset_mail.py:16 +msgid "You just sign up on the %(siteName)s website." +msgstr "Vous venez de vous inscrire sur le site %(siteName)s." + +#: n/skins/generic/password_reset_mail.py:17 +msgid "Now you have to create your password to complete your registration." +msgstr "" +"Vous devez maintenant créer votre mot de passe pour terminer votre " +"inscription." + +#: n/skins/generic/password_reset_mail.py:20 +msgid "Choose a password and enter it in the form." +msgstr "Veuillez choisir un mot de passe et le saisir dans le formulaire." + +#: n/skins/generic/password_reset_mail.py:25 +msgid "Please note:" +msgstr "Notez bien :" + +#: n/skins/generic/password_reset_mail.py:26 +msgid "Your personal login to sign in later is:" +msgstr "Votre authentifiant pour vous connecter plus tard est :" + #: n/skins/generic/password_reset_template.pt:16 msgid "Password resetting" msgstr "Réinitialisation du mot de passe" @@ -2947,6 +2960,36 @@ msgstr "Annuaire" msgid "Configure portal" msgstr "Configurer portail" +#~ msgid "" +#~ "You will receive an email shortly containing your password and " +#~ "instructions on how to activate your membership." +#~ msgstr "" +#~ "Vous allez recevoir sous peu un e-mail qui contiendra votre mot de passe " +#~ "ainsi que les instructions pour activer votre inscription." + +#~ msgid "" +#~ "Becoming a member gives you the ability to personalize the site and " +#~ "participate in the community." +#~ msgstr "" +#~ "Devenir membre vous donne la possibilité de personaliser le site et de " +#~ "participer à la communauté." + +#~ msgid "" +#~ "It does not cost any money to become a member and your email and other " +#~ "personal information will remain private." +#~ msgstr "" +#~ "Devenir membre est complètement gratuit. Votre e-mail ainsi que toutes " +#~ "vos données personnelles resteront privées." + +#~ msgid "" +#~ "You must submit a valid email address. This address will be used to send " +#~ "you a randomly-generated password. Once you have logged in with this " +#~ "password, you may change it to anything you like." +#~ msgstr "" +#~ "Vous devez entrer une adresse e-mail valide qui sera utilisée pour vous " +#~ "envoyer votre mot de passe généré automatiquement. Vous pourrez le " +#~ "changer dès votre première connexion." + #~ msgid "" #~ "You are already a member. You may use the personalization form to change your membership information." diff --git a/Products/Plinn/locales/plinn.pot b/Products/Plinn/locales/plinn.pot index 2b0facd..23989b6 100644 --- a/Products/Plinn/locales/plinn.pot +++ b/Products/Plinn/locales/plinn.pot @@ -14,7 +14,7 @@ msgid "" msgstr "" "Project-Id-Version: 2.0 beta 1\n" -"POT-Creation-Date: Wed Apr 15 17:38:57 2015\n" +"POT-Creation-Date: Thu Apr 16 16:35:11 2015\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: Zope 3 Developers \n" @@ -31,27 +31,31 @@ msgstr "" msgid "Please rename each listed object." msgstr "" -#: n/RegistrationTool.py:254 -msgid "How to reset your password on the %s website" +#: n/RegistrationTool.py:267 +msgid "Complete your registration on the %s website" msgstr "" #: n/RegistrationTool.py:269 +msgid "How to reset your password on the %s website" +msgstr "" + +#: n/RegistrationTool.py:287 msgid "Unknown user name. Please retry." msgstr "" -#: n/RegistrationTool.py:284 +#: n/RegistrationTool.py:302 msgid "Invalid reset password request." msgstr "" -#: n/RegistrationTool.py:290 +#: n/RegistrationTool.py:308 msgid "Your reset password request has expired. You can ask a new one." msgstr "" -#: n/RegistrationTool.py:299 +#: n/RegistrationTool.py:317 msgid "Password successfully updated." msgstr "" -#: n/RegistrationTool.py:301 +#: n/RegistrationTool.py:319 msgid "\"%s\" username not found." msgstr "" @@ -592,7 +596,11 @@ msgstr "" msgid "More..." msgstr "" -#: n/skins/custom_generic/join_form.py:60 +#: n/skins/custom_generic/join_form.py:41 +msgid "Success!" +msgstr "" + +#: n/skins/custom_generic/join_form.py:67 #: n/skins/photo_theme/photo_main_macros.pt:28 msgid "Join" msgstr "" @@ -614,7 +622,7 @@ msgid "You have been registered as a member." msgstr "" #: n/skins/custom_generic/join_template.pt:24 -msgid "You will receive an email shortly containing your password and instructions on how to activate your membership." +msgid "You will receive an email shortly. Please follow sent instructions to complete your registration." msgstr "" #: n/skins/custom_generic/join_template.pt:29 @@ -637,45 +645,37 @@ msgstr "" msgid "Return to homepage" msgstr "" -#: n/skins/custom_generic/join_template.pt:56 -msgid "Becoming a member gives you the ability to personalize the site and participate in the community." -msgstr "" - -#: n/skins/custom_generic/join_template.pt:60 -msgid "It does not cost any money to become a member and your email and other personal information will remain private." -msgstr "" - -#: n/skins/custom_generic/join_template.pt:64 -msgid "You must submit a valid email address. This address will be used to send you a randomly-generated password. Once you have logged in with this password, you may change it to anything you like." -msgstr "" - -#: n/skins/custom_generic/join_template.pt:76 +#: n/skins/custom_generic/join_template.pt:61 msgid "First name" msgstr "" -#: n/skins/custom_generic/join_template.pt:81 +#: n/skins/custom_generic/join_template.pt:66 msgid "Last name" msgstr "" -#: n/skins/custom_generic/join_template.pt:88 +#: n/skins/custom_generic/join_template.pt:73 #: n/skins/custom_generic/personalize_form.pt:39 #: n/skins/generic/gruf_macros.pt:280 #: n/skins/generic/gruf_macros.pt:402 msgid "Email address" msgstr "" -#: n/skins/custom_generic/join_template.pt:94 +#: n/skins/custom_generic/join_template.pt:79 msgid "use as login" msgstr "" -#: n/skins/custom_generic/join_template.pt:101 +#: n/skins/custom_generic/join_template.pt:85 +msgid "login" +msgstr "" + +#: n/skins/custom_generic/join_template.pt:93 #: n/skins/custom_generic/login_form.pt:28 #: n/skins/generic/gruf_macros.pt:268 #: n/skins/generic/gruf_macros.pt:390 msgid "Password" msgstr "" -#: n/skins/custom_generic/join_template.pt:107 +#: n/skins/custom_generic/join_template.pt:99 msgid "Password (confirm)" msgstr "" @@ -753,7 +753,7 @@ msgid "Remember my name." msgstr "" #: n/skins/custom_generic/login_form.pt:43 -#: n/skins/generic/password_reset_form.py:26 +#: n/skins/generic/password_reset_form.py:25 msgid " Login " msgstr "" @@ -1463,34 +1463,56 @@ msgstr "" msgid "Exit boxes editing" msgstr "" -#: n/skins/generic/password_reset_form.py:30 +#: n/skins/generic/password_reset_form.py:29 msgid "Update Password" msgstr "" -#: n/skins/generic/password_reset_mail.py:4 +#: n/skins/generic/password_reset_mail.py:5 msgid "Hi %(fullName)s," msgstr "" -#: n/skins/generic/password_reset_mail.py:6 +#: n/skins/generic/password_reset_mail.py:8 msgid "You recently asked to reset your password." msgstr "" -#: n/skins/generic/password_reset_mail.py:8 +#: n/skins/generic/password_reset_mail.py:10 msgid "To get back into your account on the %(siteName)s website, you'll need to create a new password." msgstr "" -#: n/skins/generic/password_reset_mail.py:9 +#: n/skins/generic/password_reset_mail.py:11 +#: n/skins/generic/password_reset_mail.py:18 msgid "It's easy:" msgstr "" -#: n/skins/generic/password_reset_mail.py:10 +#: n/skins/generic/password_reset_mail.py:12 +#: n/skins/generic/password_reset_mail.py:19 msgid "Click the link below to open a browser window." msgstr "" -#: n/skins/generic/password_reset_mail.py:11 +#: n/skins/generic/password_reset_mail.py:13 msgid "Fill the form with your new password." msgstr "" +#: n/skins/generic/password_reset_mail.py:16 +msgid "You just sign up on the %(siteName)s website." +msgstr "" + +#: n/skins/generic/password_reset_mail.py:17 +msgid "Now you have to create your password to complete your registration." +msgstr "" + +#: n/skins/generic/password_reset_mail.py:20 +msgid "Choose a password and enter it in the form." +msgstr "" + +#: n/skins/generic/password_reset_mail.py:25 +msgid "Please note:" +msgstr "" + +#: n/skins/generic/password_reset_mail.py:26 +msgid "Your personal login to sign in later is:" +msgstr "" + #: n/skins/generic/password_reset_template.pt:16 msgid "Password resetting" msgstr "" diff --git a/Products/Plinn/skins/custom_generic/join_form.py b/Products/Plinn/skins/custom_generic/join_form.py index 0e07d03..d65c8ef 100644 --- a/Products/Plinn/skins/custom_generic/join_form.py +++ b/Products/Plinn/skins/custom_generic/join_form.py @@ -24,34 +24,27 @@ form = context.REQUEST.form if add : if validate_email : password = confirm = rtool.generatePassword() + ok = True else : ok = context.validatePassword(**form) - try : - if email_as_login : - member_id = member_email - rtool.addMember(id=member_id, password=password, - properties={'username': member_id, - 'given_name' : given_name, - 'name' : name, - 'email': member_email}) - context.setStatus(True, _('Success!')) - except ValueError, errmsg: - context.setStatus(False, errmsg) + if ok : + try : + if email_as_login : + member_id = member_email + rtool.addMember(id=member_id, password=password, + properties={'username': member_id, + 'given_name' : given_name, + 'name' : name, + 'email': member_email}) + if validate_email : + rtool.requestPasswordReset(member_id, initial=True) + context.setStatus(True, _('Success!')) + is_newmember = True + is_anon = False + except ValueError, errmsg: + context.setStatus(False, errmsg) - - -# if add and \ -# context.validatePassword(**form) and \ -# context.members_add_control(**form) and \ -# context.setRedirect(atool, 'user/join', b_start=b_start, ajax=ajax): -# return - options = {} - -if context.REQUEST.get('portal_status_message', '') == 'Success!': - is_anon = False - is_newmember = True - options['member_id'] = member_id options['given_name'] = given_name options['name'] = name @@ -60,6 +53,7 @@ options['password'] = is_newmember and context.REQUEST.get('password', '') or '' options['portal_url'] = portal_url options['isAnon'] = is_anon options['isNewMember'] = is_newmember +options['isOrdinaryMember'] = not (mtool.isAnonymousUser() or is_newmember) options['validate_email'] = validate_email options['isAnonRegistration'] = rtool.getMode() == MODE_ANONYMOUS options['isReviewedRegistration'] = rtool.getMode() == MODE_REVIEWED diff --git a/Products/Plinn/skins/custom_generic/join_template.pt b/Products/Plinn/skins/custom_generic/join_template.pt index 337aa94..3434f56 100644 --- a/Products/Plinn/skins/custom_generic/join_template.pt +++ b/Products/Plinn/skins/custom_generic/join_template.pt @@ -11,7 +11,7 @@ tal:define="form options/form">

Become a member

-

+

You are already authenticated. You may use the

You have been registered as a member.

- You will receive an email shortly containing your password and - instructions on how to activate your membership. + You will receive an email shortly. Please follow sent instructions + to complete your registration.

Click the button to log in immediately.

diff --git a/Products/Plinn/skins/generic/password_reset_form.py b/Products/Plinn/skins/generic/password_reset_form.py index eaa2eb7..9cb4b1d 100644 --- a/Products/Plinn/skins/generic/password_reset_form.py +++ b/Products/Plinn/skins/generic/password_reset_form.py @@ -9,8 +9,7 @@ uuid = traverse_subpath[0] passwordChanged = False -if validate and \ - context.validatePassword(**form) : +if validate : userid = context.reset_password_control(uuid=uuid, **form) if userid : passwordChanged = True diff --git a/Products/Plinn/skins/generic/password_reset_mail.py b/Products/Plinn/skins/generic/password_reset_mail.py index 7a9ab12..9717740 100644 --- a/Products/Plinn/skins/generic/password_reset_mail.py +++ b/Products/Plinn/skins/generic/password_reset_mail.py @@ -1,15 +1,29 @@ ##parameters=options={} from Products.Plinn.utils import translate as _ + print _('Hi %(fullName)s,') print -print _('You recently asked to reset your password.') +if not options.get('initial') : + print _('You recently asked to reset your password.') -print _("To get back into your account on the %(siteName)s website, you'll need to create a new password.") -print _("It's easy:") -print '— %s' % _("Click the link below to open a browser window.") -print '— %s' % _("Fill the form with your new password.") -print + print _("To get back into your account on the %(siteName)s website, you'll need to create a new password.") + print _("It's easy:") + print '— %s' % _("Click the link below to open a browser window.") + print '— %s' % _("Fill the form with your new password.") + print +else : + print _('You just sign up on the %(siteName)s website.') + print _('Now you have to create your password to complete your registration.') + print _("It's easy:") + print '— %s' % _("Click the link below to open a browser window.") + print '— %s' % _("Choose a password and enter it in the form.") print '%(resetPasswordUrl)s' +if options['loginIsNotEmail'] : + print + print _("Please note:") + print _("Your personal login to sign in later is:") + print "%(member_id)s" + return printed % options \ No newline at end of file