symfony/symfony — pull request #4249 by clemens-tolboom (2012-05-10 13:55:05+00:00)
Title: Trans2drupal

This patch fixes some parsing problems and add a (RFC) PO Header property to PoFileLoader.

When items from the PO file are not separated by whitespace (which is optional according to the specs) they are not properly parsed or added to the messages. The last item was only added when being followed by two newlines.

To test all these three new fixtures are added.
- a minimal PO file with 1 item without whitespace before and after.
- a multiline PO file as an extra test
- a PO file with only a header

The Header is useful for Drupal (we currently will use that for http://drupal.org/node/1570346)
```php
$catalogue = $loader->load($resource, $langcode);
$header = $loader->getHeader();
```
so I hope that gets in too :)