jenkins-bot has submitted this change and it was merged.

Change subject: Replaced instances of wfMsg with non-deprecated counterparts
......................................................................


Replaced instances of wfMsg with non-deprecated counterparts

* Changed all occurances of wfMsg() to $skin->msg()->text()
* Removed useless and confusing variable name

Bug: T70750
Change-Id: Ia4a578980692dc8a605616ac5c69a32d61538150
---
M CommentPages.php
1 file changed, 15 insertions(+), 10 deletions(-)

Approvals:
  Florianschmidtwelzow: Looks good to me, approved
  Nemo bis: Looks good to me, but someone else must approve
  jenkins-bot: Verified



diff --git a/CommentPages.php b/CommentPages.php
index 8fee5db..baf660f 100644
--- a/CommentPages.php
+++ b/CommentPages.php
@@ -47,12 +47,16 @@
                        $class = 'new';
                        $query = array( 'action' => 'edit', 'redlink' => 1 );
 
-                       if ( wfMsg('commenttab-preload') != '' ) {
-                               $query['preload'] = wfMsg('commenttab-preload');
+                       $tabPreloadMsg = $skin->msg( 'commenttab-preload' );
+
+                       if ( $tabPreloadMsg->text() != '' ) {
+                               $query['preload'] = $tabPreloadMsg->text();
                        }
 
-                       if ( wfMsg('commenttab-editintro') != '' ) {
-                               $query['editintro'] = 
wfMsg('commenttab-editintro');
+                       $tabEditMsg = $skin->msg('commenttab-editintro');
+
+                       if ( $tabEditMsg->text() != '' ) {
+                               $query['editintro'] = $tabEditMsg->text();
                        }
                } else {
                        $class = '';
@@ -60,7 +64,7 @@
 
                $newcontent_actions['comments'] = array(
                        'class' => $class,
-                       'text'  => wfMsg('nstab-comments'),
+                       'text'  => $skin->msg('nstab-comments')->text(),
                        'href'  => $comments->getFullURL( $query ),
                );
 
@@ -83,10 +87,11 @@
                        $query = '';
                }
 
-               $articleMessage = $main->getNamespaceKey();
-               $articleText = wfMsg( $articleMessage );
-               if ( wfEmptyMsg( $articleMessage, $articleText ) ) {
+               $articleMsg = $skin->msg( $main->getNamespaceKey() );
+               if ( $articleMsg->isDisabled() ) {
                        $articleText = $wgContLang->getFormattedNsText( 
$main->getNamespace() );
+               } else {
+                       $articleText = $articleMsg->text();
                }
 
                $newcontent_actions['article'] = array(
@@ -104,7 +109,7 @@
                }
                $newcontent_actions['talk'] = array(
                        'class' => $class,
-                       'text'  => wfMsg( 'talk' ),
+                       'text'  => $skin->msg( 'talk' )->text(),
                        'href'  => $talk->getFullURL( $query ),
                );
 
@@ -114,7 +119,7 @@
                        }
 
                        if ( $key == 'nstab-comments' ) {
-                               $newcontent_actions['nstab-comments']['text'] = 
wfMsg( 'nstab-comments' );
+                               $newcontent_actions['nstab-comments']['text'] = 
$skin->msg( 'nstab-comments' )->text();
                        }
                }
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ia4a578980692dc8a605616ac5c69a32d61538150
Gerrit-PatchSet: 6
Gerrit-Project: mediawiki/extensions/CommentPages
Gerrit-Branch: master
Gerrit-Owner: McIntireEvan <[email protected]>
Gerrit-Reviewer: Florianschmidtwelzow <[email protected]>
Gerrit-Reviewer: McIntireEvan <[email protected]>
Gerrit-Reviewer: Nemo bis <[email protected]>
Gerrit-Reviewer: Raimond Spekking <[email protected]>
Gerrit-Reviewer: Siebrand <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

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

Reply via email to