Problem/Motivation
It would be really nice if email templates are translatable.
Steps to reproduce
1. Enable Configuration translation module
2. Enable second language (for example french)
3. Go to /admin/config/regional/config-translation - you will not see a way to translate the Auto Purge Users email template.
Proposed resolution
I prepared a small patch that allows this - basically split the setting for the mail templates from the general one (like the core's user module does) and change the schema to allow translations. Then, depending on the user's selected language preference we get the proper langcode and build the email subject and body.
Remaining tasks
Review and test
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | translate-mail-template-3270697-5.patch | 9.26 KB | yivanov |
Issue fork purge_users-3270697
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
yivanov commentedComment #3
yivanov commentedModified the patch to add necessary changes in settings form.
Comment #4
yivanov commentedAdjusted the configuration form with some fixes.
Comment #5
yivanov commentedComment #6
yivanov commentedComment #7
anybody@yivanov thank you for the nice work!
What's missing I guess is an update hook transfering the config values into the newly created config!
Also could you please create this as MR instead of a patch?
Happy to review again, thank you!
Comment #8
anybodyComment #10
grevil commentedYep, the patch doesn't apply any more. Maybe @yivanov could give a new, adjusted version of the patch as an MR on the current issue fork!
Comment #11
mably commentedI don't think we need to change the configuration structure, unless I miss something?
Switching from
stringtolabelor translatabletextshould be enough.And would facilitate its merging.
Comment #13
mably commentedJust created an MR based on @yivanov patch without changing the configuration structure.
Any feedback is welcome.
Comment #14
mably commentedComment #16
mably commented