Skip to content

Commit

Permalink
[Translation] forced the catalogue to be regenerated when a resource …
Browse files Browse the repository at this point in the history
…is added (closes symfony/translation#1)
  • Loading branch information
fabpot committed Jul 9, 2015
1 parent cc1c6cb commit 45052eb
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Translator.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@ public function addLoader($format, LoaderInterface $loader)
public function addResource($format, $resource, $locale, $domain = 'messages')
{
$this->resources[$locale][] = array($format, $resource, $domain);

unset($this->catalogues[$locale]);
}

/**
Expand Down

0 comments on commit 45052eb

Please sign in to comment.