refactor(i18n): U21 Zabbix 组件 i18n 治理 — ZabbixDatasourceManager + ZabbixDashboard 从 i18n.t() 全局改为 useTranslation() hook
- ZabbixDatasourceManager.tsx (415L): 30 处 i18n.t()/硬编码中文清零, 删除 5 个 monitor.zabbixdatasourc.* hash 键, 新增 monitor.zabbixDs.* 语义化命名空间 (23 键)
- ZabbixDashboard.tsx (162L): 12 处 i18n.t()/硬编码中文清零, 删除 monitor.zabbixdashboard.* + monitor.prometheusdashb.s5e8eb212 hash 键, 修复 3 个中文幻影键 (i18n.t('磁盘') → t('monitor.zabbixDs.disk') 等)
- 新增 common.days/common.seconds 通用单位键
- 删除 monitor.zabbixdatasourc (5 hash 键) + monitor.zabbixdashboard (1 hash 键) + monitor.prometheusdashb.s5e8eb212 hash 键
- zh/en 6767=6767 对齐, tsc -b=0, npm build✓ (17.41s), ESLint=0/43/0/0, go build=0, 17/17 测试通过
This commit is contained in:
1 parent
f953ba3248
commit
fba5fc46b6
4 files changed
+142
-67
No files matched your search
@@ -511,7 +511,9 @@
|
||||
"created": "已创建",
|
||||
"severity": "级别",
|
||||
"critical": "严重",
|
||||
"request.tokenExpired": "登录已过期,请重新登录"
|
||||
"request.tokenExpired": "登录已过期,请重新登录",
|
||||
"days": "天",
|
||||
"seconds": "秒"
|
||||
},
|
||||
"menu": {
|
||||
"dashboard": "仪表盘",
|
||||
@@ -4393,6 +4395,41 @@
|
||||
"wechat": "企业微信",
|
||||
"email": "邮件",
|
||||
"sms": "短信"
|
||||
},
|
||||
"zabbixDs": {
|
||||
"title": "Zabbix 数据源",
|
||||
"subtitle": "配置 Zabbix API 连接,获取主机监控数据",
|
||||
"addDatasource": "添加数据源",
|
||||
"emptyState": "暂无 Zabbix 数据源",
|
||||
"fetchListError": "获取数据源列表失败",
|
||||
"urlRequired": "请输入 Zabbix API URL",
|
||||
"datasourceSaved": "数据源已保存",
|
||||
"deleteConfirm": "确定删除「{{name}}」?",
|
||||
"setDefaultSuccess": "已将「{{name}}」设为默认",
|
||||
"deleteFailed": "删除失败",
|
||||
"editTitle": "编辑 Zabbix 数据源",
|
||||
"createTitle": "新建 Zabbix 数据源",
|
||||
"dialogDesc": "配置 Zabbix API 连接,用于主机监控与告警数据获取",
|
||||
"namePlaceholder": "如:生产 Zabbix",
|
||||
"apiAuth": "Zabbix API 认证",
|
||||
"trendsSettings": "Trends 设置",
|
||||
"otherSettings": "其他设置",
|
||||
"directDbBadge": "直连DB",
|
||||
"disableAck": "只读用户禁用确认",
|
||||
"disableDataAlignment": "禁用数据对齐",
|
||||
"testConnection": "测试连接",
|
||||
"user": "用户",
|
||||
"loading": "加载中...",
|
||||
"noHosts": "未找到被监控的 Zabbix 主机",
|
||||
"hostMonitor": "Zabbix 主机监控",
|
||||
"unit": "台",
|
||||
"disk": "磁盘",
|
||||
"flowOut": "流出",
|
||||
"problems": "问题",
|
||||
"totalHosts": "共 {{count}} 台主机",
|
||||
"perPage": "/页",
|
||||
"prevPage": "上一页",
|
||||
"nextPage": "下一页"
|
||||
}
|
||||
},
|
||||
"task": {
|
||||
|
||||
Reference in new issue
Block a user