Regenerate the catalogue when adding resources dynamically. #1

Closed
wants to merge 1 commit into
from
View
@@ -73,6 +73,9 @@ public function addLoader($format, LoaderInterface $loader)
public function addResource($format, $resource, $locale, $domain = 'messages')
{
$this->resources[$locale][] = array($format, $resource, $domain);
+
+ // The catalogue should be regenerated when dynamically adding resources.
+ $this->loadCatalogue($locale);
}
/**