fix: 【国际化】数据源国际化

This commit is contained in:
taojinlong 2025-01-02 16:53:15 +08:00 committed by 王嘉豪
parent 64a9083872
commit 5c66b3d935
3 changed files with 24 additions and 24 deletions

View File

@ -84,28 +84,28 @@ const configRules = {
'configuration.initialPoolSize': [ 'configuration.initialPoolSize': [
{ {
required: true, required: true,
message: t('common.inputText') + t('datasource.initial_pool_size'), message: t('common.inputText') + ' ' + t('datasource.initial_pool_size'),
trigger: 'blur' trigger: 'blur'
} }
], ],
'configuration.minPoolSize': [ 'configuration.minPoolSize': [
{ {
required: true, required: true,
message: t('common.inputText') + t('datasource.min_pool_size'), message: t('common.inputText') + ' ' + t('datasource.min_pool_size'),
trigger: 'blur' trigger: 'blur'
} }
], ],
'configuration.maxPoolSize': [ 'configuration.maxPoolSize': [
{ {
required: true, required: true,
message: t('common.inputText') + t('datasource.max_pool_size'), message: t('common.inputText') + ' ' + t('datasource.max_pool_size'),
trigger: 'blur' trigger: 'blur'
} }
], ],
'configuration.queryTimeout': [ 'configuration.queryTimeout': [
{ {
required: true, required: true,
message: t('common.inputText') + t('datasource.query_timeout'), message: t('common.inputText') + ' ' + t('datasource.query_timeout'),
trigger: 'blur' trigger: 'blur'
} }
] ]

View File

@ -287,28 +287,28 @@ const setRules = () => {
'configuration.initialPoolSize': [ 'configuration.initialPoolSize': [
{ {
required: true, required: true,
message: t('common.inputText') + t('datasource.initial_pool_size'), message: t('common.inputText') + ' ' + t('datasource.initial_pool_size'),
trigger: 'blur' trigger: 'blur'
} }
], ],
'configuration.minPoolSize': [ 'configuration.minPoolSize': [
{ {
required: true, required: true,
message: t('common.inputText') + t('datasource.min_pool_size'), message: t('common.inputText') + ' ' + t('datasource.min_pool_size'),
trigger: 'blur' trigger: 'blur'
} }
], ],
'configuration.maxPoolSize': [ 'configuration.maxPoolSize': [
{ {
required: true, required: true,
message: t('common.inputText') + t('datasource.max_pool_size'), message: t('common.inputText') + ' ' + t('datasource.max_pool_size'),
trigger: 'blur' trigger: 'blur'
} }
], ],
'configuration.queryTimeout': [ 'configuration.queryTimeout': [
{ {
required: true, required: true,
message: t('common.inputText') + t('datasource.query_timeout'), message: t('common.inputText') + ' ' + t('datasource.query_timeout'),
trigger: 'blur' trigger: 'blur'
} }
], ],
@ -1014,7 +1014,7 @@ defineExpose({
step-strictly step-strictly
class="text-left" class="text-left"
:min="0" :min="0"
:placeholder="t('common.inputText') + t('datasource.port')" :placeholder="t('common.inputText') + ' ' + t('datasource.port')"
controls-position="right" controls-position="right"
type="number" type="number"
/> />
@ -1036,7 +1036,7 @@ defineExpose({
v-if="form.type === 'presto'" v-if="form.type === 'presto'"
> >
<el-select <el-select
:placeholder="t('common.inputText') + t('datasource.auth_method')" :placeholder="t('common.inputText') + ' ' + t('datasource.auth_method')"
v-model="form.configuration.authMethod" v-model="form.configuration.authMethod"
class="de-select" class="de-select"
> >
@ -1054,7 +1054,7 @@ defineExpose({
v-if="form.type === 'presto'" v-if="form.type === 'presto'"
> >
<el-input <el-input
:placeholder="t('common.inputText') + t('datasource.client_principal')" :placeholder="t('common.inputText') + ' ' + t('datasource.client_principal')"
v-model="form.configuration.username" v-model="form.configuration.username"
autocomplete="off" autocomplete="off"
/> />
@ -1065,7 +1065,7 @@ defineExpose({
v-if="form.type === 'presto'" v-if="form.type === 'presto'"
> >
<CustomPassword <CustomPassword
:placeholder="t('common.inputText') + t('datasource.keytab_Key_path')" :placeholder="t('common.inputText') + ' ' + t('datasource.keytab_Key_path')"
show-password show-password
type="password" type="password"
v-model="form.configuration.password" v-model="form.configuration.password"
@ -1087,14 +1087,14 @@ defineExpose({
</el-form-item> </el-form-item>
<el-form-item :label="t('datasource.user_name')" v-if="form.type !== 'presto'"> <el-form-item :label="t('datasource.user_name')" v-if="form.type !== 'presto'">
<el-input <el-input
:placeholder="t('common.inputText') + t('datasource.user_name')" :placeholder="t('common.inputText') + ' ' + t('datasource.user_name')"
v-model="form.configuration.username" v-model="form.configuration.username"
autocomplete="off" autocomplete="off"
/> />
</el-form-item> </el-form-item>
<el-form-item :label="t('datasource.password')" v-if="form.type !== 'presto'"> <el-form-item :label="t('datasource.password')" v-if="form.type !== 'presto'">
<CustomPassword <CustomPassword
:placeholder="t('common.inputText') + t('datasource.password')" :placeholder="t('common.inputText') + ' ' + t('datasource.password')"
show-password show-password
type="password" type="password"
v-model="form.configuration.password" v-model="form.configuration.password"
@ -1142,7 +1142,7 @@ defineExpose({
v-if="form.configuration.urlType !== 'jdbcUrl' && form.type !== 'es'" v-if="form.configuration.urlType !== 'jdbcUrl' && form.type !== 'es'"
> >
<el-input <el-input
:placeholder="t('common.inputText') + t('datasource.extra_params')" :placeholder="t('common.inputText') + ' ' + t('datasource.extra_params')"
v-model="form.configuration.extraParams" v-model="form.configuration.extraParams"
autocomplete="off" autocomplete="off"
/> />
@ -1184,13 +1184,13 @@ defineExpose({
class="text-left" class="text-left"
:min="0" :min="0"
:max="65535" :max="65535"
:placeholder="t('common.inputText') + t('datasource.port')" :placeholder="t('common.inputText') + ' ' + t('datasource.port')"
controls-position="right" controls-position="right"
/> />
</el-form-item> </el-form-item>
<el-form-item :label="t('datasource.user_name')" prop="configuration.sshUserName"> <el-form-item :label="t('datasource.user_name')" prop="configuration.sshUserName">
<el-input <el-input
:placeholder="t('common.inputText') + t('datasource.user_name')" :placeholder="t('common.inputText') + ' ' + t('datasource.user_name')"
v-model="form.configuration.sshUserName" v-model="form.configuration.sshUserName"
autocomplete="off" autocomplete="off"
:maxlength="255" :maxlength="255"
@ -1208,7 +1208,7 @@ defineExpose({
prop="configuration.sshPassword" prop="configuration.sshPassword"
> >
<CustomPassword <CustomPassword
:placeholder="t('common.inputText') + t('datasource.password')" :placeholder="t('common.inputText') + ' ' + t('datasource.password')"
show-password show-password
type="password" type="password"
v-model="form.configuration.sshPassword" v-model="form.configuration.sshPassword"
@ -1234,7 +1234,7 @@ defineExpose({
v-if="form.configuration.sshType === 'sshkey'" v-if="form.configuration.sshType === 'sshkey'"
> >
<CustomPassword <CustomPassword
:placeholder="t('common.inputText') + t('datasource.password')" :placeholder="t('common.inputText') + ' ' + t('datasource.password')"
show-password show-password
type="password" type="password"
v-model="form.configuration.sshKeyPassword" v-model="form.configuration.sshKeyPassword"
@ -1268,7 +1268,7 @@ defineExpose({
v-model="form.configuration.initialPoolSize" v-model="form.configuration.initialPoolSize"
controls-position="right" controls-position="right"
autocomplete="off" autocomplete="off"
:placeholder="t('common.inputText') + t('datasource.initial_pool_size')" :placeholder="t('common.inputText') + ' ' + t('datasource.initial_pool_size')"
type="number" type="number"
:min="0" :min="0"
/> />
@ -1283,7 +1283,7 @@ defineExpose({
v-model="form.configuration.minPoolSize" v-model="form.configuration.minPoolSize"
controls-position="right" controls-position="right"
autocomplete="off" autocomplete="off"
:placeholder="t('common.inputText') + t('datasource.min_pool_size')" :placeholder="t('common.inputText') + ' ' + t('datasource.min_pool_size')"
type="number" type="number"
:min="0" :min="0"
/> />
@ -1300,7 +1300,7 @@ defineExpose({
v-model="form.configuration.maxPoolSize" v-model="form.configuration.maxPoolSize"
controls-position="right" controls-position="right"
autocomplete="off" autocomplete="off"
:placeholder="t('common.inputText') + t('datasource.max_pool_size')" :placeholder="t('common.inputText') + ' ' + t('datasource.max_pool_size')"
type="number" type="number"
:min="0" :min="0"
/> />
@ -1315,7 +1315,7 @@ defineExpose({
v-model="form.configuration.queryTimeout" v-model="form.configuration.queryTimeout"
controls-position="right" controls-position="right"
autocomplete="off" autocomplete="off"
:placeholder="t('common.inputText') + t('datasource.query_timeout')" :placeholder="t('common.inputText') + ' ' + t('datasource.query_timeout')"
type="number" type="number"
:min="0" :min="0"
/> />

View File

@ -1453,7 +1453,7 @@ const getMenuList = (val: boolean) => {
<template v-if="slotProps.active"> <template v-if="slotProps.active">
<el-row :gutter="24"> <el-row :gutter="24">
<el-col :span="12"> <el-col :span="12">
<BaseInfoItem :label="t('auth.datasource') + t('common.name')">{{ <BaseInfoItem :label="t('auth.datasource') + ' ' + t('common.name')">{{
nodeInfo.name nodeInfo.name
}}</BaseInfoItem> }}</BaseInfoItem>
</el-col> </el-col>