r56578 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r56577‎ | r56578 | r56579 >
Date:02:22, 18 September 2009
Author:purodha
Status:reverted (Comments)
Tags:
Comment:
Allow GENDER in messages lqt-feed-reply-intro and lqt-feed-new-thread-intro according to suggestion at
http://translatewiki.net/w/i.php?title=Support&oldid=1496678#Lqt-feed-.2A
and simplify the code a bit.
Modified paths:
  • /trunk/extensions/LiquidThreads/api/ApiFeedLQTThreads.php (modified) (history)

Diff [purge]

Index: trunk/extensions/LiquidThreads/api/ApiFeedLQTThreads.php
@@ -98,22 +98,13 @@
9999 $userLink = $linker->userLink( $thread->author()->getId(), $user );
100100 $talkpageLink = $linker->link( $thread->article()->getTitle() );
101101 $superthreadLink = $linker->link( $stTitle );
102 -
103 - $description = '';
104 - if ( $thread->hasSuperThread() ) {
105 - $description = wfMsgExt(
106 - 'lqt-feed-reply-intro',
107 - array( 'parse', 'replaceafter' ),
108 - array( $talkpageLink, $userLink, $superthreadLink )
109 - );
110 - } else {
111 - $description = wfMsgExt(
112 - 'lqt-feed-new-thread-intro',
113 - array( 'parse', 'replaceafter' ),
114 - array( $talkpageLink, $userLink )
115 - );
116 - }
117 -
 102+ $description = wfMsgExt(
 103+ $thread->hasSuperThread()
 104+ ? 'lqt-feed-reply-intro',
 105+ : 'lqt-feed-new-thread-intro',
 106+ array( 'parse', 'replaceafter' ),
 107+ array( $talkpageLink, $userLink, $superthreadLink, $user )
 108+ );
118109 $completeText = $description . $completeText;
119110
120111 return new FeedItem( $titleStr, $completeText, $titleUrl, $timestamp, $user );

Follow-up revisions

RevisionCommit summaryAuthorDate
r90562Revert r56578. Not followed up by author and does not work....siebrand00:04, 22 June 2011

Comments

#Comment by Nikerabbit (talk | contribs)   06:17, 18 September 2009

Not gonna work with replaceafter.

#Comment by Tim Starling (talk | contribs)   22:47, 3 February 2010

Nikerabbit, can you fix this please? Purodha seems to be ignoring you and I've never really understood how wfMsgExt() works.

#Comment by Nikerabbit (talk | contribs)   15:14, 28 February 2010

I see no easy way to fix it right now. Either the links would need to be converted to wikitext style, or wfMsgExt would need to be changed to allow selective replacing after parsing. Since the only problem is that gender will be wrong, I would suggest marking it as todo or fixme until wfMsgExt is changed.

#Comment by 😂 (talk | contribs)   14:14, 10 June 2010

It'd be a bit hacky, but what if we reordered the params so $user is first, run it through parse, then do our own "replaceafter" by calling wfMsgReplaceArgs() on the parsed message to put the links in?

#Comment by IAlex (talk | contribs)   21:43, 12 June 2010

That's similar to what I did in r55174 to work around the same problem. Just one note: you don't need to reorder the parameters, just replace them by other parameters that will be replaced by wfMsgReplaceArgs().

#Comment by Siebrand (talk | contribs)   00:04, 22 June 2011

Reverted.

Status & tagging log