localize

package
v1.3.168 Latest Latest
Warning

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

Go to latest
Published: Aug 1, 2024 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ILocalizer

type ILocalizer interface {
	T(bucket string, key string) string
	LoadBucketFromFile(bucket string, path string, append bool)
	LoadBucketFromMap(bucket string, pairs map[string]string, append bool)
	SaveBucketToFile(bucket string, path string)
	PushBucketToSource(bucket string) (err error)
	PullBucketFromSource(bucket string, append bool) (err error)
}

type PoeditorSource

type PoeditorSource struct {
	// contains filtered or unexported fields
}

func NewPoeditorSource

func NewPoeditorSource(apiKey string, projectID string, language string) *PoeditorSource

func (*PoeditorSource) Pull

func (l *PoeditorSource) Pull() (pairs map[string]string, err error)

func (*PoeditorSource) Push

func (l *PoeditorSource) Push(terms []string) (err error)

type SimpleLocalizer

type SimpleLocalizer struct {
	// contains filtered or unexported fields
}

func NewSimpleLocalizer

func NewSimpleLocalizer(errorLogger errorlogger.ErrorLogger, source Source, localePath string) *SimpleLocalizer

func (*SimpleLocalizer) LoadBucketFromFile

func (l *SimpleLocalizer) LoadBucketFromFile(bucket string, path string, append bool)

func (*SimpleLocalizer) LoadBucketFromMap

func (l *SimpleLocalizer) LoadBucketFromMap(bucket string, pairs map[string]string, append bool)

func (*SimpleLocalizer) PullBucketFromSource

func (l *SimpleLocalizer) PullBucketFromSource(bucket string, append bool) (err error)

func (*SimpleLocalizer) PushBucketToSource

func (l *SimpleLocalizer) PushBucketToSource(bucket string) (err error)

func (*SimpleLocalizer) SaveBucketToFile

func (l *SimpleLocalizer) SaveBucketToFile(bucket string, path string)

func (*SimpleLocalizer) T added in v0.9.85

func (l *SimpleLocalizer) T(bucket string, key string) string

type Source

type Source interface {
	Push([]string) error
	Pull() (map[string]string, error)
}

Jump to

Keyboard shortcuts

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