diff --git a/frontend/src/components/deploy/AppRelease.tsx b/frontend/src/components/deploy/AppRelease.tsx index 6ec0aab..1b52c1f 100644 --- a/frontend/src/components/deploy/AppRelease.tsx +++ b/frontend/src/components/deploy/AppRelease.tsx @@ -1,5 +1,6 @@ import { useState, useEffect } from 'react'; import { useNavigate } from 'react-router-dom'; +import { useTranslation } from 'react-i18next'; import { Button } from '@/components/ui/button'; import { Input } from '@/components/ui/input'; import { Badge } from '@/components/ui/badge'; @@ -39,6 +40,7 @@ import { ContentPanel } from '@/components/layout/ContentPanel'; import { StatStrip } from '@/components/ui/stat-strip'; export function AppReleaseManager() { + const { t } = useTranslation(); const navigate = useNavigate(); const [searchQuery, setSearchQuery] = useState(''); const [envFilter, setEnvFilter] = useState('all'); @@ -188,8 +190,8 @@ export function AppReleaseManager() { {release.version} - {getEnvBadge(release.environment)} - {getStatusBadge(release.status)} + {getEnvBadge(release.environment, t)} + {getStatusBadge(release.status, t)}
diff --git a/frontend/src/components/deploy/DeployNav.tsx b/frontend/src/components/deploy/DeployNav.tsx index 5670390..a0cd6b4 100644 --- a/frontend/src/components/deploy/DeployNav.tsx +++ b/frontend/src/components/deploy/DeployNav.tsx @@ -1,17 +1,19 @@ import { NavLink } from 'react-router-dom'; +import { useTranslation } from 'react-i18next'; import { GitBranch, Settings2, Shield, Users, Server } from 'lucide-react'; import { cn } from '@/lib/utils'; const NAV_ITEMS = [ - { path: '/pipelines', label: '流水线', icon: GitBranch }, - { path: '/deploy/build-nodes', label: '构建节点', icon: Server }, - { path: '/deploy/configureTools', label: '发布配置', icon: Settings2 }, - { path: '/deploy/rbac', label: 'Job 权限', icon: Shield }, - { path: '/deploy/groups', label: '用户组', icon: Users }, + { path: '/pipelines', labelKey: 'deploy.pipeline.title', icon: GitBranch }, + { path: '/deploy/build-nodes', labelKey: 'deploy.deployNav.buildNodes', icon: Server }, + { path: '/deploy/configureTools', labelKey: 'deploy.label.releaseConfig', icon: Settings2 }, + { path: '/deploy/rbac', labelKey: 'deploy.deployNav.jobPermission', icon: Shield }, + { path: '/deploy/groups', labelKey: 'deploy.label.userGroups', icon: Users }, ]; // 应用发布模块二级导航 // Logan.Li export function DeployNav() { + const { t } = useTranslation(); return (