protected void addPOEntry ( final String tag , final String source , final String translation , final boolean fuzzy , final StringBuilder poFile ) { // perform a check to make sure the source isn't an empty string, as this could be the case after removing the comments if ( source == null || source . length ( ) == 0 ) return ; poFile . append ( "\n" ) ; if ( ! isNullOrEmpty ( tag ) ) { poFile . append ( "#. Tag: " ) . append ( tag ) . append ( "\n" ) ; } if ( fuzzy ) { poFile . append ( "#, fuzzy\n" ) ; } poFile . append ( "#, no-c-format\n" ) . append ( "msgid \"" ) . append ( escapeForPOFile ( source , true ) ) . append ( "\"\n" ) . append ( "msgstr \"" ) . append ( escapeForPOFile ( translation , false ) ) . append ( "\"\n" ) ; }
Add an entry to a PO file .