// Prepare filesystem directories
foreach ($writers as $targetDir =>
$writer) { $filesystem->
remove($targetDir.'/'.
$this->dirName
);
$filesystem->
mkdir($targetDir.'/'.
$this->dirName
);
} $filesystem->
remove($tempDir);
$filesystem->
mkdir($tempDir);
$locales =
$this->
scanLocales($localeScanner,
$config->
getSourceDir());
$this->
compileTemporaryBundles($this->compiler,
$config->
getSourceDir(),
$tempDir);
$this->
preGenerate();
foreach ($locales as $locale) { $localeData =
$this->
generateDataForLocale($reader,
$tempDir,
$locale);
if (null !==
$localeData) { foreach ($writers as $targetDir =>
$writer) { $writer->
write($targetDir.'/'.
$this->dirName,
$locale,
$localeData);
} } }