Skip to content

Commit 7e29d2c

Browse files
committed
feature #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.8 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 ------- b941bd3 Changed output for translation:debug command
2 parents b09df56 + b941bd3 commit 7e29d2c

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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy