i18n

package
v0.0.0-...-16cd069 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2021 License: MPL-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	InvalidSubLink   = "proxycheck.invalid_sub_link"
	MissSubLink      = "proxycheck.miss_sub_link"
	VisitCheckDetail = "proxycheck.visit_check_detail"

	CheckDetail = "proxycheck.check_detail"

	CheckDetailName     = "proxycheck.check_detail.name"
	CheckDetailIp       = "proxycheck.check_detail.ip"
	CheckDetailRegion   = "proxycheck.check_detail.region"
	CheckDetailTimeZone = "proxycheck.check_detail.time_zone"
	CheckDetailIsp      = "proxycheck.check_detail.isp"
	CheckDetailOperator = "proxycheck.check_detail.operator"
	CheckDetailLat      = "proxycheck.check_detail.lat"
	CheckDetailLon      = "proxycheck.check_detail.lon"

	CheckDetailGoogle    = "proxycheck.check_detail.google"
	CheckDetailGithub    = "proxycheck.check_detail.github"
	CheckDetailGithubRaw = "proxycheck.check_detail.github_raw"
	CheckDetailYoutube   = "proxycheck.check_detail.youtube"
	CheckDetailV2Fly     = "proxycheck.check_detail.v2fly"
	CheckDetailInstagram = "proxycheck.check_detail.instagram"

	CheckDetailCachefly1M  = "proxycheck.check_detail.cachefly_1m"
	CheckDetailCachefly5M  = "proxycheck.check_detail.cachefly_5m"
	CheckDetailCachefly10M = "proxycheck.check_detail.cachefly_10m"

	CheckDetailVisitDetail = "proxycheck.check_detail.visit_detail"

	CheckDetailNetflixLocation     = "proxycheck.check_detail.netflix_location"
	CheckDetailNetflixSelfProduced = "proxycheck.check_detail.netflix_self_produced"

	CheckDetailTotalTraffic = "proxycheck.check_detail.total_traffic"
	CheckDetailDuration     = "proxycheck.check_detail.duration"

	CheckDetailDoc = "proxycheck.check_detail.detail"

	DelayCheckChartTitle  = "proxycheck.delay_check_chart.title"
	DelayCheckChartYTitle = "proxycheck.delay_check_chart.y_title"
	DelayCheckChartXTitle = "proxycheck.delay_check_chart.x_title"

	TaskAddSuccess      = "proxycheck.task.add_success"
	TaskDelSuccess      = "proxycheck.task.del_success"
	InvalidTaskSn       = "proxycheck.task.invalid_task_sn"
	CheckTaskEditStart  = "proxycheck.task.edit_task_start"
	CheckTaskEditDetail = "proxycheck.task.task_detail"

	WorkStatus = "work.status"

	NotGroupAdmin = "role.not_group_admin"

	HelpDoc = "help"
)

Variables

This section is empty.

Functions

func GetMessage

func GetMessage(language Language, key string, args interface{}) string

func GetMessageTpl

func GetMessageTpl(language Language, key string) string

func GetMessageTplWithContext

func GetMessageTplWithContext(ctx context.Context, key string) string

func GetMessageWithContext

func GetMessageWithContext(ctx context.Context, key string, args interface{}) string

func InitLanguage

func InitLanguage() error

func WithLanguage

func WithLanguage(ctx context.Context, language Language) context.Context

Types

type Language

type Language string
const (
	Unknown Language = ""
	En      Language = "en"
	ZhHans  Language = "zh-hans"
)

Jump to

Keyboard shortcuts

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