Florianschmidtwelzow has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/232065

Change subject: Use a localised license message in MobileFrontend
......................................................................

Use a localised license message in MobileFrontend

Instead of always using the site language, use the given Context object
to get the message in the language set in the context object.

Depends on: I0a3b1b866ba

Bug: T93058
Change-Id: Id4807cab6b39e235c1a177d1c1a0820fd78c6c96
---
M WikimediaMessages.hooks.php
1 file changed, 6 insertions(+), 5 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/WikimediaMessages 
refs/changes/65/232065/1

diff --git a/WikimediaMessages.hooks.php b/WikimediaMessages.hooks.php
index 282c1f9..4131e29 100644
--- a/WikimediaMessages.hooks.php
+++ b/WikimediaMessages.hooks.php
@@ -114,19 +114,20 @@
         * Override with Wikimedia's site-specific copyright message defaults 
with the CC/GFDL
         * semi-dual license fun!
         *
-        * @param $link
-        * @param $context
-        * @param $attribs
+        * @param string $link
+        * @param string $context
+        * @param array $attribs
+        * @param IContextSource $contextsource An instance of an 
implementation of IContextSource
         *
         * @return bool
         */
-       public static function onMobileLicenseLink( &$link, $context, $attribs 
) {
+       public static function onMobileLicenseLink( &$link, $context, array 
$attribs, IContextSource $contextsource ) {
                global $wgRightsUrl;
 
                if( strpos( $wgRightsUrl, 
'creativecommons.org/licenses/by-sa/3.0' ) !== false ) {
                        // We only display the dual licensing stack in the 
editor and talk interfaces
                        if ( $context === 'editor' || $context === 'talk' ) {
-                               $link = wfMessage( 
'wikimedia-mobile-license-links' )->plain();
+                               $link = $contextsource->msg( 
'wikimedia-mobile-license-links' )->plain();
                        }
                }
 

-- 
To view, visit https://gerrit.wikimedia.org/r/232065
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id4807cab6b39e235c1a177d1c1a0820fd78c6c96
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikimediaMessages
Gerrit-Branch: master
Gerrit-Owner: Florianschmidtwelzow <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to