Problem/Motivation

t() calls should be avoided.

Steps to reproduce

t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead.

Comments

Harshita mehna created an issue. See original summary.

harshita mehna’s picture

Status: Active » Needs review
StatusFileSize
new29.07 KB

I have uploaded a patch to fix this issue.
Please review it.
Thank you!

kenyoowen’s picture

Status: Needs review » Needs work
StatusFileSize
new348.41 KB
new388.31 KB

Hi Harshita mehna

I applied your patch and it removes some of the issues mentioned, but there is still t() calls should be avoided issues which can be found in file: uber_affiliate/src/Plugin/Block/UberAffiliateBlock.php. Please see the screenshots attached.

Thank you.

nitin_lama’s picture

Assigned: Unassigned » nitin_lama
nitin_lama’s picture

Status: Needs work » Needs review
StatusFileSize
new30.56 KB
new1.4 KB

Addressed #3. Please review. Thanks.

nitin_lama’s picture

Assigned: nitin_lama » Unassigned
keshavv’s picture

Status: Needs review » Reviewed & tested by the community
StatusFileSize
new35.96 KB

Patch #5 failed to apply. So I have created a new one.

  • keshav.k authored 9b084209 on 2.0.x
    Issue #3367607 by nitin_lama, keshav.k: t() calls should be avoided
    
keshavv’s picture

Version: 1.0.x-dev » 2.0.x-dev
keshavv’s picture

keshavv’s picture

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

Status: Fixed » Closed (fixed)