As noticed in #1046784: Strings in simpletest_requirements() are not using $t(), in hook_requirements() of system.api.php, one of the calls uses t() instead of $t().

It's not strictly a problem since it is protected in if ($phase == 'runtime') (and, of course, the code is just for demonstration). But I think it should be fixed to set a good example. The code in the surrounding lines all uses $t().

Comments

bfroehle’s picture

Status: Active » Needs review
StatusFileSize
new637 bytes

Simple patch.

devin carlson’s picture

Version: 7.x-dev » 8.x-dev
Category: bug » task
Status: Needs review » Reviewed & tested by the community
StatusFileSize
new645 bytes

Looks good, as you mentioned all of the surrounding code also uses $t().
As patches should now be made against D8, I've attached a patch which makes the same change but against D8.

bfroehle’s picture

Issue tags: +Needs backport to D7

Tagging for backport to D7. The patch is documentation only.

dries’s picture

Status: Reviewed & tested by the community » Fixed

Committed to 7.x and 8.x. Good catch.

Status: Fixed » Closed (fixed)
Issue tags: -Needs backport to D7

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