From 25c7b6a5d28c11bf8291190a845455b0d5f737b7 Mon Sep 17 00:00:00 2001 From: zouap Date: Wed, 24 Aug 2022 15:24:39 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9B=BD=E9=99=85=E5=8C=96=E4=BF=A1=E6=81=AF?= =?UTF-8?q?=E6=8F=90=E4=BA=A4=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zouap --- .../js/components/dataset/selectDataset.vue | 44 +++++++++---------- .../components/images/selectGrampusImages.vue | 27 +++++++----- web_src/js/components/images/selectImages.vue | 42 ++++++++++-------- web_src/js/features/i18nVue.js | 1 + 4 files changed, 64 insertions(+), 50 deletions(-) diff --git a/web_src/js/components/dataset/selectDataset.vue b/web_src/js/components/dataset/selectDataset.vue index 84d7ba6b2..4eeccf073 100755 --- a/web_src/js/components/dataset/selectDataset.vue +++ b/web_src/js/components/dataset/selectDataset.vue @@ -38,7 +38,7 @@ type="text" class="disabled" style="width: 48.5%" - placeholder="选择数据集文件" + placeholder="{{i18n.dataset_select_placeholder}}" required /> @@ -59,10 +59,10 @@ ? 'select-dataset-button' : 'select-dataset-button-color' " - >选择数据集 + >{{i18n.dataset_select}} @@ -74,7 +74,7 @@ > @@ -90,7 +90,7 @@ > - + - 正在解压缩 + {{i18n.dataset_unziping}} - 解压失败 + {{i18n.dataset_unzip_failed}} @@ -201,7 +201,7 @@ - + - 正在解压缩 + {{i18n.dataset_unziping}} - 解压失败 + {{i18n.dataset_unzip_failed}} @@ -304,7 +304,7 @@ @@ -380,13 +380,13 @@ class="zip-loading" v-if="data.DecompressState === 2" > - 正在解压缩 + {{i18n.dataset_unziping}} - 解压失败 + {{i18n.dataset_unzip_failed}} @@ -410,7 +410,7 @@ @@ -486,13 +486,13 @@ class="zip-loading" v-if="data.DecompressState === 2" > - 正在解压缩 + {{i18n.dataset_unziping}} - 解压失败 + {{i18n.dataset_unzip_failed}} @@ -536,7 +536,7 @@ line-height: 40px; " > - 已选数据文件 + {{i18n.dataset_selected}}
@@ -558,7 +558,7 @@ color: #fff; border: 1px solid #389e0d; " - >确定{{i18n.dataset_ok}}
@@ -666,10 +666,10 @@ export default { }) ) { this.$refs[data.ref].setChecked(data.id, false, false); - this.$message.warning("不能选择相同名称的数据文件"); + this.$message.warning(i18n.dataset_not_equal_file); } else if (this.selectDatasetArray.length === 5) { this.$refs[data.ref].setChecked(data.id, false, false); - this.$message.error("最多不超过五个文件"); + this.$message.error(i18n.dataset_most); } else { this.selectDatasetArray.push(data); } diff --git a/web_src/js/components/images/selectGrampusImages.vue b/web_src/js/components/images/selectGrampusImages.vue index f702c8cca..9ea56097d 100755 --- a/web_src/js/components/images/selectGrampusImages.vue +++ b/web_src/js/components/images/selectGrampusImages.vue @@ -7,32 +7,32 @@ v-if="benchmarkNew" class="label-fix-width" style="font-weight: normal" - >镜像{{i18n.image_label}} - + 选择镜像 + >{{i18n.image_select}} - +
- +
- 使用 + {{i18n.image_use}}
@@ -169,6 +169,7 @@ export default { }, tableDataPublic: [], loadingPublic: false, + i18n: {}, }; }, methods: { @@ -236,7 +237,13 @@ export default { this.benchmarkNew = true; } }, - created() {}, + created() { + if (document.documentElement.attributes["lang"].nodeValue == "en-US") { + this.i18n = this.$locale.US; + } else { + this.i18n = this.$locale.CN; + } + }, }; diff --git a/web_src/js/components/images/selectImages.vue b/web_src/js/components/images/selectImages.vue index 844303420..2e5d65ebe 100755 --- a/web_src/js/components/images/selectImages.vue +++ b/web_src/js/components/images/selectImages.vue @@ -7,16 +7,16 @@ v-if="benchmarkNew" class="label-fix-width" style="font-weight: normal" - >镜像{{i18n.image_label}} - + 选择镜像 + >{{i18n.image_select}} - +
- +
- 使用 + {{i18n.image_use}}
@@ -142,7 +142,7 @@
- +
- 使用 + {{i18n.image_use}} 提交中{{i18n.image_commit}} 提交失败{{i18n.image_commit_failed}} @@ -254,7 +254,7 @@
- +
- 使用 + {{i18n.image_use}}
@@ -368,7 +368,7 @@ export default { paramsPublic: { page: 1, pageSize: 5, q: "", recommend: false }, tableDataPublic: [], loadingPublic: false, - + i18n: {}, currentPageCustom: 1, pageSizeCustom: 5, totalNumCustom: 0, @@ -513,7 +513,13 @@ export default { this.benchmark = true; } }, - created() {}, + created() { + if (document.documentElement.attributes["lang"].nodeValue == "en-US") { + this.i18n = this.$locale.US; + } else { + this.i18n = this.$locale.CN; + } + }, }; diff --git a/web_src/js/features/i18nVue.js b/web_src/js/features/i18nVue.js index 94fa03870..71770e572 100644 --- a/web_src/js/features/i18nVue.js +++ b/web_src/js/features/i18nVue.js @@ -77,6 +77,7 @@ export const i18nVue = { dataset_my_upload:"我上传的", dataset_current_repo:"本项目", dataset_public:"公开数据集", + dataset_relate:"关联数据集", dataset_collected:"我收藏的", dataset_selected:"已选数据文件", dataset_ok:"确定",