Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ignore_errors parameter to polib.pofile #148

Open
jordimas opened this issue Nov 1, 2023 · 0 comments
Open

Add ignore_errors parameter to polib.pofile #148

jordimas opened this issue Nov 1, 2023 · 0 comments

Comments

@jordimas
Copy link

jordimas commented Nov 1, 2023

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

@jordimas jordimas changed the title Add ignore_errors to polib.pofile Add ignore_errors parameter to polib.pofile Nov 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant