Skip to content

Commit 45052eb

Browse files
committed
[Translation] forced the catalogue to be regenerated when a resource is added (closes symfony/translation#1)
1 parent cc1c6cb commit 45052eb

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Translator.php

+2
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,8 @@ public function addLoader($format, LoaderInterface $loader)
7272
public function addResource($format, $resource, $locale, $domain = 'messages')
7373
{
7474
$this->resources[$locale][] = array($format, $resource, $domain);
75+
76+
unset($this->catalogues[$locale]);
7577
}
7678

7779
/**

0 commit comments

Comments
 (0)