mirror of
https://github.com/labring/FastGPT.git
synced 2025-08-02 12:48:30 +00:00
fix i18next.d.ts (#2064)
* fix i18next.d.ts * feat: packages web i18n * delete file
This commit is contained in:
@@ -121,7 +121,7 @@ const Header = ({}: {}) => {
|
||||
FirstPathDom={
|
||||
<>
|
||||
<Box fontWeight={'bold'} fontSize={['sm', 'md']}>
|
||||
{t(DatasetTypeMap[datasetDetail?.type]?.collectionLabel)}({total})
|
||||
{t(DatasetTypeMap[datasetDetail?.type]?.collectionLabel as any)}({total})
|
||||
</Box>
|
||||
{datasetDetail?.websiteConfig?.url && (
|
||||
<Flex fontSize={'sm'}>
|
||||
|
@@ -137,7 +137,7 @@ const CollectionCard = () => {
|
||||
getData(pageNum);
|
||||
toast({
|
||||
status: 'success',
|
||||
title: t(DatasetCollectionSyncResultMap[res]?.label)
|
||||
title: t(DatasetCollectionSyncResultMap[res]?.label as any)
|
||||
});
|
||||
},
|
||||
errorToast: t('common:core.dataset.error.Start Sync Failed')
|
||||
@@ -247,7 +247,7 @@ const CollectionCard = () => {
|
||||
</Td>
|
||||
<Td py={2}>
|
||||
{!checkCollectionIsFolder(collection.type) ? (
|
||||
<>{t(getTrainingTypeLabel(collection.trainingType) || '-')}</>
|
||||
<>{t((getTrainingTypeLabel(collection.trainingType) || '-') as any)}</>
|
||||
) : (
|
||||
'-'
|
||||
)}
|
||||
@@ -259,7 +259,7 @@ const CollectionCard = () => {
|
||||
</Td>
|
||||
<Td py={2}>
|
||||
<MyTag showDot colorSchema={collection.colorSchema as any} type={'borderFill'}>
|
||||
{t(collection.statusText)}
|
||||
{t(collection.statusText as any)}
|
||||
</MyTag>
|
||||
</Td>
|
||||
<Td py={2} onClick={(e) => e.stopPropagation()}>
|
||||
|
@@ -142,7 +142,7 @@ const DataCard = () => {
|
||||
return [
|
||||
{
|
||||
label: t('common:core.dataset.collection.metadata.source'),
|
||||
value: t(DatasetCollectionTypeMap[collection.type]?.name)
|
||||
value: t(DatasetCollectionTypeMap[collection.type]?.name as any)
|
||||
},
|
||||
{
|
||||
label: t('common:core.dataset.collection.metadata.source name'),
|
||||
@@ -166,7 +166,7 @@ const DataCard = () => {
|
||||
},
|
||||
{
|
||||
label: t('common:core.dataset.collection.metadata.Training Type'),
|
||||
value: t(TrainingTypeMap[collection.trainingType]?.label)
|
||||
value: t(TrainingTypeMap[collection.trainingType]?.label as any)
|
||||
},
|
||||
{
|
||||
label: t('common:core.dataset.collection.metadata.Chunk Size'),
|
||||
|
@@ -85,9 +85,9 @@ function DataProcess({ showPreviewChunks = true }: { showPreviewChunks: boolean
|
||||
<FormLabel flex={'0 0 100px'}>{t('common:core.dataset.import.Training mode')}</FormLabel>
|
||||
<LeftRadio
|
||||
list={trainingModeList.map(([key, value]) => ({
|
||||
title: t(value.label),
|
||||
title: t(value.label as any),
|
||||
value: key,
|
||||
tooltip: t(value.tooltip)
|
||||
tooltip: t(value.tooltip as any)
|
||||
}))}
|
||||
px={3}
|
||||
py={2}
|
||||
|
@@ -81,7 +81,7 @@ const InputDataModal = ({
|
||||
icon: 'common/overviewLight'
|
||||
},
|
||||
{
|
||||
label: t('dataset.data.edit.Index', { amount: indexes.length }),
|
||||
label: t('common:dataset.data.edit.Index', { amount: indexes.length }),
|
||||
value: TabEnum.index,
|
||||
icon: 'kbTest'
|
||||
},
|
||||
@@ -126,7 +126,7 @@ const InputDataModal = ({
|
||||
onError(err) {
|
||||
toast({
|
||||
status: 'error',
|
||||
title: t(getErrText(err))
|
||||
title: t(getErrText(err) as any)
|
||||
});
|
||||
onClose();
|
||||
}
|
||||
|
@@ -196,7 +196,7 @@ const Test = ({ datasetId }: { datasetId: string }) => {
|
||||
size={'sm'}
|
||||
onClick={onOpenSelectMode}
|
||||
>
|
||||
{t(searchModeData.title)}
|
||||
{t(searchModeData.title as any)}
|
||||
</Button>
|
||||
</Flex>
|
||||
|
||||
@@ -371,7 +371,7 @@ const TestHistories = React.memo(function TestHistories({
|
||||
w={'12px'}
|
||||
mr={'1px'}
|
||||
/>
|
||||
{t(DatasetSearchModeMap[item.searchMode].title)}
|
||||
{t(DatasetSearchModeMap[item.searchMode].title as any)}
|
||||
</Flex>
|
||||
) : (
|
||||
'-'
|
||||
@@ -382,7 +382,7 @@ const TestHistories = React.memo(function TestHistories({
|
||||
</Box>
|
||||
<Box flex={'0 0 70px'}>
|
||||
{formatTimeToChatTime(item.time).includes('.')
|
||||
? t(formatTimeToChatTime(item.time))
|
||||
? t(formatTimeToChatTime(item.time) as any)
|
||||
: formatTimeToChatTime(item.time)}
|
||||
</Box>
|
||||
<MyTooltip label={t('common:core.dataset.test.delete test history')}>
|
||||
|
@@ -45,7 +45,7 @@ const Detail = ({ datasetId, currentTab }: Props) => {
|
||||
onError(err: any) {
|
||||
router.replace(`/dataset/list`);
|
||||
toast({
|
||||
title: t(getErrText(err, t('common:common.Load Failed'))),
|
||||
title: t(getErrText(err, t('common:common.Load Failed')) as any),
|
||||
status: 'error'
|
||||
});
|
||||
}
|
||||
|
Reference in New Issue
Block a user