fix: #209 after saving the knowledge base configuration, jump to the dataset page (#212)

### What problem does this PR solve?
fix: #209 after saving the knowledge base configuration, jump to the
dataset page
feat: translate ConfigurationForm
feat: translate KnowledgeTesting
feat: translate document list page
feat: translate knowledge list page

Issue link: #209

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
balibabu
2024-04-03 11:21:54 +08:00
committed by GitHub
parent 392e515c3f
commit 9b9b6d5408
19 changed files with 299 additions and 196 deletions

View File

@ -1,4 +1,4 @@
import { useShowDeleteConfirm } from '@/hooks/commonHooks';
import { useShowDeleteConfirm, useTranslate } from '@/hooks/commonHooks';
import { useRemoveDocument } from '@/hooks/documentHooks';
import { IKnowledgeFile } from '@/interfaces/database/knowledge';
import { api_host } from '@/utils/api';
@ -29,7 +29,7 @@ const ParsingActionCell = ({
}: IProps) => {
const documentId = record.id;
const isRunning = isParserRunning(record.run);
const { t } = useTranslate('knowledgeDetails');
const removeDocument = useRemoveDocument(documentId);
const showDeleteConfirm = useShowDeleteConfirm();
@ -65,7 +65,7 @@ const ParsingActionCell = ({
label: (
<div>
<Button type="link" onClick={onShowChangeParserModal}>
Chunk Method
{t('chunkMethod')}
</Button>
</div>
),
@ -83,7 +83,7 @@ const ParsingActionCell = ({
<ToolOutlined size={20} />
</Button>
</Dropdown>
<Tooltip title="Rename">
<Tooltip title={t('rename', { keyPrefix: 'common' })}>
<Button
type="text"
disabled={isRunning}