joomla-cms icon indicating copy to clipboard operation
joomla-cms copied to clipboard

[5.0] Modal Select title never gets translated

Open peter1szalatnay opened this issue 1 year ago • 1 comments

Steps to reproduce the issue

Notices that when you use titleSelect="COM_X_FIELD_X_LABEL" in a modal select XML it will never get translated as there is no Text::_() on the button in the code below.

https://github.com/joomla/joomla-cms/blob/be506c0a331698a2119a6baf4e23b9d339afe93a/layouts/joomla/form/field/modal-select/buttons.php#L57

One more thing is that if you don't set the titleSelect the title is empty as the sting value will always return true and Text::_('JSELECT') is never selected either.

Expected result

Modal title should be translated.

Actual result

Modal title is not translated.

System information (as much as possible)

phpversion: 8.2.11 server: nginx/1.23.1 version: Joomla! 5.0.3 Stable [ Kuboresha ] 20-February-2024 16:00 GMT

Additional comments

peter1szalatnay avatar Feb 29 '24 04:02 peter1szalatnay

If you look at all the instances of this code you will see that Text:: is applied when the button is defined eg

https://github.com/joomla/joomla-cms/blob/e26313a2e5d72af0df80a5c828af922b2909696e/administrator/components/com_banners/src/View/Banners/HtmlView.php#L197-L204

brianteeman avatar May 07 '24 09:05 brianteeman

It is actually valid bug. Please test the fix https://github.com/joomla/joomla-cms/pull/43878

Fedik avatar Aug 03 '24 08:08 Fedik