From 03a2c9e598826cfdba511ccc29dcfae69d88cb18 Mon Sep 17 00:00:00 2001 From: Blas Date: Wed, 12 Jul 2017 17:14:36 -0500 Subject: [PATCH] Replacing in translation keys from _ to - (#190) --- src/Command/Chain/ChainCommand.php | 4 ++-- src/Command/CheckCommand.php | 10 +++++----- src/Command/HelpCommand.php | 2 +- src/Descriptor/TextDescriptor.php | 2 +- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/Command/Chain/ChainCommand.php b/src/Command/Chain/ChainCommand.php index 1a766db..46ea3e6 100644 --- a/src/Command/Chain/ChainCommand.php +++ b/src/Command/Chain/ChainCommand.php @@ -173,7 +173,7 @@ protected function execute(InputInterface $input, OutputInterface $output) $file = $input->getOption('file'); if (!$file) { - $io->error($this->trans('commands.chain.messages.missing_file')); + $io->error($this->trans('commands.chain.messages.missing-file')); return 1; } @@ -184,7 +184,7 @@ protected function execute(InputInterface $input, OutputInterface $output) if (!$fileSystem->exists($file)) { $io->error( sprintf( - $this->trans('commands.chain.messages.invalid_file'), + $this->trans('commands.chain.messages.invalid-file'), $file ) ); diff --git a/src/Command/CheckCommand.php b/src/Command/CheckCommand.php index 33fd620..fcc3b62 100644 --- a/src/Command/CheckCommand.php +++ b/src/Command/CheckCommand.php @@ -97,7 +97,7 @@ protected function execute(InputInterface $input, OutputInterface $output) if (!$checks['php']['valid']) { $io->error( sprintf( - $this->trans('commands.check.messages.php_invalid'), + $this->trans('commands.check.messages.php-invalid'), $checks['php']['current'], $checks['php']['required'] ) @@ -110,7 +110,7 @@ protected function execute(InputInterface $input, OutputInterface $output) foreach ($extensions as $extension) { $io->error( sprintf( - $this->trans('commands.check.messages.extension_missing'), + $this->trans('commands.check.messages.extension-missing'), $extension ) ); @@ -122,7 +122,7 @@ protected function execute(InputInterface $input, OutputInterface $output) $io->commentBlock( sprintf( $this->trans( - 'commands.check.messages.extension_recommended' + 'commands.check.messages.extension-recommended' ), $extension ) @@ -134,7 +134,7 @@ protected function execute(InputInterface $input, OutputInterface $output) foreach ($configurations as $configuration) { $io->error( sprintf( - $this->trans('commands.check.messages.configuration_missing'), + $this->trans('commands.check.messages.configuration-missing'), $configuration ) ); @@ -146,7 +146,7 @@ protected function execute(InputInterface $input, OutputInterface $output) $io->commentBlock( sprintf( $this->trans( - 'commands.check.messages.configuration_overwritten' + 'commands.check.messages.configuration-overwritten' ), $configuration, $overwritten diff --git a/src/Command/HelpCommand.php b/src/Command/HelpCommand.php index c497341..e80e1e6 100644 --- a/src/Command/HelpCommand.php +++ b/src/Command/HelpCommand.php @@ -91,7 +91,7 @@ private function createDefinition() { return new InputDefinition( [ - new InputArgument('command_name', InputArgument::OPTIONAL, $this->trans('commands.help.arguments.command_name'), 'help'), + new InputArgument('command_name', InputArgument::OPTIONAL, $this->trans('commands.help.arguments.command-name'), 'help'), new InputOption('xml', null, InputOption::VALUE_NONE, $this->trans('commands.help.options.xml')), new InputOption('raw', null, InputOption::VALUE_NONE, $this->trans('commands.help.options.raw')), new InputOption('format', null, InputOption::VALUE_REQUIRED, $this->trans('commands.help.options.format'), 'txt'), diff --git a/src/Descriptor/TextDescriptor.php b/src/Descriptor/TextDescriptor.php index 9a480b4..5437d8a 100644 --- a/src/Descriptor/TextDescriptor.php +++ b/src/Descriptor/TextDescriptor.php @@ -203,7 +203,7 @@ protected function describeApplication(Application $application, array $options $this->writeText("$help\n\n", $options); } $this->writeText($application->trans('commands.list.messages.usage'), $options); - $this->writeText($application->trans('commands.list.messages.usage_details'), $options); + $this->writeText($application->trans('commands.list.messages.usage-details'), $options); $options['application'] = $application; $this->describeInputDefinition(new InputDefinition($application->getDefinition()->getOptions()), $options); $this->writeText("\n");