chore: fix type check for i18n (#30058)

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
Co-authored-by: yyh <yuanyouhuilyz@gmail.com>
This commit is contained in:
Stephen Zhou
2025-12-24 16:31:16 +08:00
committed by GitHub
parent 0f41924db4
commit 1e3823e605
155 changed files with 560 additions and 1015 deletions

View File

@ -145,7 +145,7 @@ export const useUpload = () => {
handleUpdateFile({ ...uploadingFile, uploadedId: res.id, progress: 100 })
},
onErrorCallback: (error?: any) => {
const errorMessage = getFileUploadErrorMessage(error, t('common.fileUploader.uploadFromComputerUploadError'), t)
const errorMessage = getFileUploadErrorMessage(error, t('common.fileUploader.uploadFromComputerUploadError'), t as any)
Toast.notify({ type: 'error', message: errorMessage })
handleUpdateFile({ ...uploadingFile, progress: -1 })
},
@ -187,7 +187,7 @@ export const useUpload = () => {
})
},
onErrorCallback: (error?: any) => {
const errorMessage = getFileUploadErrorMessage(error, t('common.fileUploader.uploadFromComputerUploadError'), t)
const errorMessage = getFileUploadErrorMessage(error, t('common.fileUploader.uploadFromComputerUploadError'), t as any)
Toast.notify({ type: 'error', message: errorMessage })
handleUpdateFile({ ...uploadingFile, progress: -1 })
},

View File

@ -33,8 +33,8 @@ const EconomicalRetrievalMethodConfig: FC<Props> = ({
<div className="space-y-2">
<RadioCard
icon={icon}
title={t(`dataset.retrieval.${type}.title`)}
description={t(`dataset.retrieval.${type}.description`)}
title={t(`dataset.retrieval.${type}.title` as any) as string}
description={t(`dataset.retrieval.${type}.description` as any) as string}
noRadio
chosenConfigWrapClassName="!pb-3"
chosenConfig={(