feat: 网元信息表单多语言翻译

This commit is contained in:
TsMask
2024-05-20 16:10:13 +08:00
parent 1ad2ed2d26
commit c1a9497b77
6 changed files with 59 additions and 50 deletions

View File

@@ -588,15 +588,19 @@ export default {
common: {
neType: 'NE Type',
neTypePlease: "Please select network element type",
neTypeTip: 'Fill in the type of network element to be created, e.g. SMF.',
neId: 'NE ID',
neIdPlease: 'Please enter the network element identification',
rmUid: 'Resource Unique ID',
rmUidPlease: 'Please enter a resource unique ID',
rmUidTip: "Tagging for data reporting of network element logs, alarms, metrics, etc.",
neName: 'NE Name',
neNamePlease: 'Please enter the name of the network element',
ipAddr: 'IP Addr',
ipAddrPlease: 'Please enter the IP address of the network element',
ipAddrTip: "Support IPV4/IPV6, synchronized change of configuration address",
port: 'Port',
portTip: "Network element default:33030",
serialNum: 'Serial Number',
expiryDate: 'Expiry Date',
normalcy: 'Normal',
@@ -623,10 +627,16 @@ export default {
sysDisk: "SYS Store",
neCpu: "NE CPU",
hostConfig: "Connection Configuration",
rmUID: "Data resource location identifiers are used for data tagging such as logging, alarm reporting, etc.",
ipAddr: "Support IPV4/IPV6, synchronize the change of the configuration address of the following configuration",
pvflag: 'NE Virtualization',
pnf: 'physical network element',
vnf: 'virtual network element',
neAddress: 'MAC',
neAddressTip: 'Record the physical address (MAC) of the network card of the network element',
dn: 'network identifier',
vendorName: 'provider',
province: 'Service Area',
addTitle: 'New network element information',
editTitle: 'Editing network element information',
editTitle: 'Edit network element information',
delTip: 'Confirm deletion of network element information data items?',
oam: {
title: 'OAM Configuration',
@@ -657,14 +667,13 @@ export default {
privateKey: "Private Key",
privateKeyPlease: "Please fill in the private key characters correctly ~/.ssh/id_rsa",
passPhrase: "Private Key Cipher",
remark: "Remark",
createTime: "Time",
delTip: "Confirm that you want to delete the host number [{num}]?",
addTitle: "Add Host Connection",
editTitle: "Edit Host Connection",
test: "Test Connection To Host",
testOk: "Test Connection Successful",
authorizedRSA: "Do I have to configure authorization for a password-free direct connection?",
authRSA: 'Secret Authorization',
authRSATip: "Do I have to configure secret-free authorization?",
},
neHostCmd: {
cmdType: "Type",
@@ -673,8 +682,6 @@ export default {
titlePlease: "Please fill in the command name correctly",
command: "Command",
commandPlease: "Please enter a valid command string correctly",
remark: "Remark",
createTime: "Time",
delTip: "Are you sure you want to delete the message with command number [{num}]?",
addTitle: "New Host Commands",
editTitle: "Edit Host Commands",

View File

@@ -588,15 +588,19 @@ export default {
common: {
neType: '网元类型',
neTypePlease: "请选择网元类型",
neTypeTip: '填写创建的网元类型,如:SMF',
neId: '网元标识',
neIdPlease: '请输入网元标识',
rmUid: '资源唯一标识',
rmUidPlease: '请输入资源唯一标识',
rmUidTip: "用于网元日志、告警、指标等数据上报的标记",
neName: '网元名称',
neNamePlease: '请输入网元名称',
ipAddr: '网元服务IP',
ipAddrPlease: '请输入网元IP地址',
ipAddrTip: "支持IPV4/IPV6,同步变更配置地址",
port: '网元服务端口',
portTip: "网元默认:33030",
serialNum: '序列号',
expiryDate: '许可证到期日期',
normalcy: '正常',
@@ -623,8 +627,14 @@ export default {
sysDisk: "系统存储",
neCpu: "网元CPU",
hostConfig: "终端连接配置",
rmUID: "数据资源定位标识符用于日志、告警上报等数据标记",
ipAddr: "支持IPV4/IPV6,同步变更下方配置的配置地址",
pvflag: '网元虚拟化标识',
pnf: '物理网元',
vnf: '虚拟网元',
neAddress: '物理地址(MAC)',
neAddressTip: '记录网元的网卡物理地址(MAC)',
dn: '网络标识',
vendorName: '提供厂商',
province: '服务地域',
addTitle: '新增网元信息',
editTitle: '编辑网元信息',
delTip: '确认删除网元信息数据项吗?',
@@ -657,14 +667,13 @@ export default {
privateKey: "私钥",
privateKeyPlease: "请正确填写私钥字符内容 ~/.ssh/id_rsa",
passPhrase: "私钥密码",
remark: "备注信息",
createTime: "创建时间",
delTip: "确认要删除主机编号为【{num}】的信息吗?",
addTitle: "新增主机连接",
editTitle: "编辑主机连接",
test: "测试连接",
testOk: "测试连接成功",
authorizedRSA: "是否要配置授权免密直连?",
authRSA: "免密授权",
authRSATip: "是否要配置免密授权?",
},
neHostCmd: {
cmdType: "命令类型",
@@ -673,8 +682,6 @@ export default {
titlePlease: "请正确填写命令名称",
command: "命令",
commandPlease: "请正确输入有效命令字符串",
remark: "备注",
createTime: "创建时间",
delTip: "确认要删除命令编号为【{num}】的信息吗?",
addTitle: "新增主机命令",
editTitle: "编辑主机命令",

View File

@@ -78,7 +78,7 @@ type TabeStateType = {
let tableState: TabeStateType = reactive({
loading: false,
size: 'middle',
seached: true,
seached: false,
data: [],
});
@@ -135,7 +135,7 @@ let tableColumns: ColumnsType = [
width: 100,
},
{
title: t('views.ne.neHost.createTime'),
title: t('common.createTime'),
dataIndex: 'createTime',
align: 'left',
width: 150,
@@ -798,7 +798,7 @@ onMounted(() => {
</template>
<a-form-item
:label="t('views.ne.neHost.remark')"
:label="t('common.remark')"
name="remark"
:label-col="{ span: 3 }"
:label-wrap="true"

View File

@@ -71,7 +71,7 @@ type TabeStateType = {
let tableState: TabeStateType = reactive({
loading: false,
size: 'middle',
seached: true,
seached: false,
data: [],
});
@@ -103,7 +103,7 @@ let tableColumns: ColumnsType = [
width: 100,
},
{
title: t('views.ne.neHostCmd.createTime'),
title: t('common.createTime'),
dataIndex: 'createTime',
align: 'left',
width: 150,
@@ -572,7 +572,7 @@ onMounted(() => {
</a-form-item>
<a-form-item
:label="t('views.ne.neHostCmd.remark')"
:label="t('common.remark')"
name="remark"
:label-col="{ span: 3 }"
:label-wrap="true"
@@ -582,6 +582,7 @@ onMounted(() => {
:auto-size="{ minRows: 4, maxRows: 6 }"
:maxlength="450"
:show-count="true"
:placeholder="t('common.inputPlease')"
/>
</a-form-item>
</a-form>

View File

@@ -70,7 +70,7 @@ function fnHostAuthorized(row: Record<string, any>) {
Modal.confirm({
title: t('common.tipTitle'),
content: t('views.ne.neHost.authorizedRSA'),
content: t('views.ne.neHost.authRSATip'),
onOk: () => {
modalState.confirmLoading = true;
neHostAuthorizedRSA(row).then(res => {
@@ -369,7 +369,7 @@ onMounted(() => {
<a-row :gutter="16">
<a-col :lg="12" :md="12" :xs="24">
<a-form-item
:label="t('views.configManage.neManage.neType')"
:label="t('views.ne.common.neType')"
name="neType"
v-bind="modalStateFrom.validateInfos.neType"
>
@@ -386,7 +386,7 @@ onMounted(() => {
<template #prefix>
<a-tooltip placement="topLeft">
<template #title>
{{ t('views.configManage.neManage.neTypeTip') }}
{{ t('views.ne.common.neTypeTip') }}
</template>
<InfoCircleOutlined style="color: rgba(0, 0, 0, 0.45)" />
</a-tooltip>
@@ -397,7 +397,7 @@ onMounted(() => {
</a-col>
<a-col :lg="12" :md="12" :xs="24">
<a-form-item
:label="t('views.configManage.neManage.pvflag')"
:label="t('views.ne.neInfo.pvflag')"
name="pvFlag"
v-bind="modalStateFrom.validateInfos.pvFlag"
>
@@ -405,10 +405,10 @@ onMounted(() => {
v-model:value="modalState.from.pvFlag"
default-value="PNF"
>
<a-select-opt-group :label="t('views.configManage.neManage.pnf')">
<a-select-opt-group :label="t('views.ne.neInfo.pnf')">
<a-select-option value="PNF">PNF</a-select-option>
</a-select-opt-group>
<a-select-opt-group :label="t('views.configManage.neManage.vnf')">
<a-select-opt-group :label="t('views.ne.neInfo.vnf')">
<a-select-option value="VNF">VNF</a-select-option>
</a-select-opt-group>
</a-select>
@@ -419,7 +419,7 @@ onMounted(() => {
<a-row :gutter="16">
<a-col :lg="12" :md="12" :xs="24">
<a-form-item
:label="t('views.configManage.neManage.neId')"
:label="t('views.ne.common.neId')"
name="neId"
v-bind="modalStateFrom.validateInfos.neId"
>
@@ -433,7 +433,7 @@ onMounted(() => {
</a-col>
<a-col :lg="12" :md="12" :xs="24">
<a-form-item
:label="t('views.configManage.neManage.neName')"
:label="t('views.ne.common.neName')"
name="neName"
v-bind="modalStateFrom.validateInfos.neName"
>
@@ -451,7 +451,7 @@ onMounted(() => {
<a-row :gutter="16">
<a-col :lg="12" :md="12" :xs="24">
<a-form-item
:label="t('views.configManage.neManage.ip')"
:label="t('views.ne.common.ipAddr')"
name="ip"
v-bind="modalStateFrom.validateInfos.ip"
>
@@ -466,7 +466,7 @@ onMounted(() => {
<a-tooltip placement="topLeft">
<template #title>
<div>
{{ t('views.ne.neInfo.ipAddr') }}
{{ t('views.ne.common.ipAddrTip') }}
</div>
</template>
<InfoCircleOutlined style="color: rgba(0, 0, 0, 0.45)" />
@@ -477,7 +477,7 @@ onMounted(() => {
</a-col>
<a-col :lg="12" :md="12" :xs="24">
<a-form-item
:label="t('views.configManage.neManage.port')"
:label="t('views.ne.common.port')"
name="port"
v-bind="modalStateFrom.validateInfos.port"
>
@@ -492,7 +492,7 @@ onMounted(() => {
<template #prefix>
<a-tooltip placement="topLeft">
<template #title>
<div>{{ t('views.configManage.neManage.portTip') }}</div>
<div>{{ t('views.ne.common.portTip') }}</div>
</template>
<InfoCircleOutlined style="color: rgba(0, 0, 0, 0.45)" />
</a-tooltip>
@@ -503,7 +503,7 @@ onMounted(() => {
</a-row>
<a-form-item
:label="t('views.configManage.neManage.uid')"
:label="t('views.ne.common.rmUid')"
name="rmUid"
v-bind="modalStateFrom.validateInfos.rmUid"
:label-col="{ span: 3 }"
@@ -519,7 +519,7 @@ onMounted(() => {
<a-tooltip placement="topLeft">
<template #title>
<div>
{{ t('views.ne.neInfo.rmUID') }}
{{ t('views.ne.common.rmUidTip') }}
</div>
</template>
<InfoCircleOutlined style="color: rgba(0, 0, 0, 0.45)" />
@@ -530,10 +530,7 @@ onMounted(() => {
<a-row :gutter="16">
<a-col :lg="12" :md="12" :xs="24">
<a-form-item
:label="t('views.configManage.neManage.mac')"
name="neAddress"
>
<a-form-item :label="t('views.ne.neInfo.neAddress')" name="neAddress">
<a-input
v-model:value="modalState.from.neAddress"
allow-clear
@@ -543,7 +540,7 @@ onMounted(() => {
<template #prefix>
<a-tooltip placement="topLeft">
<template #title>
<div>{{ t('views.configManage.neManage.macTip') }}</div>
<div>{{ t('views.ne.neInfo.neAddressTip') }}</div>
</template>
<InfoCircleOutlined style="color: rgba(0, 0, 0, 0.45)" />
</a-tooltip>
@@ -552,7 +549,7 @@ onMounted(() => {
</a-form-item>
</a-col>
<a-col :lg="12" :md="12" :xs="24">
<a-form-item :label="t('views.configManage.neManage.dn')" name="dn">
<a-form-item :label="t('views.ne.neInfo.dn')" name="dn">
<a-input
v-model:value="modalState.from.dn"
allow-clear
@@ -566,7 +563,7 @@ onMounted(() => {
<a-row :gutter="16">
<a-col :lg="12" :md="12" :xs="24">
<a-form-item
:label="t('views.configManage.neManage.vendorName')"
:label="t('views.ne.neInfo.vendorName')"
name="vendorName"
>
<a-input
@@ -579,10 +576,7 @@ onMounted(() => {
</a-form-item>
</a-col>
<a-col :lg="12" :md="12" :xs="24">
<a-form-item
:label="t('views.configManage.neManage.province')"
name="province"
>
<a-form-item :label="t('views.ne.neInfo.province')" name="province">
<a-input
v-model:value="modalState.from.province"
allow-clear
@@ -594,7 +588,7 @@ onMounted(() => {
</a-row>
<a-form-item
:label="t('views.ne.neHost.remark')"
:label="t('common.remark')"
:label-col="{ span: 3 }"
:label-wrap="true"
>
@@ -712,7 +706,7 @@ onMounted(() => {
</template>
<a-form-item
:label="t('views.ne.neHost.remark')"
:label="t('common.remark')"
:label-col="{ span: 3 }"
:label-wrap="true"
>
@@ -746,7 +740,7 @@ onMounted(() => {
:loading="modalState.confirmLoading"
v-if="host.hostType === 'ssh' && host.authMode !== '2'"
>
免密授权
{{ t('views.ne.neHost.authRSA') }}
</a-button>
</a-form-item>
</a-collapse-panel>

View File

@@ -501,7 +501,7 @@ onMounted(() => {
:data-source="tableState.data"
:size="tableState.size"
:pagination="tablePagination"
:scroll="{ x: tableColumns.length * 150, y: 'calc(100vh - 480px)' }"
:scroll="{ x: tableColumns.length * 150 }"
:row-selection="{
type: 'checkbox',
columnWidth: '48px',