Skip to content

Commit

Permalink
Merge pull request #335 from wimvds/set-xlf-as-default
Browse files Browse the repository at this point in the history
Set xlf as default file format
  • Loading branch information
benjamin-hubert committed Apr 1, 2016
2 parents c7555f1 + 80e5018 commit ac09e3d
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions Changelog.md
Expand Up @@ -4,6 +4,7 @@
### 1.2.1 to next release

* Support nikic/php-parser 1.4.x and 2.0.x
* Set XLF as default output format of the ExtractTranslationCommand

### 1.2.0 to 1.2.1

Expand Down
2 changes: 1 addition & 1 deletion Command/ExtractTranslationCommand.php
Expand Up @@ -53,7 +53,7 @@ protected function configure()
->addOption('output-dir', null, InputOption::VALUE_REQUIRED, 'The directory where files should be written to.')
->addOption('dry-run', null, InputOption::VALUE_NONE, 'When specified, changes are _NOT_ persisted to disk.')
->addOption('output-format', null, InputOption::VALUE_REQUIRED, 'The output format that should be used (in most cases, it is better to change only the default-output-format).')
->addOption('default-output-format', null, InputOption::VALUE_REQUIRED, 'The default output format (defaults to xliff).')
->addOption('default-output-format', null, InputOption::VALUE_REQUIRED, 'The default output format (defaults to xlf).')
->addOption('keep', null, InputOption::VALUE_NONE, 'Define if the updater service should keep the old translation (defaults to false).')
->addOption('external-translations-dir', null, InputOption::VALUE_IS_ARRAY | InputOption::VALUE_REQUIRED , 'Load external translation ressources')
;
Expand Down
4 changes: 2 additions & 2 deletions Tests/Functional/Command/ExtractCommandTest.php
Expand Up @@ -42,13 +42,13 @@ public function testExtract()
.'Directories: '.$inputDir."\n"
.'Excluded Directories: Tests'."\n"
.'Excluded Names: *Test.php, *TestCase.php'."\n"
.'Output-Format: # whatever is present, if nothing then xliff #'."\n"
.'Output-Format: # whatever is present, if nothing then xlf #'."\n"
.'Custom Extractors: # none #'."\n"
.'============================================================'."\n"
.'Loading catalogues from "'.$outputDir.'"'."\n"
.'Extracting translation keys'."\n"
.'Extracting messages from directory : '.$inputDir."\n"
.'Writing translation file "'.$outputDir.'/messages.en.xliff".'."\n"
.'Writing translation file "'.$outputDir.'/messages.en.xlf".'."\n"
.'done!'."\n"
;

Expand Down
2 changes: 1 addition & 1 deletion Translation/ConfigBuilder.php
Expand Up @@ -25,7 +25,7 @@ final class ConfigBuilder
private $ignoredDomains = array();
private $domains = array();
private $outputFormat;
private $defaultOutputFormat = 'xliff';
private $defaultOutputFormat = 'xlf';
private $scanDirs = array();
private $excludedDirs = array('Tests');
private $excludedNames = array('*Test.php', '*TestCase.php');
Expand Down

0 comments on commit ac09e3d

Please sign in to comment.