Skip to content

Commit

Permalink
Replacing in translation key from _ to - (#3422)
Browse files Browse the repository at this point in the history
  • Loading branch information
blasvicco authored and enzolutions committed Jul 12, 2017
1 parent d4acb53 commit e7f2bee
Show file tree
Hide file tree
Showing 11 changed files with 23 additions and 23 deletions.
2 changes: 1 addition & 1 deletion src/Command/Cache/RebuildCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
if ($cache && !$this->drupalApi->isValidCache($cache)) {
$io->error(
sprintf(
$this->trans('commands.cache.rebuild.messages.invalid_cache'),
$this->trans('commands.cache.rebuild.messages.invalid-cache'),
$cache
)
);
Expand Down
2 changes: 1 addition & 1 deletion src/Command/Config/ExportContentTypeCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ protected function execute(InputInterface $input, OutputInterface $output)

$this->getViewDisplays($contentType, $optionalConfig);

$this->exportConfigToModule($module, $io, $this->trans('commands.config.export.content.type.messages.content_type_exported'));
$this->exportConfigToModule($module, $io, $this->trans('commands.config.export.content.type.messages.content-type-exported'));
}

protected function getFields($contentType, $optional = false)
Expand Down
2 changes: 1 addition & 1 deletion src/Command/Config/ExportViewCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,6 @@ protected function execute(InputInterface $input, OutputInterface $output)
}
}

$this->exportConfigToModule($module, $io, $this->trans('commands.views.export.messages.view_exported'));
$this->exportConfigToModule($module, $io, $this->trans('commands.views.export.messages.view-exported'));
}
}
6 changes: 3 additions & 3 deletions src/Command/Debug/ContainerCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,8 @@ protected function execute(InputInterface $input, OutputInterface $output)
}

$tableHeader = [
$this->trans('commands.debug.container.messages.service_id'),
$this->trans('commands.debug.container.messages.class_name')
$this->trans('commands.debug.container.messages.service-id'),
$this->trans('commands.debug.container.messages.class-name')
];

$tableRows = $this->getServiceList();
Expand All @@ -114,7 +114,7 @@ private function getCallbackReturnList($service, $method, $args)
$serviceInstance = \Drupal::service($service);

if (!method_exists($serviceInstance, $method)) {
throw new \Symfony\Component\DependencyInjection\Exception\BadMethodCallException($this->trans('commands.debug.container.errors.method_not_exists'));
throw new \Symfony\Component\DependencyInjection\Exception\BadMethodCallException($this->trans('commands.debug.container.errors.method-not-exists'));

return $serviceDetail;
}
Expand Down
2 changes: 1 addition & 1 deletion src/Command/Debug/FeaturesCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
$tableHeader = [
$this->trans('commands.debug.features.messages.bundle'),
$this->trans('commands.debug.features.messages.name'),
$this->trans('commands.debug.features.messages.machine_name'),
$this->trans('commands.debug.features.messages.machine-name'),
$this->trans('commands.debug.features.messages.status'),
$this->trans('commands.debug.features.messages.state'),
];
Expand Down
8 changes: 4 additions & 4 deletions src/Command/Debug/RestCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ private function restDetail(DrupalStyle $io, $resource_id)
(string) $resource['label']
];
$configuration[] = [
$this->trans('commands.debug.rest.messages.canonical_url'),
$this->trans('commands.debug.rest.messages.canonical-url'),
$resource['uri_paths']['canonical']
];
$configuration[] = [
Expand All @@ -132,15 +132,15 @@ private function restDetail(DrupalStyle $io, $resource_id)
$tableHeader = [
$this->trans('commands.debug.rest.messages.rest-state'),
$this->trans('commands.debug.rest.messages.supported-formats'),
$this->trans('commands.debug.rest.messages.supported_auth'),
$this->trans('commands.debug.rest.messages.supported-auth'),
];

$tableRows = [];
foreach ($config[$resource['id']] as $method => $settings) {
$tableRows[] = [
$method,
implode(', ', $settings['supported_formats']),
implode(', ', $settings['supported_auth']),
implode(', ', $settings['supported-auth']),
];
}

Expand All @@ -154,7 +154,7 @@ protected function restList(DrupalStyle $io, $status)
$tableHeader = [
$this->trans('commands.debug.rest.messages.id'),
$this->trans('commands.debug.rest.messages.label'),
$this->trans('commands.debug.rest.messages.canonical_url'),
$this->trans('commands.debug.rest.messages.canonical-url'),
$this->trans('commands.debug.rest.messages.status'),
$this->trans('commands.debug.rest.messages.provider'),
];
Expand Down
4 changes: 2 additions & 2 deletions src/Command/Migrate/ExecuteCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ protected function configure()
'source-base_path',
null,
InputOption::VALUE_OPTIONAL,
$this->trans('commands.migrate.execute.options.source-base_path')
$this->trans('commands.migrate.execute.options.source-base-path')
)
->setAliases(['mie']);
;
Expand Down Expand Up @@ -274,7 +274,7 @@ protected function interact(InputInterface $input, OutputInterface $output)
$sourceBasepath = $input->getOption('source-base_path');
if (!$sourceBasepath) {
$sourceBasepath = $io->ask(
$this->trans('commands.migrate.setup.questions.source-base_path'),
$this->trans('commands.migrate.setup.questions.source-base-path'),
''
);
$input->setOption('source-base_path', $sourceBasepath);
Expand Down
4 changes: 2 additions & 2 deletions src/Command/Migrate/RollBackCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ protected function configure()
'source-base_path',
null,
InputOption::VALUE_OPTIONAL,
$this->trans('commands.migrate.setup.options.source-base_path')
$this->trans('commands.migrate.setup.options.source-base-path')
)->setAliases(['mir']);
;
}
Expand Down Expand Up @@ -175,7 +175,7 @@ protected function interact(InputInterface $input, OutputInterface $output)
$sourceBasepath = $input->getOption('source-base_path');
if (!$sourceBasepath) {
$sourceBasepath = $io->ask(
$this->trans('commands.migrate.setup.questions.source-base_path'),
$this->trans('commands.migrate.setup.questions.source-base-path'),
''
);
$input->setOption('source-base_path', $sourceBasepath);
Expand Down
4 changes: 2 additions & 2 deletions src/Command/Migrate/SetupCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ protected function configure()
'source-base_path',
null,
InputOption::VALUE_OPTIONAL,
$this->trans('commands.migrate.setup.options.source-base_path')
$this->trans('commands.migrate.setup.options.source-base-path')
)->setAliases(['mis']);
;
}
Expand Down Expand Up @@ -174,7 +174,7 @@ protected function interact(InputInterface $input, OutputInterface $output)
$sourceBasepath = $input->getOption('source-base_path');
if (!$sourceBasepath) {
$sourceBasepath = $io->ask(
$this->trans('commands.migrate.setup.questions.source-base_path'),
$this->trans('commands.migrate.setup.questions.source-base-path'),
''
);
$input->setOption('source-base_path', $sourceBasepath);
Expand Down
2 changes: 1 addition & 1 deletion src/Command/Shared/FormTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ public function formQuestion(DrupalStyle $io)
$input_machine_name = $this->stringConverter->createMachineName($input_label);

$input_name = $io->ask(
$this->trans('commands.common.questions.inputs.machine_name'),
$this->trans('commands.common.questions.inputs.machine-name'),
$input_machine_name
);

Expand Down
10 changes: 5 additions & 5 deletions src/Command/Site/StatusCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ protected function getSystemData()
} catch (\Exception $e) {
$hashSalt = '';
}
$systemData['system'][$this->trans('commands.site.status.messages.hash_salt')] = $hashSalt;
$systemData['system'][$this->trans('commands.site.status.messages.hash-salt')] = $hashSalt;
$systemData['system'][$this->trans('commands.site.status.messages.console')] = $this->getApplication()->getVersion();
}

Expand Down Expand Up @@ -239,10 +239,10 @@ protected function getDirectoryData()

return [
'directory' => [
$this->trans('commands.site.status.messages.directory_root') => $this->appRoot,
$this->trans('commands.site.status.messages.directory_temporary') => $systemFile->get('path.temporary'),
$this->trans('commands.site.status.messages.directory_theme_default') => $themeDefaultDirectory,
$this->trans('commands.site.status.messages.directory_theme_admin') => $themeAdminDirectory,
$this->trans('commands.site.status.messages.directory-root') => $this->appRoot,
$this->trans('commands.site.status.messages.directory-temporary') => $systemFile->get('path.temporary'),
$this->trans('commands.site.status.messages.directory-theme-default') => $themeDefaultDirectory,
$this->trans('commands.site.status.messages.directory-theme-admin') => $themeAdminDirectory,
],
];
}
Expand Down

0 comments on commit e7f2bee

Please sign in to comment.