I think I maybe found a bug on…

I think I maybe found a bug on glotpress, or at least, at my setup. We’re using Glotpress to translate our project (a PHP CMS), we use php-gettext. Problem is that sometimes there’re more than 1 translation per each original, but they are empty, so line 112 of pomo/mo.php ( return implode(chr(0), $entry->translations); ) adds a null character among them (When exporting as a .MO file). You end with a string like “This is my string” (null is represented by “”), and in our cms it appear as “This is my string”. On the other side .PO file is fine, if I open it with poedit and save it, the .mo file works fine with out php-code.

I’m not a gettext/mo expert, so I really don’t know if :
A) Problem is in our code (we didn’t manage multiple translation per original)
B) The problem is on the php-gettext library
C) GP should not export empty strings as translations

Our current workaround is to return only the first translation : return $entry->translations[0]; But again, since I’m not an expert, not sure if this is correct.