Documentation
¶
Index ¶
- Variables
- func ParsePluralCaseKey(key string) (real string)
- type BaseMessage
- type CCatalog
- func (c *CCatalog) AddCatalog(others ...catalog.Catalog)
- func (c *CCatalog) AddLocalesFromFS(defaultTag language.Tag, efs beFs.FileSystem)
- func (c *CCatalog) AddLocalesFromJsonBytes(tag language.Tag, src string, contents []byte)
- func (c *CCatalog) LocaleTags() (tags []language.Tag)
- func (c *CCatalog) LocaleTagsWithDefault(d language.Tag) (tags []language.Tag)
- func (c *CCatalog) MakeGoTextCatalog() (gtc catalog.Catalog, err error)
- type Catalog
- type EditGoText
- type GoText
- type Message
- type Placeholder
- type Placeholders
- type Select
- type SelectCase
- type SelectMessage
- type StringMessage
- type Translation
Constants ¶
This section is empty.
Variables ¶
View Source
var (
DefaultFileName = "out.gotext.json"
)
Functions ¶
func ParsePluralCaseKey ¶ added in v0.5.0
Types ¶
type BaseMessage ¶ added in v0.5.0
type BaseMessage struct { ID string `json:"id"` Key string `json:"key"` Message string `json:"message"` Translation interface{} `json:"translation"` TranslatorComment string `json:"translatorComment,omitempty"` Placeholders Placeholders `json:"placeholders,omitempty"` Fuzzy bool `json:"fuzzy,omitempty"` }
type CCatalog ¶ added in v0.5.0
type CCatalog struct {
// contains filtered or unexported fields
}
func (*CCatalog) AddCatalog ¶ added in v0.5.0
func (*CCatalog) AddLocalesFromFS ¶ added in v0.5.0
func (c *CCatalog) AddLocalesFromFS(defaultTag language.Tag, efs beFs.FileSystem)
func (*CCatalog) AddLocalesFromJsonBytes ¶ added in v0.5.0
func (*CCatalog) LocaleTags ¶ added in v0.5.0
func (*CCatalog) LocaleTagsWithDefault ¶ added in v0.5.0
type Catalog ¶
type Catalog interface { AddCatalog(others ...catalog.Catalog) AddLocalesFromFS(defaultTag language.Tag, efs beFs.FileSystem) AddLocalesFromJsonBytes(tag language.Tag, src string, contents []byte) LocaleTags() (tags []language.Tag) LocaleTagsWithDefault(d language.Tag) (tags []language.Tag) MakeGoTextCatalog() (gtc catalog.Catalog, err error) }
type EditGoText ¶ added in v0.5.0
type Message ¶ added in v0.5.0
type Message struct { ID string `json:"id"` Key string `json:"key"` Message string `json:"message"` Translation *Translation `json:"translation"` TranslatorComment string `json:"translatorComment,omitempty"` Placeholders Placeholders `json:"placeholders,omitempty"` Fuzzy bool `json:"fuzzy,omitempty"` }
func MakeMessageFromKey ¶ added in v0.5.0
func ParseTemplateMessages ¶ added in v0.5.0
func (*Message) MarshalJSON ¶ added in v0.5.0
func (*Message) UnmarshalJSON ¶ added in v0.5.0
type Placeholder ¶ added in v0.5.0
type Placeholders ¶ added in v0.5.0
type Placeholders []*Placeholder
func (Placeholders) Copy ¶ added in v0.5.1
func (p Placeholders) Copy() (copied Placeholders)
func (Placeholders) Numeric ¶ added in v0.5.0
func (p Placeholders) Numeric() (found Placeholders)
type Select ¶ added in v0.5.0
type Select struct { Arg string `json:"arg"` Feature string `json:"feature"` Cases map[string]SelectCase `json:"cases"` }
type SelectCase ¶ added in v0.5.0
type SelectCase struct {
Msg string `json:"msg"`
}
type SelectMessage ¶ added in v0.5.0
type SelectMessage struct { ID string `json:"id"` Key string `json:"key"` Message string `json:"message"` Translation *Translation `json:"translation"` TranslatorComment string `json:"translatorComment,omitempty"` Placeholders Placeholders `json:"placeholders,omitempty"` Fuzzy bool `json:"fuzzy,omitempty"` }
func (*SelectMessage) Make ¶ added in v0.5.0
func (s *SelectMessage) Make() (m Message)
type StringMessage ¶ added in v0.5.0
type StringMessage struct { ID string `json:"id"` Key string `json:"key"` Message string `json:"message"` Translation string `json:"translation"` TranslatorComment string `json:"translatorComment,omitempty"` Placeholders Placeholders `json:"placeholders,omitempty"` Fuzzy bool `json:"fuzzy,omitempty"` }
func (*StringMessage) Make ¶ added in v0.5.0
func (s *StringMessage) Make() (m Message)
type Translation ¶ added in v0.5.0
Click to show internal directories.
Click to hide internal directories.