Skip to content

Conversation

Aniketsy
Copy link

#1219
This PR fixes an issue where Babel would raise a valueError when encountering a blank or malformed field in .po file header.

Please provide feedback if my approach is not correct. I would love to improve and modify changes.

Thankyou!

@Aniketsy
Copy link
Author

hi @akx

Please review this PR and provide feedback ! If this needs any changes to fix the issue.

@tomasr8
Copy link
Member

tomasr8 commented Jul 27, 2025

I don't know what's the best approach for blank dates but I don't think we should be silently ignoring malformed dates.

@Aniketsy
Copy link
Author

@tomasr8
Thankyou for the review .
I would love to work on this and fix this issue .

Thanks again .

@akx
Copy link
Member

akx commented Jul 29, 2025

Hi @Aniketsy, thank you for the contribution!

As Tomas also said, I don't think it's a great idea to simply ignore invalid dates and cause silent data loss.

This is somewhat similar to #1185, where "strange" plural templates would be handled differently. We may want to do something like that here too, i.e. that you could always access and manipulate the original string value if needed, and it would be passed through as-is, even when not parseable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants