internal

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(param *Param) error

Run 运行解析任务

func Writer

func Writer(fileName string) (wr *os.File, err error)

Writer is fileName is empty or - use stdout, otherwise use file

Types

type Context

type Context struct {
	*Param
	Keywords  []Keyword
	Functions template.FuncMap
	Output    *os.File
	// contains filtered or unexported fields
}

Context parameters and result

func (*Context) Add

func (ctx *Context) Add(entry *translator.Entry) error

Add add a message entry

func (*Context) Write

func (ctx *Context) Write() error

Write write pot file to output

type Keyword

type Keyword struct {
	Name    string
	MsgCtxt int
	MsgID   int
	MsgID2  int
}

Keyword gettext keyword

func ParseKeywords

func ParseKeywords(str string) (result []Keyword, err error)

ParseKeywords gettext;T:1;N:1,2;X:1c,2;XN:1c,2,3

type Param

type Param struct {
	Input      string
	Left       string
	Right      string
	Keyword    string
	Function   string
	OutputFile string
	Debug      bool
	Remove     bool
}

Param 输入参数

Jump to

Keyboard shortcuts

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