Commit de0a9cca authored by Jérome Perrin's avatar Jérome Perrin

erp5_credential: translate user messages

parent be5a4588
...@@ -50,19 +50,21 @@ ...@@ -50,19 +50,21 @@
</item> </item>
<item> <item>
<key> <string>_body</string> </key> <key> <string>_body</string> </key>
<value> <string>portal = context.getPortalObject()\n <value> <string>from Products.ERP5Type.Message import translateString\n
portal = context.getPortalObject()\n
\n \n
assert key\n
mail_message = portal.portal_catalog.getResultValue(portal_type="Mail Message", reference=key)\n mail_message = portal.portal_catalog.getResultValue(portal_type="Mail Message", reference=key)\n
\n \n
credential_request = mail_message.getFollowUpValue()\n credential_request = mail_message.getFollowUpValue()\n
if credential_request.getValidationState() in (\'submitted\', \'accepted\'):\n if credential_request.getValidationState() in (\'submitted\', \'accepted\'):\n
message = "Your account is already active."\n message = translateString("Your account is already active.")\n
else:\n else:\n
credential_request.submit(comment=\'Create by subscription form\')\n credential_request.submit(comment=translateString(\'Created by subscription form\'))\n
mail_message.deliver()\n mail_message.deliver()\n
message = "Your account is being activated. You will receive an e-mail when activation is complete."\n message = translateString("Your account is being activated. You will receive an e-mail when activation is complete.")\n
\n \n
return context.Base_redirect("login_form?portal_status_message=%s" % message)\n return portal.Base_redirect("login_form", keep_items=dict(portal_status_message=message))\n
</string> </value> </string> </value>
</item> </item>
<item> <item>
......
418 419
\ No newline at end of file \ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment