smhg / gettext-parser

Parse and compile gettext po and mo files, nothing more, nothing less
MIT License
158 stars 44 forks source link

compile should add a carriage return to the end of content #30

Closed mattkime closed 6 years ago

mattkime commented 7 years ago

this is nitpicky but nice to have -

i'd like the output of gettextParser.po.compile to append a carriage return to its output. This is to reduce the number of lines shown in diffs after content is added. without the carriage return the last line in the previous version is always shown as changed since it didn't have the carriage return.

if there's agreement i'll go ahead and create a PR

smhg commented 6 years ago

I quickly checked what both GNU's xgettext and Poedit do when working with po files and both seem to either not append a carriage return or remove it if already present. It sounds better to match their behavior I think. I'll close the issue for now, but feel free to contradict.