Skip to content
This repository was archived by the owner on Jan 30, 2026. It is now read-only.
This repository was archived by the owner on Jan 30, 2026. It is now read-only.

Fully support of Po specification #85

@pleonex

Description

@pleonex

According to the detailed specification from Pology, the current implementation of the Po format and its converter doesn't fully implement the PO specification. That specification is based on several years of experience so it looks legit.

Describe the solution you'd like
Features and fixes to implement:

  • File header comments as translator comments in the Po header
  • Use "Original" field instead of "Translated" if the fuzzy flag is present.
  • Convert flags into a collection to easily check, add and remove
  • Differenciate if a field is null or empty (empty context vs null context)
  • Remove the lang constructor argument to support Po templates (.pot)
  • Force UTF-8 encoding
  • Set fuzzy flag in a new Po header for showing it hasn't been translated yet
  • Set an extension header with the Po generator to Yarhl
  • Wrap all the comments (anything starting with #) to 80 columns. We will wrap original and translated with new lines.
  • Support obselete entries at the end of the file for removed entries: #~
  • Support reading multi-line wrapped comments
  • Write and read previous context and original with multi-lines
  • Escape tabs and backslashes
  • Support different line breaks: \r\n, \n, \r
  • Support of plural entries

All this features should be validated at least with Weblate and PoEditor.

Related to #80

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions