Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Replace t() with $this->t in the code base .
Comment | File | Size | Author |
---|---|---|---|
#11 | this_t_should_be-2867630-11.patch | 5.54 KB | adamzimmermann |
#8 | this_t_should_be-2867630-8.patch | 4.32 KB | markdorison |
#4 | this_t_should_be-2867630-4.patch | 4.35 KB | markdorison |
#2 | 2867630-2.patch | 3.88 KB | Pavan B S |
Comments
Comment #2
Pavan B S CreditAttribution: Pavan B S at Valuebound commentedApplying the patch, please review.
Comment #3
markdorison@Pavan B S: The patch in #2 throws exceptions. The classes you have modified to not use the StringTranslationTrait, so the t() method is not currently available. For an example of how to add it, see RecurlyJsLocalTask.
Comment #4
markdorisonRe-rolled patch and updated with StringTranslationTrait as mentioned in #3.
Comment #5
Pavan B S CreditAttribution: Pavan B S at Valuebound commented@markdorison, thanks for the help. I was finding for solution but i didn't get.
Comment #6
adamzimmermann CreditAttribution: adamzimmermann at Chromatic commentedThis will need to be re-rolled after 2868491 is applied as it alters some of the same lines of code.
Also, from the
StringTranslationTrait
file:Some of the files modified with this patch are services, which are capable of having the "string_translation" service injected, so we should follow the best practice here. I can re-roll the patch to accommodate both changes once the aforementioned issue is merged, so I only have to re-roll this once.
Comment #7
markdorison@adamzimmermann #2868491: Replace deprecated usage of SafeMarkup::checkPlain() has been merged.
Comment #8
markdorisonRe-rolled patch.
Comment #9
markdorisonComment #10
adamzimmermann CreditAttribution: adamzimmermann at Chromatic commentedLooks good, but the dependency injection bit is still missing. I'll add that and re-roll this patch.
Comment #11
adamzimmermann CreditAttribution: adamzimmermann at Chromatic commentedComment #12
walangitan CreditAttribution: walangitan at Chromatic commented#11 looks good with the dependency injection included.
Comment #14
markdorison