Versions in this module Expand all Collapse all v0 v0.2.0 Feb 17, 2024 Changes in this version + func PruneCommandTranslatorComments(raw string) (clean string) + func PruneInlineTranslatorComments(raw string) (clean string) v0.1.0 Jan 31, 2024 Changes in this version + func CoalesceTranslatorComment(input string) (coalesced string) + func ParsePluralCaseKey(key string) (real string) + func ParseTag(input interface{}) (tag language.Tag, err error) + func ParseTranslatorComment(input string) (comments, sources []string) + func PruneTranslatorComments(raw string) (clean string) + func SortLanguageTags(tags []language.Tag) (sorted []language.Tag) + func SortedLanguageTagKeys[V interface{}](m map[language.Tag]V) (sorted []language.Tag) + func TagInTagSlices(needle language.Tag, haystacks ...[]language.Tag) (found bool) + func TagInTags(needle language.Tag, haystack ...language.Tag) (found bool) + type BaseMessage struct + Fuzzy bool + ID string + Key string + Message string + Placeholders Placeholders + Translation interface{} + TranslatorComment string + type GoText struct + Language string + Messages []*Message + func ParseGoText(data []byte) (gt *GoText, tag language.Tag, err error) + type Message struct + Fuzzy bool + ID string + Key string + Message string + Placeholders Placeholders + Translation *Translation + TranslatorComment string + func MakeMessageFromKey(key, comment string, argv ...string) (m *Message) + func ParseTemplateMessages(input string) (msgs []*Message, err error) + func (m *Message) Copy() (copied *Message) + func (m *Message) MarshalJSON() (data []byte, err error) + func (m *Message) UnmarshalJSON(data []byte) (err error) + type Placeholder struct + ArgNum int + Expr string + ID string + String string + Type string + UnderlyingType string + type Placeholders []*Placeholder + func ParseMessagePlaceholders(key string, argv ...string) (replaced, labelled string, placeholders Placeholders) + func (p Placeholders) Copy() (copied Placeholders) + func (p Placeholders) Numeric() (found Placeholders) + type Select struct + Arg string + Cases map[string]SelectCase + Feature string + type SelectCase struct + Msg string + type SelectMessage struct + Fuzzy bool + ID string + Key string + Message string + Placeholders Placeholders + Translation *Translation + TranslatorComment string + func (s *SelectMessage) Make() (m Message) + type StringMessage struct + Fuzzy bool + ID string + Key string + Message string + Placeholders Placeholders + Translation string + TranslatorComment string + func (s *StringMessage) Make() (m Message) + type Tags []language.Tag + func (list Tags) Has(tag language.Tag) (present bool) + func (list Tags) Strings() (locales []string) + func (list Tags) StringsWithDefault(tag language.Tag) (locales []string) + type Translation struct + Select *Select + String string