21 public function __construct() {
22 parent::__construct();
23 $this->addDescription(
'Expands a message group specification.' );
26 'List only groups that can be exported',
33 'For example page-*,main',
36 $this->requireExtension(
'Translate' );
39 public function execute() {
40 $spec = $this->getArg( 0 );
41 $patterns = explode(
',', trim( $spec ) );
42 $ids = MessageGroups::expandWildcards( $patterns );
44 if ( $this->getOption(
'exportable' ) ) {
45 foreach ( $ids as $index => $id ) {
47 unset( $ids[ $index ] );
54 echo implode(
"\n", $ids ) .
"\n";