diff --git a/src/Application.php b/src/Application.php index 1c8f355f6..511a8072e 100644 --- a/src/Application.php +++ b/src/Application.php @@ -41,8 +41,10 @@ public function getHelp(): string */ protected function getDefaultCommands(): array { - $commands = [ + //$commands = [ + $commands = array_merge(parent::getDefaultCommands(), [ new \Symfony\Component\Console\Command\HelpCommand(), + new \Symfony\Component\Console\Command\CompleteCommand(), new Command\NewSite(), new Command\NewPage(), new Command\OpenWith(), @@ -57,7 +59,8 @@ protected function getDefaultCommands(): array new Command\ShowConfig(), new Command\ListCommand(), new Command\UtilTranslationsExtract() - ]; + //]; + ]); if (Util\Platform::isPhar()) { $commands[] = new Command\SelfUpdate(); $commands[] = new Command\UtilTemplatesExtract(); diff --git a/src/Command/UtilTranslationsExtract.php b/src/Command/UtilTranslationsExtract.php index 59c57cf09..a275b31c2 100644 --- a/src/Command/UtilTranslationsExtract.php +++ b/src/Command/UtilTranslationsExtract.php @@ -49,6 +49,17 @@ protected function configure(): void new InputOption('save', null, InputOption::VALUE_NONE, 'Should the extract be done'), new InputOption('format', null, InputOption::VALUE_OPTIONAL, 'Override the default output format', 'po'), new InputOption('theme', null, InputOption::VALUE_OPTIONAL, 'Use if you want to translate a theme layouts too'), + new InputOption( + 'theme', + null, + InputOption::VALUE_REQUIRED, + 'Merge translation messages from a given theme', + null, + function (): array { + $availableThemes = $this->getBuilder()->getConfig()->getTheme(); + return $availableThemes; + } + ), ]) ->setHelp( <<<'EOF'