code: func (po *Po) Parse(buf []byte) {
  	// Lock while parsing
  	po.Lock()
  
  	// Init storage
  	if po.translations == nil {
  		po.translations = make(map[string]*Translation)
  		po.contexts = make(map[string]map[string]*Translation)
  	}
  
  	// Get lines
  	lines := strings.Split(string(buf), "\n")
  
  	// Init buffer
  	po.trBuffer = NewTranslation()
  	po.ctxBuffer = ""
  
  	state := head
  	for _, l := range lines {
  		// Trim spaces
  		l = strings.TrimSpace(l)
  
  		// Skip invalid lines
  		if !po.isValidLine(l) {
  			continue
  		}
  
  		// Buffer context and continue
  		if strings.HasPrefix(l, "msgctxt") {
  			po.parseContext(l)
  			state = msgCtxt
  			continue
  		}
  
  		// Buffer msgid and continue
  		if strings.HasPrefix(l, "msgid") && !strings.HasPrefix(l, "msgid_plural") {
  			po.parseID(l)
  			state = msgID
  			continue
  		}
  
  		// Check for plural form
  		if strings.HasPrefix(l, "msgid_plural") {
  			po.parsePluralID(l)
  			state = msgIDPlural
  			continue
  		}
  
  		// Save Translation
  		if strings.HasPrefix(l, "msgstr") {
  			po.parseMessage(l)
  			state = msgStr
  			continue
  		}
  
  		// Multi line strings and headers
  		if strings.HasPrefix(l, "\"") && strings.HasSuffix(l, "\"") {
  			po.parseString(l, state)
  			continue
  		}
  	}
  
  	// Save last Translation buffer.
  	po.saveBuffer()
  
  	// Unlock to parse headers
  	po.Unlock()
  
  	// Parse headers
  	po.parseHeaders()
  }
docs: // Parse loads the translations specified in the provided string (str)