bug 2685: it numeric format
authorNiklas Laxström <nikerabbit@users.mediawiki.org>
Sun, 3 Jul 2005 16:35:01 +0000 (16:35 +0000)
committerNiklas Laxström <nikerabbit@users.mediawiki.org>
Sun, 3 Jul 2005 16:35:01 +0000 (16:35 +0000)
RELEASE-NOTES
languages/LanguageIt.php

index 23e6ac1..70b4da3 100644 (file)
@@ -446,7 +446,7 @@ Various bugfixes, small features, and a few experimental things:
 * Add support for &preload=Page_name (load text of an existing page into
 edit area) and &editintro=Page_name (load text of an existing page instead
 of MediaWiki:Newpagetext) to &action=edit, if page is new.
-* (bugs 2633, 2672) Fix Estonian, Portuguese and Finnish numeric formatting
+* (bugs 2633, 2672, 2685) Fix Estonian, Portuguese, Italian and Finnish numeric formatting
 * (bug 2658) Fix signature time, localtime to match timezone offset again
 * Files from shared repositories (e.g. commons) now display with their
   image description pages when viewed on local wikis.
index 55aa45d..105dce6 100644 (file)
@@ -791,8 +791,7 @@ class LanguageIt extends LanguageUtf8 {
                return $wgQuickbarSettingsIt;
        }
        
-       function date( $ts, $adj = false )
-       {
+       function date( $ts, $adj = false ) {
                if ( $adj ) { $ts = $this->userAdjust( $ts ); }
 
                $d = $this->getMonthAbbreviation( substr( $ts, 4, 2 ) ) .
@@ -801,26 +800,22 @@ class LanguageIt extends LanguageUtf8 {
                return $d;
        }
 
-       function getValidSpecialPages()
-       {
+       function getValidSpecialPages() {
                global $wgValidSpecialPagesIt;
                return $wgValidSpecialPagesIt;
        }
 
-       function getSysopSpecialPages()
-       {
+       function getSysopSpecialPages() {
                global $wgSysopSpecialPagesIt;
                return $wgSysopSpecialPagesIt;
        }
 
-       function getDeveloperSpecialPages()
-       {
+       function getDeveloperSpecialPages() {
                global $wgDeveloperSpecialPagesIt;
                return $wgDeveloperSpecialPagesIt;
        }
 
-       function getMessage( $key )
-       {
+       function getMessage( $key ) {
                global $wgAllMessagesIt;
                if(array_key_exists($key, $wgAllMessagesIt))
                        return $wgAllMessagesIt[$key];
@@ -828,6 +823,13 @@ class LanguageIt extends LanguageUtf8 {
                        return parent::getMessage($key);
        }
 
+       /**
+        * Italian numeric format is 201.511,17
+        */
+       function formatNum( $number, $year = false ) {
+               return $year ? $number : strtr($this->commafy($number), '.,', ',.' );
+       }
+
 }
 
 ?>