As suggested by @Cottser on #500866: [META] remove t() from assert message, this is a new issue to pick up the views and views_ui remaining items from the t() clean-up in assert messages and groups.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

lazysoundsystem’s picture

Here's the patch.

lazysoundsystem’s picture

Status: Active » Needs review
FileSize
20.18 KB

Ignore the patch above - here's the same patch without the changes from #2035077: removing t() from asserts - remaining changes. but with Drupal\Component\Utility\String::format() instead of format_string(), as suggested there.

Crell’s picture

+++ b/core/modules/views/lib/Drupal/views/Tests/Handler/SortDateTest.php
@@ -199,10 +200,10 @@ public function testDateOrdering() {
+        ), String::format('Result is returned correctly when ordering by granularity @granularity, @reverse.', array('@granularity' => $granularity, '@reverse' => $reverse ? t('reverse') : t('forward'))));

Still some t()s.

lazysoundsystem’s picture

Thanks for the review - should be better now.

Crell’s picture

Status: Needs review » Reviewed & tested by the community

Thanks! Please remember to include interdiffs with patches. It makes it easier to review updates until we get on a real git-based workflow.

jhodgdon’s picture

Status: Reviewed & tested by the community » Needs work

This removal of t() is not correct:

-    $this->assertEqual($result[0]->attributes()->title, t('Page'));
+    $this->assertEqual($result[0]->attributes()->title, 'Page');

That is comparing a title to a translated string. It should have t() on it. It's not the message.

There are a couple of other spots like this in the patch.

lazysoundsystem’s picture

Status: Needs work » Needs review
FileSize
1.93 KB
17.74 KB

Good spot. Thanks. Here it is again without those, and with an interdiff.

Status: Needs review » Needs work

The last submitted patch, removing_remaining_ts-2035087-7.patch, failed testing.

star-szr’s picture

Status: Needs work » Needs review
star-szr’s picture

Status: Needs review » Reviewed & tested by the community

Looks good! This takes care of everything from Views and Views UI.

jhodgdon’s picture

Component: simpletest.module » views.module
Status: Reviewed & tested by the community » Fixed

Thanks! Committed to 8.x.

Status: Fixed » Closed (fixed)

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