feat(i18n): U3 国际化 — react-i18next 双语框架 + 侧边栏/Header/Login 全量翻译 + 语言切换器

- 安装 i18next + react-i18next,创建 src/i18n/ 配置实例
- 创建 zh-CN.json (120+ 键) + en-US.json 全量英文翻译
- 侧边栏 42+ 菜单项全量 labelKey 国际化
- Header 通知/主题/用户菜单全量翻译
- Login 页面表单/按钮/主题+语言切换器
- zustand useLanguageStore 持久化语言选择
- HTML lang 属性自动同步
- tsc -b=0, npm build=✅, 17/17 测试通过
This commit is contained in:
attacker committed 2026-06-27 16:54:07 +08:00
1 parent 084a3be2cf
commit 2e179ef7f4
15 files changed
+860 -112

No files matched your search

+198
View File
@@ -0,0 +1,198 @@
{
"common": {
"appName": "AIOps Platform",
"confirm": "Confirm",
"cancel": "Cancel",
"save": "Save",
"delete": "Delete",
"edit": "Edit",
"add": "Add",
"create": "Create",
"update": "Update",
"search": "Search",
"refresh": "Refresh",
"loading": "Loading...",
"success": "Success",
"failed": "Failed",
"error": "Error",
"warning": "Warning",
"info": "Info",
"close": "Close",
"back": "Back",
"next": "Next",
"previous": "Previous",
"submit": "Submit",
"reset": "Reset",
"export": "Export",
"import": "Import",
"download": "Download",
"upload": "Upload",
"copy": "Copy",
"copied": "Copied",
"test": "Test",
"enable": "Enable",
"disable": "Disable",
"all": "All",
"none": "None",
"yes": "Yes",
"no": "No",
"actions": "Actions",
"status": "Status",
"name": "Name",
"description": "Description",
"type": "Type",
"createdAt": "Created At",
"updatedAt": "Updated At",
"noData": "No Data",
"total": "Total",
"detail": "Detail",
"more": "More",
"filter": "Filter",
"clear": "Clear",
"apply": "Apply",
"approve": "Approve",
"reject": "Reject",
"pending": "Pending",
"approved": "Approved",
"rejected": "Rejected",
"online": "Online",
"offline": "Offline",
"running": "Running",
"stopped": "Stopped",
"maintenance": "Maintenance",
"unknown": "Unknown",
"active": "Active",
"inactive": "Inactive",
"required": "Required",
"optional": "Optional",
"confirmDelete": "Confirm delete? This action cannot be undone.",
"savedSuccessfully": "Saved successfully",
"deletedSuccessfully": "Deleted successfully",
"operationSuccess": "Operation succeeded",
"operationFailed": "Operation failed",
"loadFailed": "Failed to load",
"saveFailed": "Failed to save"
},
"menu": {
"dashboard": "Dashboard",
"assets": "Assets",
"servers": "Servers",
"cloudAccounts": "Cloud Accounts",
"domains": "Domains",
"regions": "Regions",
"platforms": "Cloud Platforms",
"cloudBilling": "Cloud Billing",
"kubernetes": "Kubernetes",
"clusterList": "Clusters",
"nodeManagement": "Nodes",
"workloads": "Workloads",
"deployments": "Deployments",
"statefulsets": "StatefulSets",
"daemonsets": "DaemonSets",
"cronjobs": "CronJobs",
"pods": "Pods",
"network": "Network",
"services": "Services",
"ingresses": "Ingresses",
"configCenter": "Configuration",
"configmaps": "ConfigMaps",
"secrets": "Secrets",
"storage": "Storage",
"events": "Events",
"topology": "Topology",
"deploy": "Deployment",
"pipelines": "Pipelines",
"deployConfig": "Deploy Config",
"deployRbac": "Deploy RBAC",
"monitor": "Monitoring",
"grafana": "Dashboards",
"resourceMonitor": "Resource Monitor",
"trace": "Tracing",
"alertCenter": "Alert Center",
"datasources": "Datasources",
"logCenter": "Log Center",
"lokiQuery": "Loki Query",
"esQuery": "ES Query",
"logLibrary": "Log Library",
"logAlerts": "Log Alerts",
"automation": "Automation",
"cronJobs": "Cron Jobs",
"scripts": "Scripts",
"remoteExec": "Remote Exec",
"aiops": "AIOps",
"aiAssistant": "AI Assistant",
"aiAlertAnalyzer": "Alert Analysis",
"aiPredictive": "Capacity Forecast",
"aiAgentCli": "Agent CLI",
"aiLlmConfig": "LLM Settings",
"approval": "Requests",
"approvalResource": "Resource Request",
"approvalApp": "App Request",
"approvalPermission": "Permission Request",
"audit": "Security Audit",
"auditTerminal": "Terminal Audit",
"auditOperations": "Operations Audit",
"auditLogin": "Login Logs",
"system": "System",
"users": "Users",
"roles": "Roles & Permissions",
"credentials": "Credentials",
"approvalWorkflow": "Approval Workflow",
"settings": "Settings"
},
"header": {
"expandSidebar": "Expand Sidebar",
"collapseSidebar": "Collapse Sidebar",
"theme": "Switch Theme",
"themeSwitch": "Theme",
"notifications": "Notifications",
"markAllRead": "Mark All Read",
"noNotifications": "No Notifications",
"viewAllNotifications": "View All Notifications",
"profile": "Profile",
"accountSettings": "Account Settings",
"logout": "Logout",
"language": "Language",
"languageSwitch": "Language",
"admin": "Administrator"
},
"login": {
"title": "AIOps Intelligent Operations Platform",
"subtitle": "Enterprise-grade intelligent operations management platform",
"username": "Username",
"password": "Password",
"usernamePlaceholder": "Enter username",
"passwordPlaceholder": "Enter password",
"loginButton": "Sign In",
"loggingIn": "Signing in...",
"loginFailed": "Login failed",
"usernameRequired": "Please enter username",
"passwordRequired": "Please enter password",
"rememberMe": "Remember me",
"welcome": "Welcome to",
"features": {
"k8s": "Kubernetes Full-Stack Management",
"monitor": "Comprehensive Monitoring & Alerting",
"aiops": "AI-Powered Operations",
"ci": "CI/CD Automated Pipelines"
}
},
"dashboard": {
"title": "Dashboard",
"serverStats": "Server Statistics",
"totalServers": "Total Servers",
"onlineServers": "Online Servers",
"k8sClusters": "K8s Clusters",
"runningPods": "Running Pods",
"todayAlerts": "Today's Alerts",
"recentAlerts": "Recent Alerts",
"recentPipelines": "Recent Pipelines",
"recentReleases": "Recent Releases",
"systemOverview": "System Overview",
"resourceUsage": "Resource Usage",
"cpuUsage": "CPU Usage",
"memoryUsage": "Memory Usage",
"diskUsage": "Disk Usage",
"quickActions": "Quick Actions"
}
}
+198
View File
@@ -0,0 +1,198 @@
{
"common": {
"appName": "AIOps平台",
"confirm": "确认",
"cancel": "取消",
"save": "保存",
"delete": "删除",
"edit": "编辑",
"add": "添加",
"create": "创建",
"update": "更新",
"search": "搜索",
"refresh": "刷新",
"loading": "加载中...",
"success": "成功",
"failed": "失败",
"error": "错误",
"warning": "警告",
"info": "提示",
"close": "关闭",
"back": "返回",
"next": "下一步",
"previous": "上一步",
"submit": "提交",
"reset": "重置",
"export": "导出",
"import": "导入",
"download": "下载",
"upload": "上传",
"copy": "复制",
"copied": "已复制",
"test": "测试",
"enable": "启用",
"disable": "禁用",
"all": "全部",
"none": "无",
"yes": "是",
"no": "否",
"actions": "操作",
"status": "状态",
"name": "名称",
"description": "描述",
"type": "类型",
"createdAt": "创建时间",
"updatedAt": "更新时间",
"noData": "暂无数据",
"total": "总计",
"detail": "详情",
"more": "更多",
"filter": "筛选",
"clear": "清空",
"apply": "应用",
"approve": "通过",
"reject": "拒绝",
"pending": "待处理",
"approved": "已通过",
"rejected": "已拒绝",
"online": "在线",
"offline": "离线",
"running": "运行中",
"stopped": "已停止",
"maintenance": "维护中",
"unknown": "未知",
"active": "活跃",
"inactive": "未激活",
"required": "必填",
"optional": "可选",
"confirmDelete": "确认删除?此操作不可恢复。",
"savedSuccessfully": "保存成功",
"deletedSuccessfully": "删除成功",
"operationSuccess": "操作成功",
"operationFailed": "操作失败",
"loadFailed": "加载失败",
"saveFailed": "保存失败"
},
"menu": {
"dashboard": "仪表盘",
"assets": "资产管理",
"servers": "服务器管理",
"cloudAccounts": "云账号管理",
"domains": "域名管理",
"regions": "区域管理",
"platforms": "云平台",
"cloudBilling": "云账单",
"kubernetes": "Kubernetes",
"clusterList": "集群列表",
"nodeManagement": "节点管理",
"workloads": "工作负载",
"deployments": "Deployments",
"statefulsets": "StatefulSets",
"daemonsets": "DaemonSets",
"cronjobs": "CronJobs",
"pods": "Pods",
"network": "网络",
"services": "Services",
"ingresses": "Ingresses",
"configCenter": "配置中心",
"configmaps": "ConfigMaps",
"secrets": "Secrets",
"storage": "存储",
"events": "事件",
"topology": "架构拓扑",
"deploy": "应用发布",
"pipelines": "流水线",
"deployConfig": "发布配置",
"deployRbac": "发布权限",
"monitor": "监控中心",
"grafana": "监控大屏",
"resourceMonitor": "资源监控",
"trace": "链路追踪",
"alertCenter": "告警中心",
"datasources": "数据源",
"logCenter": "日志中心",
"lokiQuery": "Loki查询",
"esQuery": "ES查询",
"logLibrary": "日志库",
"logAlerts": "日志告警",
"automation": "自动化运维",
"cronJobs": "定时任务",
"scripts": "脚本库",
"remoteExec": "远程执行",
"aiops": "AIOps智能",
"aiAssistant": "智能助手",
"aiAlertAnalyzer": "告警分析",
"aiPredictive": "容量预测",
"aiAgentCli": "Agent CLI",
"aiLlmConfig": "大模型设置",
"approval": "资源申请",
"approvalResource": "资源申请",
"approvalApp": "应用申请",
"approvalPermission": "权限审批",
"audit": "安全审计",
"auditTerminal": "终端审计",
"auditOperations": "操作审计",
"auditLogin": "登录日志",
"system": "系统管理",
"users": "用户管理",
"roles": "角色权限",
"credentials": "凭证配置",
"approvalWorkflow": "审批流程",
"settings": "系统设置"
},
"header": {
"expandSidebar": "展开侧边栏",
"collapseSidebar": "收起侧边栏",
"theme": "切换主题",
"themeSwitch": "主题切换",
"notifications": "通知",
"markAllRead": "全部已读",
"noNotifications": "暂无通知",
"viewAllNotifications": "查看全部通知",
"profile": "个人中心",
"accountSettings": "账号设置",
"logout": "退出登录",
"language": "语言",
"languageSwitch": "语言切换",
"admin": "管理员"
},
"login": {
"title": "AIOps 智能运维平台",
"subtitle": "企业级智能运维管理平台",
"username": "用户名",
"password": "密码",
"usernamePlaceholder": "请输入用户名",
"passwordPlaceholder": "请输入密码",
"loginButton": "登 录",
"loggingIn": "登录中...",
"loginFailed": "登录失败",
"usernameRequired": "请输入用户名",
"passwordRequired": "请输入密码",
"rememberMe": "记住我",
"welcome": "欢迎使用",
"features": {
"k8s": "Kubernetes 全栈管理",
"monitor": "全方位监控告警",
"aiops": "AI 智能运维",
"ci": "CI/CD 自动化流水线"
}
},
"dashboard": {
"title": "仪表盘",
"serverStats": "服务器统计",
"totalServers": "服务器总数",
"onlineServers": "在线服务器",
"k8sClusters": "K8s集群",
"runningPods": "运行中Pod",
"todayAlerts": "今日告警",
"recentAlerts": "最近告警",
"recentPipelines": "最近流水线",
"recentReleases": "最近发布",
"systemOverview": "系统概览",
"resourceUsage": "资源使用率",
"cpuUsage": "CPU使用率",
"memoryUsage": "内存使用率",
"diskUsage": "磁盘使用率",
"quickActions": "快捷操作"
}
}