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

Revision: 73406
Author:   raymond
Date:     2010-09-20 20:26:39 +0000 (Mon, 20 Sep 2010)

Log Message:
-----------
Follow-up r73404: Use message 'percent' from core
* Apply formatNum to the percent for better i18n

Modified Paths:
--------------
    trunk/extensions/CentralNotice/CentralNotice.i18n.php
    trunk/extensions/CentralNotice/SpecialBannerAllocation.php

Modified: trunk/extensions/CentralNotice/CentralNotice.i18n.php
===================================================================
--- trunk/extensions/CentralNotice/CentralNotice.i18n.php       2010-09-20 
20:20:38 UTC (rev 73405)
+++ trunk/extensions/CentralNotice/CentralNotice.i18n.php       2010-09-20 
20:26:39 UTC (rev 73406)
@@ -131,7 +131,6 @@
        'centralnotice-no-allocation' => 'No banners allocated.',
        'centralnotice-allocation-description' => 'Banner allocation for $1.$2 
in $3:',
        'centralnotice-percentage' => 'Percentage',
-       'centralnotice-percent' => '$1%',
        
        'right-centralnotice-admin' => 'Manage central notices',
        'right-centralnotice-translate' => 'Translate central notices',
@@ -194,7 +193,6 @@
        'centralnotice-insert' => '{{Identical|Insert}}',
        'centralnotice-geotargeted' => 'Used to label a checkbox which 
activates geotargeting',
        'centralnotice-allocation-description' => 'A description of the 
environment whose allocation is being described. $1 is the language code for 
the site (en). $2 is the project name for the site (wikipedia). $3 is the 
country code (US).',
-       'centralnotice-percent' => 'A percentage as a number. $1 is the 
number.',
        
        'right-centralnotice-admin' => '{{doc-right}}',
        'right-centralnotice-translate' => '{{doc-right}}',

Modified: trunk/extensions/CentralNotice/SpecialBannerAllocation.php
===================================================================
--- trunk/extensions/CentralNotice/SpecialBannerAllocation.php  2010-09-20 
20:20:38 UTC (rev 73405)
+++ trunk/extensions/CentralNotice/SpecialBannerAllocation.php  2010-09-20 
20:26:39 UTC (rev 73406)
@@ -124,7 +124,7 @@
         * Show a list of banners with allocation. Newer banners are shown 
first.
         */
        function showList() {
-               global $wgRequest, $wgOut, $wgUser, $wgRequest;
+               global $wgRequest, $wgOut, $wgUser, $wgRequest, $wgLang;
                
                $sk = $wgUser->getSkin();
                $viewPage = $this->getTitleFor( 'NoticeTemplate', 'view' );
@@ -165,7 +165,7 @@
                                $htmlOut .= Xml::openElement( 'tr' );
                                $htmlOut .= Xml::openElement( 'td' );
                                $percentage = ( $banner['weight'] / 
$totalWeight ) * 100;
-                               $htmlOut .= wfMsg ( 'centralnotice-percent', 
$percentage );
+                               $htmlOut .= wfMsg ( 'percent', 
$wgLang->formatNum( $percentage ) );
                                $htmlOut .= Xml::closeElement( 'td' );
                                $htmlOut .= Xml::tags( 'td', array( 'valign' => 
'top' ),
                                        $sk->makeLinkObj( $viewPage, 
htmlspecialchars( $banner['name'] ), 'template=' . urlencode( $banner['name'] ) 
)



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

Reply via email to