On http://api.drupal.org/api/function/hook_menu/6:

The text reads:

"title": Required. The untranslated title of the menu item. 

but one of the examples:

  $items['blog/feed'] = array(
    'title' => t('RSS feed'), // <------------- no t()??
    'page callback' => 'blog_feed',
    'access arguments' => array('access content'),
    'type' => MENU_CALLBACK,
  );

Shouldn't the t() be removed?

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

nielsbom’s picture

Component: Developer Guide » Correction/Clarification

Changed the component to reflect the new component categorization. See http://drupal.org/node/301443
-nielsbom

add1sun’s picture

Project: Documentation » Drupal core
Version: » 6.x-dev
Component: Correction/Clarification » documentation

moving queue for API docs and yes, this should be corrected.

keith.smith’s picture

Title: In correct t()ing of menu item title in example » Incorrect t()ing of menu item title in example
Status: Needs review » Active
mr.baileys’s picture

Status: Active » Needs review
FileSize
596 bytes
602 bytes

Patches for D6 and D7 attached.

boombatower’s picture

Status: Needs review » Reviewed & tested by the community

Amazing patch! now that it can be done in issue queue that is great.

Gábor Hojtsy’s picture

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

Let's get the D7 patch committed first.

Status: Reviewed & tested by the community » Needs work

The last submitted patch failed testing.

mr.baileys’s picture

grmp. I fail to see how a change to an api example can cause one test in the "User language settings" suite to fail...

stella’s picture

Status: Needs work » Needs review

All tests pass with a clean install of HEAD on my local machine.

mr.baileys’s picture

Status: Needs review » Reviewed & tested by the community

Back to RTC since the testbot is happy again.

Dries’s picture

Component: documentation » base system
Status: Reviewed & tested by the community » Fixed

Committed to CVS HEAD. Thanks!

Status: Fixed » Closed (fixed)

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