feat(i18n): 监控大屏 GrafanaDashboard 全量国际化 — 108 翻译键 (monitor.dashboard.*) + 4 组件子Tab全量迁移

- GrafanaDashboard.tsx (640L) 全量迁移: AgentTab/ZabbixTab/PrometheusTab/DashboardTab 四个组件
- 新增 monitor.dashboard.* 命名空间 (108 键): tab/agent/batch/confirm/creds/warn/status/col/pagination/zabbix/prometheus/custom
- 硬编码中文 UI 文案 → t() 翻译键: Tab标签/工具栏/批量部署对话框/确认框/toast消息/表格列头/状态Badge/凭据表单/警告文案/分页/空状态
- TABS 常量改 getTabs(t) 函数模式(支持语言切换实时更新)
- zh-CN/en-US 完全对齐: 4201 键
- tsc -b=0, npm build ✅ (19.77s), ESLint any=37 unused=0, 17/17 集成测试通过
This commit is contained in:
attacker committed 2026-07-02 21:28:58 +08:00
1 parent be2cff5745
commit 0f0f2770e1
4 files changed
+388 -103

No files matched your search

+138 -2
View File
@@ -2434,7 +2434,143 @@
"totalItems": "{{count}} total",
"minutesShort": "{{count}}m",
"durationSeconds": "{{count}}s duration",
"peopleCount": "{{count}} people"
"peopleCount": "{{count}} people",
"dashboard": {
"title": "Monitoring Dashboard",
"subtitle": "Agent hosts, Zabbix, Prometheus and custom dashboards",
"tab": {
"agent": "Agent Hosts",
"dashboard": "Custom"
},
"refresh": "Refresh",
"loading": "Loading...",
"agent": {
"loadingHosts": "Loading agent host list...",
"emptyTitle": "No server assets",
"emptyDesc": "Please add hosts in Server Management first, then install Agent here",
"selected": "{{count}} selected",
"installAgent": "Install Agent",
"batchDeploy": "Batch Deploy",
"batchUninstall": "Batch Uninstall",
"deploying": "Deploying",
"chart": "Chart",
"toast": {
"installed": "Agent installation submitted, running in background…",
"installFailed": "Installation failed",
"refreshFailed": "Failed to refresh agent host list: {{msg}}",
"unknownError": "Unknown error",
"submitFailed": "Submission failed",
"batchUninstall": "Submitted: batch uninstalling Agent on {{count}} hosts, running in background, auto-refresh in 30s",
"batchInstall": "Submitted: batch installing Agent on {{count}} hosts, running in background, auto-refresh in 30s",
"batchUpgrade": "Submitted: batch upgrading Agent on {{count}} hosts, running in background, auto-refresh in 30s",
"allInstalled": "All selected hosts already have Agent installed",
"noOnline": "No online Agent among selected hosts, cannot upgrade",
"ackRequired": "Please check \"I acknowledge\" first",
"notLogin": "Not logged in"
}
},
"confirm": {
"uninstallTitle": "Batch Uninstall Agent",
"uninstallDesc": "Confirm uninstalling AIOps Agent on {{count}} selected hosts? Uninstall will run asynchronously in the background.",
"uninstall": "Uninstall"
},
"batch": {
"title": "Batch Deploy Agent",
"summary": "{{selected}} hosts selected (need install: {{install}}, upgrade: {{upgrade}})",
"install": "⚡ Install ({{count}})",
"upgrade": "🔄 Upgrade to latest ({{count}})",
"willInstall": "Will Install",
"willUpgrade": "Will Upgrade",
"ack": "I acknowledge the above risks and precautions",
"cancel": "Cancel",
"confirmInstall": "Confirm Install",
"confirmUpgrade": "Confirm Upgrade"
},
"status": {
"online": "Online",
"offline": "Offline",
"notInstalled": "Not Installed"
},
"col": {
"hostname": "Hostname",
"version": "Current Version",
"status": "Status",
"action": "Action",
"agentVersion": "Agent Version",
"cpu": "CPU",
"memory": "Memory",
"disk": "Disk",
"region": "Region"
},
"creds": {
"hint": "The following hosts have no saved SSH credentials. Please provide temporary credentials for batch installation (this time only):",
"authType": "Auth Method",
"password": "Password",
"sshKey": "SSH Private Key",
"username": "Username",
"passwordPlaceholder": "Enter SSH password"
},
"warn": {
"thisInstall": "This installation",
"thisUpgrade": "This upgrade",
"intro": ", the host monitoring probe will deploy AIOps Agent. AIOps Agent is the next-generation data collector, providing host monitoring metric collection and observability data collection.",
"upgradeNotice": "Please note the following before upgrading:",
"installNotice": "Please note the following before installation:",
"u1": "If your machine already has an older Agent installed, the upgrade will stop the old version and replace it with the latest.",
"u2": "If your machine previously installed Agent but has been uninstalled, leftover collection configs may become active again. Please ensure obsolete configs are removed before upgrading.",
"u3": "If your machine uses a custom-installed Agent (not the AIOps one-click install script), do not use batch upgrade directly.",
"u4": "Before batch upgrading, please test single-machine canary upgrade first.",
"i1": "Installation will auto-detect target host architecture (amd64/arm64), download the corresponding Agent binary and start the service.",
"i2": "Please ensure the target host's SSH port (default 22) is accessible and valid SSH credentials are associated.",
"i3": "Installation takes about 30-60 seconds, during which the target host's CPU load will briefly spike.",
"i4": "If installation fails, check the target host's firewall rules and SSH service status, then retry.",
"c1": "This operation is irreversible. Please ensure critical configs are backed up before proceeding.",
"c2": "The operation will run asynchronously in the background. You can view detailed progress in Task Execution Records."
},
"pagination": {
"total": "{{count}} total",
"prev": "Previous",
"next": "Next",
"perPage": "page"
},
"zabbix": {
"loading": "Loading Zabbix datasource...",
"emptyTitle": "No Zabbix datasource configured",
"goConfig": "Go to configure"
},
"prometheus": {
"loading": "Loading Prometheus datasource...",
"emptyTitle": "No Prometheus datasource configured"
},
"custom": {
"selectDashboard": "Select dashboard",
"defaultTag": "(Default)",
"addPanel": "Add Panel",
"create": "Create New",
"emptyNoPanels": "No panels",
"emptyNoDashboards": "No dashboards",
"createTitle": "Create Dashboard",
"name": "Name",
"datasource": "Datasource",
"cancel": "Cancel",
"createBtn": "Create",
"addPanelTitle": "Add Panel",
"panelTitle": "Title",
"panelType": "Type",
"panelQuery": "Query",
"typeGraph": "Line Chart",
"typeStat": "Stat",
"typeGauge": "Gauge",
"typeTable": "Table",
"addBtn": "Add",
"toastRefreshFailed": "Failed to refresh custom dashboards: {{msg}}",
"toastNameRequired": "Please enter a name",
"toastCreateSuccess": "Created successfully",
"toastCreateFailed": "Creation failed",
"toastPanelAdded": "Panel added successfully",
"toastPanelFailed": "Failed to add"
}
}
},
"task": {
"cronJob": {
@@ -4456,4 +4592,4 @@
"agentCliCopied": "Copied",
"agentCliHint": "For Agent CLI high-frequency calls"
}
}
}