Smail/backend/i18n/i18n.go
smail f60d3b0880
Some checks are pending
Security Checks / security (push) Waiting to run
整理前后端与测试构建目录并完善配置和安全引导
统一 frontend、backend、test、test-log 和 out 目录,更新构建、部署及测试入口;纳入配置管理兼容与首次安全引导修复;排除本机配置、密钥和测试产物。
2026-09-05 19:19:52 +08:00

52 lines
1.5 KiB
Go
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

package i18n
var (
cn = map[string]string{
"all_email": "全部邮件数据",
"inbox": "收件箱",
"outbox": "发件箱",
"sketch": "草稿箱",
"aperror": "账号或密码错误",
"unknowError": "未知错误",
"succ": "成功",
"send_fail": "发送失败",
"att_err": "附件解码错误",
"login_exp": "登录已失效",
"ip_taps": "这是你服务器IP,确保这个IP正确",
"invalid_email_address": "无效的邮箱地址!",
"deleted": "已删除",
"junk": "广告箱",
}
en = map[string]string{
"all_email": "All Email",
"inbox": "Inbox",
"outbox": "Outbox",
"sketch": "Sketch",
"aperror": "Incorrect account number or password",
"unknowError": "Unknow Error",
"succ": "Success",
"send_fail": "Send Failure",
"att_err": "Attachment decoding error",
"login_exp": "Login has expired.",
"ip_taps": "This is your server's IP, make sure it is correct.",
"invalid_email_address": "Invalid e-mail address!",
"deleted": "Deleted",
"junk": "Junk",
}
)
func GetText(lang, key string) string {
if lang == "zhCn" {
text, exist := cn[key]
if !exist {
return ""
}
return text
}
text, exist := en[key]
if !exist {
return ""
}
return text
}