فهرست منبع

merged branch vicb/transaltion_monitor (PR #4036)

Commits
-------

7ddc8cb [FrameworkBundle] Monitor added/removed translations files in dev (fix #3653)

Discussion
----------

[FrameworkBundle] Monitor added/removed translations files in dev

fix #3653

---------------------------------------------------------------------------

by Koc at 2012-04-20T14:09:55Z

maybe you also can fix #971 ?
Fabien Potencier 13 سال پیش
والد
کامیت
9514d2baab
1فایلهای تغییر یافته به همراه4 افزوده شده و 0 حذف شده
  1. 4 0
      src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php

+ 4 - 0
src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php

@@ -17,6 +17,7 @@ use Symfony\Component\DependencyInjection\DefinitionDecorator;
 use Symfony\Component\DependencyInjection\Reference;
 use Symfony\Component\DependencyInjection\Loader\XmlFileLoader;
 use Symfony\Component\Config\Resource\FileResource;
+use Symfony\Component\Config\Resource\DirectoryResource;
 use Symfony\Component\Finder\Finder;
 use Symfony\Component\HttpKernel\DependencyInjection\Extension;
 use Symfony\Component\Config\FileLocator;
@@ -507,6 +508,9 @@ class FrameworkExtension extends Extension
 
             // Register translation resources
             if ($dirs) {
+                foreach ($dirs as $dir) {
+                    $container->addResource(new DirectoryResource($dir));
+                }
                 $finder = new Finder();
                 $finder->files()->filter(function (\SplFileInfo $file) {
                     return 2 === substr_count($file->getBasename(), '.') && preg_match('/\.\w+$/', $file->getBasename());