diff --git a/ui/litellm-dashboard/src/components/workflow_runs/index.tsx b/ui/litellm-dashboard/src/components/workflow_runs/index.tsx index 2aecbece2e3..5ee54ed2c00 100644 --- a/ui/litellm-dashboard/src/components/workflow_runs/index.tsx +++ b/ui/litellm-dashboard/src/components/workflow_runs/index.tsx @@ -1,6 +1,7 @@ import React, { useState, useEffect, useCallback } from "react"; import { Button, Collapse, Drawer, Empty, Spin, Table, Tooltip, Typography } from "antd"; import { ReloadOutlined } from "@ant-design/icons"; +import { useTranslation } from "react-i18next"; import { proxyBaseUrl } from "@/components/networking"; const { Text } = Typography; @@ -118,6 +119,7 @@ const StatusDot: React.FC<{ status: RunStatus; size?: number }> = ({ status, siz const TRUNCATE_AT = 120; const TruncatedValue: React.FC<{ value: string }> = ({ value }) => { + const { t } = useTranslation(); const [expanded, setExpanded] = useState(false); if (value.length <= TRUNCATE_AT) { return {value}; @@ -137,7 +139,7 @@ const TruncatedValue: React.FC<{ value: string }> = ({ value }) => { flexShrink: 0, }} > - {expanded ? "less" : "more"} + {expanded ? t("workflowRuns.index.less") : t("workflowRuns.index.more")} ); @@ -274,10 +276,11 @@ const GanttTimeline: React.FC<{ run: WorkflowRun; events: WorkflowRunEvent[]; }> = ({ run, events }) => { + const { t } = useTranslation(); if (events.length === 0) { return (
- No events recorded + {t("workflowRuns.index.noEvents")}
); } @@ -473,6 +476,7 @@ const MessageRow: React.FC<{ msg: WorkflowRunMessage }> = ({ msg }) => { // ── main component ──────────────────────────────────────────────────────────── const WorkflowRuns: React.FC = ({ accessToken }) => { + const { t } = useTranslation(); const [runs, setRuns] = useState([]); const [loadingRuns, setLoadingRuns] = useState(false); const [selectedRun, setSelectedRun] = useState(null); @@ -543,7 +547,7 @@ const WorkflowRuns: React.FC = ({ accessToken }) => { const columns = [ { - title: "Run", + title: t("workflowRuns.index.colRun"), dataIndex: "run_id", key: "run", render: (_: string, run: WorkflowRun) => ( @@ -557,13 +561,13 @@ const WorkflowRuns: React.FC = ({ accessToken }) => { ), }, { - title: "Type", + title: t("workflowRuns.index.colType"), dataIndex: "workflow_type", key: "workflow_type", render: (v: string) => {v}, }, { - title: "Status", + title: t("workflowRuns.index.colStatus"), dataIndex: "status", key: "status", render: (status: RunStatus, run: WorkflowRun) => { @@ -577,7 +581,7 @@ const WorkflowRuns: React.FC = ({ accessToken }) => { }, }, { - title: "Created", + title: t("workflowRuns.index.colCreated"), dataIndex: "created_at", key: "created_at", render: (v: string) => {timeAgo(v)}, @@ -604,10 +608,8 @@ const WorkflowRuns: React.FC = ({ accessToken }) => { }} >
-
Workflow Runs
-
- Durable state tracking for agents and automated workflows -
+
{t("workflowRuns.index.pageTitle")}
+
{t("workflowRuns.index.pageSubtitle")}
@@ -635,7 +637,9 @@ const WorkflowRuns: React.FC = ({ accessToken }) => { locale={{ emptyText: ( No workflow runs yet} + description={ + {t("workflowRuns.index.noRunsYet")} + } image={Empty.PRESENTED_IMAGE_SIMPLE} /> ), @@ -689,7 +693,7 @@ const WorkflowRuns: React.FC = ({ accessToken }) => { gap: 4, }} > - ← close + {t("workflowRuns.index.closeDrawer")} @@ -715,9 +719,9 @@ const WorkflowRuns: React.FC = ({ accessToken }) => { key: "timeline", label: ( - Timeline + {t("workflowRuns.index.timeline")} - {events.length} {events.length === 1 ? "event" : "events"} + {t("workflowRuns.index.eventCount", { count: events.length })} ), @@ -731,7 +735,7 @@ const WorkflowRuns: React.FC = ({ accessToken }) => { key: "messages", label: ( - Messages + {t("workflowRuns.index.messages")} {messages.length} @@ -740,7 +744,7 @@ const WorkflowRuns: React.FC = ({ accessToken }) => { children: messages.length === 0 ? (
- No messages + {t("workflowRuns.index.noMessages")}
) : (
diff --git a/ui/litellm-dashboard/src/locales/en.json b/ui/litellm-dashboard/src/locales/en.json index daff683d88e..64267826ee6 100644 --- a/ui/litellm-dashboard/src/locales/en.json +++ b/ui/litellm-dashboard/src/locales/en.json @@ -8492,5 +8492,25 @@ "roleInternalUser": "Internal User", "roleInternalUserViewer": "Internal User Viewer" } + }, + "workflowRuns": { + "index": { + "pageTitle": "Workflow Runs", + "pageSubtitle": "Durable state tracking for agents and automated workflows", + "colRun": "Run", + "colType": "Type", + "colStatus": "Status", + "colCreated": "Created", + "noRunsYet": "No workflow runs yet", + "closeDrawer": "← close", + "timeline": "Timeline", + "messages": "Messages", + "eventCount_one": "{{count}} event", + "eventCount_other": "{{count}} events", + "noEvents": "No events recorded", + "noMessages": "No messages", + "less": "less", + "more": "more" + } } } diff --git a/ui/litellm-dashboard/src/locales/zh-CN.json b/ui/litellm-dashboard/src/locales/zh-CN.json index b851f2c3aee..eb6997e32b3 100644 --- a/ui/litellm-dashboard/src/locales/zh-CN.json +++ b/ui/litellm-dashboard/src/locales/zh-CN.json @@ -8492,5 +8492,25 @@ "roleInternalUser": "内部用户", "roleInternalUserViewer": "内部用户(只读)" } + }, + "workflowRuns": { + "index": { + "pageTitle": "工作流运行", + "pageSubtitle": "为 Agent 和自动化工作流提供持久状态追踪", + "colRun": "运行", + "colType": "类型", + "colStatus": "状态", + "colCreated": "创建时间", + "noRunsYet": "暂无工作流运行记录", + "closeDrawer": "← 关闭", + "timeline": "时间线", + "messages": "消息", + "eventCount_one": "{{count}} 个事件", + "eventCount_other": "{{count}} 个事件", + "noEvents": "暂无事件记录", + "noMessages": "暂无消息", + "less": "收起", + "more": "展开" + } } }