mirror of
https://github.com/langgenius/dify.git
synced 2026-01-05 22:15:52 +00:00
chore: i18n
This commit is contained in:
@@ -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>
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -168,6 +168,14 @@ const translation = {
|
||||
preprocessDocument: '{{num}} 个预处理文档',
|
||||
allKnowledge: '所有知识库',
|
||||
allKnowledgeDescription: '选择以显示该工作区内所有知识库。只有工作区所有者才能管理所有知识库。',
|
||||
metadata: {
|
||||
createMetadata: {
|
||||
title: '新建元数据',
|
||||
type: '类型',
|
||||
name: '名称',
|
||||
namePlaceholder: '添加元数据名称',
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
export default translation
|
||||
|
||||
Reference in New Issue
Block a user