No Code Attached Yet
avatar heelc29
heelc29
27 Mar 2022

Steps to reproduce the issue

  1. open com_workflow/stage/edit (new)
  2. open com_workflow/transition/edit (new or edit)

Expected result

No untranslated strings

Actual result

2 untranslated strings

  1. COM_WORKFLOW_STAGE_FORM_NEW → code and language mismatch #32060
    COM_WORKFLOW_STAGE_FORM_ADD="Add Stage"
    COM_WORKFLOW_STAGE_FORM_EDIT="Edit Stage"

    <form action="<?php echo Route::_('index.php?option=com_workflow&view=stage&workflow_id=' . $input->getCmd('workflow_id') . '&extension=' . $input->getCmd('extension') . '&layout=' . $layout . $tmpl . '&id=' . (int) $this->item->id); ?>" method="post" name="adminForm" id="workflow-form" aria-label="<?php echo Text::_('COM_WORKFLOW_STAGE_FORM_' . ((int) $this->item->id === 0 ? 'NEW' : 'EDIT'), true); ?>" class="form-validate">
  2. JGLOBAL_FIELDSET_NOTIFICATION → missing fieldset label
    <fieldset name="notification">

System information (as much as possible)

Joomla: 4.1.1-rc3-dev
PHP: 8.1.1
DB: 10.4.22-MariaDB

avatar heelc29 heelc29 - open - 27 Mar 2022
avatar joomla-cms-bot joomla-cms-bot - change - 27 Mar 2022
Labels Added: No Code Attached Yet
avatar joomla-cms-bot joomla-cms-bot - labeled - 27 Mar 2022
avatar infograf768
infograf768 - comment - 28 Mar 2022

Error only for one string
COM_WORKFLOW_STAGE_FORM_ADD="Add Stage"

Easier to modify code to use ADD instead of NEW as release is tomorrow Tuesday 29

<form action="<?php echo Route::_('index.php?option=com_workflow&view=stage&workflow_id=' . $input->getCmd('workflow_id') . '&extension=' . $input->getCmd('extension') . '&layout=' . $layout . $tmpl . '&id=' . (int) $this->item->id); ?>" method="post" name="adminForm" id="workflow-form" aria-label="<?php echo Text::_('COM_WORKFLOW_STAGE_FORM_' . ((int) $this->item->id === 0 ? 'ADD' : 'EDIT'), true); ?>" class="form-validate">

avatar brianteeman
brianteeman - comment - 28 Mar 2022

The date of the release is irrelevant to the fix

avatar infograf768
infograf768 - comment - 28 Mar 2022

The date of the release is irrelevant to the fix

It is not in this case. It is easier at this stage to modify the code as anyway the RC code is to be modified just before release to cope with security.

I suggest you think a bit further before writing.

avatar brianteeman
brianteeman - comment - 28 Mar 2022

and thats why we had such crap code all over the place that we now have to fix.

avatar bembelimen
bembelimen - comment - 28 Mar 2022

I guess it's me, but I'm checking with the latest RC and can't find the element. Would someone give me a screenshot/hint?

avatar brianteeman
brianteeman - comment - 28 Mar 2022

it's the aria-label

avatar bembelimen
bembelimen - comment - 28 Mar 2022

Yeah, I checked that, too

grafik

avatar brianteeman
brianteeman - comment - 28 Mar 2022

its easy to miss in the report but

Stage - New

Transition - New & Edit

avatar bembelimen
bembelimen - comment - 28 Mar 2022

Ah, ok, thanks. If someone could make a PR today, I can get it in for the 4.1.1 release.

avatar richard67
richard67 - comment - 28 Mar 2022

Ah, ok, thanks. If someone could make a PR today, I can get it in for the 4.1.1 release.

@bembelimen PR for changing it in the PHP file? Or for adding a new language string in the language file?

avatar richard67
richard67 - comment - 28 Mar 2022

And what about the 2nd error with the missing fieldset label? The discussion above was only about the first error.

avatar bembelimen
bembelimen - comment - 28 Mar 2022

Fix the language files

avatar bembelimen
bembelimen - comment - 28 Mar 2022

So be more clear:
it would be nice to have two PRs, one adding the strings to the language files, one fixing the label.

avatar richard67
richard67 - comment - 28 Mar 2022

@bembelimen For point 1 see #37393 . With the missing label (point 2) I do not see any issue. It looks like it should here:

2022-03-28_workflow-transition-notification

avatar richard67
richard67 - comment - 28 Mar 2022

For the first point please test #37393 .

avatar richard67
richard67 - comment - 28 Mar 2022

For the second point I see no issue. Even without a label, the tab title and the legend of the fieldset have the right value and are translated well.

And I see many other places where we have fieldsets without label.

But if I should add one, I would use text "COM_WORKFLOW_NOTIFICATION_FIELDSET_LABEL" because that's the text of the workflow notification plugin, and when that id disabled the notifications tab in the transition edit is not shown.

@brianteeman What do you think? Is that necessary and is it right?

avatar brianteeman
brianteeman - comment - 28 Mar 2022

just been loking at that one. its a bit tricky as its an injected plugin and the string is used for the tab title and the fieldset afaict

image

I cant see how/where t he compound string is being generated so the only option i am aware of is to create a new string

JGLOBAL_FIELDSET_PUBLISHING

avatar richard67
richard67 - comment - 28 Mar 2022

@brianteeman We already have a string for that in the workflow notifications plugin. See PR #37394 .

avatar brianteeman
brianteeman - comment - 28 Mar 2022

yes - sorry. multitasking and failing

avatar richard67 richard67 - change - 28 Mar 2022
Status New Closed
Closed_Date 0000-00-00 00:00:00 2022-03-28 14:20:50
Closed_By richard67
avatar richard67
richard67 - comment - 28 Mar 2022

Closing as we have PRs now for both issues, see PRs #37393 and #37394 .

avatar richard67 richard67 - close - 28 Mar 2022

Add a Comment

Login with GitHub to post a comment