Message info
 
To:mediawiki-cvs@lists.wikimedia.org From:nikerabbit@svn.wikimedia.org Subject:[MediaWiki-CVS] SVN: [111878] trunk/extensions/Translate Date:Sun, 19 Feb 2012 19:17:47 +0000
 

https://www.mediawiki.org/wiki/Special:Code/MediaWiki/111878

Revision: 111878
Author: nikerabbit
Date: 2012-02-19 19:17:47 +0000 (Sun, 19 Feb 2012)
Log Message:
-----------
Make RecentChangesMessageGroup load definitions in correct language, not in the wikis content language

Modified Paths:
--------------
trunk/extensions/Translate/MessageGroups.php
trunk/extensions/Translate/utils/TranslationHelpers.php

Modified: trunk/extensions/Translate/MessageGroups.php
===================================================================
--- trunk/extensions/Translate/MessageGroups.php 2012-02-19 19:14:33 UTC (rev 111877)
+++ trunk/extensions/Translate/MessageGroups.php 2012-02-19 19:17:47 UTC (rev 111878)
@@ -968,7 +968,7 @@
$mkey = $row->rc_namespace . ':' . $handle->getKey();
if ( !isset( $defs[$mkey] ) ) {
$group = $handle->getGroup();
- $defs[$mkey] = $group->getMessage( $handle->getKey(), $this->getSourceLanguage() );
+ $defs[$mkey] = $group->getMessage( $handle->getKey(), $group->getSourceLanguage() );
}
}
return $defs;
@@ -981,11 +981,11 @@
/**
* Subpage language of any in the title is not used.
*/
- public function getMessageContent( MessageHandle $handle, $code ) {
+ public function getMessageContent( MessageHandle $handle ) {
$groupId = MessageIndex::getPrimaryGroupId( $handle );
$group = MessageGroups::getGroup( $groupId );
if ( $group ) {
- return $group->getMessage( $handle->getKey(), $code );
+ return $group->getMessage( $handle->getKey(), $group->getSourceLanguage() );
}
}
}

Modified: trunk/extensions/Translate/utils/TranslationHelpers.php
===================================================================
--- trunk/extensions/Translate/utils/TranslationHelpers.php 2012-02-19 19:14:33 UTC (rev 111877)
+++ trunk/extensions/Translate/utils/TranslationHelpers.php 2012-02-19 19:17:47 UTC (rev 111878)
@@ -108,7 +108,7 @@
$this->mustBeKnownMessage();

if ( method_exists( $this->group, 'getMessageContent' ) ) {
- $this->definition = $this->group->getMessageContent( $this->handle, $this->group->getSourceLanguage() );
+ $this->definition = $this->group->getMessageContent( $this->handle );
} else {
$this->definition = $this->group->getMessage( $this->handle->getKey(), $this->group->getSourceLanguage() );
}


_______________________________________________
MediaWiki-CVS mailing list
MediaWiki-CVS@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs