Skip to content

Commit c910a75

Browse files
committed
enhance the locale handling when linting translations
1 parent d9e378c commit c910a75

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Command/TranslationLintCommand.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ public function __construct(
4242

4343
public function complete(CompletionInput $input, CompletionSuggestions $suggestions): void
4444
{
45-
if ($input->mustSuggestOptionValuesFor('locales')) {
45+
if ($input->mustSuggestOptionValuesFor('locale')) {
4646
$suggestions->suggestValues($this->enabledLocales);
4747
}
4848
}
@@ -51,7 +51,7 @@ protected function configure(): void
5151
{
5252
$this
5353
->setDefinition([
54-
new InputOption('locales', null, InputOption::VALUE_OPTIONAL | InputOption::VALUE_IS_ARRAY, 'Specify the locales to lint.', $this->enabledLocales),
54+
new InputOption('locale', null, InputOption::VALUE_REQUIRED | InputOption::VALUE_IS_ARRAY, 'Specify the locales to lint.', $this->enabledLocales),
5555
])
5656
->setHelp(<<<'EOF'
5757
The <info>%command.name%</> command lint translations.
@@ -68,7 +68,7 @@ protected function initialize(InputInterface $input, OutputInterface $output): v
6868

6969
protected function execute(InputInterface $input, OutputInterface $output): int
7070
{
71-
$locales = $input->getOption('locales');
71+
$locales = $input->getOption('locale');
7272

7373
/** @var array<string, array<string, array<string, \Throwable>> $errors */
7474
$errors = [];

0 commit comments

Comments
 (0)