Index: trunk/extensions/Translate/Groups.php |
— | — | @@ -617,9 +617,12 @@ |
618 | 618 | } |
619 | 619 | |
620 | 620 | public function getMessage( $key, $code ) { |
621 | | - foreach ( $this->getGroups() as $group ) { |
622 | | - $message = $group->getMessage( $key, $code ); |
623 | | - if ( $message !== null ) return $message; |
| 621 | + $id = TranslateUtils::messageKeyToGroup( $this->getNamespace(), $key ); |
| 622 | + $groups = $this->getGroups(); |
| 623 | + if ( isset( $groups[$id] ) ) { |
| 624 | + return $groups[$id]->getMessage( $key, $code ); |
| 625 | + } else { |
| 626 | + return null; |
624 | 627 | } |
625 | 628 | } |
626 | 629 | |