[TYPO3-core] RFC #16019: Workspaces - Stage notification emails should be localizable

Benjamin Mack benni at typo3.org
Sat Oct 16 21:07:16 CEST 2010


Hey.

This is a SVN patch request.

Type: Workspaces Feature

Branches: trunk

BT reference: http://bugs.typo3.org/view.php?id=16019

Problem:
Right now, when you want to notify admins/editors etc of a stage change
of an element, the stage notification emails are HARDCODED (!) in a php
file. It is a nasty string that you can override with pageTSconfig
TCEMAIN.notificationEmail_body or TCEMAIN.notificationEmail_subject, but
still the variables are replaced through a nasty sprintf() function
which is a NOGO (!) (especially since we have nice markers ;-)).

Solution:
The attached patch moves the hardcoded email subject + body of emails
that are sent when an elements' stage is changed (editing / reviewing
etc) into a LLL file, and thus allows to make the stage change and have
localized labels, plus speaking variables through available markers.

It keeps backwards compatibility for the existing values, but throws a
warning in the deprecation log, but only IF the existing tsConfig option
was set before.

Additionally, the function that retrieves the email addresses from the
BE users needed to be adopted to send the username, email address, and
the users' used language with it to localize the email.

Another nice option is that you can now specify the headers that the
email should send along. With that you can finally set proper sender
email or reply-to headers.

The new pageTSconfig / userTSconfig options are:

tx_version.workspaces.stageNotificationEmail.subject =
LLL:EXT:version/Resources/Private/Language/emails.xml:subject
tx_version.workspaces.stageNotificationEmail.message =
LLL:EXT:version/Resources/Private/Language/emails.xml:message
tx_version.workspaces.stageNotificationEmail.additionalHeaders =

All the best,
Benni.

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: 16019_ws_multilanguage_notifications.patch
URL: <http://lists.typo3.org/pipermail/typo3-team-core/attachments/20101016/ee6c7846/attachment.asc>


More information about the TYPO3-team-core mailing list