smhg / gettext-parser

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

Added sort option for po.compile #31

Closed AlexMost closed 6 years ago

AlexMost commented 7 years ago

This PR adds sorting to the resulting .po(.pot) file by msgid.

Sorting can be handy for avoiding merge conflicts in .po(.pot) files. Currently working on this tool - https://c-3po.js.org/ and using gettext-parser for creating .po(.pot) files and have this feature request to add sorting option.

You can check this issue for other details.

smhg commented 6 years ago

(I have no idea why this repo still doesn't send me notifications - maybe because it was moved to me)

Thank you for this feature! It looks good to me. Can you update with the changes in master though? And maybe move the compare function outside of compile, to the top of the file.

Thanks again!

smhg commented 6 years ago

Just to be clear: use the options in the README instead of compileOptions when you merge.

smhg commented 6 years ago

@AlexMost any chance you'd be able to update the PR? Would be great to create a new release with this feature.

AlexMost commented 6 years ago

@smhg oh, sorry for the delay, I have completely forgotten about this PR, will try to update it ASAP.

AlexMost commented 6 years ago

@smhg master is merged, looks like the tests are green.

smhg commented 6 years ago

Thanks a lot!