Index: trunk/extensions/Translate/MessageCollection.php |
— | — | @@ -377,7 +377,7 @@ |
378 | 378 | } |
379 | 379 | |
380 | 380 | public function offsetSet( $offset, $value ) { |
381 | | - throw new MWException( "Cannot add or modify elements" ); |
| 381 | + $this->messages[$offset] = $value; |
382 | 382 | } |
383 | 383 | |
384 | 384 | public function offsetUnset( $offset ) { |
Index: trunk/extensions/Translate/scripts/createCheckIndex.php |
— | — | @@ -76,7 +76,7 @@ |
77 | 77 | } |
78 | 78 | |
79 | 79 | // Add it to the array |
80 | | - $problematic[] = array( $g->namespaces[0], $key ); |
| 80 | + $problematic[] = array( $g->namespaces[0], "$key/$code" ); |
81 | 81 | } |
82 | 82 | } |
83 | 83 | |
— | — | @@ -88,6 +88,7 @@ |
89 | 89 | function tagFuzzy( $problematic ) { |
90 | 90 | if ( !count($problematic) ) return; |
91 | 91 | |
| 92 | + |
92 | 93 | $db = wfGetDB( DB_MASTER ); |
93 | 94 | $id = $db->selectField( 'revtag_type', 'rtt_id', array( 'rtt_name' => 'fuzzy' ), __METHOD__ ); |
94 | 95 | foreach ( $problematic as $p ) { |
Index: trunk/extensions/Translate/Message.php |
— | — | @@ -18,6 +18,7 @@ |
19 | 19 | public function key() { return $this->key; } |
20 | 20 | public function definition() { return $this->definition; } |
21 | 21 | abstract public function translation(); |
| 22 | + abstract public function author(); |
22 | 23 | } |
23 | 24 | |
24 | 25 | class ThinMessage extends TMessage { |
— | — | @@ -72,4 +73,6 @@ |
73 | 74 | public function translation() { |
74 | 75 | return $this->translation; |
75 | 76 | } |
| 77 | + |
| 78 | + public function author() {} |
76 | 79 | } |
\ No newline at end of file |
Index: trunk/extensions/Translate/MessageGroups.php |
— | — | @@ -362,8 +362,9 @@ |
363 | 363 | } |
364 | 364 | |
365 | 365 | class AliasMessageGroup extends ExtensionMessageGroup { |
366 | | - public function initCollection( $code ) { |
367 | | - $collection = array(); |
| 366 | + public function initCollection( $code, $unique = false ) { |
| 367 | + $collection = parent::initCollection( $code, $unique ); |
| 368 | + |
368 | 369 | $defs = $this->load( 'en' ); |
369 | 370 | foreach ( $defs as $key => $value ) { |
370 | 371 | $collection[$key] = new FatMessage( $key, implode( ", ", $value ) ); |
— | — | @@ -373,20 +374,20 @@ |
374 | 375 | return $collection; |
375 | 376 | } |
376 | 377 | |
377 | | - public function fillCollection( $collection ) { |
| 378 | + public function fillCollection( MessageCollection $collection ) { |
378 | 379 | $this->fill( $collection ); |
379 | 380 | $this->fillContents( $collection ); |
380 | 381 | } |
381 | 382 | |
382 | 383 | |
383 | | - function fill( $messages ) { |
| 384 | + function fill( MessageCollection $messages ) { |
384 | 385 | $cache = $this->load( $messages->code ); |
385 | 386 | foreach ( $messages->keys() as $key ) { |
386 | 387 | if ( isset( $cache[$key] ) ) { |
387 | 388 | if ( is_array( $cache[$key] ) ) { |
388 | | - $messages[$key]->infile = implode( ',', $cache[$key] ); |
| 389 | + $messages[$key]->setInfile( implode( ',', $cache[$key] ) ); |
389 | 390 | } else { |
390 | | - $messages[$key]->infile = $cache[$key]; |
| 391 | + $messages[$key]->setInfile( $cache[$key] ); |
391 | 392 | } |
392 | 393 | } |
393 | 394 | } |
— | — | @@ -407,7 +408,7 @@ |
408 | 409 | if ( $name === '' || $values === '' ) continue; |
409 | 410 | |
410 | 411 | if ( isset( $collection[$name] ) ) { |
411 | | - $collection[$name]->database = $values; |
| 412 | + $collection[$name]->setTranslation( $values ); |
412 | 413 | } |
413 | 414 | } |
414 | 415 | } |