Part of meta issue #500866: [META] remove t() from assert message focused on the Simpletest 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 35 changes needed in 4 Test files. This issue includes conversion of all format_patch() occurances as well.

Files: 
CommentFileSizeAuthor
#13 1797514-13-simpletest-t.patch12.51 KBdcam
PASSED: [[SimpleTest]]: [MySQL] 40,117 pass(es).
[ View ]
#6 1797514-6-simpletest-remove-t.patch12.86 KBGaelan
PASSED: [[SimpleTest]]: [MySQL] 48,760 pass(es).
[ View ]
#2 1797514-2-t-simpletest.patch13.96 KBLars Toomre
PASSED: [[SimpleTest]]: [MySQL] 41,904 pass(es).
[ View ]

Comments

Assigned:xjm» Lars Toomre

Patch forthcoming for this one!

Status:Active» Needs review
StatusFileSize
new13.96 KB
PASSED: [[SimpleTest]]: [MySQL] 41,904 pass(es).
[ View ]

Here is an initial untested patch. This includes some format_string() changes.

Status:Needs review» Needs work
Issue tags:+Needs reroll

#2 no longer applies due to changes in SimpleTestTest.php.

Assigned:Lars Toomre» Unassigned

StatusFileSize
new12.86 KB
PASSED: [[SimpleTest]]: [MySQL] 48,760 pass(es).
[ View ]

Re-roll.

Status:Needs work» Needs review

I am forgetful! :(

Issue tags:-Needs reroll

Tag

Status:Needs review» Reviewed & tested by the community

I reviewed the patch in #6 and it looks good to me. I didn't find any additional t()'s around assert messages.

Issue summary:View changes

Added counts from initial patch.

Issue tags:+coding standards

Tagging coding standards for Jennifer to take a look at.

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

Thanks! Committed to 8.x. Ready for port!

Issue tags:+Novice

Tagging as Novice.

Status:Patch (to be ported)» Needs review
StatusFileSize
new12.51 KB
PASSED: [[SimpleTest]]: [MySQL] 40,117 pass(es).
[ View ]

Backported #6 to D7.

#13: 1797514-13-simpletest-t.patch queued for re-testing.

Status:Needs review» Reviewed & tested by the community

Reviewed this patch. It just replaces t() with a plain string for static messages and format_string() for dynamic messages. marking RTBC. I also verified it applies to a clean 7.x.

@disasm: Thanks for the review! It will be nice to get one of these committed and closed!

Status:Reviewed & tested by the community» Fixed

Thanks everyone! Another one bites the dust. Committed to 7.x.

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

Issue summary:View changes

Fix summary to say Simpletest instead of Statistics.