From: Mark A. Hershberger Date: Wed, 23 Feb 2011 20:32:57 +0000 (+0000) Subject: (Bug #27634) TOC title appears in wrong language X-Git-Tag: 1.31.0-rc.0~31800 X-Git-Url: http://git.cyclocoop.org/%22%20.%20generer_url_ecrire%28%22auteur_infos%22%2C%20%22id_auteur=%24id%22%29%20.%20%22?a=commitdiff_plain;h=fcf56ed2f397c1ce94e250e5d21576f51c0c16fa;p=lhc%2Fweb%2Fwiklou.git (Bug #27634) TOC title appears in wrong language Patch from P.Copp --- diff --git a/includes/Linker.php b/includes/Linker.php index e6624eb4b7..568ac61bcf 100644 --- a/includes/Linker.php +++ b/includes/Linker.php @@ -1322,10 +1322,11 @@ class Linker { * Wraps the TOC in a table and provides the hide/collapse javascript. * * @param $toc String: html of the Table Of Contents + * @param $lang mixed: Language code for the toc title * @return String: full html of the TOC */ - function tocList( $toc ) { - $title = wfMsgHtml( 'toc' ) ; + function tocList( $toc, $lang = false ) { + $title = wfMsgExt( 'toc', array( 'language' => $lang, 'escape' ) ); return '
' . '

' . $title . "

\n" diff --git a/includes/parser/Parser.php b/includes/parser/Parser.php index afa39345a1..9e75c32796 100644 --- a/includes/parser/Parser.php +++ b/includes/parser/Parser.php @@ -3980,7 +3980,7 @@ class Parser { if ( $prevtoclevel > 0 && $prevtoclevel < $wgMaxTocLevel ) { $toc .= $sk->tocUnindent( $prevtoclevel - 1 ); } - $toc = $sk->tocList( $toc ); + $toc = $sk->tocList( $toc, $this->mOptions->getUserLang() ); $this->mOutput->setTOCHTML( $toc ); }