Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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.
Comment | File | Size | Author |
---|---|---|---|
#8 | 1097538-drupal_set_message-docs3.patch | 609 bytes | davidtrainer |
#5 | 1097538-drupal_set_message-docs2.patch | 662 bytes | davidtrainer |
#2 | 1097538-drupal_set_message-docs.patch | 605 bytes | davidtrainer |
Comments
Comment #1
jhodgdonBy 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.
Comment #2
davidtrainer CreditAttribution: davidtrainer commentedHow's this?
Comment #3
drewish CreditAttribution: drewish commentedThe 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."
Comment #4
gbrands CreditAttribution: gbrands commentedI 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...)
Comment #5
davidtrainer CreditAttribution: davidtrainer commentedgbrands, 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.
Comment #6
jhodgdonLooks good to me! Let's get this into d8 and d7.
Comment #7
Dries CreditAttribution: Dries commentedCommitted to 8.x. Moving to 7.x. Thanks for the clarification.
Comment #8
davidtrainer CreditAttribution: davidtrainer commentedOops, missed a grammatical error. Sorry about that.
Comment #9
jhodgdonWhoops, I missed that too, thanks! Please commit to d8 and then we need to combine the two patches for d7.
Comment #10
Dries CreditAttribution: Dries commentedCommitted to 7.x and 8.x.