From 4b689111d97a7ba69b975ebaef79cf457720d62a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Romey?= Date: Wed, 25 Nov 2015 09:47:27 +0100 Subject: [PATCH] [FrameworkBundle] [Translation] Fixed translations not written when no translations directory in update command --- .../FrameworkBundle/Command/TranslationUpdateCommand.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Symfony/Bundle/FrameworkBundle/Command/TranslationUpdateCommand.php b/src/Symfony/Bundle/FrameworkBundle/Command/TranslationUpdateCommand.php index 3e1b16436f70e..88f714e05d779 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Command/TranslationUpdateCommand.php +++ b/src/Symfony/Bundle/FrameworkBundle/Command/TranslationUpdateCommand.php @@ -196,10 +196,10 @@ protected function execute(InputInterface $input, OutputInterface $output) $bundleTransPath = $path; } } - - if ($bundleTransPath) { - $writer->writeTranslations($operation->getResult(), $input->getOption('output-format'), array('path' => $bundleTransPath, 'default_locale' => $this->getContainer()->getParameter('kernel.default_locale'))); + if (!$bundleTransPath) { + $bundleTransPath = end($transPaths).'translations'; } + $writer->writeTranslations($operation->getResult(), $input->getOption('output-format'), array('path' => $bundleTransPath, 'default_locale' => $this->getContainer()->getParameter('kernel.default_locale'))); if (true === $input->getOption('dump-messages')) { $resultMessage .= ' and translation files were updated.';