fix: add upload i18n

This commit is contained in:
Joel 2024-09-27 11:16:02 +08:00
parent 288be3fbd8
commit 3904782647
3 changed files with 11 additions and 3 deletions

View File

@ -115,12 +115,12 @@ const FileUploadSetting: FC<Props> = ({
</Field>
)}
<Field
title='Upload File Types'
title={t('appDebug.variableConfig.uploadFileTypes')}
className='mt-4'
>
<div className='grid grid-cols-3 gap-2'>
<OptionCard
title='Local Upload'
title={t('appDebug.variableConfig.localUpload')}
selected={allowed_file_upload_methods.length === 1 && allowed_file_upload_methods.includes(TransferMethod.local_file)}
onSelect={handleUploadMethodChange(TransferMethod.local_file)}
/>
@ -130,7 +130,7 @@ const FileUploadSetting: FC<Props> = ({
onSelect={handleUploadMethodChange(TransferMethod.remote_url)}
/>
<OptionCard
title="Both"
title={t('appDebug.variableConfig.both')}
selected={allowed_file_upload_methods.includes(TransferMethod.local_file) && allowed_file_upload_methods.includes(TransferMethod.remote_url)}
onSelect={handleUploadMethodChange(TransferMethod.all)}
/>

View File

@ -367,6 +367,9 @@ const translation = {
createPlaceholder: '+ File extension, e.g .doc',
},
},
'uploadFileTypes': 'Upload File Types',
'localUpload': 'Local Upload',
'both': 'Both',
'maxNumberOfUploads': 'Max number of uploads',
'maxNumberTip': 'Max {{size}} each',
'errorMsg': {

View File

@ -360,6 +360,11 @@ const translation = {
createPlaceholder: '+ 文件扩展名,例如 .doc',
},
},
'uploadFileTypes': '上传文件类型',
'localUpload': '本地上传',
'both': '两者',
'maxNumberOfUploads': '最大上传数',
'maxNumberTip': '最大上传文件大小为 {{size}}',
'content': '内容',
'errorMsg': {
labelNameRequired: '显示名称必填',