- 🇮🇳India chaitanyadessai
Replaced all the t() with $this->t()
Please review. - Status changed to Needs work
over 1 year ago 9:20am 30 January 2023 - 🇮🇹Italy apaderno Brescia, 🇮🇹
Also, the issue summary needs to be updated, since the issue has been rescoped.
- 🇳🇿New Zealand quietone New Zealand
I've been doing some more digging into the issues for fixing t() function. In this comment 📌 [META] Replace t() calls inside of classes Active in the parent issue xjm outlines the scope for these issues. That means, that this issue needs to split into two issues, one for the Controllers that have the trait and one for the Controllers that do not have the trait.
There is also a sniff for this. To find the find that need to be changed I altered the DrupalPractice.Objects.GlobalFunction rule in phpcs.xml to the following.
<rule ref="DrupalPractice.Objects.GlobalFunction"> <include-pattern>*/Plugin/*</include-pattern> <include-pattern>*Controller*</include-pattern> <exclude-pattern>*/tests/*</exclude-pattern> </rule>
The results show errors in 8 files, 5 of which extend from ControllerBase, which has the trait. Lets do those here. I have updated the IS with the files to be fixed here.
The ones that do not have the trait are
- core/modules/system/src/Controller/SystemInfoController.php
- core/modules/file/src/Controller/FileWidgetAjaxController.php
- core/modules/config/src/Controller/ConfigController.php
And are to be done in a separate issue.
- Merge request !8575Replace t() calls inside of Controllers that do not use StringTranslationTrait → (Open) created by quietone
- Status changed to Needs review
5 days ago 11:32am 28 June 2024 - Status changed to RTBC
2 days ago 7:14pm 30 June 2024 - 🇺🇸United States smustgrave
Hiding patches for clarity.
Updated the summary to note that 2 of the findings aren't needed since those moved to contrib.
Reviewing the current code changes in the MR and change seems good