Skip to content

Commit

Permalink
Merge branch '2.6' into 2.7
Browse files Browse the repository at this point in the history
* 2.6: (21 commits)
  bumped Symfony version to 2.6.8
  updated VERSION for 2.6.7
  updated CHANGELOG for 2.6.7
  bumped Symfony version to 2.3.29
  updated VERSION for 2.3.28
  update CONTRIBUTORS for 2.3.28
  updated CHANGELOG for 2.3.28
  [Debug] Fixed ClassNotFoundFatalErrorHandlerTest
  [SecurityBundle] use access decision constants in config
  [SecurityBundle] use session auth constants in config
  PhpDoc fix in AbstractRememberMeServices
  [Filesystem] Simplified an if statement
  [SecurityBundle] Use Enum Nodes Instead Of Scalar
  [Debug 2.3] Fix test for PHP7
  [HttpKernel] Check if "symfony/proxy-manager-bridge" package is installed
  [Translation] simplify getMessages.
  [Framework][Translation] added test for debug command.
  Run tests on hhvm instead of hhvm-nightly
  Use HTTPS in README and some other fixes
  add more entropy to generated classnames
  ...

Conflicts:
	.travis.yml
	src/Symfony/Component/HttpKernel/Kernel.php
  • Loading branch information
fabpot committed May 11, 2015
2 parents 1097fcb + 398e0ee commit 1be5bbe
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions Translator.php
Expand Up @@ -292,15 +292,10 @@ protected function getLoaders()
*/
public function getMessages($locale = null)
{
$catalogues = array();
$catalogues[] = $catalogue = $this->getCatalogue($locale);
$catalogue = $this->getCatalogue($locale);
$messages = $catalogue->all();
while ($catalogue = $catalogue->getFallbackCatalogue()) {
$catalogues[] = $catalogue;
}
$messages = array();
for ($i = count($catalogues) - 1; $i >= 0; $i--) {
$localeMessages = $catalogues[$i]->all();
$messages = array_replace_recursive($messages, $localeMessages);
$messages = array_replace_recursive($catalogue->all(), $messages);
}

return $messages;
Expand Down

0 comments on commit 1be5bbe

Please sign in to comment.