Index: trunk/extensions/Translate/MessageGroups.php |
— | — | @@ -311,10 +311,12 @@ |
312 | 312 | // Can return null, convert to array |
313 | 313 | $messages = (array) $this->mangler->mangle( |
314 | 314 | ResourceLoader::loadVariableFromPHPFile( $file, 'messages' ) ); |
315 | | - if ( $this->getId() !== 'core' && $code !== 'en' ) { |
316 | | - // For branches, load trunk messages that are not in database |
317 | | - $trunk = MessageGroups::getGroup( 'core' ); |
318 | | - $messages += $trunk->load( $code ); |
| 315 | + if ( $this->parentId ) { |
| 316 | + if ( $code !== 'en' ) { |
| 317 | + // For branches, load newer compatible messages for missing entries, if any |
| 318 | + $trunk = MessageGroups::getGroup( $this->parentId ); |
| 319 | + $messages += $trunk->mangler->unmangle( $trunk->load( $code ) ); |
| 320 | + } |
319 | 321 | } |
320 | 322 | |
321 | 323 | return $messages; |