http://api.drupal.org/api/drupal/includes--bootstrap.inc/function/drupal...

$message The message should begin with a capital letter and always ends with a period '.'.

It doesn't seems right. We can start with anything and ends with anything. "capital letter & end with punctuation" are suggestion only.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

jhodgdon’s picture

Issue tags: +Novice

By convention, it should begin with a cap letter and end with a period. The sentence could be reworded to make it clear that's a convention.

davidtrainer’s picture

Status: Active » Needs review
FileSize
605 bytes

How's this?

drewish’s picture

Status: Needs review » Needs work

The patch looks like it's editing watchdog() not drupal_set_message(). That said I didn't try applying it.

The new comment sounds kind of awkward. How about something like "The message to be displayed to the visitor. For consistency with other messages you should begin with a capital letter and end with period."

gbrands’s picture

I like the proposed description by drewish; however, 'visitor' should be changed to 'user' as drupal_set_message applies to more than just a site's visitors (e.g., admins, editors, other roles, etc...)

davidtrainer’s picture

Status: Needs work » Needs review
FileSize
662 bytes

gbrands, I agree. Patch attached.

drewish, the patch definitely changes the comment block above drupal_set_message(). I'm guessing git shows watchdog() there because it is the last function declaration previous to the changed lines. I rolled the patch with plain old git diff.

jhodgdon’s picture

Status: Needs review » Reviewed & tested by the community

Looks good to me! Let's get this into d8 and d7.

Dries’s picture

Version: 8.x-dev » 7.x-dev

Committed to 8.x. Moving to 7.x. Thanks for the clarification.

davidtrainer’s picture

Version: 7.x-dev » 8.x-dev
Status: Reviewed & tested by the community » Needs review
FileSize
609 bytes

Oops, missed a grammatical error. Sorry about that.

jhodgdon’s picture

Status: Needs review » Reviewed & tested by the community

Whoops, I missed that too, thanks! Please commit to d8 and then we need to combine the two patches for d7.

Dries’s picture

Status: Reviewed & tested by the community » Fixed

Committed to 7.x and 8.x.

Status: Fixed » Closed (fixed)
Issue tags: -Novice

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