chore: i18n

This commit is contained in:
Joel
2025-02-13 15:50:18 +08:00
parent f60e650400
commit b74f1b3c07
3 changed files with 22 additions and 4 deletions

View File

@@ -8,6 +8,8 @@ import Field from './field'
import OptionCard from '../../workflow/nodes/_base/components/option-card'
import Input from '@/app/components/base/input'
const i18nPrefix = 'dataset.metadata.createMetadata'
type Props = {
onSave: (data: any) => void
}
@@ -33,12 +35,12 @@ const CreateModal: FC<Props> = ({
}, [onSave, type, name])
return (
<ModalLikeWrap
title='Create'
title={t(`${i18nPrefix}.title`)}
onClose={() => { }}
onConfirm={handleSave}
>
<div className='space-y-3'>
<Field label='Type'>
<Field label={t(`${i18nPrefix}.type`)}>
<div className='grid grid-cols-3 gap-2'>
<OptionCard
title='String'
@@ -57,11 +59,11 @@ const CreateModal: FC<Props> = ({
/>
</div>
</Field>
<Field label='Name'>
<Field label={t(`${i18nPrefix}.name`)}>
<Input
value={name}
onChange={handleNameChange}
placeholder='Add metadata name'
placeholder={t(`${i18nPrefix}.namePlaceholder`)}
/>
</Field>
</div>

View File

@@ -168,6 +168,14 @@ const translation = {
preprocessDocument: '{{num}} Preprocess Documents',
allKnowledge: 'All Knowledge',
allKnowledgeDescription: 'Select to display all knowledge in this workspace. Only the Workspace Owner can manage all knowledge.',
metadata: {
createMetadata: {
title: 'New Metadata',
type: 'Type',
name: 'Name',
namePlaceholder: 'Add metadata name',
},
},
}
export default translation

View File

@@ -168,6 +168,14 @@ const translation = {
preprocessDocument: '{{num}} 个预处理文档',
allKnowledge: '所有知识库',
allKnowledgeDescription: '选择以显示该工作区内所有知识库。只有工作区所有者才能管理所有知识库。',
metadata: {
createMetadata: {
title: '新建元数据',
type: '类型',
name: '名称',
namePlaceholder: '添加元数据名称',
},
},
}
export default translation