From 19349af1401641cdf4eab0a43458debaf187741b Mon Sep 17 00:00:00 2001 From: Timo Tijhof Date: Tue, 15 Sep 2015 19:35:13 +0100 Subject: [PATCH] resourceloader: Don't localise hidden exception Mechanical stacktraces are mostly program identifiers (which are English) with some glue text. When stacktraces are disabled by the site admin, the replacement message doesn't seem valuable to localise. And one could argue it should be in the user language instead of the site language in that case, which complicates the output buffer and caching layers for this. It also reduces coupling with MediaWiki (Ref T32956). Change-Id: If446f1b815add2be4baf1c333f18a4bab0cc9c37 --- includes/resourceloader/ResourceLoader.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/includes/resourceloader/ResourceLoader.php b/includes/resourceloader/ResourceLoader.php index da74b35280..173fcc1808 100644 --- a/includes/resourceloader/ResourceLoader.php +++ b/includes/resourceloader/ResourceLoader.php @@ -940,11 +940,11 @@ class ResourceLoader implements LoggerAwareInterface { protected static function formatExceptionNoComment( $e ) { global $wgShowExceptionDetails; - if ( $wgShowExceptionDetails ) { - return $e->__toString(); - } else { - return wfMessage( 'internalerror' )->text(); + if ( !$wgShowExceptionDetails ) { + return 'Internal error'; } + + return $e->__toString(); } /** -- 2.20.1