r107864 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r107863‎ | r107864 | r107865 >
Date:07:43, 3 January 2012
Author:nikerabbit
Status:ok
Tags:
Comment:
Fixed assumption that message group source language is the same as content language
Modified paths:
  • /trunk/extensions/Translate/MessageGroups.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Translate/MessageGroups.php
@@ -777,9 +777,7 @@
778778 * @return \types{\string,\null} The translation or null if it doesn't exists.
779779 */
780780 public function getMessage( $key, $code ) {
781 - global $wgContLang;
782 -
783 - if ( $code && $wgContLang->getCode() !== $code ) {
 781+ if ( $code && $this->getSourceLanguage() !== $code ) {
784782 return TranslateUtils::getMessageContent( $key, $code );
785783 } else {
786784 return TranslateUtils::getMessageContent( $key, false );

Status & tagging log