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

Command icon 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

yivanov created an issue. See original summary.

yivanov’s picture

StatusFileSize
new2.34 KB
yivanov’s picture

StatusFileSize
new6.14 KB

Modified the patch to add necessary changes in settings form.

yivanov’s picture

StatusFileSize
new7.05 KB

Adjusted the configuration form with some fixes.

yivanov’s picture

StatusFileSize
new9.26 KB
yivanov’s picture

anybody’s picture

Version: 8.x-3.0 » 4.x-dev
Status: Active » Needs work

@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!

anybody’s picture

Title: Translate email notification templates » Add config schema to allow email template translations and add UI for that

Grevil made their first commit to this issue’s fork.

grevil’s picture

Yep, 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!

mably’s picture

I don't think we need to change the configuration structure, unless I miss something?

Switching from string to label or translatable text should be enough.

And would facilitate its merging.

mably’s picture

Status: Needs work » Needs review

Just created an MR based on @yivanov patch without changing the configuration structure.

Any feedback is welcome.

mably’s picture

Assigned: yivanov » Unassigned

  • mably committed 6fc4e0a6 on 4.x
    Issue #3270697 by yivanov, mably: Add config schema to allow email...
mably’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.