Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions src/Application.php
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
Expand All @@ -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();
Expand Down
11 changes: 11 additions & 0 deletions src/Command/UtilTranslationsExtract.php
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down