r89740 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r89739‎ | r89740 | r89741 >
Date:20:18, 8 June 2011
Author:foxtrott
Status:deferred (Comments)
Tags:
Comment:
followup r89732: use wfMsgForContent, modify messages
Modified paths:
  • /trunk/extensions/Lingo/Lingo.i18n.php (modified) (history)
  • /trunk/extensions/Lingo/Lingo.php (modified) (history)
  • /trunk/extensions/Lingo/LingoBasicBackend.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Lingo/LingoBasicBackend.php
@@ -24,20 +24,20 @@
2525
2626 global $wgexLingoPage;
2727
28 - $page = $wgexLingoPage ? $wgexLingoPage : wfMsg( 'lingo-terminologypagename' );
 28+ $page = $wgexLingoPage ? $wgexLingoPage : wfMsgForContent( 'lingo-terminologypagename' );
2929
3030 parent::__construct( $messages );
3131
3232 // Get Terminology page
3333 $title = Title::newFromText( $page );
3434 if ( $title->getInterwiki() ) {
35 - $this->getMessageLog()->addError( wfMsgReal( 'lingo-terminologypagenotlocal', array($page) ) );
 35+ $this->getMessageLog()->addError( wfMsgReplaceArgs( wfMsgForContent( 'lingo-terminologypagenotlocal' ), array($page) ) );
3636 return false;
3737 }
3838
3939 $rev = Revision::newFromTitle( $title );
4040 if ( !$rev ) {
41 - $this->getMessageLog()->addWarning( wfMsgReal( 'lingo-noterminologypage', array($page) ) );
 41+ $this->getMessageLog()->addWarning( wfMsgReplaceArgs( wfMsgForContent( 'lingo-noterminologypage' ), array($page) ) );
4242 return false;
4343 }
4444
Index: trunk/extensions/Lingo/Lingo.i18n.php
@@ -11,8 +11,8 @@
1212 $messages['en'] = array(
1313 'lingo-desc' => 'Provides hover-over tool tips on pages from words defined on the [[$1]] page',
1414 'lingo-terminologypagename' => 'Terminology',
15 - 'lingo-noterminologypage' => '[[$1]] does not exist.',
16 - 'lingo-terminologypagenotlocal' => '[[$1]] is not a local page.',
 15+ 'lingo-noterminologypage' => 'Page "$1" does not exist.',
 16+ 'lingo-terminologypagenotlocal' => 'Page "$1" is not a local page.',
1717
1818 );
1919
Index: trunk/extensions/Lingo/Lingo.php
@@ -87,7 +87,7 @@
8888 'name' => 'Lingo',
8989 'author' => array( 'Barry Coughlan', '[http://www.mediawiki.org/wiki/User:F.trott Stephan Gambke]' ),
9090 'url' => 'http://www.mediawiki.org/wiki/Extension:Lingo',
91 - 'descriptionmsg' => array('lingo-desc', $wgexLingoPage?$wgexLingoPage: wfMsg( 'lingo-terminologypagename' )),
 91+ 'descriptionmsg' => array('lingo-desc', $wgexLingoPage ? $wgexLingoPage : wfMsgForContent( 'lingo-terminologypagename' )),
9292 'version' => LINGO_VERSION,
9393 );
9494

Follow-up revisions

RevisionCommit summaryAuthorDate
r89747followup r89740: remove wfMsgReplaceArgs, small fix to messagesfoxtrott20:37, 8 June 2011

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r89732followup r89730: Use the settingfoxtrott17:44, 8 June 2011

Comments

#Comment by Nikerabbit (talk | contribs)   20:27, 8 June 2011
wfMsgReplaceArgs( wfMsgForContent( 'lingo-noterminologypage' ), array($page) )

What's this code doing? Is it the same as

wfMsgForContent( 'lingo-noterminologypage', $page)

?

#Comment by F.trott (talk | contribs)   20:30, 8 June 2011
#Comment by Nikerabbit (talk | contribs)   20:32, 8 June 2011
#Comment by F.trott (talk | contribs)   20:37, 8 June 2011

Ok, removed wfMsgReplaceArgs

Status & tagging log