8000 minor #14473 [DX] Minor improvement for the translation:debug output … · symfony/symfony@5cc2849 · GitHub
[go: up one dir, main page]

Skip to content

Commit 5cc2849

Browse files
committed
minor #14473 [DX] Minor improvement for the translation:debug output (nicolasdewez)
This PR was submitted for the master branch but it was merged into the 2.7 branch instead (closes #14473). Discussion ---------- [DX] Minor improvement for the translation:debug output | Q | A | ------------- | --- | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | #13874 Commits ------- 6970469 Changed output for translation:debug command
2 parents 09cde7c + 6970469 commit 5cc2849

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