Changed output for translation:debug command
This commit is contained in:
parent
b09df56a4e
commit
b941bd3c46
@ -168,7 +168,7 @@ EOF
|
||||
}
|
||||
|
||||
// Display header line
|
||||
$headers = array('State(s)', 'Domain', 'Id', sprintf('Message Preview (%s)', $locale));
|
||||
$headers = array('State', 'Domain', 'Id', sprintf('Message Preview (%s)', $locale));
|
||||
foreach ($fallbackCatalogues as $fallbackCatalogue) {
|
||||
$headers[] = sprintf('Fallback Message Preview (%s)', $fallbackCatalogue->getLocale());
|
||||
}
|
||||
@ -215,26 +215,20 @@ EOF
|
||||
} else {
|
||||
$table->render($output);
|
||||
}
|
||||
|
||||
$output->writeln('');
|
||||
$output->writeln('<info>Legend:</info>');
|
||||
$output->writeln(sprintf(' %s Missing message', $this->formatState(self::MESSAGE_MISSING)));
|
||||
$output->writeln(sprintf(' %s Unused message', $this->formatState(self::MESSAGE_UNUSED)));
|
||||
$output->writeln(sprintf(' %s Same as the fallback message', $this->formatState(self::MESSAGE_EQUALS_FALLBACK)));
|
||||
}
|
||||
|
||||
private function formatState($state)
|
||||
{
|
||||
if (self::MESSAGE_MISSING === $state) {
|
||||
return '<fg=red>x</>';
|
||||
return '<error>missing</error>';
|
||||
}
|
||||
|
||||
if (self::MESSAGE_UNUSED === $state) {
|
||||
return '<fg=yellow>o</>';
|
||||
return '<comment>unused</comment>';
|
||||
}
|
||||
|
||||
if (self::MESSAGE_EQUALS_FALLBACK === $state) {
|
||||
return '<fg=green>=</>';
|
||||
return '<info>fallback</info>';
|
||||
}
|
||||
|
||||
return $state;
|
||||
|
Reference in New Issue
Block a user