protected static function is_final( $context ) { return ( 'msgstr' ===
$context ) || ( 'msgstr_plural' ===
$context );
} /**
* @param resource $f
* @param int $lineno
* @return null|false|array
*/
public function read_entry( $f,
$lineno = 0
) { $entry =
new Translation_Entry();
// Where were we in the last step.
// Can be: comment, msgctxt, msgid, msgid_plural, msgstr, msgstr_plural.
$context = '';
$msgstr_index = 0;
while ( true
) { $lineno++;
$line = PO::
read_line( $f );
if ( !
$line ) { if ( feof( $f ) ) { if ( self::
is_final( $context ) ) { break;
}