@@ -73,6 +73,7 @@ protected function configure()
73
73
new InputOption ('no-backup ' , null , InputOption::VALUE_NONE , 'Should backup be disabled ' ),
74
74
new InputOption ('clean ' , null , InputOption::VALUE_NONE , 'Should clean not found messages ' ),
75
75
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 ' ),
76
77
])
77
78
->setDescription ('Updates the translation file ' )
78
79
->setHelp (<<<'EOF'
@@ -262,7 +263,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
262
263
}
263
264
264
265
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 ' )) );
266
267
}
267
268
268
269
$ resultMessage = sprintf ('%d message%s successfully extracted ' , $ extractedMessagesCount , $ extractedMessagesCount > 1 ? 's were ' : ' was ' );
@@ -287,7 +288,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
287
288
$ bundleTransPath = end ($ transPaths );
288
289
}
289
290
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 ' ) ]);
291
292
292
293
if (true === $ input ->getOption ('dump-messages ' )) {
293
294
$ resultMessage .= ' and translation files were updated ' ;
0 commit comments