Always render copyright notice in user language
authorkaldari <rkaldari@wikimedia.org>
Mon, 24 Mar 2014 22:57:59 +0000 (15:57 -0700)
committerkaldari <rkaldari@wikimedia.org>
Sat, 17 May 2014 00:12:23 +0000 (17:12 -0700)
All other footer content is rendered in the user language and the
copyright notice on the edit page is also in the user language.
See EditPage::getCopyrightWarning().

We already do this on WMF wikis through the WikimediaMessages
extension (which sets $forContent to false). The same behaviour has
been requested for 3rd party wikis as well.

Bug: 49116
Change-Id: I1dddfa7771c7063ec319fa441c2e400a374abc92

RELEASE-NOTES-1.24
docs/hooks.txt
includes/Skin.php

index a666610..bb8dd22 100644 (file)
@@ -32,6 +32,8 @@ production.
 * (bug 44740) jQuery upgraded from 1.8.3 to 1.11.1.
 
 === Bug fixes in 1.24 ===
+* (bug 49116) Footer copyright notice is now always displayed in user language
+  rather than content language (same as copyright notice for editing interface).
 * (bug 62258) A bug was fixed in File::getUnscaledThumb when a height
   restriction was present in the parameters.  Images with both the "frame"
   option and a size specification set will now always ignore the provided
index d1507a2..0c03375 100644 (file)
@@ -2259,6 +2259,7 @@ $type: 'normal' or 'history' for old/diff views
   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.
+  This parameter is deprecated.
 
 'SkinGetPoweredBy': TODO
 &$text: additional 'powered by' icons in HTML. Note: Modern skin does not use
index 9d1034b..c428079 100644 (file)
@@ -830,6 +830,7 @@ abstract class Skin extends ContextSource {
                }
 
                // Allow for site and per-namespace customization of copyright notice.
+               // @todo Remove deprecated $forContent param from hook handlers and then remove here.
                $forContent = true;
 
                wfRunHooks(
@@ -837,20 +838,7 @@ abstract class Skin extends ContextSource {
                        array( $this->getTitle(), $type, &$msg, &$link, &$forContent )
                );
 
-               $msgObj = $this->msg( $msg )->rawParams( $link );
-               if ( $forContent ) {
-                       $msg = $msgObj->inContentLanguage()->text();
-                       if ( $this->getLanguage()->getCode() !== $wgContLang->getCode() ) {
-                               $msg = Html::rawElement( 'span', array(
-                                       'lang' => $wgContLang->getHtmlCode(),
-                                       'dir' => $wgContLang->getDir()
-                               ), $msg );
-                       }
-
-                       return $msg;
-               } else {
-                       return $msgObj->text();
-               }
+               return $this->msg( $msg )->rawParams( $link )->text();
        }
 
        /**