Need to correct grammar for messages in the tracker.test file. Need to correct verb/subject agreement and to make the messages complete sentences.

$this->assertNoText($unpublished->title, t('Unpublished node do not show up in the tracker listing.'));
should be changed to:
$this->assertNoText($unpublished->title, t('Unpublished node does not show up in the tracker listing.'));

$this->assertText($published->title, t('Published node show up in the tracker listing.'));
should be changed to:
$this->assertText($published->title, t('Published node shows up in the tracker listing.'));

$this->assertNoText($published->title, t('Deleted node do not show up in the tracker listing.'));
should be changed to:
$this->assertNoText($published->title, t('Deleted node does not show up in the tracker listing.'));

$this->assertNoText($unpublished->title, t("Unpublished nodes do not show up in the users's tracker listing."));
should be changed to:
$this->assertNoText($unpublished->title, t("Unpublished node does not show up in the users's tracker listing."));

$this->assertText($my_published->title, t("Published nodes show up in the user's tracker listing."));
should be changed to:
$this->assertText($my_published->title, t("Published node shows up in the user's tracker listing."));

$this->assertText('1 new', t('New comment is counted on the tracker listing pages.'));
should be changed to:
$this->assertText('1 new', t('1 new comment is counted on the tracker listing pages.'));

$this->assertText('updated', t('Node is listed as updated'));
should be changed to:
$this->assertText('updated', t('A node is listed as updated'));

$this->assertText('1 new', t('New comment is counted on the tracker listing pages.'));
should be changed to:
$this->assertText('1 new', t('1 new comment is counted on the tracker listing pages.'));

$this->assertText($node->title, t('Node is displayed on the tracker listing pages.'));
should be changed to:
$this->assertText($node->title, t('A node is displayed on the tracker listing pages.'));

$this->assertText(t('No content available.'), t('Node is displayed on the tracker listing pages.'));
should be changed to:
$this->assertText(t('No content available.'), t('A node is displayed on the tracker listing pages.'));

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

kathyh’s picture

Status: Active » Needs review
FileSize
3.87 KB

Updates per issue summary.

Devin Carlson’s picture

Status: Needs review » Needs work

Most of the patch looks great, only one thing sticks out:

  • $this->assertText('1 new', t('1 new comment is counted on the tracker listing pages.'));
  • $this->assertText('1 new', t('1 new comment is counted on the tracker listing pages.'));

It isn't common practice to start a sentence with a number or to use the numerical representation of a number when it is less than ten. Should the '1 new comment' be changed to something like 'A new comment' (or 'One new comment' if an actual number is required)?

webchick’s picture

Issue tags: +Novice

Looks like a good patch for the novice queue!

watbe’s picture

Status: Needs work » Needs review
FileSize
5.02 KB

Updated patch based on suggestion in comment 2 (which makes sense).

tregeagle’s picture

Previous patch contains some diff noise, try this one instead.

tregeagle’s picture

Issue tags: +DDU2012

updating tags

oriol_e9g’s picture

Status: Needs review » Needs work

Tests don't need to use the t() function #500866: [META] remove t() from assert message anymore:

$this->assertNoText($unpublished->title, t('Unpublished node does not show up in the tracker listing.'));
...

should be:

$this->assertNoText($unpublished->title, 'Unpublished node does not show up in the tracker listing.');
...

We can do some cleanup in tracker.tests with this patch.

oriol_e9g’s picture

Status: Needs work » Needs review
FileSize
8.54 KB

Same patch in #5 but without t() functions. I know that the removal of t() function is out of scope, feel free to review and commit the patch in #5.

patrickd’s picture

Issue tags: -Novice, -DDU2012

#8: tracker-grammar-1338152-8.patch queued for re-testing.

Status: Needs review » Needs work
Issue tags: +Novice, +DDU2012

The last submitted patch, tracker-grammar-1338152-8.patch, failed testing.

ditcheva’s picture

Status: Needs work » Needs review
FileSize
2.93 KB

Let's get these language clarifications out! It looks like this code is no longer in modules/tracker/tracker.test. That file no longer exists. I've updated this to run against the current 8.x drupal version, and it now modifies the /tracker/Tests/TrackerTest.php file, in which the t() functions were already taken out....

mitron’s picture

First change below is required to fix bad grammar. Second change is more "natural" sounding English but could be OK as is.

26,32c31,51
<      $this->drupalGet('user/' . $this->user->uid . '/track');
< -    $this->assertNoText($unpublished->label(), "Unpublished nodes do not show up in the users's tracker listing.");
< +    $this->assertNoText($unpublished->label(), "Unpublished nodes do not show up in the user's tracker listing.");
<      $this->assertText($my_published->label(), "Published nodes show up in the user's tracker listing.");
< -    $this->assertNoText($other_published_no_comment->label(), "Other user's nodes do not show up in the user's tracker listing.");
< +    $this->assertNoText($other_published_no_comment->label(), "Another user's nodes do not show up in the user's tracker listing.");
<      $this->assertText($other_published_my_comment->label(), "Nodes that the user has commented on appear in the user's tracker listing.");
---
parthipanramesh’s picture

I agree to mitron.

pkunwar’s picture

The #11 patch failed with following rejections

--- core/modules/tracker/lib/Drupal/tracker/Tests/TrackerTest.php
+++ core/modules/tracker/lib/Drupal/tracker/Tests/TrackerTest.php
@@ -72,14 +72,14 @@
));

$this->drupalGet('tracker');
- $this->assertNoText($unpublished->label(), 'Unpublished node do not show up in the tracker listing.');
- $this->assertText($published->label(), 'Published node show up in the tracker listing.');
+ $this->assertNoText($unpublished->label(), 'Unpublished node does not show up in the tracker listing.');
+ $this->assertText($published->label(), 'Published node shows up in the tracker listing.');
$this->assertLink(t('My recent content'), 0, 'User tab shows up on the global tracker page.');

// Delete a node and ensure it no longer appears on the tracker.
node_delete($published->nid);
$this->drupalGet('tracker');
- $this->assertNoText($published->label(), 'Deleted node do not show up in the tracker listing.');
+ $this->assertNoText($published->label(), 'Deleted node does not show up in the tracker listing.');
}

/**

pkunwar’s picture

Issue summary: View changes
Status: Needs review » Needs work
ditcheva’s picture

Status: Needs work » Needs review
FileSize
3.91 KB

I've redone the patch and included the suggestions from #12. Needs review!

headli’s picture

Assigned: Unassigned » headli

I'm rerolling this patch.

headli’s picture

Assigned: headli » Unassigned
FileSize
3.6 KB

The patch has been rerolled. Please review.

dermario’s picture

Status: Needs review » Reviewed & tested by the community

Looks okay for me and the patch applies right.

catch’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

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