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:
attacker committed 2026-07-11 12:57:46 +08:00
1 parent f953ba3248
commit fba5fc46b6
4 files changed
+142 -67

No files matched your search

+38 -1
View File
@@ -511,7 +511,9 @@
"created": "Created",
"severity": "Severity",
"critical": "Critical",
"request.tokenExpired": "Session expired, please log in again"
"request.tokenExpired": "Session expired, please log in again",
"days": "days",
"seconds": "sec"
},
"menu": {
"dashboard": "Dashboard",
@@ -4393,6 +4395,41 @@
"wechat": "WeChat Work",
"email": "Email",
"sms": "SMS"
},
"zabbixDs": {
"title": "Zabbix Datasource",
"subtitle": "Configure Zabbix API connection to get host monitoring data",
"addDatasource": "Add Datasource",
"emptyState": "No Zabbix data sources",
"fetchListError": "Failed to fetch datasource list",
"urlRequired": "Please enter Zabbix API URL",
"datasourceSaved": "Datasource saved",
"deleteConfirm": "Are you sure to delete \"{{name}}\"?",
"setDefaultSuccess": "\"{{name}}\" set as default",
"deleteFailed": "Delete failed",
"editTitle": "Edit Zabbix Datasource",
"createTitle": "Create Zabbix Datasource",
"dialogDesc": "Configure Zabbix API connection for host monitoring and alert data",
"namePlaceholder": "e.g. Production Zabbix",
"apiAuth": "Zabbix API Authentication",
"trendsSettings": "Trends Settings",
"otherSettings": "Other Settings",
"directDbBadge": "Direct DB",
"disableAck": "Disable Acknowledges (Read-only User)",
"disableDataAlignment": "Disable Data Alignment",
"testConnection": "Test Connection",
"user": "User",
"loading": "Loading...",
"noHosts": "No monitored Zabbix hosts found",
"hostMonitor": "Zabbix Host Monitor",
"unit": "hosts",
"disk": "Disk",
"flowOut": "Out",
"problems": "Problems",
"totalHosts": "{{count}} hosts total",
"perPage": "/page",
"prevPage": "Prev",
"nextPage": "Next"
}
},
"task": {