Yarhl icon indicating copy to clipboard operation
Yarhl copied to clipboard

Fully support of Po specification

Open pleonex opened this issue 7 years ago • 0 comments

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

pleonex avatar Jan 29 '19 11:01 pleonex