Skip to content

Commit

Permalink
Replace lost translation key in commands (#3462)
Browse files Browse the repository at this point in the history
  • Loading branch information
hjuarez20 authored and jmolivas committed Aug 1, 2017
1 parent ae445f2 commit c70c139
Show file tree
Hide file tree
Showing 19 changed files with 50 additions and 51 deletions.
2 changes: 1 addition & 1 deletion src/Command/Generate/EventSubscriberCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ protected function configure()
'name',
null,
InputOption::VALUE_OPTIONAL,
$this->trans('commands.generate.service.options.name')
$this->trans('commands.generate.service.options.service-name')
)
->addOption(
'class',
Expand Down
4 changes: 2 additions & 2 deletions src/Command/Generate/PermissionCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@ protected function configure()
{
$this
->setName('generate:permissions')
->setDescription($this->trans('commands.generate.permission.description'))
->setHelp($this->trans('commands.generate.permission.help'))
->setDescription($this->trans('commands.generate.permissions.description'))
->setHelp($this->trans('commands.generate.permissions.help'))
->addOption(
'module',
null,
Expand Down
4 changes: 2 additions & 2 deletions src/Command/Generate/PluginFieldCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,13 +86,13 @@ protected function configure()
'type-description',
null,
InputOption::VALUE_OPTIONAL,
$this->trans('commands.generate.plugin.field.options.type-type-description')
$this->trans('commands.generate.plugin.field.options.type-description')
)
->addOption(
'formatter-class',
null,
InputOption::VALUE_REQUIRED,
$this->trans('commands.generate.plugin.field.options.class')
$this->trans('commands.generate.plugin.field.options.formatter-class')
)
->addOption(
'formatter-label',
Expand Down
2 changes: 1 addition & 1 deletion src/Command/Generate/PluginRestResourceCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ protected function configure()
'name',
null,
InputOption::VALUE_OPTIONAL,
$this->trans('commands.generate.service.options.name')
$this->trans('commands.generate.service.options.service-name')
)
->addOption(
'plugin-id',
Expand Down
5 changes: 2 additions & 3 deletions src/Command/Generate/PluginSkeletonCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -109,13 +109,13 @@ protected function configure()
'plugin-id',
null,
InputOption::VALUE_REQUIRED,
$this->trans('commands.generate.plugin.options.plugin-id')
$this->trans('commands.generate.plugin.skeleton.options.plugin')
)
->addOption(
'class',
null,
InputOption::VALUE_OPTIONAL,
$this->trans('commands.generate.plugin.block.options.class')
$this->trans('commands.generate.plugin.skeleton.options.class')
)
->addOption(
'services',
Expand All @@ -124,7 +124,6 @@ protected function configure()
$this->trans('commands.common.options.services')
)->setAliases(['gps']);
}

/**
* {@inheritdoc}
*/
Expand Down
2 changes: 1 addition & 1 deletion src/Command/Generate/PostUpdateCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ protected function configure()
{
$this
->setName('generate:post:update')
->setDescription($this->trans('commands.generate.post:update.description'))
->setDescription($this->trans('commands.generate.post.update.description'))
->setHelp($this->trans('commands.generate.post.update.help'))
->addOption(
'module',
Expand Down
6 changes: 3 additions & 3 deletions src/Command/Generate/ServiceCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ protected function configure()
'name',
null,
InputOption::VALUE_REQUIRED,
$this->trans('commands.generate.service.options.name')
$this->trans('commands.generate.service.options.service-name')
)
->addOption(
'class',
Expand All @@ -104,13 +104,13 @@ protected function configure()
'interface',
null,
InputOption::VALUE_NONE,
$this->trans('commands.common.service.options.interface')
$this->trans('commands.generate.service.options.interface')
)
->addOption(
'interface-name',
null,
InputOption::VALUE_OPTIONAL,
$this->trans('commands.common.service.options.interface-name')
$this->trans('commands.generate.service.options.interface-name')
)
->addOption(
'services',
Expand Down
4 changes: 2 additions & 2 deletions src/Command/Generate/ThemeCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ protected function configure()
'theme',
null,
InputOption::VALUE_REQUIRED,
$this->trans('commands.generate.theme.options.module')
$this->trans('commands.generate.theme.options.theme')
)
->addOption(
'machine-name',
Expand All @@ -124,7 +124,7 @@ protected function configure()
'theme-path',
null,
InputOption::VALUE_REQUIRED,
$this->trans('commands.generate.theme.options.module-path')
$this->trans('commands.generate.theme.options.theme-path')
)
->addOption(
'description',
Expand Down
2 changes: 1 addition & 1 deletion src/Command/Migrate/ExecuteCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ protected function configure()
'db-type',
null,
InputOption::VALUE_REQUIRED,
$this->trans('commands.migrate.setup.migrations.options.db-type')
$this->trans('commands.migrate.execute.migrations.options.db-type')
)
->addOption(
'db-host',
Expand Down
2 changes: 1 addition & 1 deletion src/Command/Module/DownloadCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ protected function configure()
'unstable',
null,
InputOption::VALUE_NONE,
$this->trans('commands.module.install.options.unstable')
$this->trans('commands.module.download.options.unstable')
)
->setAliases(['mod']);
}
Expand Down
10 changes: 5 additions & 5 deletions src/Command/Module/InstallDependencyCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,11 +78,11 @@ protected function configure()
{
$this
->setName('module:dependency:install')
->setDescription($this->trans('commands.module.install.dependencies.description'))
->setDescription($this->trans('commands.module.dependency.install.description'))
->addArgument(
'module',
InputArgument::IS_ARRAY,
$this->trans('commands.module.install.dependencies.arguments.module')
$this->trans('commands.module.dependency.install.arguments.module')
)->setAliases(['modi']);
}

Expand Down Expand Up @@ -112,14 +112,14 @@ protected function execute(InputInterface $input, OutputInterface $output)
$unInstalledDependencies = $this->calculateDependencies((array)$module);

if (!$unInstalledDependencies) {
$io->warning($this->trans('commands.module.install.dependencies.messages.no-depencies'));
$io->warning($this->trans('commands.module.dependency.install.messages.no-depencies'));
return 0;
}

try {
$io->comment(
sprintf(
$this->trans('commands.module.install.dependencies.messages.installing'),
$this->trans('commands.module.dependency.install.messages.installing'),
implode(', ', $unInstalledDependencies)
)
);
Expand All @@ -129,7 +129,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
$this->moduleInstaller->install($unInstalledDependencies, true);
$io->success(
sprintf(
$this->trans('commands.module.install.dependencies.messages.success'),
$this->trans('commands.module.dependency.install.messages.success'),
implode(', ', $unInstalledDependencies)
)
);
Expand Down
16 changes: 8 additions & 8 deletions src/Command/Shared/PermissionTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,19 +22,19 @@ public function permissionQuestion(DrupalStyle $output)
$boolOrNone = ['true','false','none'];
while (true) {
$permission = $output->ask(
$this->trans('commands.generate.permission.questions.permission'),
$this->trans('commands.generate.permission.suggestions.access-content')
$this->trans('commands.generate.permissions.questions.permission'),
$this->trans('commands.generate.permissions.suggestions.access-content')
);
$title = $output->ask(
$this->trans('commands.generate.permission.questions.title'),
$this->trans('commands.generate.permission.suggestions.access-content')
$this->trans('commands.generate.permissions.questions.title'),
$this->trans('commands.generate.permissions.suggestions.access-content')
);
$description = $output->ask(
$this->trans('commands.generate.permission.questions.description'),
$this->trans('commands.generate.permission.suggestions.allow-access-content')
$this->trans('commands.generate.permissions.questions.description'),
$this->trans('commands.generate.permissions.suggestions.allow-access-content')
);
$restrictAccess = $output->choiceNoList(
$this->trans('commands.generate.permission.questions.restrict-access'),
$this->trans('commands.generate.permissions.questions.restrict-access'),
$boolOrNone,
'none'
);
Expand All @@ -53,7 +53,7 @@ public function permissionQuestion(DrupalStyle $output)
);

if (!$output->confirm(
$this->trans('commands.generate.permission.questions.add'),
$this->trans('commands.generate.permissions.questions.add'),
true
)
) {
Expand Down
18 changes: 9 additions & 9 deletions src/Command/Site/InstallCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -83,19 +83,19 @@ protected function configure()
'langcode',
null,
InputOption::VALUE_REQUIRED,
$this->trans('commands.site.install.options.langcode')
$this->trans('commands.site.install.arguments.langcode')
)
->addOption(
'db-type',
null,
InputOption::VALUE_REQUIRED,
$this->trans('commands.site.install.options.db-type')
$this->trans('commands.site.install.arguments.db-type')
)
->addOption(
'db-file',
null,
InputOption::VALUE_REQUIRED,
$this->trans('commands.site.install.options.db-file')
$this->trans('commands.site.install.arguments.db-file')
)
->addOption(
'db-host',
Expand Down Expand Up @@ -137,37 +137,37 @@ protected function configure()
'site-name',
null,
InputOption::VALUE_REQUIRED,
$this->trans('commands.site.install.options.site-name')
$this->trans('commands.site.install.arguments.site-name')
)
->addOption(
'site-mail',
null,
InputOption::VALUE_REQUIRED,
$this->trans('commands.site.install.options.site-mail')
$this->trans('commands.site.install.arguments.site-mail')
)
->addOption(
'account-name',
null,
InputOption::VALUE_REQUIRED,
$this->trans('commands.site.install.options.account-name')
$this->trans('commands.site.install.arguments.account-name')
)
->addOption(
'account-mail',
null,
InputOption::VALUE_REQUIRED,
$this->trans('commands.site.install.options.account-mail')
$this->trans('commands.site.install.arguments.account-mail')
)
->addOption(
'account-pass',
null,
InputOption::VALUE_REQUIRED,
$this->trans('commands.site.install.options.account-pass')
$this->trans('commands.site.install.arguments.account-pass')
)
->addOption(
'force',
null,
InputOption::VALUE_NONE,
$this->trans('commands.site.install.options.force')
$this->trans('commands.site.install.arguments.force')
)
->setAliases(['si']);
}
Expand Down
2 changes: 1 addition & 1 deletion src/Command/Site/MaintenanceCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ protected function configure()
->addArgument(
'mode',
InputArgument::REQUIRED,
$this->trans('commands.site.maintenance.arguments.mode').'[on/off]'
$this->trans('commands.site.maintenance.arguments.mode')
)
->setAliases(['sma']);
}
Expand Down
2 changes: 1 addition & 1 deletion src/Command/Theme/InstallCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ protected function configure()
->addArgument(
'theme',
InputArgument::IS_ARRAY,
$this->trans('commands.theme.install.options.module')
$this->trans('commands.theme.install.options.theme')
)
->addOption(
'set-default',
Expand Down
2 changes: 1 addition & 1 deletion src/Command/Theme/UninstallCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ protected function configure()
->addArgument(
'theme',
InputArgument::IS_ARRAY,
$this->trans('commands.theme.uninstall.options.module')
$this->trans('commands.theme.uninstall.options.theme')
)
->setAliases(['thu']);
}
Expand Down
6 changes: 3 additions & 3 deletions src/Command/User/RoleCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,17 +48,17 @@ protected function configure()
->addArgument(
'operation',
InputOption::VALUE_REQUIRED,
$this->trans('commands.user.role.operation')
$this->trans('commands.user.role.arguments.operation')
)
->addArgument(
'user',
InputOption::VALUE_REQUIRED,
$this->trans('commands.user.role.user')
$this->trans('commands.user.role.arguments.user')
)
->addArgument(
'role',
InputOption::VALUE_REQUIRED,
$this->trans('commands.user.role.role')
$this->trans('commands.user.role.arguments.roles')
)->setAliases(['ur']);
}

Expand Down
6 changes: 3 additions & 3 deletions src/Command/Views/DisableCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ protected function configure()
->addArgument(
'view-id',
InputArgument::OPTIONAL,
$this->trans('commands.views.debug.arguments.view-id')
$this->trans('commands.debug.views.arguments.view-id')
)
->setAliases(['vd']);
}
Expand All @@ -76,7 +76,7 @@ protected function interact(InputInterface $input, OutputInterface $output)
->condition('status', 1)
->execute();
$viewId = $io->choiceNoList(
$this->trans('commands.views.debug.arguments.view-id'),
$this->trans('commands.debug.views.arguments.view-id'),
$views
);
$input->setArgument('view-id', $viewId);
Expand All @@ -95,7 +95,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
$view = $this->entityTypeManager->getStorage('view')->load($viewId);

if (empty($view)) {
$io->error(sprintf($this->trans('commands.views.debug.messages.not-found'), $viewId));
$io->error(sprintf($this->trans('commands.debug.views.messages.not-found'), $viewId));

return 1;
}
Expand Down
6 changes: 3 additions & 3 deletions src/Command/Views/EnableCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ protected function configure()
->addArgument(
'view-id',
InputArgument::OPTIONAL,
$this->trans('commands.views.debug.arguments.view-id')
$this->trans('commands.debug.views.arguments.view-id')
)
->setAliases(['ve']);
}
Expand All @@ -77,7 +77,7 @@ protected function interact(InputInterface $input, OutputInterface $output)
->condition('status', 0)
->execute();
$viewId = $io->choiceNoList(
$this->trans('commands.views.debug.arguments.view-id'),
$this->trans('commands.debug.views.arguments.view-id'),
$views
);
$input->setArgument('view-id', $viewId);
Expand All @@ -97,7 +97,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
if (empty($view)) {
$io->error(
sprintf(
$this->trans('commands.views.debug.messages.not-found'),
$this->trans('commands.debug.views.messages.not-found'),
$viewId
)
);
Expand Down

0 comments on commit c70c139

Please sign in to comment.