|
@@ -490,7 +490,9 @@ class FrameworkExtension extends Extension
|
|
|
// Register translation resources
|
|
|
if ($dirs) {
|
|
|
$finder = new Finder();
|
|
|
- $finder->files()->filter(function (\SplFileInfo $file) { return 2 === substr_count($file->getBasename(), '.'); })->in($dirs);
|
|
|
+ $finder->files()->filter(function (\SplFileInfo $file) {
|
|
|
+ return 2 === substr_count($file->getBasename(), '.') && preg_match('/\.\w+$/', $file->getBasename());
|
|
|
+ })->in($dirs);
|
|
|
foreach ($finder as $file) {
|
|
|
// filename is domain.locale.format
|
|
|
list($domain, $locale, $format) = explode('.', $file->getBasename());
|