mirror of
https://github.com/Kuingsmile/PicList.git
synced 2025-01-23 14:48:13 -05:00
✨ Feature: i18n of new bucket config
This commit is contained in:
parent
a473e25469
commit
67fe85ece7
@ -368,7 +368,7 @@ MANAGE_CONSTANT_ALIYUN_ITEMS_PAGE_DESC: Number of items displayed per page
|
||||
MANAGE_CONSTANT_ALIYUN_EXPLAIN: When configuring bucket name and base directory, they can be set using English comma separation. The order must be consistent and missing or empty items will use the default value.
|
||||
MANAGE_CONSTANT_ALIYUN_REFER_TEXT: 'Refer to: '
|
||||
|
||||
MANAGE_CONSTANT_TENCENT_NAME: Tencent Cloud
|
||||
MANAGE_CONSTANT_TENCENT_NAME: Tencent
|
||||
MANAGE_CONSTANT_TENCENT_ALIAS_DESC: Alias - Required
|
||||
MANAGE_CONSTANT_TENCENT_ALIAS_PLACEHOLDER: Unique identifier for this configuration
|
||||
MANAGE_CONSTANT_TENCENT_SECRET_ID_DESC: SecretID - Required
|
||||
@ -687,6 +687,49 @@ MANAGE_BUCKET_FILE_COLUMN_INFO: File Info
|
||||
MANAGE_BUCKET_FILE_COLUMN_FILESIZE: Size
|
||||
MANAGE_BUCKET_FILE_COLUMN_TIME: Time
|
||||
|
||||
MANAGE_NEW_BUCKET_TCYUN_NAME: Tencent Cloud
|
||||
MANAGE_NEW_BUCKET_TCYUN_BUCKETNAME_DESC: Bucket Name
|
||||
MANAGE_NEW_BUCKET_TCYUN_BUCKETNAME_PLACEHOLDER: Please enter the Bucket name
|
||||
MANAGE_NEW_BUCKET_TCYUN_BUCKETNAME_RULE_MSG_A: Bucket name can't be empty
|
||||
MANAGE_NEW_BUCKET_TCYUN_BUCKETNAME_RULE_MSG_B: Bucket name length cannot exceed 23 characters
|
||||
MANAGE_NEW_BUCKET_TCYUN_BUCKETNAME_RULE_MSG_C: Bucket name can only contain lowercase letters, numbers, and hyphens, and cannot begin or end with a hyphen
|
||||
MANAGE_NEW_BUCKET_TCYUN_REGION: Region
|
||||
MANAGE_NEW_BUCKET_TCYUN_ACL_DESC: Access Control
|
||||
MANAGE_NEW_BUCKET_TCYUN_ACL_PUBLIC_RW: Public Read and Write
|
||||
MANAGE_NEW_BUCKET_TCYUN_ACL_PUBLIC_R: Public Read
|
||||
MANAGE_NEW_BUCKET_TCYUN_ACL_PRIVATE: Private
|
||||
MANAGE_NEW_BUCKET_ALIYUN_NAME: Alibaba Cloud
|
||||
MANAGE_NEW_BUCKET_ALIYUN_BUCKETNAME_DESC: Bucket Name
|
||||
MANAGE_NEW_BUCKET_ALIYUN_BUCKETNAME_PLACEHOLDER: Please enter the Bucket name
|
||||
MANAGE_NEW_BUCKET_ALIYUN_BUCKETNAME_RULE_MSG_A: Bucket name can't be empty
|
||||
MANAGE_NEW_BUCKET_ALIYUN_BUCKETNAME_RULE_MSG_B: Bucket name length cannot exceed 63 characters
|
||||
MANAGE_NEW_BUCKET_ALIYUN_BUCKETNAME_RULE_MSG_C: Bucket name can only contain lowercase letters, numbers, and hyphens, and cannot begin or end with a hyphen
|
||||
MANAGE_NEW_BUCKET_ALIYUN_REGION: Region
|
||||
MANAGE_NEW_BUCKET_ALIYUN_ACL_DESC: Access Control
|
||||
MANAGE_NEW_BUCKET_ALIYUN_ACL_PUBLIC_RW: Public Read and Write
|
||||
MANAGE_NEW_BUCKET_ALIYUN_ACL_PUBLIC_R: Public Read
|
||||
MANAGE_NEW_BUCKET_ALIYUN_ACL_PRIVATE: Private
|
||||
MANAGE_NEW_BUCKET_QINIU_NAME: Qiniu Cloud
|
||||
MANAGE_NEW_BUCKET_QINIU_BUCKETNAME_DESC: Bucket Name
|
||||
MANAGE_NEW_BUCKET_QINIU_BUCKETNAME_PLACEHOLDER: Please enter the Bucket name
|
||||
MANAGE_NEW_BUCKET_QINIU_BUCKETNAME_RULE_MSG_A: Bucket name can't be empty
|
||||
MANAGE_NEW_BUCKET_QINIU_BUCKETNAME_RULE_MSG_B: Bucket name length cannot exceed 63 characters
|
||||
MANAGE_NEW_BUCKET_QINIU_BUCKETNAME_RULE_MSG_C: Bucket names can only contain lowercase letters, numbers, and hyphens, and cannot start or end with a hyphen.
|
||||
MANAGE_NEW_BUCKET_QINIU_REGION: Region
|
||||
MANAGE_NEW_BUCKET_QINIU_ACL_DESC: Public Access
|
||||
MANAGE_NEW_BUCKET_UPYUN_NAME: Upyun
|
||||
MANAGE_NEW_BUCKET_UPYUN_BUCKETNAME_DESC: Bucket Name
|
||||
MANAGE_NEW_BUCKET_UPYUN_BUCKETNAME_PLACEHOLDER: Please enter bucket name
|
||||
MANAGE_NEW_BUCKET_UPYUN_BUCKETNAME_RULE_MSG_A: Bucket name cannot be empty
|
||||
MANAGE_NEW_BUCKET_UPYUN_BUCKETNAME_RULE_MSG_B: Bucket name length should be between 5-20 characters
|
||||
MANAGE_NEW_BUCKET_UPYUN_BUCKETNAME_RULE_MSG_C: Bucket names can only contain lowercase letters, numbers, and hyphens, and cannot start or end with a hyphen.
|
||||
MANAGE_NEW_BUCKET_UPYUN_OPERATORNAME_DESC: Operator Name
|
||||
MANAGE_NEW_BUCKET_UPYUN_OPERATORNAME_PLACEHOLDER: Please enter operator name
|
||||
MANAGE_NEW_BUCKET_UPYUN_OPERATORNAME_RULE_MSG_A: Operator name cannot be empty
|
||||
MANAGE_NEW_BUCKET_UPYUN_PASSWORD_DESC: Password
|
||||
MANAGE_NEW_BUCKET_UPYUN_PASSWORD_PLACEHOLDER: Please enter password
|
||||
MANAGE_NEW_BUCKET_UPYUN_PASSWORD_RULE_MSG_A: Password cannot be empty
|
||||
|
||||
# ---renderer i18n end---
|
||||
|
||||
# plugins
|
||||
|
@ -687,6 +687,50 @@ MANAGE_BUCKET_FILE_COLUMN_INFO: 文件信息
|
||||
MANAGE_BUCKET_FILE_COLUMN_FILESIZE: 大小
|
||||
MANAGE_BUCKET_FILE_COLUMN_TIME: 修改时间
|
||||
|
||||
MANAGE_NEW_BUCKET_TCYUN_NAME: 腾讯云
|
||||
MANAGE_NEW_BUCKET_TCYUN_BUCKETNAME_DESC: Bucket名
|
||||
MANAGE_NEW_BUCKET_TCYUN_BUCKETNAME_PLACEHOLDER: 请输入Bucket名
|
||||
MANAGE_NEW_BUCKET_TCYUN_BUCKETNAME_RULE_MSG_A: Bucket名不能为空
|
||||
MANAGE_NEW_BUCKET_TCYUN_BUCKETNAME_RULE_MSG_B: Bucket名称长度不能超过23个字符
|
||||
MANAGE_NEW_BUCKET_TCYUN_BUCKETNAME_RULE_MSG_C: Bucket名称只能包含小写字母、数字和中划线,且不能以中划线开头和结尾
|
||||
MANAGE_NEW_BUCKET_TCYUN_REGION: 区域
|
||||
MANAGE_NEW_BUCKET_TCYUN_ACL_DESC: 访问权限
|
||||
MANAGE_NEW_BUCKET_TCYUN_ACL_PUBLIC_RW: 公共读写
|
||||
MANAGE_NEW_BUCKET_TCYUN_ACL_PUBLIC_R: 公共读
|
||||
MANAGE_NEW_BUCKET_TCYUN_ACL_PRIVATE: 私有
|
||||
MANAGE_NEW_BUCKET_ALIYUN_NAME: 阿里云
|
||||
MANAGE_NEW_BUCKET_ALIYUN_BUCKETNAME_DESC: Bucket名
|
||||
MANAGE_NEW_BUCKET_ALIYUN_BUCKETNAME_PLACEHOLDER: 请输入Bucket名
|
||||
MANAGE_NEW_BUCKET_ALIYUN_BUCKETNAME_RULE_MSG_A: Bucket名不能为空
|
||||
MANAGE_NEW_BUCKET_ALIYUN_BUCKETNAME_RULE_MSG_B: Bucket名称长度不能超过63个字符
|
||||
MANAGE_NEW_BUCKET_ALIYUN_BUCKETNAME_RULE_MSG_C: Bucket名称只能包含小写字母、数字和中划线,且不能以中划线开头和结尾
|
||||
MANAGE_NEW_BUCKET_ALIYUN_REGION: 区域
|
||||
MANAGE_NEW_BUCKET_ALIYUN_ACL_DESC: 访问权限
|
||||
MANAGE_NEW_BUCKET_ALIYUN_ACL_PUBLIC_RW: 公共读写
|
||||
MANAGE_NEW_BUCKET_ALIYUN_ACL_PUBLIC_R: 公共读
|
||||
MANAGE_NEW_BUCKET_ALIYUN_ACL_PRIVATE: 私有
|
||||
MANAGE_NEW_BUCKET_QINIU_NAME: 七牛云
|
||||
MANAGE_NEW_BUCKET_QINIU_BUCKETNAME_DESC: Bucket名
|
||||
MANAGE_NEW_BUCKET_QINIU_BUCKETNAME_PLACEHOLDER: 请输入Bucket名
|
||||
MANAGE_NEW_BUCKET_QINIU_BUCKETNAME_RULE_MSG_A: Bucket名不能为空
|
||||
MANAGE_NEW_BUCKET_QINIU_BUCKETNAME_RULE_MSG_B: Bucket名称长度不能超过63个字符
|
||||
MANAGE_NEW_BUCKET_QINIU_BUCKETNAME_RULE_MSG_C: Bucket名称只能包含小写字母、数字和中划线,且不能以中划线开头和结尾
|
||||
MANAGE_NEW_BUCKET_QINIU_REGION: 区域
|
||||
MANAGE_NEW_BUCKET_QINIU_ACL_DESC: 公开访问
|
||||
MANAGE_NEW_BUCKET_UPYUN_NAME: 又拍云
|
||||
MANAGE_NEW_BUCKET_UPYUN_BUCKETNAME_DESC: Bucket名
|
||||
MANAGE_NEW_BUCKET_UPYUN_BUCKETNAME_PLACEHOLDER: 请输入Bucket名
|
||||
MANAGE_NEW_BUCKET_UPYUN_BUCKETNAME_RULE_MSG_A: Bucket名不能为空
|
||||
MANAGE_NEW_BUCKET_UPYUN_BUCKETNAME_RULE_MSG_B: Bucket名称长度为5-20个字符
|
||||
MANAGE_NEW_BUCKET_UPYUN_BUCKETNAME_RULE_MSG_C: Bucket名称只能包含小写字母、数字和中划线,且不能以中划线开头和结尾
|
||||
MANAGE_NEW_BUCKET_UPYUN_OPERATORNAME_DESC: 操作员
|
||||
MANAGE_NEW_BUCKET_UPYUN_OPERATORNAME_PLACEHOLDER: 请输入操作员
|
||||
MANAGE_NEW_BUCKET_UPYUN_OPERATORNAME_RULE_MSG_A: 操作员不能为空
|
||||
MANAGE_NEW_BUCKET_UPYUN_PASSWORD_DESC: 密码
|
||||
MANAGE_NEW_BUCKET_UPYUN_PASSWORD_PLACEHOLDER: 请输入密码
|
||||
MANAGE_NEW_BUCKET_UPYUN_PASSWORD_RULE_MSG_A: 密码不能为空
|
||||
|
||||
|
||||
# ---renderer i18n end---
|
||||
|
||||
# plugins
|
||||
|
@ -687,6 +687,48 @@ MANAGE_BUCKET_FILE_COLUMN_INFO: 文件信息
|
||||
MANAGE_BUCKET_FILE_COLUMN_FILESIZE: 大小
|
||||
MANAGE_BUCKET_FILE_COLUMN_TIME: 修改時間
|
||||
|
||||
MANAGE_NEW_BUCKET_TCYUN_NAME: 腾讯雲
|
||||
MANAGE_NEW_BUCKET_TCYUN_BUCKETNAME_DESC: Bucket名稱
|
||||
MANAGE_NEW_BUCKET_TCYUN_BUCKETNAME_PLACEHOLDER: 請輸入Bucket名稱
|
||||
MANAGE_NEW_BUCKET_TCYUN_BUCKETNAME_RULE_MSG_A: Bucket名稱不能為空
|
||||
MANAGE_NEW_BUCKET_TCYUN_BUCKETNAME_RULE_MSG_B: Bucket名稱長度不能超過23個字符
|
||||
MANAGE_NEW_BUCKET_TCYUN_BUCKETNAME_RULE_MSG_C: Bucket名稱只能包含小寫字母、數字和中橫線,且不能以中橫線開頭和結尾
|
||||
MANAGE_NEW_BUCKET_TCYUN_REGION: 區域
|
||||
MANAGE_NEW_BUCKET_TCYUN_ACL_DESC: 訪問權限
|
||||
MANAGE_NEW_BUCKET_TCYUN_ACL_PUBLIC_RW: 公共讀寫
|
||||
MANAGE_NEW_BUCKET_TCYUN_ACL_PUBLIC_R: 公共讀
|
||||
MANAGE_NEW_BUCKET_TCYUN_ACL_PRIVATE: 私有
|
||||
MANAGE_NEW_BUCKET_ALIYUN_NAME: 阿里雲
|
||||
MANAGE_NEW_BUCKET_ALIYUN_BUCKETNAME_DESC: Bucket名稱
|
||||
MANAGE_NEW_BUCKET_ALIYUN_BUCKETNAME_PLACEHOLDER: 請輸入Bucket名稱
|
||||
MANAGE_NEW_BUCKET_ALIYUN_BUCKETNAME_RULE_MSG_A: Bucket名稱不能為空
|
||||
MANAGE_NEW_BUCKET_ALIYUN_BUCKETNAME_RULE_MSG_B: Bucket名稱長度不能超過63個字符
|
||||
MANAGE_NEW_BUCKET_ALIYUN_BUCKETNAME_RULE_MSG_C: Bucket名稱只能包含小寫字母、數字和中橫線,且不能以中橫線開頭和結尾
|
||||
MANAGE_NEW_BUCKET_ALIYUN_REGION: 區域
|
||||
MANAGE_NEW_BUCKET_ALIYUN_ACL_DESC: 訪問權限
|
||||
MANAGE_NEW_BUCKET_ALIYUN_ACL_PUBLIC_RW: 公共讀寫
|
||||
MANAGE_NEW_BUCKET_ALIYUN_ACL_PUBLIC_R: 公共讀
|
||||
MANAGE_NEW_BUCKET_ALIYUN_ACL_PRIVATE: 私有
|
||||
MANAGE_NEW_BUCKET_QINIU_NAME: 七牛雲
|
||||
MANAGE_NEW_BUCKET_QINIU_BUCKETNAME_DESC: Bucket名稱
|
||||
MANAGE_NEW_BUCKET_QINIU_BUCKETNAME_PLACEHOLDER: 請輸入Bucket名稱
|
||||
MANAGE_NEW_BUCKET_QINIU_BUCKETNAME_RULE_MSG_A: Bucket名稱不能為空
|
||||
MANAGE_NEW_BUCKET_QINIU_BUCKETNAME_RULE_MSG_B: Bucket名稱長度不能超過63個字符
|
||||
MANAGE_NEW_BUCKET_QINIU_BUCKETNAME_RULE_MSG_C: Bucket名稱只能包含小寫字母、數字和中橫線,且不能以中橫線開頭和結尾
|
||||
MANAGE_NEW_BUCKET_QINIU_REGION: 區域
|
||||
MANAGE_NEW_BUCKET_QINIU_ACL_DESC: 公開訪問
|
||||
MANAGE_NEW_BUCKET_UPYUN_NAME: 又拍雲
|
||||
MANAGE_NEW_BUCKET_UPYUN_BUCKETNAME_DESC: Bucket名稱
|
||||
MANAGE_NEW_BUCKET_UPYUN_BUCKETNAME_PLACEHOLDER: 請輸入Bucket名稱
|
||||
MANAGE_NEW_BUCKET_UPYUN_BUCKETNAME_RULE_MSG_A: Bucket名稱不能為空
|
||||
MANAGE_NEW_BUCKET_UPYUN_BUCKETNAME_RULE_MSG_B: Bucket名稱長度為5-20個字符
|
||||
MANAGE_NEW_BUCKET_UPYUN_BUCKETNAME_RULE_MSG_C: Bucket名稱只能包含小寫字母、數字和中橫線,且不能以中橫線開頭和結尾
|
||||
MANAGE_NEW_BUCKET_UPYUN_OPERATORNAME_DESC: 操作員
|
||||
MANAGE_NEW_BUCKET_UPYUN_OPERATORNAME_PLACEHOLDER: 請輸入操作員
|
||||
MANAGE_NEW_BUCKET_UPYUN_OPERATORNAME_RULE_MSG_A: 操作員不能為空
|
||||
MANAGE_NEW_BUCKET_UPYUN_PASSWORD_DESC: 密碼
|
||||
MANAGE_NEW_BUCKET_UPYUN_PASSWORD_PLACEHOLDER: 請輸入密碼
|
||||
MANAGE_NEW_BUCKET_UPYUN_PASSWORD_RULE_MSG_A: 密碼不能為空
|
||||
# ---renderer i18n end---
|
||||
|
||||
# plugins
|
||||
|
@ -1,30 +1,31 @@
|
||||
import { AliyunAreaCodeName, QiniuAreaCodeName, TencentAreaCodeName } from '~/main/manage/utils/constants'
|
||||
import { T as $T } from '@/i18n'
|
||||
|
||||
export const newBucketConfig:IStringKeyMap = {
|
||||
tcyun: {
|
||||
name: '腾讯云',
|
||||
name: $T('MANAGE_NEW_BUCKET_TCYUN_NAME'),
|
||||
icon: 'tcyun',
|
||||
configOptions: {
|
||||
BucketName: {
|
||||
required: true,
|
||||
description: 'Bucket名称',
|
||||
placeholder: '请输入Bucket名称',
|
||||
description: $T('MANAGE_NEW_BUCKET_TCYUN_BUCKETNAME_DESC'),
|
||||
placeholder: $T('MANAGE_NEW_BUCKET_TCYUN_BUCKETNAME_PLACEHOLDER'),
|
||||
paraType: 'string',
|
||||
component: 'input',
|
||||
default: 'piclist',
|
||||
rule: [
|
||||
{
|
||||
required: true,
|
||||
message: 'Bucket名称不能为空',
|
||||
message: $T('MANAGE_NEW_BUCKET_TCYUN_BUCKETNAME_RULE_MSG_A'),
|
||||
trigger: 'blur'
|
||||
},
|
||||
{
|
||||
validator: (rule: any, value: any, callback: any) => {
|
||||
const reg = /^[a-z0-9][a-z0-9-]{1,21}[a-z0-9]$/
|
||||
if (value.length > 23) {
|
||||
callback(new Error('Bucket名称长度不能超过23个字符'))
|
||||
callback(new Error($T('MANAGE_NEW_BUCKET_TCYUN_BUCKETNAME_RULE_MSG_B')))
|
||||
} else if (!reg.test(value)) {
|
||||
callback(new Error('Bucket名称只能包含小写字母、数字和中划线,且不能以中划线开头和结尾'))
|
||||
callback(new Error($T('MANAGE_NEW_BUCKET_TCYUN_BUCKETNAME_RULE_MSG_C')))
|
||||
} else {
|
||||
callback()
|
||||
}
|
||||
@ -35,7 +36,7 @@ export const newBucketConfig:IStringKeyMap = {
|
||||
},
|
||||
region: {
|
||||
required: true,
|
||||
description: '地域',
|
||||
description: $T('MANAGE_NEW_BUCKET_TCYUN_REGION'),
|
||||
paraType: 'string',
|
||||
component: 'select',
|
||||
default: 'ap-nanjing',
|
||||
@ -43,43 +44,43 @@ export const newBucketConfig:IStringKeyMap = {
|
||||
},
|
||||
acl: {
|
||||
required: true,
|
||||
description: '访问权限',
|
||||
description: $T('MANAGE_NEW_BUCKET_TCYUN_ACL_DESC'),
|
||||
paraType: 'string',
|
||||
component: 'select',
|
||||
default: 'private',
|
||||
options: {
|
||||
private: '私有',
|
||||
publicRead: '公共读',
|
||||
publicReadWrite: '公共读写'
|
||||
private: $T('MANAGE_NEW_BUCKET_TCYUN_ACL_PRIVATE'),
|
||||
publicRead: $T('MANAGE_NEW_BUCKET_TCYUN_ACL_PUBLIC_R'),
|
||||
publicReadWrite: $T('MANAGE_NEW_BUCKET_TCYUN_ACL_PUBLIC_RW')
|
||||
}
|
||||
}
|
||||
},
|
||||
options: ['BucketName', 'region', 'acl']
|
||||
},
|
||||
aliyun: {
|
||||
name: '阿里云',
|
||||
name: $T('MANAGE_NEW_BUCKET_ALIYUN_NAME'),
|
||||
icon: 'aliyun',
|
||||
configOptions: {
|
||||
BucketName: {
|
||||
required: true,
|
||||
description: 'Bucket名称',
|
||||
placeholder: '请输入Bucket名称',
|
||||
description: $T('MANAGE_NEW_BUCKET_ALIYUN_BUCKETNAME_DESC'),
|
||||
placeholder: $T('MANAGE_NEW_BUCKET_ALIYUN_BUCKETNAME_PLACEHOLDER'),
|
||||
paraType: 'string',
|
||||
component: 'input',
|
||||
default: 'piclist',
|
||||
rule: [
|
||||
{
|
||||
required: true,
|
||||
message: 'Bucket名称不能为空',
|
||||
message: $T('MANAGE_NEW_BUCKET_ALIYUN_BUCKETNAME_RULE_MSG_A'),
|
||||
trigger: 'blur'
|
||||
},
|
||||
{
|
||||
validator: (rule: any, value: any, callback: any) => {
|
||||
const reg = /^[a-z0-9][a-z0-9-]{0,61}[a-z0-9]$/
|
||||
if (value.length > 63) {
|
||||
callback(new Error('Bucket名称长度不能超过63个字符'))
|
||||
callback(new Error($T('MANAGE_NEW_BUCKET_ALIYUN_BUCKETNAME_RULE_MSG_B')))
|
||||
} else if (!reg.test(value)) {
|
||||
callback(new Error('Bucket名称只能包含小写字母、数字和中划线,且不能以中划线开头和结尾'))
|
||||
callback(new Error($T('MANAGE_NEW_BUCKET_ALIYUN_BUCKETNAME_RULE_MSG_C')))
|
||||
} else {
|
||||
callback()
|
||||
}
|
||||
@ -90,7 +91,7 @@ export const newBucketConfig:IStringKeyMap = {
|
||||
},
|
||||
region: {
|
||||
required: true,
|
||||
description: '地域',
|
||||
description: $T('MANAGE_NEW_BUCKET_ALIYUN_REGION'),
|
||||
paraType: 'string',
|
||||
component: 'select',
|
||||
default: 'oss-cn-hangzhou',
|
||||
@ -98,43 +99,43 @@ export const newBucketConfig:IStringKeyMap = {
|
||||
},
|
||||
acl: {
|
||||
required: true,
|
||||
description: '访问权限',
|
||||
description: $T('MANAGE_NEW_BUCKET_ALIYUN_ACL_DESC'),
|
||||
paraType: 'string',
|
||||
component: 'select',
|
||||
default: 'private',
|
||||
options: {
|
||||
private: '私有',
|
||||
publicRead: '公共读',
|
||||
publicReadWrite: '公共读写'
|
||||
private: $T('MANAGE_NEW_BUCKET_ALIYUN_ACL_PRIVATE'),
|
||||
publicRead: $T('MANAGE_NEW_BUCKET_ALIYUN_ACL_PUBLIC_R'),
|
||||
publicReadWrite: $T('MANAGE_NEW_BUCKET_ALIYUN_ACL_PUBLIC_RW')
|
||||
}
|
||||
}
|
||||
},
|
||||
options: ['BucketName', 'region', 'acl']
|
||||
},
|
||||
qiniu: {
|
||||
name: '七牛云',
|
||||
name: $T('MANAGE_NEW_BUCKET_QINIU_NAME'),
|
||||
icon: 'qiniu',
|
||||
configOptions: {
|
||||
BucketName: {
|
||||
required: true,
|
||||
description: 'Bucket名称',
|
||||
placeholder: '请输入Bucket名称',
|
||||
description: $T('MANAGE_NEW_BUCKET_QINIU_BUCKETNAME_DESC'),
|
||||
placeholder: $T('MANAGE_NEW_BUCKET_QINIU_BUCKETNAME_PLACEHOLDER'),
|
||||
paraType: 'string',
|
||||
component: 'input',
|
||||
default: 'piclist',
|
||||
rule: [
|
||||
{
|
||||
required: true,
|
||||
message: 'Bucket名称不能为空',
|
||||
message: $T('MANAGE_NEW_BUCKET_QINIU_BUCKETNAME_RULE_MSG_A'),
|
||||
trigger: 'blur'
|
||||
},
|
||||
{
|
||||
validator: (rule: any, value: any, callback: any) => {
|
||||
const reg = /^[a-z0-9][a-z0-9-]{1,61}[a-z0-9]$/
|
||||
if (value.length > 63) {
|
||||
callback(new Error('Bucket名称长度不能超过63个字符'))
|
||||
callback(new Error($T('MANAGE_NEW_BUCKET_QINIU_BUCKETNAME_RULE_MSG_B')))
|
||||
} else if (!reg.test(value)) {
|
||||
callback(new Error('Bucket名称只能包含小写字母、数字和中划线,且不能以中划线开头和结尾'))
|
||||
callback(new Error($T('MANAGE_NEW_BUCKET_QINIU_BUCKETNAME_RULE_MSG_C')))
|
||||
} else {
|
||||
callback()
|
||||
}
|
||||
@ -145,7 +146,7 @@ export const newBucketConfig:IStringKeyMap = {
|
||||
},
|
||||
region: {
|
||||
required: true,
|
||||
description: '地域',
|
||||
description: $T('MANAGE_NEW_BUCKET_QINIU_REGION'),
|
||||
paraType: 'string',
|
||||
component: 'select',
|
||||
default: 'z0',
|
||||
@ -153,7 +154,7 @@ export const newBucketConfig:IStringKeyMap = {
|
||||
},
|
||||
acl: {
|
||||
required: true,
|
||||
description: '公开访问',
|
||||
description: $T('MANAGE_NEW_BUCKET_QINIU_ACL_DESC'),
|
||||
paraType: 'boolean',
|
||||
component: 'switch',
|
||||
default: false
|
||||
@ -162,29 +163,29 @@ export const newBucketConfig:IStringKeyMap = {
|
||||
options: ['BucketName', 'region', 'acl']
|
||||
},
|
||||
upyun: {
|
||||
name: '又拍云',
|
||||
name: $T('MANAGE_NEW_BUCKET_UPYUN_NAME'),
|
||||
icon: 'upyun',
|
||||
configOptions: {
|
||||
BucketName: {
|
||||
required: true,
|
||||
description: 'Bucket名称',
|
||||
placeholder: '请输入Bucket名称',
|
||||
description: $T('MANAGE_NEW_BUCKET_UPYUN_BUCKETNAME_DESC'),
|
||||
placeholder: $T('MANAGE_NEW_BUCKET_UPYUN_BUCKETNAME_PLACEHOLDER'),
|
||||
paraType: 'string',
|
||||
component: 'input',
|
||||
default: 'piclist',
|
||||
rule: [
|
||||
{
|
||||
required: true,
|
||||
message: 'Bucket名称不能为空',
|
||||
message: $T('MANAGE_NEW_BUCKET_UPYUN_BUCKETNAME_RULE_MSG_A'),
|
||||
trigger: 'blur'
|
||||
},
|
||||
{
|
||||
validator: (rule: any, value: any, callback: any) => {
|
||||
const reg = /^[a-z][a-z0-9-]{4,19}$/
|
||||
if (value.length > 23 || value.length < 5) {
|
||||
callback(new Error('Bucket名称长度为5-20个字符'))
|
||||
callback(new Error($T('MANAGE_NEW_BUCKET_UPYUN_BUCKETNAME_RULE_MSG_B')))
|
||||
} else if (!reg.test(value)) {
|
||||
callback(new Error('Bucket名称只能包含小写字母、数字和中划线,且不能以中划线开头和结尾'))
|
||||
callback(new Error($T('MANAGE_NEW_BUCKET_UPYUN_BUCKETNAME_RULE_MSG_C')))
|
||||
} else {
|
||||
callback()
|
||||
}
|
||||
@ -195,28 +196,28 @@ export const newBucketConfig:IStringKeyMap = {
|
||||
},
|
||||
operator: {
|
||||
required: true,
|
||||
description: '操作员',
|
||||
placeholder: '请输入操作员',
|
||||
description: $T('MANAGE_NEW_BUCKET_UPYUN_OPERATORNAME_DESC'),
|
||||
placeholder: $T('MANAGE_NEW_BUCKET_UPYUN_OPERATORNAME_PLACEHOLDER'),
|
||||
paraType: 'string',
|
||||
component: 'input',
|
||||
rule: [
|
||||
{
|
||||
required: true,
|
||||
message: '操作员不能为空',
|
||||
message: $T('MANAGE_NEW_BUCKET_UPYUN_OPERATORNAME_RULE_MSG_A'),
|
||||
trigger: 'blur'
|
||||
}
|
||||
]
|
||||
},
|
||||
password: {
|
||||
required: true,
|
||||
description: '密码',
|
||||
placeholder: '请输入密码',
|
||||
description: $T('MANAGE_NEW_BUCKET_UPYUN_PASSWORD_DESC'),
|
||||
placeholder: $T('MANAGE_NEW_BUCKET_UPYUN_PASSWORD_PLACEHOLDER'),
|
||||
paraType: 'string',
|
||||
component: 'input',
|
||||
rule: [
|
||||
{
|
||||
required: true,
|
||||
message: '密码不能为空',
|
||||
message: $T('MANAGE_NEW_BUCKET_UPYUN_PASSWORD_RULE_MSG_A'),
|
||||
trigger: 'blur'
|
||||
}
|
||||
]
|
||||
|
42
src/universal/types/i18n.d.ts
vendored
42
src/universal/types/i18n.d.ts
vendored
@ -643,6 +643,48 @@ interface ILocales {
|
||||
MANAGE_BUCKET_FILE_COLUMN_INFO: string
|
||||
MANAGE_BUCKET_FILE_COLUMN_FILESIZE: string
|
||||
MANAGE_BUCKET_FILE_COLUMN_TIME: string
|
||||
MANAGE_NEW_BUCKET_TCYUN_NAME: string
|
||||
MANAGE_NEW_BUCKET_TCYUN_BUCKETNAME_DESC: string
|
||||
MANAGE_NEW_BUCKET_TCYUN_BUCKETNAME_PLACEHOLDER: string
|
||||
MANAGE_NEW_BUCKET_TCYUN_BUCKETNAME_RULE_MSG_A: string
|
||||
MANAGE_NEW_BUCKET_TCYUN_BUCKETNAME_RULE_MSG_B: string
|
||||
MANAGE_NEW_BUCKET_TCYUN_BUCKETNAME_RULE_MSG_C: string
|
||||
MANAGE_NEW_BUCKET_TCYUN_REGION: string
|
||||
MANAGE_NEW_BUCKET_TCYUN_ACL_DESC: string
|
||||
MANAGE_NEW_BUCKET_TCYUN_ACL_PUBLIC_RW: string
|
||||
MANAGE_NEW_BUCKET_TCYUN_ACL_PUBLIC_R: string
|
||||
MANAGE_NEW_BUCKET_TCYUN_ACL_PRIVATE: string
|
||||
MANAGE_NEW_BUCKET_ALIYUN_NAME: string
|
||||
MANAGE_NEW_BUCKET_ALIYUN_BUCKETNAME_DESC: string
|
||||
MANAGE_NEW_BUCKET_ALIYUN_BUCKETNAME_PLACEHOLDER: string
|
||||
MANAGE_NEW_BUCKET_ALIYUN_BUCKETNAME_RULE_MSG_A: string
|
||||
MANAGE_NEW_BUCKET_ALIYUN_BUCKETNAME_RULE_MSG_B: string
|
||||
MANAGE_NEW_BUCKET_ALIYUN_BUCKETNAME_RULE_MSG_C: string
|
||||
MANAGE_NEW_BUCKET_ALIYUN_REGION: string
|
||||
MANAGE_NEW_BUCKET_ALIYUN_ACL_DESC: string
|
||||
MANAGE_NEW_BUCKET_ALIYUN_ACL_PUBLIC_RW: string
|
||||
MANAGE_NEW_BUCKET_ALIYUN_ACL_PUBLIC_R: string
|
||||
MANAGE_NEW_BUCKET_ALIYUN_ACL_PRIVATE: string
|
||||
MANAGE_NEW_BUCKET_QINIU_NAME: string
|
||||
MANAGE_NEW_BUCKET_QINIU_BUCKETNAME_DESC: string
|
||||
MANAGE_NEW_BUCKET_QINIU_BUCKETNAME_PLACEHOLDER: string
|
||||
MANAGE_NEW_BUCKET_QINIU_BUCKETNAME_RULE_MSG_A: string
|
||||
MANAGE_NEW_BUCKET_QINIU_BUCKETNAME_RULE_MSG_B: string
|
||||
MANAGE_NEW_BUCKET_QINIU_BUCKETNAME_RULE_MSG_C: string
|
||||
MANAGE_NEW_BUCKET_QINIU_REGION: string
|
||||
MANAGE_NEW_BUCKET_QINIU_ACL_DESC: string
|
||||
MANAGE_NEW_BUCKET_UPYUN_NAME: string
|
||||
MANAGE_NEW_BUCKET_UPYUN_BUCKETNAME_DESC: string
|
||||
MANAGE_NEW_BUCKET_UPYUN_BUCKETNAME_PLACEHOLDER: string
|
||||
MANAGE_NEW_BUCKET_UPYUN_BUCKETNAME_RULE_MSG_A: string
|
||||
MANAGE_NEW_BUCKET_UPYUN_BUCKETNAME_RULE_MSG_B: string
|
||||
MANAGE_NEW_BUCKET_UPYUN_BUCKETNAME_RULE_MSG_C: string
|
||||
MANAGE_NEW_BUCKET_UPYUN_OPERATORNAME_DESC: string
|
||||
MANAGE_NEW_BUCKET_UPYUN_OPERATORNAME_PLACEHOLDER: string
|
||||
MANAGE_NEW_BUCKET_UPYUN_OPERATORNAME_RULE_MSG_A: string
|
||||
MANAGE_NEW_BUCKET_UPYUN_PASSWORD_DESC: string
|
||||
MANAGE_NEW_BUCKET_UPYUN_PASSWORD_PLACEHOLDER: string
|
||||
MANAGE_NEW_BUCKET_UPYUN_PASSWORD_RULE_MSG_A: string
|
||||
PLUGIN_INSTALL_SUCCEED: string
|
||||
PLUGIN_INSTALL_FAILED: string
|
||||
PLUGIN_UNINSTALL_SUCCEED: string
|
||||
|
Loading…
Reference in New Issue
Block a user