From 81938a3cdc7b9bd13d58e355c59d9835e830fea4 Mon Sep 17 00:00:00 2001 From: Steven Wittens Date: Fri, 18 Aug 2006 12:17:00 +0000 Subject: #76802: Introduce placeholder magic into t() See: http://drupal.org/node/64279#t-placeholders --- modules/menu/menu.module | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) (limited to 'modules/menu') diff --git a/modules/menu/menu.module b/modules/menu/menu.module index d0167119d..8e6d42414 100644 --- a/modules/menu/menu.module +++ b/modules/menu/menu.module @@ -12,31 +12,31 @@ function menu_help($section) { switch ($section) { case 'admin/help#menu': - $output = t('

Menus are a collection of links (menu items) used to navigate a website. The menu module provides an interface to control and customize the powerful menu system that comes with Drupal. Menus are primarily displayed as a hierarchical list of links using Drupal\'s highly flexible blocks feature. Each menu automatically creates a block of the same name. By default, new menu items are placed inside a built-in menu labelled %navigation, but administrators can also create custom menus.

-

Drupal themes generally provide out-of-the-box support for two menus commonly labelled %primary-links and %secondary-links. These are sets of links which are usually displayed in the header or footer of each page (depending on the currently active theme). Any menu can be designated as the primary or secondary links menu via the menu settings page.

+ $output = t('

Menus are a collection of links (menu items) used to navigate a website. The menu module provides an interface to control and customize the powerful menu system that comes with Drupal. Menus are primarily displayed as a hierarchical list of links using Drupal\'s highly flexible blocks feature. Each menu automatically creates a block of the same name. By default, new menu items are placed inside a built-in menu labelled %navigation, but administrators can also create custom menus.

+

Drupal themes generally provide out-of-the-box support for two menus commonly labelled %primary-links and %secondary-links. These are sets of links which are usually displayed in the header or footer of each page (depending on the currently active theme). Any menu can be designated as the primary or secondary links menu via the menu settings page.

Menu administration tabs: ', array('%navigation' => theme('placeholder', 'Navigation'), '%primary-links' => theme('placeholder', 'primary links'), '%secondary-links' => theme('placeholder', 'secondary links'), '%admin-block' => url('admin/build/block'), '%menu-settings' => url('admin/build/menu/settings'))); +', array('%navigation' => 'Navigation', '%primary-links' => 'primary links', '%secondary-links' => 'secondary links', '@admin-block' => url('admin/build/block'), '@menu-settings' => url('admin/build/menu/settings'))); $output .= t('

You can

-', array('%admin-menu' => url('admin/build/menu'), '%admin-block' => url('admin/build/block'), '%admin-menu-menu-add' => url('admin/build/menu/menu/add'), '%admin-menu-item-add' => url('admin/build/menu/item/add'), '%admin-settings-menus' => url('admin/build/menu/settings'))); - $output .= '

'. t('For more information please read the configuration and customization handbook Menu page.', array('%menu' => 'http://drupal.org/handbook/modules/menu/')) .'

'; +', array('@admin-menu' => url('admin/build/menu'), '@admin-block' => url('admin/build/block'), '@admin-menu-menu-add' => url('admin/build/menu/menu/add'), '@admin-menu-item-add' => url('admin/build/menu/item/add'), '@admin-settings-menus' => url('admin/build/menu/settings'))); + $output .= '

'. t('For more information please read the configuration and customization handbook Menu page.', array('@menu' => 'http://drupal.org/handbook/modules/menu/')) .'

'; return $output; case 'admin/settings/modules#description': return t('Allows administrators to customize the site navigation menu.'); case 'admin/build/menu': - return '

'. t('Menus are a collection of links (menu items) used to navigate a website. The list(s) below display the currently available menus along with their menu items. Select an operation from the list to manage each menu or menu item.', array('%admin-settings-menus' => url('admin/build/menu/settings'), '%admin-block'=>url('admin/build/block'))) .'

'; + return '

'. t('Menus are a collection of links (menu items) used to navigate a website. The list(s) below display the currently available menus along with their menu items. Select an operation from the list to manage each menu or menu item.', array('@admin-settings-menus' => url('admin/build/menu/settings'), '@admin-block'=> url('admin/build/block'))) .'

'; case 'admin/build/menu/menu/add': - return '

'. t('Enter the name for your new menu. Remember to enable the newly created block in the blocks administration page.', array('%blocks' => url('admin/build/block'))) .'

'; + return '

'. t('Enter the name for your new menu. Remember to enable the newly created block in the blocks administration page.', array('@blocks' => url('admin/build/block'))) .'

'; case 'admin/build/menu/item/add': return '

'. t('Enter the title, path, position and the weight for your new menu item.') .'

'; } @@ -251,7 +251,7 @@ function menu_form_alter($form_id, &$form) { ); $form['menu']['advanced'] = array('#type' => 'item', - '#value' => t('You may also edit the advanced settings for this menu item.', array('%edit' => url("admin/build/menu/item/edit/{$item['mid']}"))), + '#value' => t('You may also edit the advanced settings for this menu item.', array('@edit' => url("admin/build/menu/item/edit/{$item['mid']}"))), ); } } @@ -271,7 +271,7 @@ function menu_configure() { ); $form['settings_links']['intro'] = array('#type' => 'item', - '#value' => t('Primary and secondary links provide a navigational menu system which usually (depending on your theme) appears at the top-right of the browser window. The links displayed can be generated either from a custom list created via the menu administration page or from a built-in list of menu items such as the navigation menu links.', array('%menu' => url('admin/build/menu'))), + '#value' => t('Primary and secondary links provide a navigational menu system which usually (depending on your theme) appears at the top-right of the browser window. The links displayed can be generated either from a custom list created via the menu administration page or from a built-in list of menu items such as the navigation menu links.', array('@menu' => url('admin/build/menu'))), ); $form['settings_links']['menu_primary_menu'] = array('#type' => 'select', @@ -375,7 +375,7 @@ function menu_edit_item_form($type, $mid = 0) { $form['path'] = array('#type' => 'textfield', '#title' => t('Path'), '#default_value' => $item['path'], - '#description' => t('The path this menu item links to. This can be an internal Drupal path such as %add-node or an external URL such as %drupal. Enter %front to link to the front page.', array('%front' => theme('placeholder', ''), '%add-node' => theme('placeholder', 'node/add'), '%drupal' => theme('placeholder', 'http://drupal.org'))), + '#description' => t('The path this menu item links to. This can be an internal Drupal path such as %add-node or an external URL such as %drupal. Enter %front to link to the front page.', array('%front' => '', '%add-node' => 'node/add', '%drupal' => 'http://drupal.org')), '#required' => TRUE, ); } @@ -441,10 +441,10 @@ function menu_item_delete_form($mid) { $form['title'] = array('#type' => 'value', '#value' => $menu->title); if ($menu->type & MENU_IS_ROOT) { - $message = t('Are you sure you want to delete the menu %item?', array('%item' => theme('placeholder', $menu->title))); + $message = t('Are you sure you want to delete the menu %item?', array('%item' => $menu->title)); } else { - $message = t('Are you sure you want to delete the custom menu item %item?', array('%item' => theme('placeholder', $menu->title))); + $message = t('Are you sure you want to delete the custom menu item %item?', array('%item' => $menu->title)); } return confirm_form('menu_confirm_delete_form', $form, $message, 'admin/build/menu', t('This action cannot be undone.'), t('Delete')); @@ -475,7 +475,7 @@ function menu_confirm_delete_form_submit($form_id, $form_values) { function menu_reset_item($mid) { if (isset($mid) && $title = db_result(db_query('SELECT title FROM {menu} WHERE mid = %d', $mid))) { $form['mid'] = array('#type' => 'value', '#value' => $mid); - return confirm_form('menu_reset_item_form', $form, t('Are you sure you want to reset the item %item to its default values?', array('%item' => theme('placeholder', $title))), 'admin/build/menu', t('Any customizations will be lost. This action cannot be undone.'), t('Reset')); + return confirm_form('menu_reset_item_form', $form, t('Are you sure you want to reset the item %item to its default values?', array('%item' => $title)), 'admin/build/menu', t('Any customizations will be lost. This action cannot be undone.'), t('Reset')); } else { drupal_not_found(); @@ -532,7 +532,7 @@ function menu_edit_item_save($edit) { $status = menu_save_item($edit); - $t_args = array('%title' => theme('placeholder', $edit['title'])); + $t_args = array('%title' => $edit['title']); if ($status == SAVED_UPDATED) { drupal_set_message(t('The menu item %title has been updated.', $t_args)); } -- cgit v1.2.3