Versions in this module Expand all Collapse all v0 v0.2.0 Jun 12, 2019 v0.1.0 Jun 11, 2019 Changes in this version + func Generate(w io.Writer, pkg string, extracted *Messages, trans ...Messages) (n int, err error) + func Rewrite(w io.Writer, args ...string) error + type Config struct + DeclareVar string + Dir string + Ext string + Format string + GenFile string + GenPackage string + OutPattern string + Packages []string + SetDefault bool + SourceLanguage language.Tag + Supported []language.Tag + TranslationsPattern string + type Feature struct + Type string + type IDList []string + func (id *IDList) MarshalJSON() ([]byte, error) + func (id *IDList) UnmarshalJSON(b []byte) error + type Message struct + Comment string + Fuzzy bool + ID IDList + Key string + Meaning string + Message Text + Placeholders []Placeholder + Position string + Translation Text + TranslatorComment string + func (m *Message) Placeholder(id string) *Placeholder + func (m *Message) Substitute(msg string) (sub string, err error) + type Messages struct + Language language.Tag + Macros map[string]Text + Messages []Message + type Placeholder struct + ArgNum int + Comment string + Example string + Expr string + Features []Feature + ID string + String string + Type string + UnderlyingType string + type Select struct + Arg string + Cases map[string]Text + Feature string + type State struct + Config Config + Extracted Messages + Messages []Messages + Package string + Translations []Messages + func Extract(c *Config) (*State, error) + func (s *State) Export() error + func (s *State) Generate() error + func (s *State) Import() error + func (s *State) Merge() error + func (s *State) WriteGen(w io.Writer, pkg string) error + type Text struct + Example string + Msg string + Select *Select + Var map[string]Text + func (t *Text) IsEmpty() bool + func (t *Text) MarshalJSON() ([]byte, error) + func (t *Text) UnmarshalJSON(b []byte) error