* (bug 5858) Update for Russian language (ru)
* (bug 5860) Update for Indonesian language (id)
* (bug 1120) Update for Czech language (Cs)
+* Added many missing formatNum calls
== Compatibility ==
}
function formatResult( $skin, $result ) {
+ global $wgLang;
$title = Title::makeTitle( NS_CATEGORY, $result->title );
$plink = $skin->makeLinkObj( $title, $title->getText() );
- $nlinks = wfMsg( 'members', $result->count );
+ $nlinks = wfMsg( 'members', $wgLang->formatNum( $result->count ) );
return wfSpecialList($plink, $nlinks);
}
}
$download = $skin->makeMediaLink( $nt->getText(), 'fuck me!', wfMsgHtml( 'download' ) );
$bytes = wfMsgExt( 'nbytes', array( 'parsemag', 'escape'),
$wgLang->formatNum( $result->img_size ) );
- $dimensions = wfMsg( 'widthheight', $result->img_width, $result->img_height );
+ $dimensions = wfMsg( 'widthheight', $wgLang->formatNum( $result->img_width ),
+ $wgLang->formatNum( $result->img_height ) );
$user = $skin->makeLinkObj( Title::makeTitle( NS_USER, $result->img_user_text ), $result->img_user_text );
$time = $wgLang->timeanddate( $result->img_timestamp );
}
function formatResult( $skin, $result ) {
- global $wgContLang;
+ global $wgLang, $wgContLang;
$nt = Title::makeTitle( $result->namespace, $result->title );
$text = $wgContLang->convert( $nt->getPrefixedText() );
$plink = $skin->makeKnownLink( $nt->getPrefixedText(), $text );
- $nl = wfMsg( 'nlinks', $result->value );
+ $nl = wfMsg( 'nlinks', $wgLang->formatNum ( $result->value ) );
$nlink = $skin->makeKnownLink( $nt->getPrefixedText() . '#filelinks', $nl );
return wfSpecialList($plink, $nlink);
* @return string
*/
function formatResult( $skin, $result ) {
+ global $wgLang;
$title = Title::makeTitleSafe( $result->namespace, $result->title );
$link = $skin->makeLinkObj( $title );
- $wlh = $this->makeWlhLink( $title, wfMsgHtml( 'nlinks', $result->value ), $skin );
+ $wlh = $this->makeWlhLink( $title, wfMsgHtml( 'nlinks',
+ $wgLang->formatNum( $result->value ) ), $skin );
return wfSpecialList( $link, $wlh );
}
}
}
function formatResult( $skin, $result ) {
- global $wgContLang;
+ global $wgLang, $wgContLang;
$nt = Title::makeTitle( $result->namespace, $result->title );
$text = $wgContLang->convert( $nt->getText() );
$plink = $skin->makeLinkObj( $nt, htmlspecialchars( $text ) );
- $nlinks = wfMsg( 'members', $result->value );
+ $nlinks = wfMsg( 'members', $wgLang->formatNum( $result->value ) );
return wfSpecialList($plink, $nlinks);
}
}
}
function formatResult( $skin, $result ) {
- global $wgContLang;
+ global $wgLang, $wgContLang;
$nt = Title::makeTitle( $result->namespace, $result->title );
$text = $wgContLang->convert( $nt->getPrefixedText() );
$plink = $skin->makeKnownLinkObj( $nt, $text );
- $nl = wfMsg( 'nrevisions', $result->value );
+ $nl = wfMsg( 'nrevisions', $wgLang->formatNum( $result->value ) );
$nlink = $skin->makeKnownLinkObj( $nt, $nl, 'action=history' );
return wfSpecialList($plink, $nlink);
$note = wfMsg( 'rcnote', $wgLang->formatNum( $options['limit'] ), $wgLang->formatNum( $options['days'] ), $wgLang->timeAndDate( wfTimestampNow(), true ) );
// limit links
- $cl = '';
$options_limit = array(50, 100, 250, 500);
- $i = 0;
- while ( $i+1 < count($options_limit) ) {
- $cl .= makeOptionsLink( $options_limit[$i], array( 'limit' => $options_limit[$i] ), $nondefaults) . ' | ' ;
- $i++;
+ foreach( $options_limit as $value ) {
+ $cl[] = makeOptionsLink( $wgLang->formatNum( $value ),
+ array( 'limit' => $value ), $nondefaults) ;
}
- $cl .= makeOptionsLink( $options_limit[$i], array( 'limit' => $options_limit[$i] ), $nondefaults) ;
+ $cl = implode( ' | ', $cl);
// day links, reset 'from' to none
- $dl = '';
$options_days = array(1, 3, 7, 14, 30);
- $i = 0;
- while ( $i+1 < count($options_days) ) {
- $dl .= makeOptionsLink( $options_days[$i], array( 'days' => $options_days[$i], 'from' => '' ), $nondefaults) . ' | ' ;
- $i++;
+ foreach( $options_days as $value ) {
+ $dl[] = makeOptionsLink( $wgLang->formatNum( $value ),
+ array( 'days' => $value, 'from' => '' ), $nondefaults) ;
}
- $dl .= makeOptionsLink( $options_days[$i], array( 'days' => $options_days[$i], 'from' => '' ), $nondefaults) ;
+ $dl = implode( ' | ', $dl);
+
// show/hide links
$showhide = array( wfMsg( 'show' ), wfMsg( 'hide' ));
}
function formatResult( $skin, $result ) {
- global $wgContLang;
+ global $wgLang, $wgContLang;
$nt = Title::makeTitle( $result->namespace, $result->title );
$text = $wgContLang->convert( $nt->getText() );
$skin->makeLinkObj( $nt, htmlspecialchars( $text ) ) :
$skin->makeBrokenLinkObj( $nt, htmlspecialchars( $text ) );
- $nlinks = wfMsg( 'members', $result->value );
+ $nlinks = wfMsg( 'members', $wgLang->formatNum( $result->value ) );
return wfSpecialList($plink, $nlinks);
}
}
function formatResult( $skin, $result ) {
- global $wgContLang;
+ global $wgLang;
$title = Title::makeTitleSafe( $result->namespace, $result->title );
# Make a link to "what links here" if it's required
$wlhLink = $this->nlinks
- ? $this->makeWlhLink( $title, $skin, wfMsgHtml( 'nlinks', $result->value ) )
- : "";
+ ? $this->makeWlhLink( $title, $skin, wfMsgHtml( 'nlinks',
+ $wgLang->formatNum( $result->value ) ) )
+ : null;
return wfSpecialList($pageLink, $wlhLink);
}
*/
function makeWlhLink( &$title, &$skin, $text ) {
$wlhTitle = Title::makeTitle( NS_SPECIAL, 'Whatlinkshere' );
- return $skin->makeKnownLinkObj( $wlhTitle, $text, 'target=' . $title->getPrefixedUrl() );
+ return $skin->makeKnownLinkObj( $wlhTitle, $text, 'target=' . $title->getPrefixedUrl() );
}
}