Commit 703557e1 authored by Dries's avatar Dries

- Patch #283201 by pwolanin, Dries: use code registry properly for locale page callbacks.

parent 0bdd86b4
......@@ -78,17 +78,14 @@ function locale_help($path, $arg) {
/**
* Implementation of hook_menu().
*
* Locale module only provides administrative menu items, so all
* menu items are invoked through locale_inc_callback().
*/
function locale_menu() {
// Manage languages
$items['admin/settings/language'] = array(
'title' => 'Languages',
'description' => 'Configure languages for content and the user interface.',
'page callback' => 'locale_inc_callback',
'page arguments' => array('drupal_get_form', 'locale_languages_overview_form'),
'page callback' => 'drupal_get_form',
'page arguments' => array('locale_languages_overview_form'),
'access arguments' => array('administer languages'),
);
$items['admin/settings/language/overview'] = array(
......@@ -98,31 +95,30 @@ function locale_menu() {
);
$items['admin/settings/language/add'] = array(
'title' => 'Add language',
'page callback' => 'locale_inc_callback',
'page arguments' => array('locale_languages_add_screen'), // two forms concatenated
'page callback' => 'locale_languages_add_screen', // two forms concatenated
'access arguments' => array('administer languages'),
'weight' => 5,
'type' => MENU_LOCAL_TASK,
);
$items['admin/settings/language/configure'] = array(
'title' => 'Configure',
'page callback' => 'locale_inc_callback',
'page arguments' => array('drupal_get_form', 'locale_languages_configure_form'),
'page callback' => 'drupal_get_form',
'page arguments' => array('locale_languages_configure_form'),
'access arguments' => array('administer languages'),
'weight' => 10,
'type' => MENU_LOCAL_TASK,
);
$items['admin/settings/language/edit/%'] = array(
'title' => 'Edit language',
'page callback' => 'locale_inc_callback',
'page arguments' => array('drupal_get_form', 'locale_languages_edit_form', 4),
'page callback' => 'drupal_get_form',
'page arguments' => array('locale_languages_edit_form', 4),
'access arguments' => array('administer languages'),
'type' => MENU_CALLBACK,
);
$items['admin/settings/language/delete/%'] = array(
'title' => 'Confirm',
'page callback' => 'locale_inc_callback',
'page arguments' => array('drupal_get_form', 'locale_languages_delete_form', 4),
'page callback' => 'drupal_get_form',
'page arguments' => array('locale_languages_delete_form', 4),
'access arguments' => array('administer languages'),
'type' => MENU_CALLBACK,
);
......@@ -131,8 +127,7 @@ function locale_menu() {
$items['admin/build/translate'] = array(
'title' => 'Translate interface',
'description' => 'Translate the built in interface and optionally other text.',
'page callback' => 'locale_inc_callback',
'page arguments' => array('locale_translate_overview_screen'), // not a form, just a table
'page callback' => 'locale_translate_overview_screen', // not a form, just a table
'access arguments' => array('translate interface'),
);
$items['admin/build/translate/overview'] = array(
......@@ -144,37 +139,35 @@ function locale_menu() {
'title' => 'Search',
'weight' => 10,
'type' => MENU_LOCAL_TASK,
'page callback' => 'locale_inc_callback',
'page arguments' => array('locale_translate_seek_screen'), // search results and form concatenated
'page callback' => 'locale_translate_seek_screen', // search results and form concatenated
'access arguments' => array('translate interface'),
);
$items['admin/build/translate/import'] = array(
'title' => 'Import',
'page callback' => 'locale_inc_callback',
'page arguments' => array('drupal_get_form', 'locale_translate_import_form'),
'page callback' => 'drupal_get_form',
'page arguments' => array('locale_translate_import_form'),
'access arguments' => array('translate interface'),
'weight' => 20,
'type' => MENU_LOCAL_TASK,
);
$items['admin/build/translate/export'] = array(
'title' => 'Export',
'page callback' => 'locale_inc_callback',
'page arguments' => array('locale_translate_export_screen'), // possibly multiple forms concatenated
'page callback' => 'locale_translate_export_screen', // possibly multiple forms concatenated
'access arguments' => array('translate interface'),
'weight' => 30,
'type' => MENU_LOCAL_TASK,
);
$items['admin/build/translate/edit/%'] = array(
'title' => 'Edit string',
'page callback' => 'locale_inc_callback',
'page arguments' => array('drupal_get_form', 'locale_translate_edit_form', 4),
'page callback' => 'drupal_get_form',
'page arguments' => array('locale_translate_edit_form', 4),
'access arguments' => array('translate interface'),
'type' => MENU_CALLBACK,
);
$items['admin/build/translate/delete/%'] = array(
'title' => 'Delete string',
'page callback' => 'locale_inc_callback',
'page arguments' => array('locale_translate_delete_page', 4),
'page callback' => 'locale_translate_delete_page',
'page arguments' => array(4),
'access arguments' => array('translate interface'),
'type' => MENU_CALLBACK,
);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment