r111878 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r111877‎ | r111878 | r111879 >
Date:19:17, 19 February 2012
Author:nikerabbit
Status:ok
Tags:i18nreview 
Comment:
Make RecentChangesMessageGroup load definitions in correct language, not in the wikis content language
Modified paths:
  • /trunk/extensions/Translate/MessageGroups.php (modified) (history)
  • /trunk/extensions/Translate/utils/TranslationHelpers.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Translate/MessageGroups.php
@@ -968,7 +968,7 @@
969969 $mkey = $row->rc_namespace . ':' . $handle->getKey();
970970 if ( !isset( $defs[$mkey] ) ) {
971971 $group = $handle->getGroup();
972 - $defs[$mkey] = $group->getMessage( $handle->getKey(), $this->getSourceLanguage() );
 972+ $defs[$mkey] = $group->getMessage( $handle->getKey(), $group->getSourceLanguage() );
973973 }
974974 }
975975 return $defs;
@@ -981,11 +981,11 @@
982982 /**
983983 * Subpage language of any in the title is not used.
984984 */
985 - public function getMessageContent( MessageHandle $handle, $code ) {
 985+ public function getMessageContent( MessageHandle $handle ) {
986986 $groupId = MessageIndex::getPrimaryGroupId( $handle );
987987 $group = MessageGroups::getGroup( $groupId );
988988 if ( $group ) {
989 - return $group->getMessage( $handle->getKey(), $code );
 989+ return $group->getMessage( $handle->getKey(), $group->getSourceLanguage() );
990990 }
991991 }
992992 }
Index: trunk/extensions/Translate/utils/TranslationHelpers.php
@@ -108,7 +108,7 @@
109109 $this->mustBeKnownMessage();
110110
111111 if ( method_exists( $this->group, 'getMessageContent' ) ) {
112 - $this->definition = $this->group->getMessageContent( $this->handle, $this->group->getSourceLanguage() );
 112+ $this->definition = $this->group->getMessageContent( $this->handle );
113113 } else {
114114 $this->definition = $this->group->getMessage( $this->handle->getKey(), $this->group->getSourceLanguage() );
115115 }

Status & tagging log