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

kokobutter’s picture

Assigned: Unassigned » kokobutter

hi thank you for this bug. i will look over this function and try to documented better.

kokobutter’s picture

Assigned: kokobutter » Unassigned

sorry 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

jhodgdon’s picture

Status: Active » Closed (won't fix)

We 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().

dahousecat’s picture

Project: Drupal core » Drupal.org site moderators
Version: 7.x-dev »
Component: documentation » Broken link
Status: Closed (won't fix) » Active

I 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.

lizzjoy’s picture

Status: Active » Closed (won't fix)

Hi @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.