Skip to content

Commit

Permalink
[composerize] Add translation keys. (#3660)
Browse files Browse the repository at this point in the history
  • Loading branch information
jmolivas authored Jan 8, 2018
1 parent 9ae59ed commit a860f39
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 7 deletions.
1 change: 0 additions & 1 deletion src/Application.php
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@ public function validateCommands()
return;
}


if (!$this->container->has('console.annotation_command_reader')) {
return;
}
Expand Down
21 changes: 15 additions & 6 deletions src/Command/ComposerizeCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@
use Symfony\Component\Console\Output\OutputInterface;
use Drupal\Console\Core\Command\ContainerAwareCommand;

/**
* Class ComposerizeCommand
*
* @package Drupal\Console\Command
*/
class ComposerizeCommand extends ContainerAwareCommand
{
protected $packages = [];
Expand Down Expand Up @@ -37,7 +42,7 @@ protected function configure()
InputOption::VALUE_NONE,
$this->trans('commands.composerize.options.include-version')
)
->setHelp($this->trans('commands.composerize.help'));
->setHelp($this->trans('commands.composerize.description'));
}

/**
Expand Down Expand Up @@ -71,8 +76,12 @@ protected function execute(InputInterface $input, OutputInterface $output)
continue;
}
if (!$hidePackages) {
$io->comment(ucfirst($type).'(s) detected.');
$tableHeader = ['Name', 'Version', 'Dependencies'];
$io->comment($this->trans('commands.composerize.messages.'.$type));
$tableHeader = [
$this->trans('commands.composerize.messages.name'),
$this->trans('commands.composerize.messages.version'),
$this->trans('commands.composerize.messages.dependencies')
];
$io->table($tableHeader, $packages);
}
foreach ($packages as $package) {
Expand All @@ -87,13 +96,13 @@ protected function execute(InputInterface $input, OutputInterface $output)
$composerCommand .= ' ';
}
}
$io->comment('From your project root:');
$io->comment($this->trans('commands.composerize.messages.from'));
$io->simple($this->get('console.root'));
$io->newLine();
$io->comment('Execute this command:');
$io->comment($this->trans('commands.composerize.messages.execute'));
$io->simple($composerCommand);
$io->newLine();
$io->comment('To ignore third party libraries, modules and themes add to your .gitignore file:');
$io->comment($this->trans('commands.composerize.messages.ignore'));
$io->writeln(
[
' /vendor/',
Expand Down

0 comments on commit a860f39

Please sign in to comment.