Skip to content

Commit

Permalink
Merge pull request #8 from enumag/master-3
Browse files Browse the repository at this point in the history
Fixed cache invalidation when adding or removing a translation file
  • Loading branch information
fprochazka committed Sep 5, 2013
2 parents 6a374e1 + f0ccbe4 commit 4ab9918
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/Kdyby/Translation/DI/TranslationExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,9 @@ public function beforeCompile()
$translator->factory->arguments[4] = $this->loaders;

if ($dirs = array_filter($config['dirs'], callback('is_dir'))) {
foreach ($dirs as $dir) {
$builder->addDependency($dir);
}
foreach (Arrays::flatten($this->loaders) as $format) {
foreach (Finder::findFiles('*.*.' . $format)->from($dirs) as $file) {
/** @var \SplFileInfo $file */
Expand Down

0 comments on commit 4ab9918

Please sign in to comment.