From: Niklas Laxström Date: Sun, 3 Jul 2005 16:35:01 +0000 (+0000) Subject: bug 2685: it numeric format X-Git-Tag: 1.5.0beta2~44 X-Git-Url: http://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=commitdiff_plain;h=54f799ee4d3fad240817e148fdf7e77b8c63be34 bug 2685: it numeric format --- diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 23e6ac114b..70b4da309f 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -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. diff --git a/languages/LanguageIt.php b/languages/LanguageIt.php index 55aa45d996..105dce6598 100644 --- a/languages/LanguageIt.php +++ b/languages/LanguageIt.php @@ -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), '.,', ',.' ); + } + } ?>