[5.0] Modal Select title never gets translated
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
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
It is actually valid bug. Please test the fix https://github.com/joomla/joomla-cms/pull/43878