# HG changeset patch # User Dan # Date 1197071257 18000 # Node ID 474f8be559435acbde533646cef5fab189ad541e # Parent 854eecfada2025fa26c2442fed7b0a7112b6ea22 Localized remainder of on-page tools and parts of PageProcess diff -r 854eecfada20 -r 474f8be55943 includes/pageprocess.php --- a/includes/pageprocess.php Fri Dec 07 16:42:22 2007 -0500 +++ b/includes/pageprocess.php Fri Dec 07 18:47:37 2007 -0500 @@ -152,6 +152,8 @@ function send( $do_stats = false ) { global $db, $session, $paths, $template, $plugins; // Common objects + global $lang; + if ( !$this->perms->get_permissions('read') ) { $this->err_access_denied(); @@ -187,7 +189,7 @@ { if ( !$this->page_exists ) { - redirect( makeUrl(getConfig('main_page')), 'Can\'t find special page', 'The special or administration page you requested does not exist. You will now be transferred to the main page.', 2 ); + die_semicritical('Exception in PageProcessor', '
Special page not existent but exception not previously caught by path manager.
'); } $func_name = "page_{$this->namespace}_{$this->page_id}"; if ( function_exists($func_name) ) @@ -196,9 +198,8 @@ } else { - $title = 'Page backend not found'; - $message = "The administration page you are looking for was properly registered using the page API, but the backend function - ($fname) was not found. If this is a plugin page, then this is almost certainly a bug with the plugin."; + $title = $lang->get('page_err_custompage_function_missing_title'); + $message = $lang->get('page_err_custompage_function_missing_body', array( 'function_name' => $fname )); if ( $this->send_headers ) { @@ -291,7 +292,7 @@ $page_id_data = RenderMan::strToPageID($page_to); if ( count($this->redirect_stack) >= 3 ) { - $this->render( (!$strict_no_headers), ' ' ); + $this->render( (!$strict_no_headers), ' ' ); } else { @@ -381,6 +382,7 @@ function render($incl_inner_headers = true, $_errormsg = false) { global $db, $session, $paths, $template, $plugins; // Common objects + global $lang; $text = $this->fetch_text(); $text = preg_replace('/([\s]*)__NOBREADCRUMBS__([\s]*)/', '', $text); @@ -414,11 +416,7 @@" . $lang->get('page_err_access_denied_body', array('site_administration' => $email_link)) . "
"; if ( $this->send_headers ) { diff -r 854eecfada20 -r 474f8be55943 includes/template.php --- a/includes/template.php Fri Dec 07 16:42:22 2007 -0500 +++ b/includes/template.php Fri Dec 07 18:47:37 2007 -0500 @@ -535,7 +535,7 @@ } $menubtn->assign_vars(array( - 'FLAGS' => 'onclick="if ( !KILL_SWITCH ) { void(ajaxDeletePage()); return false; }" title="Delete this page. This is always reversible unless the logs are cleared. (alt-k)" accesskey="k"', + 'FLAGS' => 'onclick="if ( !KILL_SWITCH ) { void(ajaxDeletePage()); return false; }" title="' . $lang->get('onpage_tip_deletepage') . '" accesskey="k"', 'HREF' => makeUrl($paths->page, 'do=deletepage', true), 'TEXT' => $s, )); @@ -591,7 +591,7 @@ if ( $session->user_level >= USER_LEVEL_ADMIN && $paths->page_exists && $paths->namespace != 'Special' && $paths->namespace != 'Admin' ) { $menubtn->assign_vars(array( - 'FLAGS' => 'onclick="if ( !KILL_SWITCH ) { void(ajaxAdminPage()); return false; }" title="Administrative options for this page" accesskey="g"', + 'FLAGS' => 'onclick="if ( !KILL_SWITCH ) { void(ajaxAdminPage()); return false; }" title="' . $lang->get('onpage_tip_adminoptions') . '" accesskey="g"', 'HREF' => makeUrlNS('Special', 'Administration', 'module='.$paths->nslist['Admin'].'PageManager', true), 'TEXT' => $lang->get('onpage_btn_admin'), )); @@ -601,7 +601,7 @@ if ( strlen($this->toolbar_menu) > 0 ) { $button->assign_vars(array( - 'FLAGS' => 'id="mdgToolbar_moreoptions" onclick="if ( !KILL_SWITCH ) { return false; }" title="Additional options for working with this page"', + 'FLAGS' => 'id="mdgToolbar_moreoptions" onclick="if ( !KILL_SWITCH ) { return false; }" title="' . $lang->get('onpage_tip_moreoptions') . '"', 'PARENTFLAGS' => '', 'HREF' => makeUrl($paths->page, 'do=moreoptions', true), 'TEXT' => $lang->get('onpage_btn_moreoptions') diff -r 854eecfada20 -r 474f8be55943 language/english/enano.json --- a/language/english/enano.json Fri Dec 07 16:42:22 2007 -0500 +++ b/language/english/enano.json Fri Dec 07 18:47:37 2007 -0500 @@ -204,6 +204,9 @@ tip_protect_off: 'Allows everyone to edit this page. [alt-o]', tip_protect_semi: 'Allows only users who have been registered for 4 days to edit this page. [alt-p]', tip_flushlogs: 'Remove all edit and action logs for this page from the database. IRREVERSIBLE! (alt-l)', + tip_deletepage: 'Delete this page. This is always reversible unless the logs are cleared. (alt-k)', + tip_adminoptions: 'Administrative options for this page', + tip_moreoptions: 'Additional options for working with this page', tip_password: 'Require a password in order for this page to be viewed', tip_aclmanager: 'Manage who can do what with this page (alt-m)', @@ -383,6 +386,26 @@ detag_err_page_exists: 'The detag action is only valid for pages that have been deleted in the past.', detag_success_title: 'Page detagged', detag_success_body: 'All stale tags have been removed from this page.', + + err_custompage_function_missing_title: 'Page backend not found', + err_custompage_function_missing_body: 'The administration page you are looking for was properly registered using the page API, but the backend function (%function_name%) was not found. If this is a plugin page, then this is almost certainly a bug with the plugin.', + err_redirects_exceeded: 'The maximum number of internal redirects has been exceeded.', + err_redirect_to_nonexistent: 'This page redirects to another page that doesn\'t exist.', + err_redirect_infinite_loop: 'This page infinitely redirects with another page (or another series of pages), and the infinite redirect was trapped.', + err_redirect_to_special: 'This page redirects to a Special or Administration page, which is not allowed.', + err_access_denied_title: 'You don\'t have permission to view this page.', + err_access_denied_body: 'Your user account doesn\'t have the necessary permission to view this page. There are a number of possible reasons for this:
+If you would like to inquire further about this message, you may contact the %site_administration%.
', + err_access_denied_siteadmin: 'site administrator', + msg_this_is_a_redirector: 'This page is a redirector.