r51217 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r51216‎ | r51217 | r51218 >
Date:08:09, 31 May 2009
Author:nikerabbit
Status:ok
Tags:
Comment:
Possible fix for alias export
Modified paths:
  • /trunk/extensions/Translate/MessageGroups.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Translate/MessageGroups.php
@@ -362,14 +362,24 @@
363363 }
364364
365365 class AliasMessageGroup extends ExtensionMessageGroup {
 366+ public function initCollection( $code ) {
 367+ $collection = array();
 368+ $defs = $this->load( 'en' );
 369+ foreach ( $defs as $key => $value ) {
 370+ $collection[$key] = new FatMessage( $key, implode( ", ", $value ) );
 371+ }
366372
367 - public function fillCollection( MessageCollection $collection ) {
 373+ $this->fillCollection( $collection );
 374+ return $collection;
 375+ }
 376+
 377+ public function fillCollection( $collection ) {
368378 $this->fill( $collection );
369379 $this->fillContents( $collection );
370380 }
371381
372382
373 - function fill( MessageCollection $messages ) {
 383+ function fill( $messages ) {
374384 $cache = $this->load( $messages->code );
375385 foreach ( $messages->keys() as $key ) {
376386 if ( isset( $cache[$key] ) ) {

Status & tagging log