BUG#160 Internationalize display of numbers:
authorJens Frank <jeluf@users.mediawiki.org>
Sat, 28 Aug 2004 19:08:49 +0000 (19:08 +0000)
committerJens Frank <jeluf@users.mediawiki.org>
Sat, 28 Aug 2004 19:08:49 +0000 (19:08 +0000)
* section numbers in TOC
* file size in edit page warning for big articles.

includes/EditPage.php
includes/Parser.php

index d1c3a9f..83f3034 100644 (file)
@@ -290,7 +290,7 @@ class EditPage {
                $kblength = (int)(strlen( $this->textbox1 ) / 1024);
                if( $kblength > 29 ) {
                        $wgOut->addHTML( '<strong>' .
-                               wfMsg( 'longpagewarning', $kblength )
+                               wfMsg( 'longpagewarning', $wgLang->formatNum( $kblength ) )
                                . '</strong>' );
                }
 
index ae665d2..4a1bc0c 100644 (file)
@@ -1855,7 +1855,7 @@ class Parser
        # It loops through all headlines, collects the necessary data, then splits up the
        # string and re-inserts the newly formatted headlines.
        /* private */ function formatHeadings( $text, $isMain=true ) {
-               global $wgInputEncoding, $wgMaxTocLevel;
+               global $wgInputEncoding, $wgMaxTocLevel, $wgLang;
 
                $doNumberHeadings = $this->mOptions->getNumberHeadings();
                $doShowToc = $this->mOptions->getShowToc();
@@ -1954,7 +1954,7 @@ class Parser
                                                if( $dot ) {
                                                        $numbering .= '.';
                                                }
-                                               $numbering .= $sublevelCount[$i];
+                                               $numbering .= $wgLang->formatNum( $sublevelCount[$i] );
                                                $dot = 1;
                                        }
                                }