smhg / gettext-parser

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

msgid duplicates behaviour #11

Closed cloud-walker closed 9 years ago

cloud-walker commented 9 years ago

If I got duplicate msgid's on my po the po.parse does not throw any exceptions...

For example:

# it.po
msgid "apple"
msgstr "mela"

msgid "apple"
msgstr "melania"

Compiles to:

it.compiled.po
msgid ""
msgstr "Content-Type: text/plain;\n"

msgid "apple"
msgstr "melania"

Keeping only the last msgid...

andris9 commented 9 years ago

Seems like a correct behavior to me

cloud-walker commented 9 years ago

Can you explain why? Thanks in advance.