def to_s
      str = String.new('')

      # Add comments
      str = add_comment(str, ':', @references.join(' ')) if references?
      str = add_comment(str, ',', @flags.join("\n")) if flags?

      # Add id and context
      str = add_string(str, 'msgctxt', @msgctxt) if @msgctxt
      str = add_string(str, 'msgid', @msgid)
      str = add_string(str, 'msgid_plural', @msgid_plural) if plural?
      str = add_translations(str)

      str
    end
def to_s
      str = String.new('')

      # Add comments
      str = add_comment(str, ':', @references.join(' ')) if references?
      str = add_comment(str, ',', @flags.join("\n")) if flags?

      # Add id and context
      str = add_string(str, 'msgctxt', @msgctxt) if @msgctxt
      str = add_string(str, 'msgid', @msgid)
      str = add_string(str, 'msgid_plural', @msgid_plural) if plural?
      str = add_translations(str)

      str
    end
Create a new POEntry

 @param [Hash] attrs
 @option attrs [String] :msgid the id of the string (the string that needs
   to be translated). Can include a context, separated from the id by
   {NS_SEPARATOR} or by the specified :separator.
 @option attrs [String] :msgid_plural the pluralized id of the string (the
   pluralized string that needs to be translated).
 @option attrs [String] :msgctxt the context of the string.
 @option attrs [Array<String>] :msgstr the translated strings.
 @option attrs [Array<String>] :references a list of files with line
   numbers, pointing to where the string was found.
 @option attrs [Array<String>] :flags a list of flags for this entry.
 @option attrs [String] :separator the separator of context from id in
   :msgid.
 Convert the entry to a string representation, to be written to a .po file
 @return [String] a string representation of the entry.