Skip to content

Commit 0a340be

Browse files
committed
bug symfony#57650 [Translation] enhance the locale handling when linting translations (xabbuh)
This PR was merged into the 7.2 branch. Discussion ---------- [Translation] enhance the locale handling when linting translations | Q | A | ------------- | --- | Branch? | 7.2 | Bug fix? | no | New feature? | no | Deprecations? | no | Issues | Fix symfony#57101 (comment) | License | MIT Commits ------- 27e9faa enhance the locale handling when linting translations
2 parents 3a3f55c + 27e9faa commit 0a340be

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/Symfony/Component/Translation/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)