[login] Adding reset password email translations - #11078
Conversation
|
Could you not use dgettext() in lost_password.tpl, perhaps with the login domain? Since the template is outside the modules, I'm not sure if that will work. Jefferson brought up the same exact issue you're fixing in this PR while reviewing my password reset rework changes (not going in 29.0.0 because too late), so I was wondering if this approach had been considered. I haven’t tried it myself, but I know dgettext() can be used in .tpl files, and it would avoid having multiple versions of the same file. |
|
I think this way makes more sense to me because you want to translate the whole email as a unit, and might want to move things around. Using The downside of doing it this way is that you can't override a language translation without overriding the module that has the template, but overall I think this approach is better than hacking up templates with dgettext for emails. |
That makes sense. My initial thought was something like this. It’s definitely less elegant, but it keeps everything in one block. I kind of used that approach in the statistics module when I was dealing with template files. {sprintf( |
|
I'm okay with both I will just adapt whenever I have to resolve the conflicts on my PR for the rework of the reset password functionality (where I modified this specific template file). |
Co-authored-by: Jad El Hachem <156138084+HachemJ@users.noreply.github.com>
d926d97 to
17fc63d
Compare
|
Added only Chinese and Hindi translations since Spanish is not in RB yet |




Brief summary of changes
lost_password.tplPriority High given the bug blocks users from entering their new generated password successfully.
Testing instructions (if applicable)
Link(s) to related issue(s)