polib
polib copied to clipboard
Add ignore_errors parameter to polib.pofile
Problem
In my use case I use polib.pofile to calculate the number of words in large collections of PO files.
What happens is that as soon polib finds error it throws an IOError and stops parsing the rest of the file
Suggested solution
It will be great that if pofile supports an ignore_errors which changes the behaviour and continues to parse the file ignoring the error. I will expect by default to False, and then to enabling doing:
polib.pofile("file.po", _ignore_errors_ = True)
If this is something interesting, I will be willing to provide a PR to add this optional behaviour