[FrameworkBundle] fixed Translator to also load the fallback catalog

This commit is contained in:
Fabien Potencier 2011-09-19 09:01:12 +02:00
parent 80abf56e92
commit 9703aac268
2 changed files with 3 additions and 3 deletions

View File

@ -80,7 +80,7 @@ class Translator extends BaseTranslator
/**
* {@inheritdoc}
*/
protected function loadCatalogue($locale)
protected function doLoadCatalogue($locale)
{
if (isset($this->catalogues[$locale])) {
return;
@ -96,7 +96,7 @@ class Translator extends BaseTranslator
if (!$cache->isFresh()) {
$this->initialize();
parent::loadCatalogue($locale);
parent::doLoadCatalogue($locale);
$content = sprintf(
"<?php use Symfony\Component\Translation\MessageCatalogue; return new MessageCatalogue('%s', %s);",

View File

@ -164,7 +164,7 @@ class Translator implements TranslatorInterface
$this->loadFallbackCatalogues($locale);
}
private function doLoadCatalogue($locale)
protected function doLoadCatalogue($locale)
{
$this->catalogues[$locale] = new MessageCatalogue($locale);