Reverted r49855, r49656, r49401, r49399, r49397. The language converter cannot be...
authorTim Starling <tstarling@users.mediawiki.org>
Tue, 26 May 2009 07:46:29 +0000 (07:46 +0000)
committerTim Starling <tstarling@users.mediawiki.org>
Tue, 26 May 2009 07:46:29 +0000 (07:46 +0000)
includes/CategoryPage.php
includes/GlobalFunctions.php
languages/Language.php
languages/LanguageConverter.php

index e35a7de..c75eb19 100644 (file)
@@ -189,7 +189,7 @@ class CategoryViewer {
         */
        function addPage( $title, $sortkey, $pageLength, $isRedirect = false ) {
                global $wgContLang;
-               $titletext = $wgContLang->convertHtml( $title->getPrefixedText(), true );
+               $titletext = $wgContLang->convertHtml( $title->getPrefixedText() );
                $this->articles[] = $isRedirect
                        ? '<span class="redirect-in-category">' . $this->getSkin()->makeKnownLinkObj( $title, $titletext ) . '</span>'
                        : $this->getSkin()->makeSizeLinkObj( $pageLength, $title, $titletext );
index aa44d5e..26b75bf 100644 (file)
@@ -1968,9 +1968,7 @@ function wfGetCachedNotice( $name ) {
        }
 
        wfProfileOut( $fname );
-       // Use $wgContLang to get a converted string by language.
-       global $wgContLang;
-       return $wgContLang->convert( $notice );
+       return $notice;
 }
 
 function wfGetNamespaceNotice() {
index e557717..aee11d3 100644 (file)
@@ -35,7 +35,7 @@ if( function_exists( 'mb_strtoupper' ) ) {
 class FakeConverter {
        var $mLang;
        function FakeConverter($langobj) {$this->mLang = $langobj;}
-       function convert($t, $i, $v) {return $t;}
+       function convert($t, $i) {return $t;}
        function parserConvert($t, $p) {return $t;}
        function getVariants() { return array( $this->mLang->getCode() ); }
        function getPreferredVariant() {return $this->mLang->getCode(); }
@@ -2244,8 +2244,8 @@ class Language {
        }
 
        # convert text to different variants of a language.
-       function convert( $text, $isTitle = false, $variant = null ) {
-               return $this->mConverter->convert($text, $isTitle, $variant);
+       function convert( $text, $isTitle = false) {
+               return $this->mConverter->convert($text, $isTitle);
        }
 
        # Convert text from within Parser
index 1333186..86077be 100644 (file)
@@ -505,11 +505,10 @@ class LanguageConverter {
         *
         * @param string $text text to be converted
         * @param bool $isTitle whether this conversion is for the article title
-        * @param string $variant the variant we convert to
         * @return string converted text
         * @public
         */
-       function convert( $text, $isTitle = false, $variant = null ) {
+       function convert( $text, $isTitle = false ) {
 
                $mw =& MagicWord::get( 'notitleconvert' );
                if( $mw->matchAndRemove( $text ) )
@@ -524,10 +523,7 @@ class LanguageConverter {
                if( $mw->matchStart( $text ) )
                        return $text;
 
-               if( $variant && in_array( $variant, $this->mVariants ) )
-                       $plang = $variant;
-               else
-                       $plang = $this->getPreferredVariant();
+               $plang = $this->getPreferredVariant();
 
                // for title convertion
                if ( $isTitle ) return $this->convertTitle( $text, $plang );