r110450 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r110449‎ | r110450 | r110451 >
Date:00:01, 1 February 2012
Author:gregchiasson
Status:resolved (Comments)
Tags:aft 
Comment:
AFT5: Remove the second username that was appearing in the links, and get proper gender support for bucket1 rendering.
Modified paths:
  • /trunk/extensions/ArticleFeedbackv5/ArticleFeedbackv5.i18n.php (modified) (history)
  • /trunk/extensions/ArticleFeedbackv5/api/ApiViewFeedbackArticleFeedbackv5.php (modified) (history)

Diff [purge]

Index: trunk/extensions/ArticleFeedbackv5/ArticleFeedbackv5.i18n.php
@@ -90,9 +90,9 @@
9191 'articlefeedbackv5-form-unoversight' => 'Unmark for oversight',
9292 'articlefeedbackv5-form-undelete' => 'Un-delete (oversight)',
9393 'articlefeedbackv5-form-header' => 'Feedback #$1, at $2',
94 - 'articlefeedbackv5-form1-header-found' => '{{GENDER:$1|$1}} found what they were looking for',
95 - 'articlefeedbackv5-form1-header-not-found' => '{{GENDER:$1|$1}} did not find what they were looking for',
96 - 'articlefeedbackv5-form1-header-left-comment' => '{{GENDER:$1|$1}} posted this comment',
 94+ 'articlefeedbackv5-form1-header-found' => '{{GENDER:$1| $2 found what they were looking for|$2 found what they were looking for}}',
 95+ 'articlefeedbackv5-form1-header-not-found' => '{{GENDER:$1| $2 did not find what they were looking for|$2 did not find what they were looking for}}',
 96+ 'articlefeedbackv5-form1-header-left-comment' => '{{GENDER:$1|$2 posted this comment|$2 posted this comment}}',
9797 'articlefeedbackv5-form2-header-praise' => '{{GENDER:$1|$1}} had a praise:',
9898 'articlefeedbackv5-form2-header-problem' => '{{GENDER:$1|$1}} had a problem:',
9999 'articlefeedbackv5-form2-header-question' => '{{GENDER:$1|$1}} had a question:',
Index: trunk/extensions/ArticleFeedbackv5/api/ApiViewFeedbackArticleFeedbackv5.php
@@ -616,8 +616,7 @@
617617 }
618618
619619 private function feedbackHead( $message, $class, $record, $extra = '' ) {
620 - $name = htmlspecialchars( $record->user_name );
621 - $gender = $name;
 620+ $name = htmlspecialchars( $record->user_name );
622621 if( $record->af_user_ip ) {
623622 // Anonymous user, go to contributions page.
624623 $title = SpecialPage::getTitleFor( 'Contributions', $record->user_name );
@@ -628,10 +627,11 @@
629628
630629 return Html::openElement( 'h3', array( 'class' => $class) )
631630 . Html::element( 'span', array( 'class' => 'icon' ) )
632 - . Linker::link( $title, $name )
633 - . Html::element( 'span',
 631+ . Html::rawElement( 'span',
634632 array( 'class' => 'result' ),
635 - wfMessage( $message, $gender, $extra )->text()
 633+ wfMessage( $message, $name )->rawParams(
 634+ Linker::link( $title, $name )
 635+ )->escaped()
636636 )
637637 . Html::closeElement( 'h3' )
638638 . $this->renderPermalinkTimestamp( $record );

Follow-up revisions

RevisionCommit summaryAuthorDate
r110466r110450: Remove trailing space, simplify GENDER arguments because text is gen...raymond08:18, 1 February 2012
r110482AFT5: Add message documentation, per comments on r110450.gregchiasson15:11, 1 February 2012

Comments

#Comment by Raymond (talk | contribs)   08:17, 1 February 2012

Please add message documentation for the newly added messages. Thanks.

$2 = ?

Status & tagging log