diff --git a/resource/l10n/zh-CN.toml b/resource/l10n/zh-CN.toml
index b387822..6d20a27 100644
--- a/resource/l10n/zh-CN.toml
+++ b/resource/l10n/zh-CN.toml
@@ -1,2 +1,217 @@
[nezhaMonitor]
other = "哪吒监控"
+[Server]
+other = "主机"
+[Services]
+other = "服务"
+[Task]
+other = "任务"
+[Notification]
+other = "报警"
+[Settings]
+other = "设置"
+[Home]
+other = "首页"
+[BackToHomepage]
+other = "返回前台"
+[AdminPanel]
+other = "管理后台"
+[Logout]
+other = "注销登录"
+[Login]
+other = "登录"
+[ConfirmLogout]
+other = "确认注销?"
+[AfterLoggingOutYouHaveToLoginAgain]
+other = "注销后您必须重新登录才能使用"
+[Cancel]
+other = "取消"
+[Confirm]
+other = "确认"
+[AddScheduledTasks]
+other = "添加计划任务"
+[Name]
+other = "名称"
+[Scheduler]
+other = "计划"
+[BackUp]
+other = "备份"
+[3amDaily]
+other = "(每天3点)"
+[Command]
+other = "命令"
+[Coverage]
+other = "覆盖范围"
+[IgnoreAllAndExecuteOnlyThroughSpecificServers]
+other = "忽略所有,仅通过特定服务器执行"
+[AllIncludedOnlySpecificServersAreNotExecuted]
+other = "覆盖所有,仅特定服务器不执行"
+[SpecificServers]
+other = "特定服务器"
+[EnterIdAndNameToSearch]
+other = "输入ID/名称以搜索"
+[NotificationMethod]
+other = "通知方式组"
+[PushSuccessMessages]
+other = "推送成功的消息"
+[TheFormaOfTheScheduleIs]
+other = "计划的格式为:"
+[SecondsMinutesHoursDaysMonthsWeeksSeeDetails]
+other = "秒 分 时 天 月 星期,详情见"
+[ScheduleExpressionFormat]
+other = "计划表达式格式"
+[IntroductionOfCommands]
+other = "命令:就像写 shell/bat 脚本一样,但是不推荐换行,多个命令使用 &&
/&
连接,如果遇到 xxx 命令找不到,可能是PATH
环境变量的问题,Linux
主机在命令开头加入source ~/.bashrc
或者使用绝对路径执行。"
+[AddMonitor]
+other = "添加监控"
+[Blog]
+other = "博客"
+[Target]
+other = "目标"
+[Type]
+other = "类型"
+[SslExpirationOrChange]
+other = "(SSL到期、变更)"
+[Duration]
+other = "请求间隔"
+[Seconds]
+other = "秒"
+[EnableFailureNotification]
+other = "启用故障通知"
+[IntroductionOfMonitor]
+other = """
+类型为 HTTP-GET 时输入URL(带 http/https, HTTPS协议的会顺带监控SSL证书);
+类型为 ICMP-Ping 时输入主机名/IP,不带端口;
+类型为 TCP-Ping 时输入主机名/IP + 端口号:example.com:22"""
+[AddNotificationMethod]
+other = "添加通知方式"
+[Tag]
+other = "分组"
+[DoNotSendTestMessages]
+other = "不发送测试信息"
+[RequestMethod]
+other = "请求方式"
+[RequestType]
+other = "请求类型"
+[VerifySSL]
+other = "验证SSL"
+[AddNotificationRule]
+other = "添加报警规则"
+[Rules]
+other = "规则"
+[Enable]
+other = "启用"
+[AddServer]
+other = "添加服务器"
+[ServerGroup]
+other = "服务器分组"
+[EinsteinLightspeed1]
+other = "爱因斯坦-光速1号"
+[DisplayIndex]
+other = "排序"
+[TheLargerTheNumberTheHigherThePriority]
+other = "越大越靠前"
+[Secret]
+other = "密钥"
+[Note]
+other = "备注"
+[LinuxOneKeyInstall]
+other = "Linux 一键安装"
+[NoDomainAlert]
+other = "请先在设置页面配置 未接入CDN的面板服务器域名/IP"
+[PushSuccessfully]
+other = "成功推送"
+[LastExecution]
+other = "最后执行"
+[LastResult]
+other = "最后结果"
+[Administration]
+other = "管理"
+[CoverAll]
+other = "覆盖所有"
+[IgnoreAll]
+other = "忽略所有"
+[DeleteScheduledTask]
+other = "删除计划任务"
+[ConfirmToDeleteThisScheduledTask]
+other = "确认删除此计划任务?"
+[AccessDenied]
+other = "访问受限"
+[Use]
+other = "使用"
+[AccountToLogin]
+other = "账号登录"
+[SignUp]
+other = "注册"
+[DontHaveAnAccount]
+other = "没有账号?"
+[SSLCertificate]
+other = "HTTP(S)/SSL证书"
+[TCPPort]
+other = "TCP 端口"
+[DeleteService]
+other = "删除服务"
+[ConfirmToDeleteThisService]
+other = "确认删除此服务?"
+[DeleteNotificationMethod]
+other = "删除通知方式"
+[ConfirmToDeleteThisNotificationMethod]
+other = "确认删除此通知方式?"
+[ForceUpdate]
+other = "强制更新"
+[SelectAll]
+other = "全选"
+[VersionNumber]
+other = "版本号"
+[OneKeyInstall]
+other = "一键安装"
+[ClickToCopyTheInstallationCommand]
+other = "点击复制安装命令"
+[NotSupportedYet]
+other = "尚未支持,请下载release手动安装"
+[DeleteServer]
+other = "删除主机"
+[ConfirmToDeleteThisServer]
+other = "确认删除此主机?"
+[NoServerSelected]
+other = "当前没有选中的服务器"
+[ExecutionResults]
+other = "执行结果"
+[SiteTitle]
+other = "站点标题"
+[AdministratorList]
+other = "管理员列表"
+[Theme]
+other = "主题"
+[DefaultTheme]
+other = "默认主题"
+[CustomCodes]
+other = "自定义代码(style、script 都可以)"
+[AccessPassword]
+other = "前台查看密码"
+[PanelServerDomainAndIP]
+other = "未接入CDN的面板服务器域名/IP"
+[IPChangeAlert]
+other = "IP 变更提醒"
+[AllIncludedOnlySpecificServersAreNotAlerted]
+other = "覆盖所有,仅特定服务器不提醒"
+[IgnoreAllOnlyAlertSpecificServers]
+other = "忽略所有,仅提醒特定服务器"
+[IgnoreAllRequestOnlyThroughSpecificServers]
+other = "忽略所有,仅通过特定服务器请求"
+[AllIncludedOnlySpecificServersAreNotRequest]
+other = "覆盖所有,仅特定服务器不请求"
+[ServerIDSeparatedByCommas]
+other = "服务器ID 以逗号隔开"
+[IPChangeNotificationTag]
+other = "提醒发送至指定的通知分组"
+[NotificationMessagesDoNotHideIP]
+other = "通知信息IP不打码"
+[Save]
+other = "保存"
+[ModifiedSuccessfully]
+other = "修改成功"
+[TerminalConnectionTimeOutOrSessionEnded]
+other = "Terminal 连接超时或会话已结束"
+[TerminalConnectionFailed]
+other = "Terminal 连接失败,请检查 /terminal/* 的 WebSocket 反代情况"
\ No newline at end of file
diff --git a/resource/template/common/menu.html b/resource/template/common/menu.html
index bd5bb4f..3423c4e 100644
--- a/resource/template/common/menu.html
+++ b/resource/template/common/menu.html
@@ -5,16 +5,16 @@
{{if .IsAdminPage}}
- 主机
- 服务
- 任务
- 报警
+ {{tr "Server"}}
+ {{tr "Services"}}
+ {{tr "Task"}}
+ {{tr "Notification"}}
- 设置
+ {{tr "Settings"}}
{{else}}
- 首页
- 服务
+ {{tr "Home"}}
+ {{tr "Services"}}
{{end}}
diff --git a/resource/template/component/confirm.html b/resource/template/component/confirm.html
index 3db8b45..9cdbfa1 100644
--- a/resource/template/component/confirm.html
+++ b/resource/template/component/confirm.html
@@ -4,8 +4,8 @@
-
+
diff --git a/resource/template/component/rule.html b/resource/template/component/rule.html
index 8448244..5fc5c29 100644
--- a/resource/template/component/rule.html
+++ b/resource/template/component/rule.html
@@ -1,32 +1,32 @@
{{define "component/rule"}}
-
+
-
取消
-
diff --git a/resource/template/component/server.html b/resource/template/component/server.html
index ab88344..f0e4112 100644
--- a/resource/template/component/server.html
+++ b/resource/template/component/server.html
@@ -1,32 +1,32 @@
{{define "component/server"}}
-
+
-
取消
-
确认
+ {{tr "Cancel"}}
+ {{tr "Confirm"}}
diff --git a/resource/template/dashboard/cron.html b/resource/template/dashboard/cron.html
index 842d914..febca61 100644
--- a/resource/template/dashboard/cron.html
+++ b/resource/template/dashboard/cron.html
@@ -6,7 +6,7 @@
- 添加计划任务
+ {{tr "AddScheduledTasks"}}
@@ -14,16 +14,16 @@
ID |
- 名称 |
- 计划 |
- 命令 |
- 通知方式组 |
- 成功推送 |
- 覆盖范围 |
- 特定服务器 |
- 最后执行 |
- 最后结果 |
- 管理 |
+ {{tr "Name"}} |
+ {{tr "Scheduler"}} |
+ {{tr "Command"}} |
+ {{tr "NotificationMethod"}} |
+ {{tr "PushSuccessfully"}} |
+ {{tr "Coverage"}} |
+ {{tr "SpecificServers"}} |
+ {{tr "LastExecution"}} |
+ {{tr "LastResult"}} |
+ {{tr "Administration"}} |
@@ -35,7 +35,7 @@
{{$cron.Command}} |
{{$cron.NotificationTag}} |
{{$cron.PushSuccessful}} |
- {{if eq $cron.Cover 0}}忽略所有{{else}}覆盖所有{{end}} |
+ {{if eq $cron.Cover 0}}{{tr "IgnoreAll"}}{{else}}{{tr "CoverAll"}}{{end}} |
{{$cron.ServersRaw}} |
{{$cron.LastExecutedAt|tf}} |
{{$cron.LastResult}} |
@@ -48,7 +48,7 @@
+ onclick="showConfirm('{{tr "DeleteScheduledTask"}}','{{tr "ConfirmToDeleteThisScheduledTask"}}',deleteRequest,'/api/cron/'+{{$cron.ID}})">
diff --git a/resource/template/dashboard/error.html b/resource/template/dashboard/error.html
index b23c8b7..d920a73 100644
--- a/resource/template/dashboard/error.html
+++ b/resource/template/dashboard/error.html
@@ -6,7 +6,7 @@
diff --git a/resource/template/dashboard/login.html b/resource/template/dashboard/login.html
index dfe5c79..95b6aa5 100644
--- a/resource/template/dashboard/login.html
+++ b/resource/template/dashboard/login.html
@@ -6,12 +6,12 @@
-
登录
+
{{tr "Login"}}
diff --git a/resource/template/dashboard/monitor.html b/resource/template/dashboard/monitor.html
index 2feff3a..a9872a8 100644
--- a/resource/template/dashboard/monitor.html
+++ b/resource/template/dashboard/monitor.html
@@ -5,7 +5,7 @@
- 添加服务
+ {{tr "AddMonitor"}}
@@ -13,15 +13,15 @@
ID |
- 名称 |
- 目标 |
- 覆盖范围 |
- 特定服务器 |
- 类型 |
- 请求间隔 |
- 通知方式组 |
- 通知 |
- 管理 |
+ {{tr "Name"}} |
+ {{tr "Target"}} |
+ {{tr "Coverage"}} |
+ {{tr "SpecificServers"}} |
+ {{tr "Type"}} |
+ {{tr "Duration"}} |
+ {{tr "NotificationMethod"}} |
+ {{tr "Notification"}} |
+ {{tr "Administration"}} |
@@ -30,13 +30,13 @@
{{$monitor.ID}} |
{{$monitor.Name}} |
{{$monitor.Target}} |
- {{if eq $monitor.Cover 0}}覆盖所有{{else}}忽略所有{{end}} |
+ {{if eq $monitor.Cover 0}}{{tr "CoverAll"}}{{else}}{{tr "IgnoreAll"}}{{end}} |
{{$monitor.SkipServersRaw}} |
- {{if eq $monitor.Type 1}}HTTP(S)/SSL证书 {{else if eq $monitor.Type
- 2}} ICMP Ping {{else}} TCP 端口 {{end}}
+ {{if eq $monitor.Type 1}}{{tr "SSLCertificate"}} {{else if eq $monitor.Type
+ 2}} ICMP Ping {{else}} {{tr "TCPPort"}} {{end}}
|
- {{$monitor.Duration}}秒 |
+ {{$monitor.Duration}}{{tr "Seconds"}} |
{{$monitor.NotificationTag}} |
{{$monitor.Notify}} |
@@ -45,7 +45,7 @@
+ onclick="showConfirm('{{tr "DeleteService"}}','{{tr "ConfirmToDeleteThisService"}}',deleteRequest,'/api/monitor/'+{{$monitor.ID}})">
diff --git a/resource/template/dashboard/notification.html b/resource/template/dashboard/notification.html
index d012b8c..3148efa 100644
--- a/resource/template/dashboard/notification.html
+++ b/resource/template/dashboard/notification.html
@@ -6,7 +6,7 @@
添加通知方式
+ class="add icon"> {{tr "AddNotificationMethod"}}
@@ -14,11 +14,11 @@
ID |
- 名称 |
- 分组 |
+ {{tr "Name"}} |
+ {{tr "Tag"}} |
URL |
- 验证SSL |
- 管理 |
+ {{tr "VerifySSL"}} |
+ {{tr "Administration"}} |
|
@@ -35,7 +35,7 @@
+ onclick="showConfirm('{{tr "DeleteNotificationMethod"}}','{{tr "ConfirmToDeleteThisNotificationMethod"}}',deleteRequest,'/api/notification/'+{{$notification.ID}})">
@@ -48,7 +48,7 @@
- 添加报警规则
+ {{tr "AddNotificationRule"}}
@@ -56,11 +56,11 @@
ID |
- 名称 |
- 通知方式组 |
- 规则 |
- 启用 |
- 管理 |
+ {{tr "Name"}} |
+ {{tr "NotificationMethod"}} |
+ {{tr "Rules"}} |
+ {{tr "Enable"}} |
+ {{tr "Administration"}} |
@@ -77,7 +77,7 @@
+ onclick="showConfirm('{{tr "DeleteNotificationMethod"}}','{{tr "ConfirmToDeleteThisNotificationMethod"}}',deleteRequest,'/api/alert-rule/'+{{$rule.ID}})">
diff --git a/resource/template/dashboard/server.html b/resource/template/dashboard/server.html
index 33818e8..3401693 100644
--- a/resource/template/dashboard/server.html
+++ b/resource/template/dashboard/server.html
@@ -6,26 +6,26 @@
添加主机
+ class="add icon"> {{tr "AddServer"}}
强制更新
+ class="arrow alternate circle up outline icon"> {{tr "ForceUpdate"}}
- 全选 |
- ID(排序) |
- 名称 |
- 分组 |
+ {{tr "SelectAll"}} |
+ ID({{tr "DisplayIndex"}}) |
+ {{tr "Name"}} |
+ {{tr "Tag"}} |
IP |
- 版本号 |
- 密钥 |
- 一键安装 |
- 备注 |
- 管理 |
+ {{tr "VersionNumber"}} |
+ {{tr "Secret"}} |
+ {{tr "OneKeyInstall"}} |
+ {{tr "Note"}} |
+ {{tr "Administration"}} |
@@ -40,16 +40,17 @@
{{$server.Secret}} |
+ data-clipboard-text="{{if $.Conf.GRPCHost}}curl -L https://raw.githubusercontent.com/naiba/nezha/master/script/install.sh -o nezha.sh && chmod +x nezha.sh && sudo ./nezha.sh install_agent {{$.Conf.GRPCHost}} {{if $.Conf.ProxyGRPCPort}}{{$.Conf.ProxyGRPCPort}}{{else}}{{$.Conf.GRPCPort}}{{end}} {{$server.Secret}}{{if $.Conf.TLS}} --tls{{end}}{{else}}{{tr "NoDomainAlert"}}{{end}}"
+ data-tooltip="{{tr "ClickToCopyTheInstallationCommand"}}">
+
+ data-clipboard-text="{{if $.Conf.GRPCHost}}set-ExecutionPolicy RemoteSigned;Invoke-WebRequest https://raw.githubusercontent.com/naiba/nezha/master/script/install.ps1 -OutFile C:\install.ps1;powershell.exe C:\install.ps1 {{$.Conf.GRPCHost}}:{{if $.Conf.ProxyGRPCPort}}{{$.Conf.ProxyGRPCPort}}{{else}}{{$.Conf.GRPCPort}}{{end}} {{$server.Secret}}{{if $.Conf.TLS}} --tls{{end}}{{else}}{{tr "NoDomainAlert"}}{{end}}"
+ data-tooltip="{{tr "ClickToCopyTheInstallationCommand"}}">
-
+
|
@@ -63,7 +64,7 @@
+ onclick="showConfirm('{{tr "DeleteServer"}}}','{{tr "ConfirmToDeleteThisServer"}}',deleteRequest,'/api/server/'+{{$server.ID}})">
@@ -94,7 +95,7 @@
})
if (servers.length == 0) {
$.suiAlert({
- title: '当前没有选中的服务器',
+ title: '{{tr "NoServerSelected"}}',
description: '',
type: 'warning',
time: '2',
@@ -106,7 +107,7 @@
.then((resp) => {
if (resp.code == 200) {
$.suiAlert({
- title: '执行结果',
+ title: '{{tr "ExecutionResults"}}',
description: resp.message,
type: 'success',
time: '3',
diff --git a/resource/template/dashboard/setting.html b/resource/template/dashboard/setting.html
index 9054e76..2987944 100644
--- a/resource/template/dashboard/setting.html
+++ b/resource/template/dashboard/setting.html
@@ -5,17 +5,17 @@
@@ -81,7 +81,7 @@
if (resp.code == 200) {
$.suiAlert({
title: '',
- description: '修改成功',
+ description: '{{tr "ModifiedSuccessfully"}}',
type: 'success',
time: '3',
position: 'top-center',
diff --git a/resource/template/dashboard/terminal.html b/resource/template/dashboard/terminal.html
index 98dfa5d..c9a52f6 100644
--- a/resource/template/dashboard/terminal.html
+++ b/resource/template/dashboard/terminal.html
@@ -84,12 +84,12 @@
}
socket.onclose = () => {
- alert('Terminal 连接超时或会话已结束')
+ alert('{{tr "TerminalConnectionTimeOutOrSessionEnded"}}')
window.close()
}
socket.onerror = () => {
- alert('Terminal 连接失败,请检查 /terminal/* 的 WebSocket 反代情况')
+ alert('{{tr "TerminalConnectionFailed"}}')
}