Nemo bis has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/190372

Change subject: Add i18n for the infamous "Fatal exception of type MWException" 
errorbox
......................................................................

Add i18n for the infamous "Fatal exception of type MWException" errorbox

Bug: T40095
Change-Id: Ibd2f984b66acb9150400126f21acf7cc5fc85acd
---
M includes/exception/MWException.php
M languages/i18n/en.json
M languages/i18n/qqq.json
3 files changed, 12 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/72/190372/1

diff --git a/includes/exception/MWException.php 
b/includes/exception/MWException.php
index 6fd6fb5..df27c3d 100644
--- a/includes/exception/MWException.php
+++ b/includes/exception/MWException.php
@@ -139,10 +139,17 @@
                        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 " . $type,
+                               $type,
+                               $logId,
+                               MWExceptionHandler::getURL( $this )
+                       ) . "</div>\n" .
                        "<!-- Set \$wgShowExceptionDetails = true; " .
                        "at the bottom of LocalSettings.php to show detailed " .
                        "debugging information. -->";
diff --git a/languages/i18n/en.json b/languages/i18n/en.json
index cff74b4..9ad3d86 100644
--- a/languages/i18n/en.json
+++ b/languages/i18n/en.json
@@ -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\".",
diff --git a/languages/i18n/qqq.json b/languages/i18n/qqq.json
index 6470103..beb53c9 100644
--- a/languages/i18n/qqq.json
+++ b/languages/i18n/qqq.json
@@ -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",

-- 
To view, visit https://gerrit.wikimedia.org/r/190372
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ibd2f984b66acb9150400126f21acf7cc5fc85acd
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Nemo bis <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to