Documentation ¶
Overview ¶
Package translate converts charachorder.File's from one keyboard layout to another.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddTranslation ¶
func AddTranslation(t Translation)
AddTranslation adds a translation to the known list.
func AddTranslationFromFile ¶
func AddTranslationFromFile(filename string)
AddTranslationFromFile reads a YAML file and adds it to then known list of translations.
Types ¶
type TranslateKey ¶
type Translation ¶
Translation represents a translation to or from Qwerty into `Name`.
func GetTranslation ¶
func GetTranslation(name string) (Translation, bool)
GetTranslation will find a known location or return false if unknown.
func NewTranslationFromYaml ¶
func NewTranslationFromYaml(value []byte) Translation
NewTranslationFromYaml parses YAML content into a `Translation`.
func (*Translation) Translate ¶
func (t *Translation) Translate(chord charachorder.Chord, reverse bool) charachorder.Chord
Translate converts a single `chord` to the layout from Qwerty.
func (*Translation) TranslateFile ¶
func (t *Translation) TranslateFile(f *charachorder.File, reverse bool) charachorder.File
TranslateFile converts an entire file to the layout from Qwerty.
Click to show internal directories.
Click to hide internal directories.