languages

package
v0.0.0-...-65ee0f0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 10, 2024 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenLanguageSchema

func GenLanguageSchema(filePath string, deviceOS string, langCode string, layer string, outFilePath string)

func GenLanguageTompl

func GenLanguageTompl(c *cli.Context) error

RPCNew is to generate rpc greet service, this greet service can speed up your understanding of the zrpc service structure

Types

type DeletedLanguage

type DeletedLanguage struct {
	Key string
}

type Language

type Language struct {
	Key   string
	Value string
	Zero  bool
	One   bool
	Two   bool
	Few   bool
	Many  bool
	Other bool
}

func (Language) IsDeleted

func (this Language) IsDeleted() bool

func (Language) IsPlural

func (this Language) IsPlural() bool

func (Language) IsSingle

func (this Language) IsSingle() bool

type LanguageAndroidParser

type LanguageAndroidParser struct {
	ZeroSymbol  string
	OneSymbol   string
	TwoSymbol   string
	FewSymbol   string
	ManySymbol  string
	OtherSymbol string
}

func (LanguageAndroidParser) Parse

func (this LanguageAndroidParser) Parse(key string, value string) *Language

type LanguageGroup

type LanguageGroup struct {
	Key       string
	Languages []*Language
}

func NewLanguageGroup

func NewLanguageGroup(key string) *LanguageGroup

type LanguageIosParser

type LanguageIosParser struct {
	ZeroSymbol  string
	OneSymbol   string
	TwoSymbol   string
	FewSymbol   string
	ManySymbol  string
	OtherSymbol string
}

func NewLanguageIosParser

func NewLanguageIosParser(zero string, one string, two string, few string, many string, other string) LanguageIosParser

func (LanguageIosParser) Parse

func (this LanguageIosParser) Parse(key string, value string) *Language

type LanguageParser

type LanguageParser interface {
	Parse(key string, value string) *Language
}

func NewLanguageAndroidParser

func NewLanguageAndroidParser(zero string, one string, two string, few string, many string, other string) LanguageParser

type PluralizedLanguage

type PluralizedLanguage struct {
	Key        string
	ZeroValue  string
	OneValue   string
	TwoValue   string
	FewValue   string
	ManyValue  string
	OtherValue string
}

type SchemaLanguageGroup

type SchemaLanguageGroup struct {
	Layer               string
	OS                  string
	LangCode            string
	SingleLanguages     []SingleLanguage
	PluralizedLanguages []PluralizedLanguage
	DeletedLanguages    []DeletedLanguage
}

func Parse

func Parse(filePath string, deviceOS string, langCode string, layer string) (*SchemaLanguageGroup, error)

type SchemaLanguageParser

type SchemaLanguageParser struct {
	Layer         string
	AndroidParser LanguageParser
	IOSParser     LanguageParser
}

func NewSchemaLanguageParser

func NewSchemaLanguageParser(layer string) SchemaLanguageParser

func (*SchemaLanguageParser) GetLanguageParser

func (this *SchemaLanguageParser) GetLanguageParser(os string) LanguageParser

type SingleLanguage

type SingleLanguage struct {
	Key   string
	Value string
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL