Index: trunk/phase3/includes/GlobalFunctions.php |
— | — | @@ -731,7 +731,9 @@ |
732 | 732 | } elseif ( in_array('parsemag', $options) ) { |
733 | 733 | global $wgMessageCache; |
734 | 734 | if ( isset( $wgMessageCache ) ) { |
735 | | - $string = $wgMessageCache->transform( $string, !$forContent ); |
| 735 | + $string = $wgMessageCache->transform( $string, |
| 736 | + !$forContent, |
| 737 | + is_object( $langCode ) ? $langCode : null ); |
736 | 738 | } |
737 | 739 | } |
738 | 740 | |
Index: trunk/phase3/includes/MessageCache.php |
— | — | @@ -647,7 +647,7 @@ |
648 | 648 | return $message; |
649 | 649 | } |
650 | 650 | |
651 | | - function transform( $message, $interface = false ) { |
| 651 | + function transform( $message, $interface = false, $language = null ) { |
652 | 652 | // Avoid creating parser if nothing to transfrom |
653 | 653 | if( strpos( $message, '{{' ) === false ) { |
654 | 654 | return $message; |
— | — | @@ -670,6 +670,7 @@ |
671 | 671 | if ( $this->mParser ) { |
672 | 672 | $popts = $this->getParserOptions(); |
673 | 673 | $popts->setInterfaceMessage( $interface ); |
| 674 | + $popts->setTargetLanguage( $language ); |
674 | 675 | $message = $this->mParser->transformMsg( $message, $popts ); |
675 | 676 | } |
676 | 677 | return $message; |