@@ -39,6 +39,7 @@ protected function configure()
39
39
new InputArgument ('locale ' , InputArgument::REQUIRED , 'The locale ' ),
40
40
new InputArgument ('bundle ' , InputArgument::OPTIONAL , 'The bundle name or directory where to load the messages, defaults to app/Resources folder ' ),
41
41
new InputOption ('prefix ' , null , InputOption::VALUE_OPTIONAL , 'Override the default prefix ' , '__ ' ),
42
+ new InputOption ('no-prefix ' , null , InputOption::VALUE_NONE , 'If set, no prefix is added to the translations ' ),
42
43
new InputOption ('output-format ' , null , InputOption::VALUE_OPTIONAL , 'Override the default output format ' , 'yml ' ),
43
44
new InputOption ('dump-messages ' , null , InputOption::VALUE_NONE , 'Should the messages be dumped in the console ' ),
44
45
new InputOption ('force ' , null , InputOption::VALUE_NONE , 'Should the update be done ' ),
@@ -132,9 +133,8 @@ protected function execute(InputInterface $input, OutputInterface $output)
132
133
// load any messages from templates
133
134
$ extractedCatalogue = new MessageCatalogue ($ input ->getArgument ('locale ' ));
134
135
$ io ->comment ('Parsing templates... ' );
135
- $ prefix = $ input ->getOption ('prefix ' );
136
136
$ extractor = $ this ->getContainer ()->get ('translation.extractor ' );
137
- $ extractor ->setPrefix (null === $ prefix ? '' : $ prefix );
137
+ $ extractor ->setPrefix ($ input -> getOption ( ' no- prefix' ) ? '' : $ input -> getOption ( ' prefix ' ) );
138
138
foreach ($ transPaths as $ path ) {
139
139
$ path .= 'views ' ;
140
140
if (is_dir ($ path )) {
0 commit comments