fix: Devise email translation customization#109
fix: Devise email translation customization#109Quentinchampenois wants to merge 5 commits intomainio:mainfrom
Conversation
|
Hello @Quentinchampenois, we've noticed on few applications containing this branch on their Gemfile that we had an issue with the sending of notifications due to this line
We may need to identify the reason of the issue as soon as possible and find an alternative to this fix. |
| # passed for the job. | ||
| user = nil | ||
| data[:job].arguments.each do |arg| | ||
| arg = arg[:args].first if arg.is_a?(Hash) && arg.has_key?(:args) |
There was a problem hiding this comment.
I would suggest adding a comment(i.e with a reference to #93).
Also, I would move this line of code to organization_from_argument method, so as to affect only organization setting
There was a problem hiding this comment.
Thank you for your review, I convert to draft and re-open it once I implemented your suggestion !
There was a problem hiding this comment.
I can move this line in organization_from_argument method but I wonder if we should also keep it for space_from_argument and component_from_argument because all these methods takes arg as argument
|
Hello, I will work on resolving conflicts asap About the change request, should I move the line : In the following methods : |
Description
Current version does not allow to translate Devise emails translations (subjects, etc...)
Decidim::TermCustomizer::Context::JobContextdoesn't handle the Devise job arguments format. At the moment, it expects Decidim jobs to have as argument aDecidim::OrganizationorDecidim::Userin methodresolve!.I found that Devise mailer jobs contains a list of arguments and the expected argument in a Hash
{ args: [Decidim::User] }for example.Related to
How to test
Create multiple devise translation customizations :
For account confirmation mails :
Create TermCustomizer entries
devise.mailer.confirmation_instructions.instructiondevise.mailer.confirmation_instructions.subjectRefresh cache and create a new account
For reset password confirmation :
Create TermCustomizer entries
devise.mailer.reset_password_instructions.subjectRefresh cache and ask a reset password for
user@example.orgFor new admin invitation
Create TermCustomizer entries
devise.mailer.invite_admin.subjectRefresh cache and invite a new admin