fix: Optimize internationalization configuration #3221 (#9924)

### What problem does this PR solve?

fix: Optimize internationalization configuration

- Update multi-language options, adding general translations for
functions like Select All and Clear
- Add internationalization support for modules like Chat, Search, and
Datasets

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
chanx
2025-09-05 09:57:15 +08:00
committed by GitHub
parent 41cb94324a
commit 3b1ee769eb
36 changed files with 175 additions and 51 deletions

View File

@ -36,7 +36,7 @@ export default function Agents() {
<section className="flex flex-col w-full flex-1">
<div className="px-8 pt-8 ">
<ListFilterBar
title="Agents"
title={t('flow.agents')}
searchString={searchString}
onSearchChange={handleInputChange}
icon="agent"

View File

@ -1,5 +1,7 @@
import { Button } from '@/components/ui/button';
import { cn } from '@/lib/utils';
import { t } from 'i18next';
import { lowerFirst } from 'lodash';
import {
Box,
ChartPie,
@ -23,26 +25,38 @@ const menuItems = [
items: [
{
icon: Sparkle,
label: MenuItemKey.Recommended,
label: t('flow.' + lowerFirst(MenuItemKey.Recommended)),
key: MenuItemKey.Recommended,
},
{ icon: Box, label: MenuItemKey.Agent, key: MenuItemKey.Agent },
{
icon: Box,
label: t('flow.' + lowerFirst(MenuItemKey.Agent)),
key: MenuItemKey.Agent,
},
{
icon: MessageCircleCode,
label: MenuItemKey.CustomerSupport,
label: t(
'flow.' + lowerFirst(MenuItemKey.CustomerSupport).replace(' ', ''),
),
key: MenuItemKey.CustomerSupport,
},
{
icon: ChartPie,
label: MenuItemKey.Marketing,
label: t('flow.' + lowerFirst(MenuItemKey.Marketing)),
key: MenuItemKey.Marketing,
},
{
icon: Component,
label: MenuItemKey.ConsumerApp,
label: t(
'flow.' + lowerFirst(MenuItemKey.ConsumerApp.replace(' ', '')),
),
key: MenuItemKey.ConsumerApp,
},
{ icon: PencilRuler, label: MenuItemKey.Other, key: MenuItemKey.Other },
{
icon: PencilRuler,
label: t('flow.' + lowerFirst(MenuItemKey.Other)),
key: MenuItemKey.Other,
},
],
},
];