There are several (6) comments on the hook_menu documentation page that show the use of the t() function for the title and description.
I think this is dangerous because new users will simply copy and paste this code and not realise it is wrong.
Can these comments be edited to remove the erroneous call to the t() function to provide as good examples as possible.
API page: https://api.drupal.org/api/drupal/modules!system!system.api.php/function...
Comments
Comment #1
kokobutter commentedhi thank you for this bug. i will look over this function and try to documented better.
Comment #2
kokobutter commentedsorry didn't notice this bug is for fixing webpage. i don't have that kind of permission to change anything on the main webpage. i sure have read further to understand the issue. sorry
Comment #3
jhodgdonWe don't normally edit comments on api.drupal.org. You can:
a) Change this to a "Drupal.org webmasters" project issue, reopen, and request action. They might do it.
or
b) Reply to the comments and explain not to use t().
Comment #4
dahousecat commentedI could add another comment but I've copied and pasted from that page several times without reading all of the comments so think it would be easy for others to do the same and it's not encouraging best practices.
Changed to drupal.org webmaster issue and re-opened.
Comment #5
lizzjoyHi @dahousecat, there is not a policy in place about editing comments on api.drupal.org and generally speaking it is not done by anyone. I recommend that you leave a comment about this in the thread so others see it and not copy/paste because of your warning.