Merge "Add i18n for the infamous "Fatal exception of type MWException" errorbox"
This commit is contained in:
commit
87e3e9b5e9
3 changed files with 16 additions and 6 deletions
|
|
@ -117,10 +117,11 @@ class MWException extends Exception {
|
|||
$args = array_slice( func_get_args(), 2 );
|
||||
|
||||
if ( $this->useMessageCache() ) {
|
||||
return wfMessage( $key, $args )->text();
|
||||
} else {
|
||||
return wfMsgReplaceArgs( $fallback, $args );
|
||||
try {
|
||||
return wfMessage( $key, $args )->text();
|
||||
} catch ( Exception $e ) {}
|
||||
}
|
||||
return wfMsgReplaceArgs( $fallback, $args );
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -139,10 +140,17 @@ class MWException extends Exception {
|
|||
nl2br( htmlspecialchars( MWExceptionHandler::getRedactedTraceAsString( $this ) ) ) .
|
||||
"</p>\n";
|
||||
} else {
|
||||
$logId = MWExceptionHandler::getLogId( $this );
|
||||
$type = get_class( $this );
|
||||
return "<div class=\"errorbox\">" .
|
||||
'[' . MWExceptionHandler::getLogId( $this ) . '] ' .
|
||||
gmdate( 'Y-m-d H:i:s' ) .
|
||||
": Fatal exception of type " . get_class( $this ) . "</div>\n" .
|
||||
'[' . $logId . '] ' .
|
||||
gmdate( 'Y-m-d H:i:s' ) . ": " .
|
||||
$this->msg( "internalerror-fatal-exception",
|
||||
"Fatal exception of type $1",
|
||||
$type,
|
||||
$logId,
|
||||
MWExceptionHandler::getURL( $this )
|
||||
) . "</div>\n" .
|
||||
"<!-- Set \$wgShowExceptionDetails = true; " .
|
||||
"at the bottom of LocalSettings.php to show detailed " .
|
||||
"debugging information. -->";
|
||||
|
|
|
|||
|
|
@ -322,6 +322,7 @@
|
|||
"readonly_lag": "The database has been automatically locked while the slave database servers catch up to the master",
|
||||
"internalerror": "Internal error",
|
||||
"internalerror_info": "Internal error: $1",
|
||||
"internalerror-fatal-exception": "Fatal exception of type \"$1\"",
|
||||
"filecopyerror": "Could not copy file \"$1\" to \"$2\".",
|
||||
"filerenameerror": "Could not rename file \"$1\" to \"$2\".",
|
||||
"filedeleteerror": "Could not delete file \"$1\".",
|
||||
|
|
|
|||
|
|
@ -486,6 +486,7 @@
|
|||
"readonly_lag": "Error message displayed when the database is locked.",
|
||||
"internalerror": "{{Identical|Internal error}}",
|
||||
"internalerror_info": "Parameters:\n* $1 - error message",
|
||||
"internalerror-fatal-exception": "Error message displayed by MediaWiki itself when the request failed, inside an error box which also contains a code, a timestamp and a colon before this message.\nParameters:\n* $1 - proper name of the kind of error\n* $2 - alphanumeric code identifying the error in the server logs\n* $3 - URL which resulted in the error\n$2 and $3 are not used by default and only available for wiki customisations, because they are useful for communication to the wiki system administrator.",
|
||||
"filecopyerror": "Parameters:\n* $1 - source file name\n* $2 - destination file name",
|
||||
"filerenameerror": "Parameters:\n* $1 - old file name\n* $2 - new file name",
|
||||
"filedeleteerror": "Parameters:\n* $1 - file name",
|
||||
|
|
|
|||
Loading…
Reference in a new issue