From 7db2fb200c59178b9c9c2b53057b014932ec6886 Mon Sep 17 00:00:00 2001 From: chanx <1243304602@qq.com> Date: Tue, 24 Feb 2026 13:10:32 +0800 Subject: [PATCH] Fix: Metadata mult-selected display error (#13189) ### What problem does this PR solve? Fix: Metadata mult-selected display error ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue) --- web/src/components/bulk-operate-bar.tsx | 18 ++++++++++++++---- web/src/locales/en.ts | 1 + web/src/locales/zh.ts | 1 + .../components/metedata/manage-modal.tsx | 4 ++-- web/src/pages/dataset/dataset/index.tsx | 2 +- 5 files changed, 19 insertions(+), 7 deletions(-) diff --git a/web/src/components/bulk-operate-bar.tsx b/web/src/components/bulk-operate-bar.tsx index ce5a733767..ea71b50525 100644 --- a/web/src/components/bulk-operate-bar.tsx +++ b/web/src/components/bulk-operate-bar.tsx @@ -1,9 +1,9 @@ import { Button } from '@/components/ui/button'; import { Card, CardContent } from '@/components/ui/card'; import { cn } from '@/lib/utils'; -import { t } from 'i18next'; import { BrushCleaning } from 'lucide-react'; import { ReactNode, useCallback } from 'react'; +import { useTranslation } from 'react-i18next'; import { ConfirmDeleteDialog, ConfirmDeleteDialogNode, @@ -21,22 +21,28 @@ type BulkOperateBarProps = { list: BulkOperateItemType[]; count: number; className?: string; + unit?: string; }; export function BulkOperateBar({ list, count, className, + unit, }: BulkOperateBarProps) { const isDeleteItem = useCallback((id: string) => { return id === 'delete'; }, []); + const { t } = useTranslation(); return (
- Selected: {count} Files + + {t('common.selected')}: {count}{' '} + {unit ?? t('knowledgeDetails.files')} +
@@ -49,12 +55,16 @@ export function BulkOperateBar({