Commit Graph

8 Commits

Author SHA1 Message Date
Julian Bäume
851a87ebf2 add some real world examples for c-strings in po files
make sure, if a file containing c-string messages is identical after being
parsed and written afterwards.
2014-03-05 11:37:48 +01:00
Julian Bäume
94f5f4a83e add reverse method of extract(string)
during PO.parse, an extract(string) method is called on each string to
unescape some characters (like " and \). This process should be reverted
in the toString method.

The PO spec says, that all strings should be C-Strings. Otherwise tools
like msgmerge (from the gettext package) will fail parsing po files written
by this library.
2014-03-05 10:13:30 +01:00
Gabe Gorelick
ac85ba0b9c Handle extracted comments 2014-03-02 13:17:20 -05:00
Gabe Gorelick
ada76116b0 Include comments in PO.Item output
Fixes #5
2014-03-02 12:41:40 -05:00
Julian Bäume
a5f3059661 fix default value of msgctxt field
I added a few more edge-cases to the tests for the new msgctxt field and
revealed a bug during that. The default value has been set to empty
string, but should have been null, since the spec says, this field is
optional.
2014-01-22 14:14:03 +01:00
Julian Bäume
c046b62873 implement writing msgctxt field
since the parser can extract this information, now, the writer should
also be able to write it back to a po file
2014-01-21 15:06:11 +01:00
Ruben Vermeersch
6b2cb2e71e Stop using util.format.
This will massively shrink the browserified footprint.
2013-12-18 16:46:09 +01:00
Ruben Vermeersch
0d4f80e7f6 Write flags out when serializing. 2013-12-17 16:35:40 +01:00