collective / collective.pwexpiry

Emulate Active Directory password complexity requirements.
1 stars 6 forks source link

password expiration email not translated #12

Closed frisi closed 8 years ago

frisi commented 8 years ago

collective.pwexpiry.utils.send_notification_email

subject and email text do not get translated on a portal with default language set to German.

for the subject we could provide the target language as argument in the i18n.translate method. for the email_template i think we'd need to set the proper locale for the TestRequest

the target language needs to be computed (we should try to re-use portal_languages negotiation settings/methods for this) too.

another possibility would be to move the notfiy_and_expire script to a browser view. this way we could call it via a zope clockserver as well and we'd have a request present.

@frapell what's your opinion on this?

frapell commented 8 years ago

@frisi I am fine with either option... I don't really know the status of clockserver... I personally prefer the separate cron config, because that's easier to mantain for sysadmins, but feel free to improve this as you see fit...

jochumdev commented 8 years ago

This has been implemented in #15