func (p Header) String() string {
	var buf bytes.Buffer
	fmt.Fprintf(&buf, `msgid ""`+"\n")
	fmt.Fprintf(&buf, `msgstr ""`+"\n")
	fmt.Fprintf(&buf, `"%s: %s\n"`+"\n", "Project-Id-Version", p.ProjectIdVersion)
	fmt.Fprintf(&buf, `"%s: %s\n"`+"\n", "Report-Msgid-Bugs-To", p.ReportMsgidBugsTo)
	fmt.Fprintf(&buf, `"%s: %s\n"`+"\n", "POT-Creation-Date", p.POTCreationDate)
	fmt.Fprintf(&buf, `"%s: %s\n"`+"\n", "PO-Revision-Date", p.PORevisionDate)
	fmt.Fprintf(&buf, `"%s: %s\n"`+"\n", "Last-Translator", p.LastTranslator)
	fmt.Fprintf(&buf, `"%s: %s\n"`+"\n", "Language-Team", p.LanguageTeam)
	fmt.Fprintf(&buf, `"%s: %s\n"`+"\n", "Language", p.Language)
	if p.MimeVersion != "" {
		fmt.Fprintf(&buf, `"%s: %s\n"`+"\n", "MIME-Version", p.MimeVersion)
	}
	fmt.Fprintf(&buf, `"%s: %s\n"`+"\n", "Content-Type", p.ContentType)
	fmt.Fprintf(&buf, `"%s: %s\n"`+"\n", "Content-Transfer-Encoding", p.ContentTransferEncoding)
	if p.XGenerator != "" {
		fmt.Fprintf(&buf, `"%s: %s\n"`+"\n", "X-Generator", p.XGenerator)
	}
	for k, v := range p.UnknowFields {
		fmt.Fprintf(&buf, `"%s: %s\n"`+"\n", k, v)
	}
	return buf.String()
}
String returns the po format header string.
package mo
import (
	"bytes"
	"fmt"
	"strings"
)
type Header struct {
	ProjectIdVersion        string  
	ReportMsgidBugsTo       string  
	POTCreationDate         string  
	PORevisionDate          string  
	LastTranslator          string  
	LanguageTeam            string  
	Language                string  
	MimeVersion             string  
	ContentType             string  
	ContentTransferEncoding string  
	PluralForms             string  
	XGenerator              string  
	UnknowFields            map[string]string
}
func (p *Header) fromMessage(msg *Message) {
	if msg.MsgId != "" || msg.MsgStr == "" {
		return
	}
	lines := strings.Split(msg.MsgStr, "\n")
	for i := 0; i < len(lines); i++ {
		idx := strings.Index(lines[i], ":")
		if idx < 0 {
			continue
		}
		key := strings.TrimSpace(lines[i][:idx])
		val := strings.TrimSpace(lines[i][idx+1:])
		switch strings.ToUpper(key) {
		case strings.ToUpper("Project-Id-Version"):
			p.ProjectIdVersion = val
		case strings.ToUpper("Report-Msgid-Bugs-To"):
			p.ReportMsgidBugsTo = val
		case strings.ToUpper("POT-Creation-Date"):
			p.POTCreationDate = val
		case strings.ToUpper("PO-Revision-Date"):
			p.PORevisionDate = val
		case strings.ToUpper("Last-Translator"):
			p.LastTranslator = val
		case strings.ToUpper("Language-Team"):
			p.LanguageTeam = val
		case strings.ToUpper("Language"):
			p.Language = val
		case strings.ToUpper("MIME-Version"):
			p.MimeVersion = val
		case strings.ToUpper("Content-Type"):
			p.ContentType = val
		case strings.ToUpper("Content-Transfer-Encoding"):
			p.ContentTransferEncoding = val
		case strings.ToUpper("Plural-Forms"):
			p.PluralForms = val
		case strings.ToUpper("X-Generator"):
			p.XGenerator = val
		default:
			if p.UnknowFields == nil {
				p.UnknowFields = make(map[string]string)
			}
			p.UnknowFields[key] = val
		}
	}
}
func (p *Header) toMessage() Message {
	return Message{
		MsgStr: p.String(),
	}
}