2222use Symfony \Component \Console \Style \SymfonyStyle ;
2323use Symfony \Component \HttpKernel \Bundle \BundleInterface ;
2424use Symfony \Component \HttpKernel \KernelInterface ;
25- use Symfony \Component \Intl \Locales ;
2625use Symfony \Component \Translation \Catalogue \MergeOperation ;
2726use Symfony \Component \Translation \Catalogue \TargetOperation ;
2827use Symfony \Component \Translation \Extractor \ExtractorInterface ;
@@ -60,8 +59,9 @@ class TranslationUpdateCommand extends Command
6059 private $ defaultViewsPath ;
6160 private $ transPaths ;
6261 private $ codePaths ;
62+ private $ enabledLocales ;
6363
64- public function __construct (TranslationWriterInterface $ writer , TranslationReaderInterface $ reader , ExtractorInterface $ extractor , string $ defaultLocale , string $ defaultTransPath = null , string $ defaultViewsPath = null , array $ transPaths = [], array $ codePaths = [])
64+ public function __construct (TranslationWriterInterface $ writer , TranslationReaderInterface $ reader , ExtractorInterface $ extractor , string $ defaultLocale , string $ defaultTransPath = null , string $ defaultViewsPath = null , array $ transPaths = [], array $ codePaths = [], array $ enabledLocales = [] )
6565 {
6666 parent ::__construct ();
6767
@@ -73,6 +73,7 @@ public function __construct(TranslationWriterInterface $writer, TranslationReade
7373 $ this ->defaultViewsPath = $ defaultViewsPath ;
7474 $ this ->transPaths = $ transPaths ;
7575 $ this ->codePaths = $ codePaths ;
76+ $ this ->enabledLocales = $ enabledLocales ;
7677 }
7778
7879 /**
@@ -311,7 +312,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int
311312 public function complete (CompletionInput $ input , CompletionSuggestions $ suggestions ): void
312313 {
313314 if ($ input ->mustSuggestArgumentValuesFor ('locale ' )) {
314- $ suggestions ->suggestValues (Locales:: getLocales () );
315+ $ suggestions ->suggestValues ($ this -> enabledLocales );
315316
316317 return ;
317318 }
0 commit comments