From 93f32c27d7ed7c648d2407de8af0c8909bddd9ac Mon Sep 17 00:00:00 2001 From: lan-yonghui Date: Fri, 18 Oct 2024 09:33:06 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=96=B0=E6=89=8B=E5=BC=95=E5=AF=BC):=20?= =?UTF-8?q?=E6=96=B0=E6=89=8B=E6=95=99=E7=A8=8B=E4=B8=AD=E7=9A=84=E7=B3=BB?= =?UTF-8?q?=E7=BB=9F=E5=90=8D=E7=A7=B0=E8=B0=83=E6=95=B4=E4=B8=BA=E5=8A=A8?= =?UTF-8?q?=E6=80=81=E6=8C=87=E5=AE=9A=20--bug=3D1046104=20--user=3D?= =?UTF-8?q?=E5=85=B0=E6=B0=B8=E8=BE=89=20https://www.tapd.cn/55049933/bugt?= =?UTF-8?q?race/bugs/view/1155049933001046104?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../frontend/src/business/app-layout/index.vue | 3 ++- .../sdk-parent/frontend/src/business/login/index.vue | 5 +++++ .../frontend/src/components/guide/Guidance.vue | 4 ++-- .../src/components/guide/components/Introduction.vue | 10 ++++++---- framework/sdk-parent/frontend/src/i18n/lang/en-US.js | 8 ++++---- framework/sdk-parent/frontend/src/i18n/lang/zh-CN.js | 8 ++++---- framework/sdk-parent/frontend/src/i18n/lang/zh-TW.js | 8 ++++---- .../frontend/src/business/home/ProjectHome.vue | 2 +- 8 files changed, 28 insertions(+), 20 deletions(-) diff --git a/framework/sdk-parent/frontend/src/business/app-layout/index.vue b/framework/sdk-parent/frontend/src/business/app-layout/index.vue index df3ba3a562..6f3a34d555 100644 --- a/framework/sdk-parent/frontend/src/business/app-layout/index.vue +++ b/framework/sdk-parent/frontend/src/business/app-layout/index.vue @@ -138,7 +138,8 @@ export default { } if (response.data && response.data[6] && response.data[6].paramValue) { - this.sysTitle = response.data[6].paramValue; + this.sysTitle = response.data[6].paramValue || "MeterSphere"; + localStorage.setItem("default-sys-title", this.sysTitle); } let title = response.data[4].paramValue; diff --git a/framework/sdk-parent/frontend/src/business/login/index.vue b/framework/sdk-parent/frontend/src/business/login/index.vue index 986cd69484..58573a593c 100644 --- a/framework/sdk-parent/frontend/src/business/login/index.vue +++ b/framework/sdk-parent/frontend/src/business/login/index.vue @@ -192,6 +192,11 @@ export default { this.loginTitle = response.data[3].paramValue; } + if (response.data && response.data[6] && response.data[6].paramValue) { + this.sysTitle = response.data[6].paramValue || "MeterSphere"; + localStorage.setItem("default-sys-title", this.sysTitle); + } + let title = response.data[4].paramValue; if (title) { document.title = title; diff --git a/framework/sdk-parent/frontend/src/components/guide/Guidance.vue b/framework/sdk-parent/frontend/src/components/guide/Guidance.vue index 65a36728f8..db321be1af 100644 --- a/framework/sdk-parent/frontend/src/components/guide/Guidance.vue +++ b/framework/sdk-parent/frontend/src/components/guide/Guidance.vue @@ -137,7 +137,7 @@ export default { } ], title: _this.$t("shepherd.step1.title"), - text: _this.$t("shepherd.step1.text") + text: _this.$t("shepherd.step1.text", [localStorage.getItem("default-sys-title") || "MeterSphere"]) }, { attachTo: { @@ -188,7 +188,7 @@ export default { } ], title: _this.$t("shepherd.step3.title"), - text: _this.$t("shepherd.step3.text") + text: _this.$t("shepherd.step3.text", [localStorage.getItem("default-sys-title") || "MeterSphere"]) }, { attachTo: { diff --git a/framework/sdk-parent/frontend/src/components/guide/components/Introduction.vue b/framework/sdk-parent/frontend/src/components/guide/components/Introduction.vue index a694bee355..8eacbf61e5 100644 --- a/framework/sdk-parent/frontend/src/components/guide/components/Introduction.vue +++ b/framework/sdk-parent/frontend/src/components/guide/components/Introduction.vue @@ -5,9 +5,9 @@
MS
-

MS{{ $t("guide.home.title") }}

+

MS{{ $t("guide.home.title", [defaultSysTitle]) }}

-

{{ $t("guide.home.desc") }}

+

{{ $t("guide.home.desc", [defaultSysTitle]) }}

{{ $t("guide.home.button") }} @@ -95,10 +95,12 @@ export default { button: 'guide.performance.button', id: 3 } - ] + ], + defaultSysTitle: '' } }, - created() { + mounted() { + this.defaultSysTitle = localStorage.getItem("default-sys-title") || "MeterSphere"; }, methods: { openNext() { diff --git a/framework/sdk-parent/frontend/src/i18n/lang/en-US.js b/framework/sdk-parent/frontend/src/i18n/lang/en-US.js index 64bd331086..82ab92cc3d 100644 --- a/framework/sdk-parent/frontend/src/i18n/lang/en-US.js +++ b/framework/sdk-parent/frontend/src/i18n/lang/en-US.js @@ -3474,7 +3474,7 @@ const message = { shepherd: { step1: { title: 'A Workspaces and Projects', - text: 'MeterSphere uses [workspace] and [project] to isolate test data, and you can switch between workspace and project in the top menu.', + text: '{0} uses [workspace] and [project] to isolate test data, and you can switch between workspace and project in the top menu.', }, step2: { title: 'Side navigation menu', @@ -3482,7 +3482,7 @@ const message = { }, step3: { title: 'One workspace holds multiple projects', - text: 'A "project" is a collection of use cases and members. Various types of tests on MeterSphere are viewed and managed through projects.', + text: 'A "project" is a collection of use cases and members. Various types of tests on {0} are viewed and managed through projects.', }, step4: { title: 'Top function menu', @@ -3498,8 +3498,8 @@ const message = { }, guide: { home: { - title: 'Welcome to MeterSphere!', - desc: 'A quickstart guide to see what MeterSphere can do for you.', + title: 'Welcome to {0}!', + desc: 'A quickstart guide to see what {0} can do for you.', button: 'Lets get started', }, test: { diff --git a/framework/sdk-parent/frontend/src/i18n/lang/zh-CN.js b/framework/sdk-parent/frontend/src/i18n/lang/zh-CN.js index d0d9a08b4c..bd2026c062 100644 --- a/framework/sdk-parent/frontend/src/i18n/lang/zh-CN.js +++ b/framework/sdk-parent/frontend/src/i18n/lang/zh-CN.js @@ -3427,7 +3427,7 @@ const message = { shepherd: { step1: { title: '工作空间和项目', - text: 'MeterSphere 使用 [工作空间] 和 [项目] 来隔离测试数据, 你可以在顶部菜单进行工作空间和项目切换。', + text: '{0} 使用 [工作空间] 和 [项目] 来隔离测试数据, 你可以在顶部菜单进行工作空间和项目切换。', }, step2: { title: '功能主菜单', @@ -3435,7 +3435,7 @@ const message = { }, step3: { title: '一个空间可以创建多个项目', - text: '「项目」是一组用例和成员的集合。MeterSphere 上各种类型的测试均通过项目进行分权分域查看和管理。', + text: '「项目」是一组用例和成员的集合。{0} 上各种类型的测试均通过项目进行分权分域查看和管理。', }, step4: { title: '一级功能菜单', @@ -3451,8 +3451,8 @@ const message = { }, guide: { home: { - title: '欢迎来到 MeterSphere!', - desc: '通过一个快捷指引来了解 MeterSphere 究竟能为你做哪些事。', + title: '欢迎来到 {0}!', + desc: '通过一个快捷指引来了解 {0} 究竟能为你做哪些事。', button: '让我们开始吧', }, test: { diff --git a/framework/sdk-parent/frontend/src/i18n/lang/zh-TW.js b/framework/sdk-parent/frontend/src/i18n/lang/zh-TW.js index 01cddab262..144561c994 100644 --- a/framework/sdk-parent/frontend/src/i18n/lang/zh-TW.js +++ b/framework/sdk-parent/frontend/src/i18n/lang/zh-TW.js @@ -3424,7 +3424,7 @@ const message = { shepherd: { step1: { title: '工作空間和項目', - text: 'MeterSphere 使用 [工作空間] 和 [項目] 來隔離測試數據, 你可以在頂部菜單進行工作空間和項目切換。', + text: '{0} 使用 [工作空間] 和 [項目] 來隔離測試數據, 你可以在頂部菜單進行工作空間和項目切換。', }, step2: { title: '功能主菜單', @@ -3432,7 +3432,7 @@ const message = { }, step3: { title: '一個空間可以創建多個項目', - text: '「項目」是一組用例和成員的集合。 MeterSphere 上各種類型的測試均通過項目進行分權分域查看和管理。', + text: '「項目」是一組用例和成員的集合。 {0} 上各種類型的測試均通過項目進行分權分域查看和管理。', }, step4: { title: '一級功能菜單', @@ -3448,8 +3448,8 @@ const message = { }, guide: { home: { - title: '歡迎來到 MeterSphere!', - desc: '通過一個快捷指引來了解 MeterSphere 究竟能為你做哪些事。', + title: '歡迎來到 {0}!', + desc: '通過一個快捷指引來了解 {0} 究竟能為你做哪些事。', button: '讓我們開始吧', }, test: { diff --git a/project-management/frontend/src/business/home/ProjectHome.vue b/project-management/frontend/src/business/home/ProjectHome.vue index 44462fd082..c089f0f6dc 100644 --- a/project-management/frontend/src/business/home/ProjectHome.vue +++ b/project-management/frontend/src/business/home/ProjectHome.vue @@ -231,7 +231,7 @@ export default { } ], title: _this.$t("shepherd.step3.title"), - text: _this.$t("shepherd.step3.text") + text: _this.$t("shepherd.step3.text", [localStorage.getItem("default-sys-title") || "MeterSphere"]) }, { attachTo: {