Skip to content
Raúl Ferràs edited this page Jan 22, 2015 · 8 revisions

###v4.2.0

  • Add function to add plural and context to existing entry (thanks @Ben-Ho)
  • Add ability to change msg id of entry (thanks @wildex)

###v4.1.1

  • Fixes with multi-flag entries (thanks to @gnouet).

###v4.1

  • Constructor now accepts options to define separator used in multiline msgid entries.
  • New method getOptions().

###v4.0

  • new methods parseString() and parseFile() replace the old `parse()``
  • new method writeFile() replaces the old write().
  • new method compile() which takes all parsed entries and coverts back to a PO formatted string.
  • updateEntry() allows now create new entries by passing true to $createNew argument.
  • Dropped compatibility with old named methods (read, update_entry and headers).

Upgrading instructions

Some backwards incompatible changes has been made:

  • Instead of parse($filepath) call now parseFile($filepath)
  • Instead of write($filepath) call now writeFile($filepath)
  • updateEntry() accepts a new argument $createNew which allows creating a new entry if msgid not found. Default false.

###v3.1.0

  • Adds support for #| comments #19 (thanks @Cellard)).
  • Properly parses entry flags (store them as an array in flags key instead of a string)

###v3.0.5

  • Fixes #18
  • Merges #16 (fixes classname casing)

###v3.0.4

  • Fix updating multiline plural messages (thanks @newage)
  • update_entry method now allows update translator comments and developer comments (thanks @newage)
  • Added travis and scrutinizer files (thanks @newage)

###v3.0.3

  • Project renamed to sepia/po-parser in composer.json

###v3.0.2

  • Changes to follow PSR-0

###v3.0.1

  • Po Header detection was too strict by expecting “Plural-Forms” to be present

###v3.0 Version 3.0 changes:

  • Library namespaced.
  • Adds composer support.
  • Includes some simple unit tests to better avoid regressions or detect errors.
  • Fixes an error when no header is found.

###v2.1 Version 2.1 has the following changes:

  • fixes errors when saving msgid_plurals (thanks @felixgilles).
  • Now it handles entries using msgctxt correctly by not merging them into a single entry.
  • Headers of some file headers were being ignored because of a too strict check.
  • A new method is introduced to read file headers: headers().

###v2.0 Version 2.0 introduces a lot of bug fixes, mainly related to multiline entries. I also decide to change class name to something more semantic (PoParser) as I felt old name was not well suited.
Check read documentation to look for changes in data returned.

  • Class name changed to PoParser.
  • Improve reading of multiline entries.
  • Fix ending quotes being removed on multiline msgid and msgstr.
  • Possible bug with msg_id_plural.
  • read method throws Exception if an error occurs.
  • Translator and source code Multiline comments are properly parsed.

###v1.0

  • First version.
Clone this wiki locally