r65021 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r65020‎ | r65021 | r65022 >
Date:12:51, 14 April 2010
Author:siebrand
Status:deferred
Tags:
Comment:
Add plural support for 'sphinxSearchPreamble' and 'sphinxSearchStats'.
Modified paths:
  • /trunk/extensions/SphinxSearch/SphinxSearch.i18n.php (modified) (history)
  • /trunk/extensions/SphinxSearch/SphinxSearch_body.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SphinxSearch/SphinxSearch_body.php
@@ -435,7 +435,7 @@
436436 $this->page * $wgSphinxSearch_matches,
437437 $res['total']
438438 );
439 - $wgOut->addWikiText( wfMsg( 'sphinxSearchPreamble',
 439+ $wgOut->addWikiText( wfMsgExt( 'sphinxSearchPreamble', 'parsemag',
440440 $from, $to, $res['total'], $term, $res['time'] )
441441 );
442442
@@ -443,7 +443,7 @@
444444 $warn = false;
445445 foreach ( $res["words"] as $word => $info ) {
446446 $wgOut->addWikiText(
447 - wfMsg( 'sphinxSearchStats', $word, $info['hits'], $info['docs'] )
 447+ wfMsgExt( 'sphinxSearchStats', 'parsemag', $word, $info['hits'], $info['docs'] )
448448 );
449449 if ( ( $info['docs'] < $wgSphinxSearch_maxmatches ) && ( $info['docs'] > $res['total'] ) ) {
450450 $warn = true;
@@ -811,7 +811,7 @@
812812 }
813813 }
814814 }
815 -
 815+
816816 return ( $suggestion_needed ? join( ' ', $word_suggestions ) : '' );
817817 }
818818
Index: trunk/extensions/SphinxSearch/SphinxSearch.i18n.php
@@ -12,8 +12,8 @@
1313 'sphinxResultPage' => 'Result page:',
1414 'sphinxPreviousPage' => 'Previous',
1515 'sphinxNextPage' => 'Next',
16 - 'sphinxSearchPreamble' => 'Displaying $1—$2 of $3 matches for query "<nowiki>$4</nowiki>" retrieved in $5 sec with these stats:',
17 - 'sphinxSearchStats' => '* "$1" found $2 times in $3 documents',
 16+ 'sphinxSearchPreamble' => 'Displaying $1—$2 of $3 {{PLURAL:$3|match|matches}} for query "<nowiki>$4</nowiki>" retrieved in $5 sec with these stats:',
 17+ 'sphinxSearchStats' => '* "$1" found $2 {{PLURAL:$2|time|times}} in $3 {{PLURAL:$3|documents}}',
1818 'sphinxSearchStatsInfo' => "''Above numbers may include documents not listed due to search options.''",
1919 'sphinxSearchButton' => 'Search',
2020 'sphinxSearchEpilogue' => 'Additional database time was $1 sec.',

Status & tagging log