t() calls should be avoided in classes, use dependency injection and $this->t() instead

CommentFileSizeAuthor
#2 use_this_t-2984088-1.patch9.61 KBkeshavv

Comments

keshav.k created an issue. See original summary.

keshavv’s picture

Status: Needs work » Needs review
StatusFileSize
new9.61 KB

Patch added please review

  • Snater committed 3e91401 on 8.x-2.x
    Issue #2984088: Revisited string translation
    
snater’s picture

Methods of InsertUtility and InsertColorboxUtility are static, using StringTranslationTrait fails as you cannot use $this in static context and self fails as well. I guess t() has to stand alone in those files. Feel free to reopen if you find another solution.

snater’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.