File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ class PhpCode extends Extractor implements ExtractorInterface
1414 // - false: to not extract comments
1515 // - empty string: to extract all comments
1616 // - non-empty string: to extract comments that start with that string
17- 'extractComments ' => '' ,
17+ 'extractComments ' => false ,
1818
1919 'functions ' => [
2020 'gettext ' => 'gettext ' ,
Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ class Csv extends Generator implements GeneratorInterface
1313 use HeadersGeneratorTrait;
1414
1515 public static $ options = [
16- 'includeHeaders ' => true ,
16+ 'includeHeaders ' => false ,
1717 ];
1818
1919 /**
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ class Json extends Generator implements GeneratorInterface
1111
1212 public static $ options = [
1313 'json ' => 0 ,
14- 'includeHeaders ' => true ,
14+ 'includeHeaders ' => false ,
1515 ];
1616
1717 /**
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ class Yaml extends Generator implements GeneratorInterface
1111 use MultidimensionalArrayTrait;
1212
1313 public static $ options = [
14- 'includeHeaders ' => true ,
14+ 'includeHeaders ' => false ,
1515 'indent ' => 2 ,
1616 'inline ' => 4 ,
1717 ];
Original file line number Diff line number Diff line change @@ -70,6 +70,7 @@ class Translations extends \ArrayObject
7070 'Content-Type ' => 'text/plain; charset=UTF-8 ' ,
7171 'Content-Transfer-Encoding ' => '8bit ' ,
7272 ],
73+ 'headersSorting ' => false ,
7374 'defaultDateHeaders ' => [
7475 'POT-Creation-Date ' ,
7576 'PO-Revision-Date ' ,
@@ -246,7 +247,9 @@ public function getHeader($name)
246247 */
247248 public function getHeaders ()
248249 {
249- ksort ($ this ->headers );
250+ if (static ::$ options ['headersSorting ' ]) {
251+ ksort ($ this ->headers );
252+ }
250253
251254 return $ this ->headers ;
252255 }
Original file line number Diff line number Diff line change 88
99//Config
1010Gettext \Translations::$ options ['defaultDateHeaders ' ] = [];
11+ Gettext \Translations::$ options ['headersSorting ' ] = true ;
12+
13+ Gettext \Extractors \PhpCode::$ options ['extractComments ' ] = '' ;
14+
15+ Gettext \Generators \Csv::$ options ['includeHeaders ' ] = true ;
16+
1117Gettext \Generators \Jed::$ options ['json ' ] = JSON_PRETTY_PRINT ;
18+
1219Gettext \Generators \Json::$ options ['json ' ] = JSON_PRETTY_PRINT ;
20+ Gettext \Generators \Json::$ options ['includeHeaders ' ] = true ;
21+
1322Gettext \Generators \JsonDictionary::$ options ['json ' ] = JSON_PRETTY_PRINT ;
23+
24+ Gettext \Generators \Yaml::$ options ['includeHeaders ' ] = true ;
You can’t perform that action at this time.
0 commit comments