Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit f5e0d81

Browse files
committed
[FrameworkBundle][TranslationUpdateCommand] Do not output positive feedback on stderr
1 parent 8e9aafc commit f5e0d81

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

src/Symfony/Bundle/FrameworkBundle/Command/ContainerDebugCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
127127
} elseif ($tag = $input->getOption('tag')) {
128128
$options = ['tag' => $tag, 'show_private' => $input->getOption('show-private')];
129129
} elseif ($name = $input->getArgument('name')) {
130-
$name = $this->findProperServiceName($input, $errorIo, $object, $name);
130+
$name = $this->findProperServiceName($input, $io, $object, $name);
131131
$options = ['id' => $name];
132132
} else {
133133
$options = ['show_private' => $input->getOption('show-private')];

src/Symfony/Bundle/FrameworkBundle/Command/TranslationUpdateCommand.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -200,12 +200,12 @@ protected function execute(InputInterface $input, OutputInterface $output)
200200
}
201201
}
202202

203-
$errorIo->title('Translation Messages Extractor and Dumper');
204-
$errorIo->comment(sprintf('Generating "<info>%s</info>" translation files for "<info>%s</info>"', $input->getArgument('locale'), $currentName));
203+
$io->title('Translation Messages Extractor and Dumper');
204+
$io->comment(sprintf('Generating "<info>%s</info>" translation files for "<info>%s</info>"', $input->getArgument('locale'), $currentName));
205205

206206
// load any messages from templates
207207
$extractedCatalogue = new MessageCatalogue($input->getArgument('locale'));
208-
$errorIo->comment('Parsing templates...');
208+
$io->comment('Parsing templates...');
209209
$prefix = $input->getOption('prefix');
210210
// @deprecated since version 3.4, to be removed in 4.0 along with the --no-prefix option
211211
if ($input->getOption('no-prefix')) {
@@ -221,7 +221,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
221221

222222
// load any existing messages from the translation files
223223
$currentCatalogue = new MessageCatalogue($input->getArgument('locale'));
224-
$errorIo->comment('Loading translation files...');
224+
$io->comment('Loading translation files...');
225225
foreach ($transPaths as $path) {
226226
if (is_dir($path)) {
227227
$this->reader->read($path, $currentCatalogue);
@@ -274,7 +274,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
274274
}
275275

276276
if ('xlf' == $input->getOption('output-format')) {
277-
$errorIo->comment('Xliff output version is <info>1.2</info>');
277+
$io->comment('Xliff output version is <info>1.2</info>');
278278
}
279279

280280
$resultMessage = sprintf('%d message%s successfully extracted', $extractedMessagesCount, $extractedMessagesCount > 1 ? 's were' : ' was');
@@ -286,7 +286,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
286286

287287
// save the files
288288
if (true === $input->getOption('force')) {
289-
$errorIo->comment('Writing files...');
289+
$io->comment('Writing files...');
290290

291291
$bundleTransPath = false;
292292
foreach ($transPaths as $path) {
@@ -306,7 +306,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
306306
}
307307
}
308308

309-
$errorIo->success($resultMessage.'.');
309+
$io->success($resultMessage.'.');
310310

311311
return null;
312312
}

0 commit comments

Comments
 (0)