- 🇮🇳India Rashmisoni Bangalore
grep -rl "use[ ]*StringTranslationTrait" * |grep -v "^modules" |xargs grep -n "\<t\>(" | grep -v "\* *" | grep -v "this->t"
Found new files in D10. Fixed and create a patch. Please review.
- Status changed to Needs review
over 1 year ago 2:15pm 16 March 2023 - Status changed to RTBC
over 1 year ago 4:44pm 16 March 2023 - last update
about 1 year ago Patch Failed to Apply - Status changed to Needs work
about 1 year ago 4:01am 17 April 2023 - 🇳🇿New Zealand quietone New Zealand
I checked the original issue and am adding credit for krishnan.n as suggested in the Issue Summary.
A reminder that when reviewing a patch or setting it to RTBC it is very helpful to describe in detail what one did to review the patch. There is Review a patch or merge request → which should provide some guidance.
I applied that patch and ran the grep command, which I added to the IS, and there were more usages. The reason these are not being changed should be stated in the Issue Summary and/or the review comment.
The issue title status 'round 2'. Is there a round 3? Is there more to do? If these are indeed the last ones to fix, then a title change is in order.
Oh wait, there are many other issues about replacing t(). Yes, here is the Meta, 📌 [META] Replace t() calls inside of classes Active . I am adding this to that Meta.
So, now we need to make sure that the scope is correct here and not conflicting with that issue or other children of that issue.
Setting to NW for scoping, title change, issue summary update.
- Merge request !8574Replace t() with $this->t() where possible. ( Round 2 ) → (Open) created by quietone
- Status changed to Needs review
about 16 hours ago 10:42am 28 June 2024 - 🇳🇿New Zealand quietone New Zealand
Running the grep command now results in the following. The remaining occurrences are in comments and non-object context.
)$ grep -rl "use[ ]*StringTranslationTrait" * |grep -v "^modules" |xargs grep -n "\<t\>(" | grep -v "\* *" | grep -v "this->t" core/lib/Drupal/Core/Entity/EntityFieldManager.php:668: // hook_entity_extra_field_info_alter() might contain t() calls, we cache core/lib/Drupal/Core/Config/ConfigManager.php:178: // Cast the result of t() to a string, as the diff engine doesn't know core/lib/Drupal/Core/Config/ConfigManager.php:184: // Cast the result of t() to a string, as the diff engine doesn't know core/lib/Drupal/Core/EventSubscriber/FinalExceptionSubscriber.php:104: // rather than use t() since we are in the middle of error handling, and core/lib/Drupal/Core/EventSubscriber/FinalExceptionSubscriber.php:105: // we don't want t() to cause further errors. core/modules/media/src/Entity/Media.php:483: ->setLabel(t('Name')) core/modules/media/src/Entity/Media.php:497: ->setLabel(t('Thumbnail')) core/modules/media/src/Entity/Media.php:498: ->setDescription(t('The thumbnail of the media item.')) core/modules/media/src/Entity/Media.php:513: ->setLabel(t('Authored by')) core/modules/media/src/Entity/Media.php:514: ->setDescription(t('The user ID of the author.')) core/modules/media/src/Entity/Media.php:545: ->setLabel(t('Authored on')) core/modules/media/src/Entity/Media.php:546: ->setDescription(t('The time the media item was created.')) core/modules/media/src/Entity/Media.php:563: ->setLabel(t('Changed')) core/modules/media/src/Entity/Media.php:564: ->setDescription(t('The time the media item was last edited.')) core/modules/media_library/src/MediaLibraryUiBuilder.php:95: 'title' => t('Add or select media'),