Index: trunk/phase3/includes/Parser.php |
— | — | @@ -20,7 +20,7 @@ |
21 | 21 | * |
22 | 22 | * settings: |
23 | 23 | * $wgUseTex*, $wgUseDynamicDates*, $wgInterwikiMagic*, |
24 | | - * $wgNamespacesWithSubpages, $wgLanguageCode, $wgAllowExternalImages*, |
| 24 | + * $wgNamespacesWithSubpages, $wgAllowExternalImages*, |
25 | 25 | * $wgLocaltimezone |
26 | 26 | * |
27 | 27 | * * only within ParserOptions |
— | — | @@ -579,7 +579,7 @@ |
580 | 580 | } |
581 | 581 | |
582 | 582 | function internalParse( $text, $linestart, $args = array(), $isMain=true ) { |
583 | | - global $wgLanguageCode, $wgLang; |
| 583 | + global $wgLang; |
584 | 584 | |
585 | 585 | $fname = 'Parser::internalParse'; |
586 | 586 | wfProfileIn( $fname ); |
— | — | @@ -587,9 +587,7 @@ |
588 | 588 | $text = $this->removeHTMLtags( $text ); |
589 | 589 | $text = $this->replaceVariables( $text, $args ); |
590 | 590 | |
591 | | - if($wgLanguageCode == "zh") { |
592 | | - $text = $wgLang->convert($text); |
593 | | - } |
| 591 | + $text = $wgLang->convert($text); |
594 | 592 | |
595 | 593 | $text = preg_replace( '/(^|\n)-----*/', '\\1<hr />', $text ); |
596 | 594 | |
— | — | @@ -963,7 +961,7 @@ |
964 | 962 | # The wikilinks [[ ]] are procedeed here. |
965 | 963 | /* private */ function replaceInternalLinks( $s ) { |
966 | 964 | global $wgLang, $wgLinkCache; |
967 | | - global $wgNamespacesWithSubpages, $wgLanguageCode; |
| 965 | + global $wgNamespacesWithSubpages; |
968 | 966 | static $fname = 'Parser::replaceInternalLinks' ; |
969 | 967 | wfProfileIn( $fname ); |
970 | 968 | |
Index: trunk/phase3/languages/Language.php |
— | — | @@ -1956,6 +1956,11 @@ |
1957 | 1957 | function convertGrammar( $word, $case ) { |
1958 | 1958 | return $word; |
1959 | 1959 | } |
| 1960 | + |
| 1961 | + # Hook for Chinese traditional/simplified conversion |
| 1962 | + function convert( $text ) { |
| 1963 | + return $text; |
| 1964 | + } |
1960 | 1965 | } |
1961 | 1966 | |
1962 | 1967 | # This should fail gracefully if there's not a localization available |