Mise en forme du mail avec une page template (ne marche pas, on va contourner).
authorBenoît Pin <pin@cri.ensmp.fr>
Thu, 1 Aug 2013 12:14:04 +0000 (14:14 +0200)
committerBenoît Pin <pin@cri.ensmp.fr>
Thu, 1 Aug 2013 12:14:04 +0000 (14:14 +0200)
RegistrationTool.py
locales/en/LC_MESSAGES/plinn.mo
locales/en/LC_MESSAGES/plinn.po
locales/fr/LC_MESSAGES/plinn.mo
locales/fr/LC_MESSAGES/plinn.po
locales/plinn.pot
skins/generic/password_reset_mail_temlate.pt [deleted file]
skins/generic/password_reset_mail_template.pt [new file with mode: 0644]

index 5072095..021b714 100644 (file)
@@ -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,
index 8c755e5..4cd15ff 100644 (file)
Binary files a/locales/en/LC_MESSAGES/plinn.mo and b/locales/en/LC_MESSAGES/plinn.mo differ
index b729ee6..7e6bac9 100644 (file)
@@ -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
index b8ca134..f151770 100644 (file)
Binary files a/locales/fr/LC_MESSAGES/plinn.mo and b/locales/fr/LC_MESSAGES/plinn.mo differ
index e31e9c9..58520fd 100755 (executable)
@@ -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"
index 3822b03..886a0fd 100644 (file)
@@ -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 <EMAIL@ADDRESS>\n"
 "Language-Team: Zope 3 Developers <zope-dev@zope.org>\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 (file)
index a871ed5..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-<tal:element i18n:translate="">Hi <span tal:replace="options/fullName" i18n:name="fullname"/>,</tal:element>
-
-
-<tal:element i18n:translate="">You have asked to change your password.</tal:element>
-<tal:element i18n:translate="">Please </tal:element>
diff --git a/skins/generic/password_reset_mail_template.pt b/skins/generic/password_reset_mail_template.pt
new file mode 100644 (file)
index 0000000..261abd3
--- /dev/null
@@ -0,0 +1,10 @@
+<tal:element i18n:translate="">Hi <span tal:replace="options/fullName" i18n:name="fullname"/>,</tal:element>
+
+<tal:element i18n:translate="">You have asked to change your password.</tal:element>
+
+<tal:element i18n:translate="">To get back into your account on the <tal:name tal:replace="options/siteName" i18n:name="siteName"/> website, you'll need to create a new password.</tal:element>
+<tal:element i18n:translate="">It's easy:</tal:element>
+<tal:element i18n:translate="">— Click the link below to open a browser window.</tal:element>
+<tal:element i18n:translate="">— Fill the form with your new password.</tal:element>
+
+<tal:element tal:replace="options/resetPasswordUrl">http://portal.bla/password_reset_form/uuid</tal:element>