i18n

package
v0.2.0-beta.2 Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2022 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Languages = make([]string, 0)
View Source
var Templates = make(map[string]*Template)

Functions

func Init

func Init(dir string) error

Types

type Template

type Template struct {
	Text   *TemplateText   `mapstructure:"text"`
	Button *TemplateButton `mapstructure:"button"`
}

type TemplateButton

type TemplateButton struct {
	Back   tele.InlineButton                     `mapstructure:"back"`
	Search searchbot.SearchContextButtonTemplate `mapstructure:"search"`
	Start  struct {
		Settings tele.InlineButton `mapstructure:"settings"`
	} `mapstructure:"start"`
	Settings struct {
		Language      tele.InlineButton `mapstructure:"language"`
		LanguagePlain tele.InlineButton `mapstructure:"language_plain"` // set manually
	} `mapstructure:"settings"`
}

type TemplateText

type TemplateText struct {
	Settings struct {
		Desc     i18n.Text `mapstructure:"desc"`
		Language i18n.Text `mapstructure:"language"`
	} `mapstructure:"settings"`
	Search       searchbot.SearchContextTextTemplate `mapstructure:"search"`
	AddedToGroup struct {
		Fail    i18n.Text `mapstructure:"fail"`
		Success i18n.Text `mapstructure:"success"`
	} `mapstructure:"added_to_group"`
	Start i18n.Text `mapstructure:"start"`
}

Jump to

Keyboard shortcuts

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