Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DecodeString ¶
DecodeString decodes the string values that appear after msgid, mgstr etc
func EncodeString ¶
EncodeString encodes the string values that appear after msgid, mgstr etc
Types ¶
type Comment ¶
type Comment struct { Translator []string // # translator-comments Extracted []string // #. extracted-comments References []string // #: references Flags []string // #, e.g. fuzzy,python-format }
Comment is a comment for an entry
func ParseComment ¶
ParseComment parses a PO file comment from the given string
type Entry ¶
type Entry struct { Comment Comment // Comment MsgContext string // msgctxt context MsgID string // msgid untranslated-string MsgStr string // msgstr translated-string }
Entry is an entry in a PO catalog
type Header ¶
type Header struct { InitialComment string POTCreationDate time.Time // POT-Creation-Date: YEAR-MO-DA HO:MI+ZONE Language string // Language: e.g. en-US MIMEVersion string // MIME-Version: 1.0 ContentType string // Content-Type: text/plain; charset=UTF-8 Custom map[string]string // other custom values }
Header contains metadata about a PO file
type Library ¶
type Library struct {
// contains filtered or unexported fields
}
Library is a collection of PO files providing translations in different languages
func NewLibrary ¶
NewLibrary creates new library from directory structure in path
func (*Library) SrcLanguage ¶
SrcLanguage returns the source language of this library
Click to show internal directories.
Click to hide internal directories.