statictl

package
v0.0.0-...-7f2d481 Latest Latest
Warning

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

Go to latest
Published: Feb 1, 2019 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DatabaseEntryDynamic

type DatabaseEntryDynamic struct {
	RegexMatch   string
	RegexReplace string
}

Regex

type DatabaseEntryStatic

type DatabaseEntryStatic struct {
	Original   string
	Translated string
}

Normal replace

type DatabaseType

type DatabaseType int
const (
	DbStatic DatabaseType = iota
	DbDynamic
)

type Db

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

func New

func New() *Db

func (*Db) GetTranslation

func (t *Db) GetTranslation(str string, typ TranslationType) (string, error)

GetTranslation Replaces source if match is found and stops any further translation. Called after RunPreTranslation

func (*Db) RunPostTranslation

func (t *Db) RunPostTranslation(str string) (string, error)

RunPostTranslation Edits text returned from translation service, ignores static tl

func (*Db) RunPreTranslation

func (t *Db) RunPreTranslation(str string) (string, error)

RunPreTranslation Edits original text, called before anything else

type TranslationType

type TranslationType int
const (
	TransGeneric     TranslationType = iota // Default group
	TransName                               // Every name
	TransDescription                        // Every description
	TransDialogue
	TransChoice
	TransVocab
	TransMessage      // Skill and Status messages
	TransInlineScript // Inline scripts
	TransScript       // Scripts
	TransSystem       // System translations like main menu and title
)

Jump to

Keyboard shortcuts

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