from Products.Plinn.utils import Message as _
from Products.Plinn.utils import translate
from Products.Plinn.utils import encodeQuopriEmail
+from Products.Plinn.utils import encodeMailHeader
from DateTime import DateTime
from types import TupleType, ListType
from uuid import uuid4
-from quopri import encodestring
security = ModuleSecurityInfo('Products.Plinn.RegistrationTool')
MODE_ANONYMOUS = 'anonymous'
sender = encodeQuopriEmail(ptool.getProperty('email_from_name'), ptool.getProperty('email_from_address'))
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)
- body = self.password_reset_mail_template(fullName=member.getMemberFullName(nameBefore=0),
- siteName=ptool.getProperty('title'),
- resetPasswordUrl='%s/password_reset_form/%s' % (utool(), uuid)
- )
+ subject = encodeMailHeader(subject)
+ options = {'fullName' : member.getMemberFullName(nameBefore=0),
+ 'siteName' : ptool.getProperty('title'),
+ 'resetPasswordUrl' : '%s/password_reset_form/%s' % (utool(), uuid)}
+ body = self.password_reset_mail(options)
message = self.echange_mail_template(From=sender,
To=to,
Subject=subject,
msgid ""
msgstr ""
"Project-Id-Version: Plinn 2.0\n"
-"POT-Creation-Date: Thu Aug 1 11:47:35 2013\n"
+"POT-Creation-Date: Thu Aug 1 14:40:48 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"
msgid "Exit boxes editing"
msgstr ""
-#: n/skins/generic/password_reset_mail_temlate.pt:1
-msgid "Hi ${fullname},"
+#: n/skins/generic/password_reset_mail.py:4
+msgid "Hi %(fullName)s,"
msgstr ""
-#: n/skins/generic/password_reset_mail_temlate.pt:4
+#: n/skins/generic/password_reset_mail.py:6
msgid "You have asked to change your password."
msgstr ""
-#: n/skins/generic/password_reset_mail_temlate.pt:6
+#: n/skins/generic/password_reset_mail.py:8
msgid ""
-"To get back into your account on the ${siteName} website, you'll need to "
+"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_temlate.pt:7
+#: n/skins/generic/password_reset_mail.py:9
msgid "It's easy:"
msgstr ""
-#: n/skins/generic/password_reset_mail_temlate.pt:8
-msgid "— Click the link below to open a browser window."
+#: n/skins/generic/password_reset_mail.py:10
+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."
+#: n/skins/generic/password_reset_mail.py:11
+msgid "Fill the form with your new password."
msgstr ""
#: n/skins/generic/password_reset_template.pt:13
msgid ""
msgstr ""
"Project-Id-Version: Plinn 2.0\n"
-"POT-Creation-Date: Thu Aug 1 11:47:35 2013\n"
-"PO-Revision-Date: 2013-08-01 11:49+0200\n"
+"POT-Creation-Date: Thu Aug 1 14:40:48 2013\n"
+"PO-Revision-Date: 2013-08-01 14:42+0200\n"
"Last-Translator: Benoît PIN\n"
"Language-Team: CRI http://cri.ensmp.fr\n"
"Language: \n"
msgid "Exit boxes editing"
msgstr "Quitter l'édition des boîtes"
-#: n/skins/generic/password_reset_mail_temlate.pt:1
-msgid "Hi ${fullname},"
-msgstr "Bonjour ${fullname},"
+#: n/skins/generic/password_reset_mail.py:4
+msgid "Hi %(fullName)s,"
+msgstr "Bonjour %(fullName)s,"
-#: n/skins/generic/password_reset_mail_temlate.pt:4
+#: n/skins/generic/password_reset_mail.py:6
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:6
+#: n/skins/generic/password_reset_mail.py:8
msgid ""
-"To get back into your account on the ${siteName} website, you'll need to "
+"To get back into your account on the %(siteName)s website, you'll need to "
"create a new password."
msgstr ""
-"Pour accéder à nouveau à votre compte sur le site ${siteName}, vous devez "
+"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_temlate.pt:7
+#: n/skins/generic/password_reset_mail.py:9
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.py:10
+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_mail.py:11
+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"
msgid "mail_bcc"
msgstr "Cci"
+#~ msgid "— Click the link below to open a browser window."
+#~ msgstr ""
+#~ "— Cliquez sur le lien ci-dessous pour ouvrir une fenêtre de navigateur."
+
+#~ msgid "— Fill the form with your new password."
+#~ msgstr "— Remplissez le formulaire avec votre nouveau mot de passe."
+
+#~ msgid "Hi ${fullname},"
+#~ msgstr "Bonjour ${fullname},"
+
+#~ 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."
+
#~ msgid "Invalid userid."
#~ msgstr "Login invalide."
msgid ""
msgstr ""
"Project-Id-Version: 2.0 beta 1\n"
-"POT-Creation-Date: Thu Aug 1 11:47:35 2013\n"
+"POT-Creation-Date: Thu Aug 1 14:40:48 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"
msgid "Exit boxes editing"
msgstr ""
-#: n/skins/generic/password_reset_mail_temlate.pt:1
-msgid "Hi ${fullname},"
+#: n/skins/generic/password_reset_mail.py:4
+msgid "Hi %(fullName)s,"
msgstr ""
-#: n/skins/generic/password_reset_mail_temlate.pt:4
+#: n/skins/generic/password_reset_mail.py:6
msgid "You have asked to change your password."
msgstr ""
-#: 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."
+#: n/skins/generic/password_reset_mail.py:8
+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_temlate.pt:7
+#: n/skins/generic/password_reset_mail.py:9
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."
+#: n/skins/generic/password_reset_mail.py:10
+msgid "Click 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."
+#: n/skins/generic/password_reset_mail.py:11
+msgid "Fill the form with your new password."
msgstr ""
#: n/skins/generic/password_reset_template.pt:13
--- /dev/null
+##parameters=options={}
+from Products.Plinn.utils import translate as _
+
+print _('Hi %(fullName)s,')
+print
+print _('You have asked to change 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 '%(resetPasswordUrl)s'
+
+return printed % options
\ No newline at end of file
+++ /dev/null
-<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>