From a860f398ff8b7e661d266fe1243969beb20f0fc1 Mon Sep 17 00:00:00 2001 From: Jesus Manuel Olivas Date: Mon, 8 Jan 2018 10:36:46 -0800 Subject: [PATCH] [composerize] Add translation keys. (#3660) --- src/Application.php | 1 - src/Command/ComposerizeCommand.php | 21 +++++++++++++++------ 2 files changed, 15 insertions(+), 7 deletions(-) diff --git a/src/Application.php b/src/Application.php index c71d44e80..8d7768d40 100644 --- a/src/Application.php +++ b/src/Application.php @@ -79,7 +79,6 @@ public function validateCommands() return; } - if (!$this->container->has('console.annotation_command_reader')) { return; } diff --git a/src/Command/ComposerizeCommand.php b/src/Command/ComposerizeCommand.php index 77acd88c7..4f9b072d0 100644 --- a/src/Command/ComposerizeCommand.php +++ b/src/Command/ComposerizeCommand.php @@ -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 = []; @@ -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')); } /** @@ -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) { @@ -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/',