feat(i18n): add internationalization support across multiple components
This commit is contained in:
@@ -6,6 +6,7 @@ import {
|
||||
Settings as ConfigIcon,
|
||||
|
||||
} from '@mui/icons-material';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
|
||||
interface FloatingActionButtonsProps {
|
||||
onTestClick: () => void;
|
||||
@@ -16,22 +17,24 @@ const FloatingActionButtons: React.FC<FloatingActionButtonsProps> = ({
|
||||
onTestClick,
|
||||
onConfigClick,
|
||||
}) => {
|
||||
const { t } = useTranslation();
|
||||
|
||||
const actions = [
|
||||
{
|
||||
icon: <TestIcon />,
|
||||
name: '检索测试',
|
||||
name: t('knowledge.retrievalTest'),
|
||||
onClick: onTestClick,
|
||||
},
|
||||
{
|
||||
icon: <ConfigIcon />,
|
||||
name: '配置设置',
|
||||
name: t('knowledge.configSettings'),
|
||||
onClick: onConfigClick,
|
||||
},
|
||||
];
|
||||
|
||||
return (
|
||||
<SpeedDial
|
||||
ariaLabel="知识库操作"
|
||||
ariaLabel={t('knowledge.knowledgeBaseActions')}
|
||||
sx={{
|
||||
position: 'fixed',
|
||||
bottom: 128,
|
||||
|
||||
Reference in New Issue
Block a user