From: Raimond Spekking Date: Wed, 21 Jul 2010 16:01:10 +0000 (+0000) Subject: Show the copyright message in user preference language for Wikimedia wikis, important... X-Git-Tag: 1.31.0-rc.0~36028 X-Git-Url: http://git.cyclocoop.org/%7B%24www_url%7Dadmin/password.php?a=commitdiff_plain;h=0f55112939daf3903b903c0871bd04dbaf4ec53f;p=lhc%2Fweb%2Fwiklou.git 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 --- 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; }