1. Library doesn't handle same msgid with different msgctxt properly. It should distinct them. See https://www.gnu.org/software/gettext/manual/html_node/PO-Files.html for details. 2. It also mishandle succeeding strings without white-space line between. See bug 10424, comment 10, 11 and 15 for more information. Reproducible: Steps to Reproduce:
Created attachment 5763 [details] Sample for same msgid with different msgctxt
Status: NEW => ASSIGNEDCC: (none) => filip.komarAssignee: atelier-bugs => filip.komar
Created attachment 5764 [details] Sample for strings w/o white-space
URL: (none) => http://gitweb.mageia.org/web/nav/log/php-mo.php
commit ad791614f4a8f6fc83f9868bc1a9105b6795104d Author: filip <filip.komar@...> Date: Tue Aug 25 23:11:12 2015 +0200 bugfix for mga#14899 (proper handling of gettext files) details in bug report --- Commit Link: http://gitweb.mageia.org/web/nav/commit/?id=ad791614f4a8f6fc83f9868bc1a9105b6795104d
commit 5764610c84d44790dff8bebfc503cb6d2b1696f7 Author: filip <filip.komar@...> Date: Tue Aug 25 23:13:42 2015 +0200 bugfix for mga#14899 --- Commit Link: http://gitweb.mageia.org/web/www/commit/?id=5764610c84d44790dff8bebfc503cb6d2b1696f7
Created attachment 6966 [details] Sample for same msgid with different msgctxt
Attachment 5763 is obsolete: 0 => 1
Created attachment 6967 [details] Sample for strings with no empty line
Attachment 5764 is obsolete: 0 => 1
Created attachment 6968 [details] Sample with commented fuzzy string
Created attachment 6969 [details] Sample with one normal and one fuzzy string
Created attachment 6970 [details] Sample with msgid_plural strings
Created attachment 6971 [details] test cases webpage for bugs of php.mo 0.1 by Joss Crowcroft You need to add php.mo library with the name php-mo_new.php to the same directory as the page and sample files. Page will show each parsed array and difference from expected result.
Besides two points from Description (same msgid with different msgctxt and strings with no empty line) there was even more bugs: At least commented fuzzy string bug (See bug 10424) and not the best handling of msgid_plural strings. See the source of improved code in comment #3 and comment #4 for the structure of the resulting array.
Status: ASSIGNED => RESOLVEDResolution: (none) => FIXED
Created attachment 8264 [details] test cases webpage updated testing webpage due to changed to a more consistent structure of resulting php array from phpmo library
Attachment 6971 is obsolete: 0 => 1