diff --git a/src/frontend/lang.js b/src/frontend/lang.js index a264aaf01..f5c0e1326 100644 --- a/src/frontend/lang.js +++ b/src/frontend/lang.js @@ -43,9 +43,18 @@ if (process.argv[2] === 'format') { } if (process.argv[3] === 'zh-Hans') { const filePath = path.resolve(__dirname, 'src/assets/i18n', 'zh-Hans.json'); + const enSet = new Set([]); + const zhSet = new Set([]); + const matchSet = new Set(['CPU使用']); const result = JSON.stringify(defaultValue, null, 2).replace(/([\u4e00-\u9fa5]+)([a-zA-Z]+)/g, function (match, $1, $2) { + if (matchSet.has(match) || zhSet.has($1) || enSet.has($2)) { + return match + } return $1 + ' ' + $2; }).replace(/([a-zA-Z]+)([\u4e00-\u9fa5]+)/g, function (match, $1, $2) { + if (matchSet.has(match) || zhSet.has($2) || enSet.has($1)) { + return match; + } return $1 + ' ' + $2; }); fs.writeFile(filePath, result, err => { diff --git a/src/frontend/src/app/portal/configmap/create-edit-configmaptpl/create-edit-configmaptpl.component.html b/src/frontend/src/app/portal/configmap/create-edit-configmaptpl/create-edit-configmaptpl.component.html index d8aec231e..0e36c2f19 100644 --- a/src/frontend/src/app/portal/configmap/create-edit-configmaptpl/create-edit-configmaptpl.component.html +++ b/src/frontend/src/app/portal/configmap/create-edit-configmaptpl/create-edit-configmaptpl.component.html @@ -6,6 +6,7 @@

{{'CONFIGMAP.CREATE_TMP' | translate}}

+ {{'CONFIGMAP.CREATE_EDIT_TMP.CLUSTER_MESSAGE' | translate}}
diff --git a/src/frontend/src/app/portal/cronjob/create-edit-cronjob/create-edit-cronjob.component.html b/src/frontend/src/app/portal/cronjob/create-edit-cronjob/create-edit-cronjob.component.html index e78431474..47d133f25 100644 --- a/src/frontend/src/app/portal/cronjob/create-edit-cronjob/create-edit-cronjob.component.html +++ b/src/frontend/src/app/portal/cronjob/create-edit-cronjob/create-edit-cronjob.component.html @@ -25,6 +25,7 @@
+ {{'CRONJOB.CREATE_EDIT.CLUSTER_MESSAGE' | translate}}
{{title | translate}}
+ {{'DAEMONSET.CREATE_EDIT.CLUSTER_MESSAGE' | translate}}
{{title}}
+ {{'DEPLOYMENT.CREATE_EDIT.CLUSTER_MESSAGE' | translate}}
{{title}}
+ {{'INGRESS.CREATE_EDIT.CLUSTER_MESSAGE' | translate}}
{{'PVC.CREATE_TMP' | translate}}
+ {{'PVC.CREATE_EDIT.CLUSTER_MESSAGE' | translate}}
diff --git a/src/frontend/src/app/portal/secret/create-edit-secrettpl/create-edit-secrettpl.component.html b/src/frontend/src/app/portal/secret/create-edit-secrettpl/create-edit-secrettpl.component.html index fb0aa61c7..c3810baae 100644 --- a/src/frontend/src/app/portal/secret/create-edit-secrettpl/create-edit-secrettpl.component.html +++ b/src/frontend/src/app/portal/secret/create-edit-secrettpl/create-edit-secrettpl.component.html @@ -6,6 +6,7 @@

{{'SECRET.CREATE_TMP' | translate}}

+ {{'SECRET.CREATE_EDIT.CLUSTER_MESSAGE' | translate}}
diff --git a/src/frontend/src/app/portal/statefulset/create-edit-statefulset/create-edit-statefulset.component.html b/src/frontend/src/app/portal/statefulset/create-edit-statefulset/create-edit-statefulset.component.html index fc04bca7c..27340997b 100644 --- a/src/frontend/src/app/portal/statefulset/create-edit-statefulset/create-edit-statefulset.component.html +++ b/src/frontend/src/app/portal/statefulset/create-edit-statefulset/create-edit-statefulset.component.html @@ -28,6 +28,7 @@
+ {{'STATEFULSET.CREATE_EDIT.CLUSTER_MESSAGE' | translate}}