http://www.mediawiki.org/wiki/Special:Code/MediaWiki/65312

Revision: 65312
Author:   jojo
Date:     2010-04-20 13:52:22 +0000 (Tue, 20 Apr 2010)

Log Message:
-----------
show progress with 2 decimals. fix number formatting in JS code.

Modified Paths:
--------------
    trunk/extensions/Collection/Collection.php
    trunk/extensions/Collection/Collection.templates.php

Modified: trunk/extensions/Collection/Collection.php
===================================================================
--- trunk/extensions/Collection/Collection.php  2010-04-20 13:49:27 UTC (rev 
65311)
+++ trunk/extensions/Collection/Collection.php  2010-04-20 13:52:22 UTC (rev 
65312)
@@ -177,11 +177,16 @@
 $wgAjaxExportList[] = 'wfAjaxPostCollection';
 
 function wfAjaxGetMWServeStatus( $collection_id = '', $writer = 'rl' ) {
+       global $wgLang;
+
        $json = new Services_JSON();
        $result = SpecialCollection::mwServeCommand( 'render_status', array(
                'collection_id' => $collection_id,
                'writer' => $writer
        ) );
+       if ( isset( $result['status']['progress'] ) ) {
+               $result['status']['progress'] = $wgLang->parseFormattedNumber( 
number_format( $result['status']['progress'], 2 ) );
+       }
        $r = new AjaxResponse( $json->encode( $result ) );
        $r->setContentType( 'application/json' );
        return $r;

Modified: trunk/extensions/Collection/Collection.templates.php
===================================================================
--- trunk/extensions/Collection/Collection.templates.php        2010-04-20 
13:49:27 UTC (rev 65311)
+++ trunk/extensions/Collection/Collection.templates.php        2010-04-20 
13:52:22 UTC (rev 65312)
@@ -349,7 +349,7 @@
 <span style="display:none" id="renderingArticle"><?php echo ' ' . wfMsg( 
'coll-rendering_article', '%PARAM%' ) ?></span>
 <span style="display:none" id="renderingPage"><?php echo ' ' . wfMsg( 
'coll-rendering_page', '%PARAM%' ) ?></span>
 
-<?php echo wfMsg( 'coll-rendering_text',       $GLOBALS['wgLang']->formatNum( 
$this->data['progress'] ), $this->data['status'] ) ?>
+<?php echo wfMsg( 'coll-rendering_text', 
$GLOBALS['wgLang']->parseFormattedNumber( number_format( 
$this->data['progress'], 2 ) ), $this->data['status'] ) ?>
 
 <?php
                if ( CollectionSession::isEnabled() ) {



_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to