Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Comment ¶
type Comment struct {
TranslatorComments []string
ExtractedComments []string
References []string
Flags []string
PrevCtxt string
PrevId string
PrevIdPlural string
}
Comment stores meta-data from a gettext message.
type File ¶
type File struct {
Header textproto.MIMEHeader
Messages []Message
Pluralize PluralSelector
}
File represents a PO file.
type Message ¶
type Message struct {
Comment // message comments from PO file
Ctxt string // msgctxt: message context, if any
Id string // msgid: untranslated singular string
IdPlural string // msgid_plural: untranslated plural string
Str []string // msgstr or msgstr[n]: translated strings
}
Message stores a gettext message.
type PluralSelector ¶
PluralSelector returns the appropriate plural case to use, given a quantity.
func PluralSelectorForLanguage ¶
func PluralSelectorForLanguage(lang string) PluralSelector
PluralSelectorForLanguage returns the appropriate plural selector for the provided languge code. The code can be either the too letter code ("en") or the 5 character variant ("en_GB")
Click to show internal directories.
Click to hide internal directories.