From: Benoît Pin Date: Thu, 1 Aug 2013 12:14:04 +0000 (+0200) Subject: Mise en forme du mail avec une page template (ne marche pas, on va contourner). X-Git-Url: https://svn.cri.ensmp.fr/git/Plinn.git/commitdiff_plain/dab819e75a82aea184b6651523f9be4ad10f71ff?ds=sidebyside Mise en forme du mail avec une page template (ne marche pas, on va contourner). --- diff --git a/RegistrationTool.py b/RegistrationTool.py index 5072095..021b714 100644 --- a/RegistrationTool.py +++ b/RegistrationTool.py @@ -216,10 +216,10 @@ class RegistrationTool(BaseRegistrationTool) : to = encodeQuopriEmail(member.getMemberFullName(nameBefore=0), member.getProperty('email')) subject = translate(_('How to reset your password on the %s website')) % ptool.getProperty('title') subject = "=?utf-8?q?%s?=" % encodestring(subject) - lines = [] - pr = lines.append - pr('%s/password_reset_form/%s' % (utool(), uuid)) - body = '\n'.join(lines) + body = self.password_reset_mail_template(fullName=member.getMemberFullName(nameBefore=0), + siteName=ptool.getProperty('title'), + resetPasswordUrl='%s/password_reset_form/%s' % (utool(), uuid) + ) message = self.echange_mail_template(From=sender, To=to, Subject=subject, diff --git a/locales/en/LC_MESSAGES/plinn.mo b/locales/en/LC_MESSAGES/plinn.mo index 8c755e5..4cd15ff 100644 Binary files a/locales/en/LC_MESSAGES/plinn.mo and b/locales/en/LC_MESSAGES/plinn.mo differ diff --git a/locales/en/LC_MESSAGES/plinn.po b/locales/en/LC_MESSAGES/plinn.po index b729ee6..7e6bac9 100644 --- a/locales/en/LC_MESSAGES/plinn.po +++ b/locales/en/LC_MESSAGES/plinn.po @@ -1,7 +1,7 @@ msgid "" msgstr "" "Project-Id-Version: Plinn 2.0\n" -"POT-Creation-Date: Wed Jul 31 16:55:00 2013\n" +"POT-Creation-Date: Thu Aug 1 11:47:35 2013\n" "PO-Revision-Date: 2007-10-17 14:43+0200\n" "Last-Translator: Benoît PIN\n" "Language-Team: CRI http://cri.ensmp.fr\n" @@ -1007,8 +1007,22 @@ msgstr "" msgid "You have asked to change your password." msgstr "" -#: n/skins/generic/password_reset_mail_temlate.pt:5 -msgid "Please" +#: n/skins/generic/password_reset_mail_temlate.pt:6 +msgid "" +"To get back into your account on the ${siteName} website, you'll need to " +"create a new password." +msgstr "" + +#: n/skins/generic/password_reset_mail_temlate.pt:7 +msgid "It's easy:" +msgstr "" + +#: n/skins/generic/password_reset_mail_temlate.pt:8 +msgid "— Click the link below to open a browser window." +msgstr "" + +#: n/skins/generic/password_reset_mail_temlate.pt:9 +msgid "— Fill the form with your new password." msgstr "" #: n/skins/generic/password_reset_template.pt:13 diff --git a/locales/fr/LC_MESSAGES/plinn.mo b/locales/fr/LC_MESSAGES/plinn.mo index b8ca134..f151770 100644 Binary files a/locales/fr/LC_MESSAGES/plinn.mo and b/locales/fr/LC_MESSAGES/plinn.mo differ diff --git a/locales/fr/LC_MESSAGES/plinn.po b/locales/fr/LC_MESSAGES/plinn.po index e31e9c9..58520fd 100755 --- a/locales/fr/LC_MESSAGES/plinn.po +++ b/locales/fr/LC_MESSAGES/plinn.po @@ -1,8 +1,8 @@ msgid "" msgstr "" "Project-Id-Version: Plinn 2.0\n" -"POT-Creation-Date: Wed Jul 31 16:55:00 2013\n" -"PO-Revision-Date: 2013-07-31 16:58+0200\n" +"POT-Creation-Date: Thu Aug 1 11:47:35 2013\n" +"PO-Revision-Date: 2013-08-01 11:49+0200\n" "Last-Translator: Benoît PIN\n" "Language-Team: CRI http://cri.ensmp.fr\n" "Language: \n" @@ -1043,9 +1043,25 @@ msgstr "Bonjour ${fullname}," msgid "You have asked to change your password." msgstr "Vous avez demandé de changer de mot de passe." -#: n/skins/generic/password_reset_mail_temlate.pt:5 -msgid "Please" +#: n/skins/generic/password_reset_mail_temlate.pt:6 +msgid "" +"To get back into your account on the ${siteName} website, you'll need to " +"create a new password." msgstr "" +"Pour accéder à nouveau à votre compte sur le site ${siteName}, vous devez " +"créer un nouveau mot de passe." + +#: n/skins/generic/password_reset_mail_temlate.pt:7 +msgid "It's easy:" +msgstr "Rien de plus simple :" + +#: n/skins/generic/password_reset_mail_temlate.pt:8 +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_temlate.pt:9 +msgid "— Fill the form with your new password." +msgstr "— Remplissez le formulaire avec votre nouveau mot de passe." #: n/skins/generic/password_reset_template.pt:13 msgid "Password resetting" diff --git a/locales/plinn.pot b/locales/plinn.pot index 3822b03..886a0fd 100644 --- a/locales/plinn.pot +++ b/locales/plinn.pot @@ -14,7 +14,7 @@ msgid "" msgstr "" "Project-Id-Version: 2.0 beta 1\n" -"POT-Creation-Date: Wed Jul 31 16:55:00 2013\n" +"POT-Creation-Date: Thu Aug 1 11:47:35 2013\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: Zope 3 Developers \n" @@ -1029,8 +1029,20 @@ msgstr "" msgid "You have asked to change your password." msgstr "" -#: n/skins/generic/password_reset_mail_temlate.pt:5 -msgid "Please" +#: n/skins/generic/password_reset_mail_temlate.pt:6 +msgid "To get back into your account on the ${siteName} website, you'll need to create a new password." +msgstr "" + +#: n/skins/generic/password_reset_mail_temlate.pt:7 +msgid "It's easy:" +msgstr "" + +#: n/skins/generic/password_reset_mail_temlate.pt:8 +msgid "\342\200\224\302\240Click the link below to open a browser window." +msgstr "" + +#: n/skins/generic/password_reset_mail_temlate.pt:9 +msgid "\342\200\224 Fill the form with your new password." msgstr "" #: n/skins/generic/password_reset_template.pt:13 diff --git a/skins/generic/password_reset_mail_temlate.pt b/skins/generic/password_reset_mail_temlate.pt deleted file mode 100644 index a871ed5..0000000 --- a/skins/generic/password_reset_mail_temlate.pt +++ /dev/null @@ -1,5 +0,0 @@ -Hi , - - -You have asked to change your password. -Please diff --git a/skins/generic/password_reset_mail_template.pt b/skins/generic/password_reset_mail_template.pt new file mode 100644 index 0000000..261abd3 --- /dev/null +++ b/skins/generic/password_reset_mail_template.pt @@ -0,0 +1,10 @@ +Hi , + +You have asked to change your password. + +To get back into your account on the website, you'll need to create a new password. +It's easy: +— Click the link below to open a browser window. +— Fill the form with your new password. + +http://portal.bla/password_reset_form/uuid