19 public function __construct() {
20 parent::__construct();
21 $this->addDescription(
'Expands a message group specification.' );
24 'List only groups that can be exported',
31 'For example page-*,main',
34 $this->requireExtension(
'Translate' );
37 public function execute() {
38 $spec = $this->getArg( 0 );
39 $patterns = explode(
',', trim( $spec ) );
40 $ids = MessageGroups::expandWildcards( $patterns );
42 if ( $this->getOption(
'exportable' ) ) {
43 foreach ( $ids as $index => $id ) {
45 unset( $ids[ $index ] );
52 echo implode(
"\n", $ids ) .
"\n";