r5245 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r5244‎ | r5245 | r5246 >
Date:20:25, 16 September 2004
Author:zhengzhu
Status:old
Tags:
Comment:
Added entry point to call the Traditional/Simplified Chinese conversion code in LanguageZh.php
Modified paths:
  • /trunk/phase3/includes/Parser.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/Parser.php
@@ -579,12 +579,18 @@
580580 }
581581
582582 function internalParse( $text, $linestart, $args = array(), $isMain=true ) {
 583+ global $wgLanguageCode, $wgLang;
 584+
583585 $fname = 'Parser::internalParse';
584586 wfProfileIn( $fname );
585587
586588 $text = $this->removeHTMLtags( $text );
587589 $text = $this->replaceVariables( $text, $args );
588590
 591+ if($wgLanguageCode == "zh") {
 592+ $text = $wgLang->convert($text);
 593+ }
 594+
589595 $text = preg_replace( '/(^|\n)-----*/', '\\1<hr />', $text );
590596
591597 $text = $this->doHeadings( $text );

Status & tagging log