@@ -73,6 +73,7 @@ protected function configure()
7373 new InputOption ('no-backup ' , null , InputOption::VALUE_NONE , 'Should backup be disabled ' ),
7474 new InputOption ('clean ' , null , InputOption::VALUE_NONE , 'Should clean not found messages ' ),
7575 new InputOption ('domain ' , null , InputOption::VALUE_OPTIONAL , 'Specify the domain to update ' ),
76+ new InputOption ('xliff-version ' , null , InputOption::VALUE_OPTIONAL , 'Override the default xliff version ' , '1.2 ' ),
7677 ])
7778 ->setDescription ('Updates the translation file ' )
7879 ->setHelp (<<<'EOF'
@@ -262,7 +263,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
262263 }
263264
264265 if ('xlf ' === $ input ->getOption ('output-format ' )) {
265- $ errorIo ->comment ('Xliff output version is <info>1.2 </info> ' );
266+ $ errorIo ->comment (sprintf ( 'Xliff output version is <info>%s </info> ' , $ input -> getOption ( ' xliff-version ' )) );
266267 }
267268
268269 $ resultMessage = sprintf ('%d message%s successfully extracted ' , $ extractedMessagesCount , $ extractedMessagesCount > 1 ? 's were ' : ' was ' );
@@ -287,7 +288,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
287288 $ bundleTransPath = end ($ transPaths );
288289 }
289290
290- $ this ->writer ->write ($ operation ->getResult (), $ input ->getOption ('output-format ' ), ['path ' => $ bundleTransPath , 'default_locale ' => $ this ->defaultLocale ]);
291+ $ this ->writer ->write ($ operation ->getResult (), $ input ->getOption ('output-format ' ), ['path ' => $ bundleTransPath , 'default_locale ' => $ this ->defaultLocale , ' xliff_version ' => $ input -> getOption ( ' xliff-version ' ) ]);
291292
292293 if (true === $ input ->getOption ('dump-messages ' )) {
293294 $ resultMessage .= ' and translation files were updated ' ;
0 commit comments