Show the copyright message in user preference language for Wikimedia wikis, important...
authorRaimond Spekking <raymond@users.mediawiki.org>
Wed, 21 Jul 2010 16:01:10 +0000 (16:01 +0000)
committerRaimond Spekking <raymond@users.mediawiki.org>
Wed, 21 Jul 2010 16:01:10 +0000 (16:01 +0000)
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
includes/Skin.php

index 4687a27..1073828 100644 (file)
@@ -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
index 4dabb9b..001f67f 100644 (file)
@@ -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;
        }