8000 Changed output for translation:debug command · symfony/symfony@b941bd3 · GitHub
[go: up one dir, main page]

Skip to content

Commit b941bd3

Browse files
Nicolas Dewezaitboudad
Nicolas Dewez
authored andcommitted
Changed output for translation:debug command
1 parent b09df56 commit b941bd3

File tree

1 file changed

+4
-10
lines changed

1 file changed

+4
-10
lines changed

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

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
168168
}
169169

170170
// Display header line
171-
$headers = array('State(s)', 'Domain', 'Id', sprintf('Message Preview (%s)', $locale));
171+
$headers = array('State', 'Domain', 'Id', sprintf('Message Preview (%s)', $locale));
172172
foreach ($fallbackCatalogues as $fallbackCatalogue) {
173173
$headers[] = sprintf('Fallback Message Preview (%s)', $fallbackCatalogue->getLocale());
174174
}
@@ -215,26 +215,20 @@ protected function execute(InputInterface $input, OutputInterface $output)
215215
} else {
216216
$table->render($output);
217217
}
218-
219-
$output->writeln('');
220-
$output->writeln('<info>Legend:</info>');
221-
$output->writeln(sprintf(' %s Missing message', $this->formatState(self::MESSAGE_MISSING)));
222-
$output->writeln(sprintf(' %s Unused message', $this->formatState(self::MESSAGE_UNUSED)));
223-
$output->writeln(sprintf(' %s Same as the fallback message', $this->formatState(self::MESSAGE_EQUALS_FALLBACK)));
224218
}
225219

226220
private function formatState($state)
227221
{
228222
if (self::MESSAGE_MISSING === $state) {
229-
return '<fg=red>x</>';
223+
return '<error>missing</error>';
230224
}
231225

232226
if (self::MESSAGE_UNUSED === $state) {
233-
return '<fg=yellow>o</>';
227+
return '<comment>unused</comment>';
234228
}
235229

236230
if (self::MESSAGE_EQUALS_FALLBACK === $state) {
237-
return '<fg=green>=</>';
231+
return '<info>fallback</info>';
238232
}
239233

240234
return $state;

0 commit comments

Comments
 (0)
0