This is a sub-task of #500866: [META] remove t() from assert message focused on the User module.

In D8 per http://drupal.org/simpletest-tutorial-drupal7#t, best practice is to remove t() from assert messages in tests. When necessary, t() should be replaced with format_string().

There are approximately 200 changes needed in 18 Test files. This issue includes conversion of all format_patch() occurances as well.

Comments

lars toomre’s picture

Status: Active » Needs review
StatusFileSize
new78.88 KB

Here is an initial untested patch for this issue. This patch includes format_string() conversions as well.

It also includes coorrections for two test cases where the getInfo strings where being translated with t(). All of the other test cases in this module were correct.

dcam’s picture

Status: Needs review » Reviewed & tested by the community

#1 looks good to me. I don't see any additional t()'s around assert messages.

jhodgdon’s picture

Version: 8.x-dev » 7.x-dev
Status: Reviewed & tested by the community » Patch (to be ported)

Whew, that was a big one. :) Committed to 8.x, ready for backport.

lars toomre’s picture

My guess is that with this commit we are more than 50% way there to eliminating the t() wraps around test assert messages. Thanks for the commits @jhodgdon!

The other big batches of the t() asserts are in the sub-issues to the System module testing the include files. Since I generated most of those patches, it would be great if @dcam or others could review them so that they are ready to be committed as well.

dcam’s picture

I'm not certain, but I think almost all of the issues have had their patches committed to 8.x now. This week I went through the whole list in the meta issue, one-by-one, in order. Last night I reached the end of the list. A few of them had to be skipped and of course many remain to be backported, but other than those that needed rerolling almost all the system tests should be done.

I'll try to get to the rerolled patches tonight if I can, but they may have to wait until tomorrow. We're going out and participating in college homecoming festivities in a few minutes.

dcam’s picture

Status: Patch (to be ported) » Needs review
StatusFileSize
new65.97 KB

Backported #1 to D7.

dcam’s picture

#6: 1798386-6-t-user.patch queued for re-testing.

Status: Needs review » Needs work

The last submitted patch, 1798386-6-t-user.patch, failed testing.

dcam’s picture

Issue tags: +Novice

Tagging as Novice.

dcam’s picture

Status: Needs work » Needs review
StatusFileSize
new65.99 KB

Rerolled #6.

robloach’s picture

Issue tags: -Novice

#10: 1798386-10-t-user.patch queued for re-testing.

izus’s picture

Issue tags: +Novice

#10: 1798386-10-t-user.patch queued for re-testing.

izus’s picture

Status: Needs review » Reviewed & tested by the community

hi,
this patch looks great
Thanks

dcam’s picture

Thanks for the review, izus!

jhodgdon’s picture

Status: Reviewed & tested by the community » Fixed

Thanks all! Committed to 7.x and this one is done.

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

Anonymous’s picture

Issue summary: View changes

Added counts from initial patch.