No Code Attached Yet
avatar Kostelano
Kostelano
1 Nov 2021

Steps to reproduce the issue

  1. Use the latest stable version of Joomla.

  2. Create a new user, add it to the administrators group (for example).

  3. Enable workflows in the content settings.

  4. Enable all plugins in the workflow group.

  5. Go to the process transitions and, for example, for the "Publish" item in the notification settings, enable the "administrator" user group or a specific user created earlier.
    Screenshot_1

  6. Install any other language that is clearly different from en-GB.

  7. Create an article, define it in the "Publish" transition.

  8. The second created user will receive a private message informing that the state has changed. However, in the subject of the message - the type (in this case Article) will be in English, since these elements are not localized.

Screenshot_2

avatar Kostelano Kostelano - open - 1 Nov 2021
avatar joomla-cms-bot joomla-cms-bot - change - 1 Nov 2021
Labels Added: No Code Attached Yet
avatar joomla-cms-bot joomla-cms-bot - labeled - 1 Nov 2021
avatar brianteeman
brianteeman - comment - 1 Nov 2021

I can confirm the Subject is not correct. Can you also confirm please that the message is correct

avatar Kostelano
Kostelano - comment - 1 Nov 2021

Everything is in order in the message. Issue only deals with the topic of the notification.

avatar brianteeman
brianteeman - comment - 1 Nov 2021

I just wanted to double check

avatar Kostelano
Kostelano - comment - 1 Nov 2021

By the way, another Russian-speaking user received a notification with "Form" in the subject.

Screenshot_1

avatar brianteeman
brianteeman - comment - 1 Nov 2021

same bug. I just don't know the fix

avatar chmst
chmst - comment - 1 Nov 2021

It is the model name. Can we translate the model name?

avatar brianteeman
brianteeman - comment - 1 Nov 2021

This is the relevant line

'subject' => sprintf($lang->_('PLG_WORKFLOW_NOTIFICATION_ON_TRANSITION_SUBJECT'), $modelName),

We translate the transitionName here

$messageText = sprintf($lang->_('PLG_WORKFLOW_NOTIFICATION_ON_TRANSITION_MSG'),
$title,
$lang->_($transitionName),
$user->name,
$lang->_($toStage)

I tried the same $lang-> but no luck

avatar chmst
chmst - comment - 2 Nov 2021

A simple solution would be:
Changeing the message and insert the title instead of the model name (is this a b/c break?).
"The status of "halloween 2021" has been changed" instead of "The status of an article has been changed"

Also possible but not my favourite:
mapping all modelnames to Language strings
case $modelName == "article"
lang_key = "PLG_WORKFLOW_NOTIFICATION_ARTICLE"

avatar brianteeman
brianteeman - comment - 2 Nov 2021

I would go with option 1. Its not breaking anything (afaict) its just fixing a bug and improving the message

avatar chmst chmst - change - 2 Nov 2021
Status New Closed
Closed_Date 0000-00-00 00:00:00 2021-11-02 21:34:38
Closed_By chmst
avatar chmst chmst - close - 2 Nov 2021
avatar chmst
chmst - comment - 2 Nov 2021

Please test #35960

Add a Comment

Login with GitHub to post a comment