diff --git a/src/Command/Config/EditCommand.php b/src/Command/Config/EditCommand.php index bd5ad9576..fe1ddc46d 100644 --- a/src/Command/Config/EditCommand.php +++ b/src/Command/Config/EditCommand.php @@ -140,7 +140,7 @@ protected function interact(InputInterface $input, OutputInterface $output) if (!$configName) { $configNames = $this->configFactory->listAll(); $configName = $io->choice( - 'Choose a configuration', + $this->trans('commands.config.edit.messages.choose-configuration'), $configNames ); diff --git a/src/Command/DevelDumperCommand.php b/src/Command/DevelDumperCommand.php index 97a246b9d..612b52e73 100644 --- a/src/Command/DevelDumperCommand.php +++ b/src/Command/DevelDumperCommand.php @@ -50,11 +50,11 @@ protected function configure() { $this ->setName('devel:dumper') - ->setDescription($this->trans('Change the devel dumper plugin')) + ->setDescription($this->trans('commands.devel.dumper.messages.change-devel-dumper-plugin')) ->addArgument( 'dumper', InputArgument::OPTIONAL, - $this->trans('Name of the devel dumper plugin') + $this->trans('commands.devel.dumper.messages.name-devel-dumper-plugin') )->setAliases(['dd']); } @@ -65,7 +65,7 @@ protected function interact(InputInterface $input, OutputInterface $output) { $io = new DrupalStyle($input, $output); if (!\Drupal::moduleHandler()->moduleExists('devel')) { - $io->error($this->trans('Devel must be installed')); + $io->error($this->trans('commands.devel.dumper.messages.devel-must-be-installed')); return 1; } @@ -76,7 +76,7 @@ protected function interact(InputInterface $input, OutputInterface $output) $dumpKeys = $this->getDumperKeys(); $dumper = $io->choice( - $this->trans('Select a Debug Dumper'), + $this->trans('commands.devel.dumper.messages.select-debug-dumper'), $dumpKeys, 'kint', //Make kint the default for quick 'switchback' false @@ -97,7 +97,7 @@ protected function execute(InputInterface $input, OutputInterface $output) $dumper = $input->getArgument('dumper'); $dumpKeys = $this->getDumperKeys(); if (!in_array($dumper, $dumpKeys)) { - $io->error($this->trans('Dumper does not exist')); + $io->error($this->trans('commands.devel.dumper.messages.dumper-not-exist')); return 1; } @@ -108,7 +108,7 @@ protected function execute(InputInterface $input, OutputInterface $output) $develSettings->set('devel_dumper', $dumper)->save(); $io->info( sprintf( - $this->trans('Devel Dumper set to: %s'), + $this->trans('commands.devel.dumper.messages.devel-dumper-set'), $configFactory->get('devel.settings')->get('devel_dumper') ) ); diff --git a/src/Command/Generate/HelpCommand.php b/src/Command/Generate/HelpCommand.php index bff5a1206..282aee5f6 100644 --- a/src/Command/Generate/HelpCommand.php +++ b/src/Command/Generate/HelpCommand.php @@ -140,7 +140,7 @@ protected function interact(InputInterface $input, OutputInterface $output) if (!$description) { $description = $io->ask( $this->trans('commands.generate.module.questions.description'), - 'My Awesome Module' + $this->trans('commands.generate.module.suggestions.my-awesome-module') ); } $input->setOption('description', $description); diff --git a/src/Command/Generate/ModuleCommand.php b/src/Command/Generate/ModuleCommand.php index 1382b08b3..215909eea 100644 --- a/src/Command/Generate/ModuleCommand.php +++ b/src/Command/Generate/ModuleCommand.php @@ -298,7 +298,7 @@ function ($modulePath) use ($drupalRoot, $machineName) { if (!$description) { $description = $io->ask( $this->trans('commands.generate.module.questions.description'), - 'My Awesome Module' + $this->trans('commands.generate.module.suggestions.my-awesome-module') ); } $input->setOption('description', $description); diff --git a/src/Command/Generate/PluginFieldCommand.php b/src/Command/Generate/PluginFieldCommand.php index 35577216a..965b54841 100644 --- a/src/Command/Generate/PluginFieldCommand.php +++ b/src/Command/Generate/PluginFieldCommand.php @@ -248,7 +248,7 @@ protected function interact(InputInterface $input, OutputInterface $output) if (!$description) { $description = $io->ask( $this->trans('commands.generate.plugin.field.questions.type-description'), - 'My Field Type' + $this->trans('commands.generate.plugin.field.suggestions.my-field-type') ); $input->setOption('type-description', $description); } diff --git a/src/Command/Generate/PluginFieldTypeCommand.php b/src/Command/Generate/PluginFieldTypeCommand.php index 49f6b6eef..cd7b9c64b 100644 --- a/src/Command/Generate/PluginFieldTypeCommand.php +++ b/src/Command/Generate/PluginFieldTypeCommand.php @@ -195,7 +195,7 @@ protected function interact(InputInterface $input, OutputInterface $output) if (!$description) { $description = $io->ask( $this->trans('commands.generate.plugin.fieldtype.questions.description'), - 'My Field Type' + $this->trans('commands.generate.plugin.fieldtype.suggestions.my-field-type') ); $input->setOption('description', $description); } diff --git a/src/Command/Generate/PluginImageEffectCommand.php b/src/Command/Generate/PluginImageEffectCommand.php index cf516e813..df33700e9 100644 --- a/src/Command/Generate/PluginImageEffectCommand.php +++ b/src/Command/Generate/PluginImageEffectCommand.php @@ -177,7 +177,7 @@ protected function interact(InputInterface $input, OutputInterface $output) if (!$description) { $description = $io->ask( $this->trans('commands.generate.plugin.imageeffect.questions.description'), - 'My Image Effect' + $this->trans('commands.generate.plugin.imageeffect.suggestions.my-image-effect') ); $input->setOption('description', $description); } diff --git a/src/Command/Generate/ProfileCommand.php b/src/Command/Generate/ProfileCommand.php index 5225379e0..f26791ae2 100644 --- a/src/Command/Generate/ProfileCommand.php +++ b/src/Command/Generate/ProfileCommand.php @@ -215,7 +215,7 @@ function ($machine_name) use ($validators) { if (!$description) { $description = $io->ask( $this->trans('commands.generate.profile.questions.description'), - 'My Useful Profile' + $this->trans('commands.generate.profile.suggestions.my-useful-profile') ); $input->setOption('description', $description); } @@ -253,7 +253,7 @@ function ($machine_name) use ($validators) { ) { $distribution = $io->ask( $this->trans('commands.generate.profile.options.distribution'), - 'My Kick-ass Distribution' + $this->trans('commands.generate.profile.suggestions.my-kick-ass-distribution') ); $input->setOption('distribution', $distribution); } diff --git a/src/Command/Generate/ThemeCommand.php b/src/Command/Generate/ThemeCommand.php index 8c598baf2..e92af8d1f 100644 --- a/src/Command/Generate/ThemeCommand.php +++ b/src/Command/Generate/ThemeCommand.php @@ -291,7 +291,7 @@ function ($theme_path) use ($drupalRoot, $machine_name) { if (!$description) { $description = $io->ask( $this->trans('commands.generate.theme.questions.description'), - 'My Awesome theme' + $this->trans('commands.generate.theme.suggestions.my-awesome-theme') ); $input->setOption('description', $description); } @@ -300,7 +300,7 @@ function ($theme_path) use ($drupalRoot, $machine_name) { if (!$package) { $package = $io->ask( $this->trans('commands.generate.theme.questions.package'), - 'Other' + $this->trans('commands.generate.theme.suggestions.other') ); $input->setOption('package', $package); } diff --git a/src/Command/Shared/FormTrait.php b/src/Command/Shared/FormTrait.php index f55da0134..8a72e0264 100644 --- a/src/Command/Shared/FormTrait.php +++ b/src/Command/Shared/FormTrait.php @@ -93,19 +93,19 @@ public function formQuestion(DrupalStyle $io) $size = null; if (in_array($input_type, ['textfield', 'password', 'password_confirm'])) { $maxlength = $io->ask( - 'Maximum amount of characters', + $this->trans('commands.generate.form.questions.max-amount-characters'), '64' ); $size = $io->ask( - 'Width of the textfield (in characters)', + $this->trans('commands.generate.form.questions.textfield-width-in-chars'), '64' ); } if ($input_type == 'select') { $size = $io->ask( - 'Size of multiselect box (in lines)', + $this->trans('commands.generate.form.questions.multiselect-size-in-lines'), '5' ); } @@ -113,7 +113,7 @@ public function formQuestion(DrupalStyle $io) $input_options = ''; if (in_array($input_type, ['checkboxes', 'radios', 'select'])) { $input_options = $io->ask( - 'Input options separated by comma' + $this->trans('commands.generate.form.questions.input-options') ); } diff --git a/src/Command/Shared/MenuTrait.php b/src/Command/Shared/MenuTrait.php index faa083c85..5d8bc55a4 100644 --- a/src/Command/Shared/MenuTrait.php +++ b/src/Command/Shared/MenuTrait.php @@ -56,7 +56,7 @@ public function menuQuestion(DrupalStyle $io, $className) $menu_link_desc = $io->ask( $menu_link_desc = $this->trans('commands.generate.form.options.menu-link-desc'), - 'A description for the menu entry' + $menu_link_desc = $this->trans('commands.generate.form.suggestions.description-for-menu') ); $menu_options['menu_link_title'] = $menu_link_title; $menu_options['menu_parent'] = $menu_parent; diff --git a/src/Command/Shared/PermissionTrait.php b/src/Command/Shared/PermissionTrait.php index a3e3f6796..1822ac06a 100644 --- a/src/Command/Shared/PermissionTrait.php +++ b/src/Command/Shared/PermissionTrait.php @@ -23,15 +23,15 @@ public function permissionQuestion(DrupalStyle $output) while (true) { $permission = $output->ask( $this->trans('commands.generate.permission.questions.permission'), - 'access content' + $this->trans('commands.generate.permission.suggestions.access-content') ); $title = $output->ask( $this->trans('commands.generate.permission.questions.title'), - 'Access content' + $this->trans('commands.generate.permission.suggestions.access-content') ); $description = $output->ask( $this->trans('commands.generate.permission.questions.description'), - 'Allow access to my content' + $this->trans('commands.generate.permission.suggestions.allow-access-content') ); $restrictAccess = $output->choiceNoList( $this->trans('commands.generate.permission.questions.restrict-access'), diff --git a/src/Command/Site/InstallCommand.php b/src/Command/Site/InstallCommand.php index 3781fa598..480219581 100644 --- a/src/Command/Site/InstallCommand.php +++ b/src/Command/Site/InstallCommand.php @@ -321,7 +321,7 @@ function ($profile) { if (!$siteName) { $siteName = $io->ask( $this->trans('commands.site.install.questions.site-name'), - 'Drupal 8' + $this->trans('commands.site.install.suggestions.site-name') ); $input->setOption('site-name', $siteName); } diff --git a/src/Command/Theme/PathCommand.php b/src/Command/Theme/PathCommand.php index 131c16525..fdfd85dce 100644 --- a/src/Command/Theme/PathCommand.php +++ b/src/Command/Theme/PathCommand.php @@ -73,7 +73,7 @@ protected function execute(InputInterface $input, OutputInterface $output) if (!in_array($theme, $this->getThemeList())) { $io->error( sprintf( - 'Invalid theme name: %s', + $this->trans('commands.theme.path.messages.invalid-theme-name'), $theme ) );