mirror of
https://github.com/labring/FastGPT.git
synced 2025-07-24 22:03:54 +00:00
i18n
This commit is contained in:
@@ -35,7 +35,7 @@
|
|||||||
"select a document": "select a document",
|
"select a document": "select a document",
|
||||||
"support": "support {{fileExtension}} file",
|
"support": "support {{fileExtension}} file",
|
||||||
"upload error description": "Only upload multiple files or one folder at a time",
|
"upload error description": "Only upload multiple files or one folder at a time",
|
||||||
"If the imported file is garbled, please convert CSV to utf-8 encoding format": "If the imported file is garbled, please convert CSV to utf-8 encoding format"
|
"If the imported file is garbled, please convert CSV to UTF-8 encoding format": "If the imported file is garbled, please convert CSV to UTF-8 encoding format"
|
||||||
},
|
},
|
||||||
"home": {
|
"home": {
|
||||||
"Quickly build AI question and answer library": "Quickly build AI question and answer library",
|
"Quickly build AI question and answer library": "Quickly build AI question and answer library",
|
||||||
@@ -75,4 +75,4 @@
|
|||||||
"Update password succseful": "Update password succseful",
|
"Update password succseful": "Update password succseful",
|
||||||
"Usage Record": "Usage"
|
"Usage Record": "Usage"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -35,7 +35,7 @@
|
|||||||
"select a document": "选择文件",
|
"select a document": "选择文件",
|
||||||
"support": "支持 {{fileExtension}} 文件",
|
"support": "支持 {{fileExtension}} 文件",
|
||||||
"upload error description": "单次只支持上传多个文件或者一个文件夹",
|
"upload error description": "单次只支持上传多个文件或者一个文件夹",
|
||||||
"If the imported file is garbled, please convert CSV to utf-8 encoding format": "如果导入文件乱码,请将 CSV 转成 utf-8 编码格式"
|
"If the imported file is garbled, please convert CSV to UTF-8 encoding format": "如果导入文件乱码,请将 CSV 转成 UTF-8 编码格式"
|
||||||
},
|
},
|
||||||
"home": {
|
"home": {
|
||||||
"Quickly build AI question and answer library": "快速搭建 AI 问答系统",
|
"Quickly build AI question and answer library": "快速搭建 AI 问答系统",
|
||||||
@@ -75,4 +75,4 @@
|
|||||||
"Update password succseful": "修改密码成功",
|
"Update password succseful": "修改密码成功",
|
||||||
"Usage Record": "使用记录"
|
"Usage Record": "使用记录"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -9,8 +9,7 @@ import {
|
|||||||
NumberInputStepper,
|
NumberInputStepper,
|
||||||
NumberIncrementStepper,
|
NumberIncrementStepper,
|
||||||
NumberDecrementStepper,
|
NumberDecrementStepper,
|
||||||
Image,
|
Image
|
||||||
Textarea
|
|
||||||
} from '@chakra-ui/react';
|
} from '@chakra-ui/react';
|
||||||
import { useToast } from '@/hooks/useToast';
|
import { useToast } from '@/hooks/useToast';
|
||||||
import { useConfirm } from '@/hooks/useConfirm';
|
import { useConfirm } from '@/hooks/useConfirm';
|
||||||
|
@@ -52,7 +52,7 @@ const CsvImport = ({ kbId }: { kbId: string }) => {
|
|||||||
promise = promise.then(async () => {
|
promise = promise.then(async () => {
|
||||||
const { header, data } = await readCsvContent(file);
|
const { header, data } = await readCsvContent(file);
|
||||||
if (header[0] !== 'question' || header[1] !== 'answer') {
|
if (header[0] !== 'question' || header[1] !== 'answer') {
|
||||||
throw new Error('csv 文件格式有误');
|
throw new Error('csv 文件格式有误,请确保 question 和 answer 两列');
|
||||||
}
|
}
|
||||||
|
|
||||||
setFiles((state) => [
|
setFiles((state) => [
|
||||||
@@ -73,7 +73,7 @@ const CsvImport = ({ kbId }: { kbId: string }) => {
|
|||||||
} catch (error: any) {
|
} catch (error: any) {
|
||||||
console.log(error);
|
console.log(error);
|
||||||
toast({
|
toast({
|
||||||
title: typeof error === 'string' ? error : '解析文件失败',
|
title: getErrText(error, '解析文件失败'),
|
||||||
status: 'error'
|
status: 'error'
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -136,7 +136,9 @@ const CsvImport = ({ kbId }: { kbId: string }) => {
|
|||||||
fileExtension={fileExtension}
|
fileExtension={fileExtension}
|
||||||
onSelectFile={onSelectFile}
|
onSelectFile={onSelectFile}
|
||||||
isLoading={selecting}
|
isLoading={selecting}
|
||||||
tipText={'If the imported file is garbled, please convert CSV to utf-8 encoding format'}
|
tipText={
|
||||||
|
'file.If the imported file is garbled, please convert CSV to UTF-8 encoding format'
|
||||||
|
}
|
||||||
py={emptyFiles ? '100px' : 5}
|
py={emptyFiles ? '100px' : 5}
|
||||||
isCsv
|
isCsv
|
||||||
/>
|
/>
|
||||||
|
Reference in New Issue
Block a user