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

Comments

hiramanpatil created an issue. See original summary.

hiramanpatil’s picture

Assigned: Unassigned » hiramanpatil
hiramanpatil’s picture

Assigned: hiramanpatil » Unassigned
Status: Active » Needs review
StatusFileSize
new1.98 KB

Here is the patch for the same.

hiramanpatil’s picture

jcnventura’s picture

Status: Needs review » Needs work

Note that the 1st file being changed here is covered better in #3281576: Do not use t() when logging to the logger channel. The 2nd file being changed is fine.

jcnventura’s picture

Status: Needs work » Reviewed & tested by the community

Actually, so that no one loses time doing this, I'm setting this to RTBC based on the changes only from the second file.

Make sure to apply the fix to #3281576: Do not use t() when logging to the logger channel before this one, and then ignore the rejected changes in src/EntityLogService.php

  • 0670fb8 committed on 8.x-1.x
    Issue #3064455 by hiramanpatil, jcnventura: t() calls should be avoided...
jcnventura’s picture

Status: Reviewed & tested by the community » Fixed
jcnventura’s picture

Status: Fixed » Closed (fixed)

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