Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Catalog ¶
type Catalog struct {
Header textproto.MIMEHeader
// contains filtered or unexported fields
}
Catalog stores translations.
type Iterator ¶
type Iterator interface {
// Size returns the amount of messages provided by the iterator.
Size() int
// Next returns the next message. At the end of the iteration,
// io.EOF is returned as the error.
Next() (*Message, error)
}
Iterator iterates over gettext messages.
func ReadMo ¶
func ReadMo(r io.ReadSeeker) Iterator
ReadMo reads a MO file from r and returns a messages iterator.
type Message ¶
type Message struct {
Ctxt []byte // msgctxt: message context, if any
Id []byte // msgid: untranslated singular string
IdPlural []byte // msgid_plural: untranslated plural string
Str []byte // msgstr: translated singular string
StrPlural [][]byte // msgstr[n]: translated plural strings
Meta *MessageMeta // message comments from PO file
}
Message stores a gettext message.
Click to show internal directories.
Click to hide internal directories.