Skip to content

Conversation

@iamchanii
Copy link

@iamchanii iamchanii commented Jul 17, 2025

This replaces the custom regex-based PO parser with the pofile library to properly handle real-world PO files.

Changes

  • Use pofile npm package for parsing and serialization
  • Preserve file headers, comments, and metadata
  • Fix escaped quote handling in translation strings
  • Add tests for complex PO file features

Why

The current parser strips essential metadata such as comments for plurals and source location comments, breaking workflows with tools like Lingui.

The new implementation maintains the same API while properly supporting the full PO file specification.

@vercel
Copy link

vercel bot commented Jul 17, 2025

@iamchanii is attempting to deploy a commit to the Pontus Abrahamsson's projects Team on Vercel.

A member of the Team first needs to authorize it.

@iamchanii iamchanii changed the title Rewrite PoParser Refactoring PoParser Jul 17, 2025
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

Successfully merging this pull request may close these issues.

1 participant