From 0f55112939daf3903b903c0871bd04dbaf4ec53f Mon Sep 17 00:00:00 2001 From: Raimond Spekking Date: Wed, 21 Jul 2010 16:01:10 +0000 Subject: [PATCH] Show the copyright message in user preference language for Wikimedia wikis, important especially for multi language projects like Commons. Stick to content language for standard MediaWiki installations for the case that [[MediaWiki:Copyright]] is customized. It is very unlikely that a third party installation translate its customization in 204 languages like we have done it at Translatewiki for WikimediaMessages --- docs/hooks.txt | 1 + includes/Skin.php | 9 +++++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/docs/hooks.txt b/docs/hooks.txt index 4687a279dd..1073828b28 100644 --- a/docs/hooks.txt +++ b/docs/hooks.txt @@ -1429,6 +1429,7 @@ $title: displayed page title $type: 'normal' or 'history' for old/diff views &$msg: overridable message; usually 'copyright' or 'history_copyright'. This message must be in HTML format, not wikitext! &$link: overridable HTML link to be passed into the message as $1 +&$forContent: overridable flag if copyright footer is shown in content language. 'SkinSubPageSubtitle': At the beginning of Skin::subPageSubtitle() $skin: Skin object diff --git a/includes/Skin.php b/includes/Skin.php index 4dabb9b82f..001f67f569 100644 --- a/includes/Skin.php +++ b/includes/Skin.php @@ -1525,11 +1525,16 @@ CSS; return $out; } // Allow for site and per-namespace customization of copyright notice. + $forContent = true; if( isset( $wgArticle ) ) { - wfRunHooks( 'SkinCopyrightFooter', array( $wgArticle->getTitle(), $type, &$msg, &$link ) ); + wfRunHooks( 'SkinCopyrightFooter', array( $wgArticle->getTitle(), $type, &$msg, &$link, &$forContent ) ); } - $out .= wfMsgForContent( $msg, $link ); + if ( $forContent ) { + $out .= wfMsgForContent( $msg, $link ); + } else { + $out .= wfMsg( $msg, $link ); + } return $out; } -- 2.20.1