diff --git a/core/includes/menu.inc b/core/includes/menu.inc index 211d7ba..a03a70c 100644 --- a/core/includes/menu.inc +++ b/core/includes/menu.inc @@ -654,7 +654,8 @@ function _menu_check_access(&$item, $map) { * $item['title'] is localized according to $item['title_callback']. * If an item's callback is check_plain(), $item['options']['html'] becomes * TRUE. - * $item['description'] is translated using t(). + * $item['description'] is computed using $item['description_callback'] if + * specified, otherwise it is translated using t(). * When doing link translation and the $item['options']['attributes']['title'] * (link title attribute) matches the description, it is translated as well. */ @@ -719,7 +720,7 @@ function _menu_item_localize(&$item, $map, $link_translate = FALSE) { } } elseif ($description_callback) { - // If there are no arguments, call the desscription callback directly. + // If there are no arguments, call the description callback directly. if (empty($item['description_arguments'])) { $item['description'] = $description_callback($item['description']); } diff --git a/core/modules/system/tests/menu.test b/core/modules/system/tests/menu.test index 5e36807..cd036fe 100644 --- a/core/modules/system/tests/menu.test +++ b/core/modules/system/tests/menu.test @@ -186,7 +186,7 @@ class MenuRouterTestCase extends DrupalWebTestCase { // Verify that the menu router item title is output as page title. $this->drupalGet('menu_callback_description'); $this->assertText(t('Menu item description text')); - $this->assertText(t('Menu item description arguments')); + $this->assertText('Menu item description arguments'); } /** diff --git a/core/modules/system/tests/modules/menu_test/menu_test.module b/core/modules/system/tests/modules/menu_test/menu_test.module index c2b294f..356a0f7 100644 --- a/core/modules/system/tests/modules/menu_test/menu_test.module +++ b/core/modules/system/tests/modules/menu_test/menu_test.module @@ -41,7 +41,7 @@ function menu_test_menu() { 'title' => 'Menu Item with a description set with a callback', 'page callback' => 'menu_test_callback', 'description callback' => 'check_plain', - 'description arguments' => array('Menu item description arguments'), + 'description arguments' => array('Menu item description arguments'), 'access arguments' => array('access content'), ); // Use FALSE as 'title callback' to bypass t().