Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DecodePOString ¶
DecodePOString decodes the string values that appear after msgid, mgstr etc
func EncodePOString ¶
EncodePOString encodes the string values that appear after msgid, mgstr etc
Types ¶
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) Locales ¶ added in v0.101.0
Locales returns the names of the locales included in this library
func (*Library) SrcLanguage ¶
SrcLanguage returns the source language of this library
type PO ¶
PO is a PO file of translation entries
type POComment ¶
type POComment struct { Translator []string // # translator-comments Extracted []string // #. extracted-comments References []string // #: references Flags []string // #, e.g. fuzzy,python-format }
POComment is a comment for an entry
func ParsePOComment ¶
ParsePOComment parses a PO file comment from the given string
type POEntry ¶
type POEntry struct { Comment POComment // Comment MsgContext string // msgctxt context MsgID string // msgid untranslated-string MsgStr string // msgstr translated-string }
POEntry is an entry in a PO catalog
type POHeader ¶
type POHeader 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 }
POHeader contains metadata about a PO file
Click to show internal directories.
Click to hide internal directories.