Skip to content

Commit 9515581

Browse files
[FrameworkBundle] [Translation] Fixed translations not written when no translations directory in update command
1 parent 37c17e7 commit 9515581

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

Command/TranslationUpdateCommand.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -188,9 +188,11 @@ protected function execute(InputInterface $input, OutputInterface $output)
188188
}
189189
}
190190

191-
if ($bundleTransPath) {
192-
$writer->writeTranslations($operation->getResult(), $input->getOption('output-format'), array('path' => $bundleTransPath, 'default_locale' => $this->getContainer()->getParameter('kernel.default_locale')));
191+
if (!$bundleTransPath) {
192+
$bundleTransPath = end($transPaths).'translations';
193193
}
194+
195+
$writer->writeTranslations($operation->getResult(), $input->getOption('output-format'), array('path' => $bundleTransPath, 'default_locale' => $this->getContainer()->getParameter('kernel.default_locale')));
194196
}
195197

196198
$output->newLine();

0 commit comments

Comments
 (0)