From 709c207fccf64133105536e240f85cab827dc763 Mon Sep 17 00:00:00 2001 From: q4speed Date: Wed, 13 May 2020 12:59:41 +0800 Subject: [PATCH 01/11] =?UTF-8?q?=E5=9C=BA=E6=99=AF=E5=85=AC=E7=94=A8?= =?UTF-8?q?=E5=8F=98=E9=87=8F=E5=92=8CHeader?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../api/test/components/ApiKeyValue.vue | 6 +- .../api/test/components/ApiScenarioConfig.vue | 4 +- .../api/test/components/ApiScenarioForm.vue | 19 ++-- .../test/components/ApiScenarioVariables.vue | 86 ++++++++++++++++++ .../api/test/components/ApiVariableInput.vue | 89 +++++++++++++++++++ .../components/{ => collapse}/ApiCollapse.vue | 0 .../{ => collapse}/ApiCollapseItem.vue | 0 .../components/extract/ApiExtractCommon.vue | 16 +--- .../business/components/api/test/model/JMX.js | 4 +- .../api/test/model/ScenarioModel.js | 26 +++++- frontend/src/i18n/en-US.js | 14 +-- frontend/src/i18n/zh-CN.js | 10 ++- 12 files changed, 234 insertions(+), 40 deletions(-) create mode 100644 frontend/src/business/components/api/test/components/ApiScenarioVariables.vue create mode 100644 frontend/src/business/components/api/test/components/ApiVariableInput.vue rename frontend/src/business/components/api/test/components/{ => collapse}/ApiCollapse.vue (100%) rename frontend/src/business/components/api/test/components/{ => collapse}/ApiCollapseItem.vue (100%) diff --git a/frontend/src/business/components/api/test/components/ApiKeyValue.vue b/frontend/src/business/components/api/test/components/ApiKeyValue.vue index 0746d460c2..da57fcf04e 100644 --- a/frontend/src/business/components/api/test/components/ApiKeyValue.vue +++ b/frontend/src/business/components/api/test/components/ApiKeyValue.vue @@ -6,10 +6,12 @@
- + - + - import MsApiCollapseItem from "./ApiCollapseItem"; - import MsApiCollapse from "./ApiCollapse"; + import MsApiCollapseItem from "./collapse/ApiCollapseItem"; + import MsApiCollapse from "./collapse/ApiCollapse"; import MsApiRequestConfig from "./ApiRequestConfig"; import MsApiRequestForm from "./ApiRequestForm"; import MsApiScenarioForm from "./ApiScenarioForm"; diff --git a/frontend/src/business/components/api/test/components/ApiScenarioForm.vue b/frontend/src/business/components/api/test/components/ApiScenarioForm.vue index 1a604a97f8..87bf4c47d4 100644 --- a/frontend/src/business/components/api/test/components/ApiScenarioForm.vue +++ b/frontend/src/business/components/api/test/components/ApiScenarioForm.vue @@ -8,24 +8,25 @@ - - - - - - - - + + + + + + + + + + diff --git a/frontend/src/business/components/api/test/components/ApiVariableInput.vue b/frontend/src/business/components/api/test/components/ApiVariableInput.vue new file mode 100644 index 0000000000..8a74cef208 --- /dev/null +++ b/frontend/src/business/components/api/test/components/ApiVariableInput.vue @@ -0,0 +1,89 @@ + + + + + diff --git a/frontend/src/business/components/api/test/components/ApiCollapse.vue b/frontend/src/business/components/api/test/components/collapse/ApiCollapse.vue similarity index 100% rename from frontend/src/business/components/api/test/components/ApiCollapse.vue rename to frontend/src/business/components/api/test/components/collapse/ApiCollapse.vue diff --git a/frontend/src/business/components/api/test/components/ApiCollapseItem.vue b/frontend/src/business/components/api/test/components/collapse/ApiCollapseItem.vue similarity index 100% rename from frontend/src/business/components/api/test/components/ApiCollapseItem.vue rename to frontend/src/business/components/api/test/components/collapse/ApiCollapseItem.vue diff --git a/frontend/src/business/components/api/test/components/extract/ApiExtractCommon.vue b/frontend/src/business/components/api/test/components/extract/ApiExtractCommon.vue index ee2997f57b..b4a0f83b36 100644 --- a/frontend/src/business/components/api/test/components/extract/ApiExtractCommon.vue +++ b/frontend/src/business/components/api/test/components/extract/ApiExtractCommon.vue @@ -2,17 +2,8 @@
-
- -
-
{{common.value}}
- - - -
-
+
@@ -27,10 +18,11 @@ diff --git a/frontend/src/business/components/common/head/HeaderOrgWs.vue b/frontend/src/business/components/common/head/HeaderOrgWs.vue new file mode 100644 index 0000000000..e3386aaf63 --- /dev/null +++ b/frontend/src/business/components/common/head/HeaderOrgWs.vue @@ -0,0 +1,132 @@ + + + + + diff --git a/frontend/src/business/components/common/head/HeaderUser.vue b/frontend/src/business/components/common/head/HeaderUser.vue index 2fa6b44723..9eb7096b2b 100644 --- a/frontend/src/business/components/common/head/HeaderUser.vue +++ b/frontend/src/business/components/common/head/HeaderUser.vue @@ -1,79 +1,23 @@ + + diff --git a/frontend/src/common/css/menu-header.css b/frontend/src/common/css/menu-header.css index c054b76307..7277b56b88 100644 --- a/frontend/src/common/css/menu-header.css +++ b/frontend/src/common/css/menu-header.css @@ -32,3 +32,7 @@ .header-top-menus.el-menu--horizontal > li.is-active { background: #595591 !important; } + +.el-menu.el-menu--horizontal { + border-bottom: none; + } diff --git a/frontend/src/common/js/constants.js b/frontend/src/common/js/constants.js index fb2807a1a6..56d4dbd7df 100644 --- a/frontend/src/common/js/constants.js +++ b/frontend/src/common/js/constants.js @@ -13,3 +13,7 @@ export const REFRESH_SESSION_USER_URL = 'user/refresh'; export const WORKSPACE = 'workspace'; export const ORGANIZATION = 'organization'; export const DEFAULT = 'default'; + +export const ZH_CN = 'zh_CN'; +export const ZH_TW = 'zh_TW'; +export const EN_US = 'en_US'; diff --git a/frontend/src/login/Login.vue b/frontend/src/login/Login.vue index 83c8b81998..2200679edc 100644 --- a/frontend/src/login/Login.vue +++ b/frontend/src/login/Login.vue @@ -104,8 +104,13 @@ submit(form) { this.$refs[form].validate((valid) => { if (valid) { - this.$post("signin", this.form, (response) => { + this.$post("signin", this.form, response => { saveLocalStorage(response); + let language = response.data.language; + if (!language) { + language = 'zh_CN'; + } + this.$setLang(language); window.location.href = "/" }); } else { From bef553365632ba5de9c9604c0c730f1a85c485cf Mon Sep 17 00:00:00 2001 From: "Captain.B" Date: Wed, 13 May 2020 16:26:51 +0800 Subject: [PATCH 05/11] =?UTF-8?q?=E8=8F=9C=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/business/App.vue | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/frontend/src/business/App.vue b/frontend/src/business/App.vue index 2864957589..b804aaea00 100644 --- a/frontend/src/business/App.vue +++ b/frontend/src/business/App.vue @@ -7,16 +7,11 @@ - - - - - - - - - - + + + + +
@@ -95,5 +90,9 @@ padding-right: 15px; text-decoration: none; } + + .align-right { + float: right; + } From 6c2df5f1226146844bb7b5ef3fe126e69ad757b1 Mon Sep 17 00:00:00 2001 From: "Captain.B" Date: Wed, 13 May 2020 16:29:19 +0800 Subject: [PATCH 06/11] float right --- frontend/src/business/App.vue | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/frontend/src/business/App.vue b/frontend/src/business/App.vue index b804aaea00..fe42618a6e 100644 --- a/frontend/src/business/App.vue +++ b/frontend/src/business/App.vue @@ -7,11 +7,11 @@ - + - - - + + + From 96e275c09520ffc0138fc0700f7b1cb63a8f736b Mon Sep 17 00:00:00 2001 From: shiziyuan9527 Date: Wed, 13 May 2020 17:58:26 +0800 Subject: [PATCH 07/11] =?UTF-8?q?=E7=94=A8=E6=88=B7=E8=A7=92=E8=89=B2?= =?UTF-8?q?=E5=9B=BD=E9=99=85=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/business/components/common/components/MsRolesTag.vue | 2 +- .../src/business/components/common/head/LanguageSwitch.vue | 1 - frontend/src/i18n/en-US.js | 5 +++++ frontend/src/i18n/zh-CN.js | 5 +++++ 4 files changed, 11 insertions(+), 2 deletions(-) diff --git a/frontend/src/business/components/common/components/MsRolesTag.vue b/frontend/src/business/components/common/components/MsRolesTag.vue index a51f13c988..79c3e406bc 100644 --- a/frontend/src/business/components/common/components/MsRolesTag.vue +++ b/frontend/src/business/components/common/components/MsRolesTag.vue @@ -4,7 +4,7 @@ :key="index" :effect="effect" :type="type" - :content="role.name"/> + :content="$t('role.' + role.id)"/>
diff --git a/frontend/src/business/components/common/head/LanguageSwitch.vue b/frontend/src/business/components/common/head/LanguageSwitch.vue index 24b4c5a255..9afceaa119 100644 --- a/frontend/src/business/components/common/head/LanguageSwitch.vue +++ b/frontend/src/business/components/common/head/LanguageSwitch.vue @@ -67,7 +67,6 @@ language: language }; this.result = this.$post("/user/update/current", user, response => { - this.$success(this.$t('commons.modify_success')); localStorage.setItem(TokenKey, JSON.stringify(response.data)); window.location.reload(); }); diff --git a/frontend/src/i18n/en-US.js b/frontend/src/i18n/en-US.js index c55b714705..d7e8e2bb9f 100644 --- a/frontend/src/i18n/en-US.js +++ b/frontend/src/i18n/en-US.js @@ -124,6 +124,11 @@ export default { }, role: { 'please_choose_role': 'Please Choose Role', + 'admin': 'Admin', + 'org_admin': 'Org_Admin', + 'test_manager': 'Test_Manager', + 'test_user': 'Test_User', + 'test_viewer': 'Test_Viewer', }, report: { 'recent': 'Recent Report', diff --git a/frontend/src/i18n/zh-CN.js b/frontend/src/i18n/zh-CN.js index e4683ce67b..be9761be13 100644 --- a/frontend/src/i18n/zh-CN.js +++ b/frontend/src/i18n/zh-CN.js @@ -124,6 +124,11 @@ export default { }, role: { 'please_choose_role': '请选择角色', + 'admin': '系统管理员', + 'org_admin': '组织管理员', + 'test_manager': '测试经理', + 'test_user': '测试人员', + 'test_viewer': 'Viewer' }, report: { 'recent': '最近的报告', From 39fa11dc09e26ac8f4a61f39d68ccf5ee3227ecd Mon Sep 17 00:00:00 2001 From: "Captain.B" Date: Wed, 13 May 2020 18:02:29 +0800 Subject: [PATCH 08/11] =?UTF-8?q?=E5=88=A0=E9=99=A4=E5=8E=9F=E6=9D=A5?= =?UTF-8?q?=E7=9A=84=E5=9B=BD=E9=99=85=E5=8C=96=E6=96=B9=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../io/metersphere/config/I18nConfig.java | 12 --- .../java/io/metersphere/i18n/I18nManager.java | 86 ------------------- 2 files changed, 98 deletions(-) delete mode 100644 backend/src/main/java/io/metersphere/i18n/I18nManager.java diff --git a/backend/src/main/java/io/metersphere/config/I18nConfig.java b/backend/src/main/java/io/metersphere/config/I18nConfig.java index 8d5a5d5548..5467268924 100644 --- a/backend/src/main/java/io/metersphere/config/I18nConfig.java +++ b/backend/src/main/java/io/metersphere/config/I18nConfig.java @@ -1,26 +1,14 @@ package io.metersphere.config; import io.metersphere.commons.utils.CommonBeanFactory; -import io.metersphere.i18n.I18nManager; import io.metersphere.i18n.Translator; import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; -import java.util.ArrayList; -import java.util.List; - @Configuration public class I18nConfig { - @Bean - @ConditionalOnMissingBean - public I18nManager i18nManager() { - List dirs = new ArrayList<>(); - dirs.add("i18n/"); - return new I18nManager(dirs); - } - @Bean @ConditionalOnMissingBean public Translator translator() { diff --git a/backend/src/main/java/io/metersphere/i18n/I18nManager.java b/backend/src/main/java/io/metersphere/i18n/I18nManager.java deleted file mode 100644 index 71802ee58d..0000000000 --- a/backend/src/main/java/io/metersphere/i18n/I18nManager.java +++ /dev/null @@ -1,86 +0,0 @@ -package io.metersphere.i18n; - -import com.alibaba.fastjson.JSON; -import com.alibaba.fastjson.TypeReference; -import io.metersphere.commons.utils.IOUtils; -import io.metersphere.commons.utils.LogUtil; -import org.apache.commons.lang3.ArrayUtils; -import org.apache.commons.lang3.StringUtils; -import org.springframework.boot.ApplicationArguments; -import org.springframework.boot.ApplicationRunner; -import org.springframework.core.io.Resource; -import org.springframework.core.io.support.PathMatchingResourcePatternResolver; -import org.springframework.util.ResourceUtils; - -import java.io.IOException; -import java.io.InputStream; -import java.nio.charset.Charset; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class I18nManager implements ApplicationRunner { - - private static Map> i18nMap = new HashMap<>(); - - private List dirs; - - public I18nManager(List dirs) { - this.dirs = dirs; - } - - public static Map> getI18nMap() { - return i18nMap; - } - - private static Resource[] getResources(String dir, String suffix) throws IOException { - Resource[] result = new Resource[0]; - PathMatchingResourcePatternResolver patternResolver = new PathMatchingResourcePatternResolver(); - if (!patternResolver.getResource(ResourceUtils.CLASSPATH_URL_PREFIX + dir).exists()) { - return result; - } - Resource[] resources = patternResolver.getResources(ResourceUtils.CLASSPATH_URL_PREFIX + dir + "*"); - for (Resource resource : resources) { - if (StringUtils.endsWithIgnoreCase(resource.getFilename(), suffix)) { - result = ArrayUtils.add(result, resource); - } - } - return result; - } - - private void init() { - try { - for (Lang lang : Lang.values()) { - Resource[] resources = new Resource[0]; - String i18nKey = lang.getDesc().toLowerCase(); - for (String dir : dirs) { - resources = ArrayUtils.addAll(resources, getResources(dir, i18nKey + ".json")); - } - for (Resource resource : resources) { - if (resource.exists()) { - try (InputStream inputStream = resource.getInputStream()) { - String fileContent = IOUtils.toString(inputStream, Charset.defaultCharset()); - Map langMap = JSON.parseObject(fileContent, new TypeReference>() { - }); - i18nMap.computeIfAbsent(i18nKey, k -> new HashMap<>()); - i18nMap.get(i18nKey).putAll(langMap); - } catch (Exception e) { - e.printStackTrace(); - LogUtil.error("failed to load resource: " + resource.getURI()); - } - } - } - } - } catch (Exception e) { - LogUtil.error("failed to load i18n.", e); - } - } - - /** - * 国际化配置初始化 - */ - @Override - public void run(ApplicationArguments args) { - init(); - } -} From a8dd83b3cce786e572226960b8a6c8201f2f8886 Mon Sep 17 00:00:00 2001 From: shiziyuan9527 Date: Wed, 13 May 2020 18:12:15 +0800 Subject: [PATCH 09/11] i18n --- .../components/common/components/MsDialogFooter.vue | 4 ++-- .../settings/organization/OrganizationMember.vue | 3 +-- .../settings/organization/OrganizationWorkspace.vue | 7 ++----- .../business/components/settings/system/Organization.vue | 6 ++---- .../components/settings/system/SystemWorkspace.vue | 7 ++----- .../components/settings/system/TestResourcePool.vue | 5 +---- frontend/src/business/components/settings/system/User.vue | 3 +-- .../components/settings/workspace/WorkspaceMember.vue | 3 +-- frontend/src/i18n/en-US.js | 2 +- 9 files changed, 13 insertions(+), 27 deletions(-) diff --git a/frontend/src/business/components/common/components/MsDialogFooter.vue b/frontend/src/business/components/common/components/MsDialogFooter.vue index bcd271add2..261a49422f 100644 --- a/frontend/src/business/components/common/components/MsDialogFooter.vue +++ b/frontend/src/business/components/common/components/MsDialogFooter.vue @@ -1,8 +1,8 @@ diff --git a/frontend/src/business/components/settings/organization/OrganizationMember.vue b/frontend/src/business/components/settings/organization/OrganizationMember.vue index c5f7a4673a..17d347d478 100644 --- a/frontend/src/business/components/settings/organization/OrganizationMember.vue +++ b/frontend/src/business/components/settings/organization/OrganizationMember.vue @@ -3,7 +3,7 @@ @@ -111,7 +111,6 @@ data() { return { result: {}, - btnTips: this.$t('member.create'), createVisible: false, updateVisible: false, form: {}, diff --git a/frontend/src/business/components/settings/organization/OrganizationWorkspace.vue b/frontend/src/business/components/settings/organization/OrganizationWorkspace.vue index ba9c2fecf9..4385018046 100644 --- a/frontend/src/business/components/settings/organization/OrganizationWorkspace.vue +++ b/frontend/src/business/components/settings/organization/OrganizationWorkspace.vue @@ -3,7 +3,7 @@ @@ -43,7 +43,7 @@ + :create-tip="$t('member.create')" :title="$t('commons.member')"/> @@ -366,9 +366,6 @@ dialogWsMemberVisible: false, dialogWsMemberAddVisible: false, dialogWsMemberUpdateVisible: false, - btnTips: this.$t('workspace.create'), - dialogBtnTips: this.$t('member.create'), - addTips: this.$t('member.create'), condition: {}, dialogCondition: {}, items: [], diff --git a/frontend/src/business/components/settings/system/Organization.vue b/frontend/src/business/components/settings/system/Organization.vue index e4f4101177..e9206154c3 100644 --- a/frontend/src/business/components/settings/system/Organization.vue +++ b/frontend/src/business/components/settings/system/Organization.vue @@ -4,7 +4,7 @@ @@ -30,7 +30,7 @@ + :create-tip="$t('member.create')" :title="$t('commons.member')"/> @@ -201,8 +201,6 @@ dialogPageSize: 5, dialogTotal: 0, currentRow: {}, - btnTips: this.$t('organization.create'), - dialogBtnTips: this.$t('member.create'), condition: {}, dialogCondition: {}, tableData: [], diff --git a/frontend/src/business/components/settings/system/SystemWorkspace.vue b/frontend/src/business/components/settings/system/SystemWorkspace.vue index 03268cdf60..c4e3035d39 100644 --- a/frontend/src/business/components/settings/system/SystemWorkspace.vue +++ b/frontend/src/business/components/settings/system/SystemWorkspace.vue @@ -3,7 +3,7 @@ @@ -87,7 +87,7 @@ + :create-tip="$t('member.create')" :title="$t('commons.member')"/> @@ -420,9 +420,6 @@ dialogWsMemberVisible: false, dialogWsMemberAddVisible: false, dialogWsMemberUpdateVisible: false, - btnTips: this.$t('workspace.create'), - dialogBtnTips: this.$t('member.create'), - addTips: this.$t('member.create'), condition: {}, dialogCondition: {}, items: [], diff --git a/frontend/src/business/components/settings/system/TestResourcePool.vue b/frontend/src/business/components/settings/system/TestResourcePool.vue index 056514f361..065086bc23 100644 --- a/frontend/src/business/components/settings/system/TestResourcePool.vue +++ b/frontend/src/business/components/settings/system/TestResourcePool.vue @@ -3,7 +3,7 @@ @@ -229,9 +229,6 @@ createVisible: false, infoList: [], updateVisible: false, - btnTips: this.$t('test_resource_pool.create_resource_pool'), - btnTipsAdd: this.$t("commons.add"), - btnTipsDel: this.$t("commons.delete"), queryPath: "testresourcepool/list", condition: {}, items: [], diff --git a/frontend/src/business/components/settings/system/User.vue b/frontend/src/business/components/settings/system/User.vue index f540a9860b..8cad4a49b3 100644 --- a/frontend/src/business/components/settings/system/User.vue +++ b/frontend/src/business/components/settings/system/User.vue @@ -4,7 +4,7 @@ @@ -161,7 +161,6 @@ currentPage: 1, pageSize: 5, total: 0, - btnTips: this.$t('user.create'), condition: {}, tableData: [], form: {}, diff --git a/frontend/src/business/components/settings/workspace/WorkspaceMember.vue b/frontend/src/business/components/settings/workspace/WorkspaceMember.vue index 0d332a6089..fa73572f22 100644 --- a/frontend/src/business/components/settings/workspace/WorkspaceMember.vue +++ b/frontend/src/business/components/settings/workspace/WorkspaceMember.vue @@ -3,7 +3,7 @@ @@ -111,7 +111,6 @@ return { result: {}, form: {}, - btnTips: this.$t('member.create'), createVisible: false, updateVisible: false, queryPath: "/user/ws/member/list", diff --git a/frontend/src/i18n/en-US.js b/frontend/src/i18n/en-US.js index d7e8e2bb9f..da155c593c 100644 --- a/frontend/src/i18n/en-US.js +++ b/frontend/src/i18n/en-US.js @@ -72,7 +72,7 @@ export default { 'select': 'Select Workspace', }, organization: { - 'create': 'Create', + 'create': 'Create Organization', 'modify': 'Modify', 'delete_confirm': 'Are you sure you want to delete this workspace?', 'input_name': 'Please enter a organization name', From e0fb95f4618a7f998562689d132197d00bb6a3fa Mon Sep 17 00:00:00 2001 From: "Captain.B" Date: Thu, 14 May 2020 11:28:50 +0800 Subject: [PATCH 10/11] zh_TW --- .../resources/i18n/messages_zh_TW.properties | 36 +++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 backend/src/main/resources/i18n/messages_zh_TW.properties diff --git a/backend/src/main/resources/i18n/messages_zh_TW.properties b/backend/src/main/resources/i18n/messages_zh_TW.properties new file mode 100644 index 0000000000..6f3a64cfb9 --- /dev/null +++ b/backend/src/main/resources/i18n/messages_zh_TW.properties @@ -0,0 +1,36 @@ +test_case_exist=該項目下已存在用例: +error_lang_invalid=語言參數錯誤 +load_test_already_exists=測試名稱不能重複 +project_name_is_null=項目名稱不能為空 +project_name_already_exists=項目名稱已存在 +workspace_name_is_null=工作空間名不能為空 +workspace_name_already_exists=工作空間名已存在 +workspace_does_not_belong_to_user=當前工作空間不屬於當前用戶 +organization_does_not_belong_to_user=當前組織不屬於當前用戶 +file_cannot_be_null=文件不能為空! +edit_load_test_not_found=無法編輯測試,未找到測試: +run_load_test_not_found=無法運行測試,未找到測試: +run_load_test_file_not_found=無法運行測試,無法獲取測試文件元信息,測試ID: +run_load_test_file_content_not_found=無法運行測試,無法獲取測試文件內容,測試ID: +run_load_test_file_init_error=無法運行測試,初始化運行環境失敗,測試ID: +load_test_is_running=測試正在運行, 請等待 +node_deep_limit=節點深度不超過5層! +no_nodes_message=沒有節點信息 +duplicate_node_ip=節點 IP 重複 +only_one_k8s=只能添加一個 K8s +organization_id_is_null=組織 ID 不能為空 +max_thread_insufficient=並髮用戶數超額 +cannot_edit_load_test_running=不能修改正在運行的測試 +test_not_found=測試不存在: +test_not_running=測試未運行 +before_delete_plan=該計劃下存在關聯測試用例,請先取消關聯! +user_email_already_exists=用戶郵箱已存在 +user_name_is_null=用戶名不能為空 +user_email_is_null=用戶郵箱不能為空 +password_is_null=密碼不能為空 +workspace_not_exists=工作空間不存在 +#api +api_load_script_error=讀取腳本失敗 +user_id_already_exists=用戶id已存在 +password_modification_failed=密碼修改失敗 +cannot_delete_current_user=無法刪除當前登錄用戶 \ No newline at end of file From d082ebc7d2b0351a09539594aa10c12b994860ff Mon Sep 17 00:00:00 2001 From: "Captain.B" Date: Thu, 14 May 2020 11:34:15 +0800 Subject: [PATCH 11/11] zh-tw --- frontend/src/i18n/zh-TW.js | 427 +++++++++++++++++++++++++++++++++++-- 1 file changed, 410 insertions(+), 17 deletions(-) diff --git a/frontend/src/i18n/zh-TW.js b/frontend/src/i18n/zh-TW.js index 143343310d..e123f8e46b 100644 --- a/frontend/src/i18n/zh-TW.js +++ b/frontend/src/i18n/zh-TW.js @@ -1,35 +1,428 @@ export default { commons: { - 'workspace': '工作空间', - 'organization': '组织', - 'name': '名称', + 'workspace': '工作空間', + 'organization': '組織', + 'setting': '設置', + 'project': '項目', + 'name': '名稱', 'description': '描述', + 'clear': '清空', 'save': '保存', 'save_success': '保存成功', - 'delete_success': '删除成功', - 'confirm': '确定', + 'delete_success': '刪除成功', + 'modify_success': '修改成功', + 'delete_cancel': '已取消刪除', + 'confirm': '確定', 'cancel': '取消', 'prompt': '提示', 'operating': '操作', + 'input_limit': '長度在 {0} 到 {1} 個字符', + 'login': '登錄', + 'welcome': '歡迎回來,請輸入用戶名和密碼登錄MeterSphere', + 'username': '用戶名', + 'password': '密碼', + 'input_username': '請輸入用戶名', + 'input_password': '請輸入密碼', + 'test': '測試', + 'create_time': '創建時間', + 'update_time': '更新時間', + 'add': '添加', + 'member': '成員', + 'email': '郵箱', + 'phone': '電話', + 'role': '角色', + 'personal_info': '個人信息', + 'status': '狀態', + 'show_all': '顯示全部', + 'report': '報告', + 'user': '用戶', + 'system': '系統', + 'personal_setting': '個人設置', + 'test_resource_pool': '測試資源池', + 'system_setting': '系統設置', + 'api': '接口測試', + 'performance': '性能測試', + 'functional': '功能測試', + 'input_content': '請輸入內容', + 'create': '新建', + 'edit': '編輯', + 'copy': '複製', + 'refresh': '刷新', + 'remark': '備註', + 'delete': '刪除', + 'not_filled': '未填寫', + 'please_select': '請選擇', + 'search_by_name': '根據名稱搜索', + 'personal_information': '個人信息', + 'exit_system': '退出系統', + 'verification': '驗證', + 'set_admin': '設置為管理員', }, workspace: { - 'create': '创建工作空间', - 'delete_confirm': '这个工作空间确定要删除吗?', - 'add': '添加工作空间', - 'input_name': '请输入工作空间名称', - 'search_by_name': '根据名称搜索', - 'organization_name': '所属组织', - 'please_choose_organization': '请选择组织', + 'create': '創建工作空間', + 'update': '修改工作空間', + 'delete_confirm': '刪除工作空間會關聯刪除該工作空間下的資源,確定要刪除嗎?', + 'add': '添加工作空間', + 'input_name': '請輸入工作空間名稱', + 'search_by_name': '根據名稱搜索', + 'organization_name': '所屬組織', + 'please_choose_organization': '請選擇組織', + 'please_select_a_workspace_first': '請先選擇工作空間! ', + 'none': '無工作空間', + 'select': '選擇工作空間', }, organization: { - 'create': '创建组织', - 'modify': '修改组织', - 'search_by_name': '根据名称搜索', + 'create': '創建組織', + 'modify': '修改組織', + 'delete_confirm': '刪除組織會關聯刪除該組織下的資源,確定要刪除嗎?', + 'input_name': '請輸入組織名稱', + 'select_organization': '請選擇組織', + 'search_by_name': '根據名稱搜索', + 'special_characters_are_not_supported': '不支持特殊字符', + 'none': '無組織', + 'select': '選擇組織', }, project: { - 'recent': '最近的项目' + 'recent': '最近的項目', + 'create': '創建項目', + 'edit': '編輯項目', + 'delete_confirm': '這個項目確定要刪除嗎?', + 'search_by_name': '根據名稱搜索', + 'input_name': '請輸入項目名稱', + 'owning_workspace': '所屬工作空間', + 'please_choose_workspace': '請選擇工作空間', + }, + member: { + 'create': '添加成員', + 'modify': '修改成員', + 'delete_confirm': '這個用戶確定要刪除嗎?', + 'please_choose_member': '請選擇成員', + 'search_by_name': '根據名稱搜索', + 'modify_personal_info': '修改個人信息', + 'edit_password': '修改密碼', + 'edit_information': '編輯信息', + 'input_name': '請輸入名稱', + 'input_email': '請輸入郵箱', + 'special_characters_are_not_supported': '不支持特殊字符', + 'mobile_number_format_is_incorrect': '手機號碼格式不正確', + 'email_format_is_incorrect': '郵箱格式不正確', + 'password_format_is_incorrect': '密碼格式不正確(至少8-16個字符,至少1個大寫字母,1個小寫字母和1個數字)', + 'old_password': '舊密碼', + 'new_password': '新密碼', + }, + user: { + 'create': '創建用戶', + 'modify': '修改用戶', + 'input_name': '請輸入用戶名', + 'input_id': '請輸入ID', + 'input_email': '請輸入郵箱', + 'input_password': '請輸入密碼', + 'special_characters_are_not_supported': '不支持特殊字符', + 'mobile_number_format_is_incorrect': '手機號碼格式不正確', + 'email_format_is_incorrect': '郵箱格式不正確', + 'delete_confirm': '這個用戶確定要刪除嗎?', + }, + role: { + 'please_choose_role': '請選擇角色', + 'admin': '系統管理員', + 'org_admin': '組織管理員', + 'test_manager': '測試經理', + 'test_user': '測試人員', + 'test_viewer': 'Viewer' + }, + report: { + 'recent': '最近的報告', + 'search_by_name': '根據名稱搜索', + 'test_name': '所屬測試', + 'test_overview': '測試概覽', + 'test_request_statistics': '請求統計', + 'test_error_log': '錯誤記錄', + 'test_log_details': '日誌詳情', + 'test_details': '測試詳情', + 'test_duration': '持續時間:{0} 分鐘 {1} 秒', + 'test_start_time': '開始時間', + 'test_end_time': '結束時間', + 'test_stop_now': '立即停止', + 'test_execute_again': '再次執行', + 'export': '導出', + 'compare': '比較', + 'generation_error': '報告生成錯誤,無法查看!', + 'being_generated': '報告正在生成中...', + 'delete_confirm': '確認刪除報告: ', + }, + load_test: { + 'operating': '操作', + 'recent': '最近的測試', + 'search_by_name': '根據名稱搜索', + 'project_name': '所屬項目', + 'delete_confirm': '確認刪除測試: ', + 'input_name': '請輸入名稱', + 'select_project': '請選擇項目', + 'save_and_run': '保存並執行', + 'basic_config': '場景配置', + 'pressure_config': '壓力配置', + 'advanced_config': '高級配置', + 'runtime_config': '運行配置', + 'is_running': '正在運行! ', + 'test_name_is_null': '測試名稱不能為空! ', + 'project_is_null': '項目不能為空! ', + 'jmx_is_null': '只能包含一個JMX文件! ', + 'file_name': '文件名', + 'file_size': '文件大小', + 'file_type': '文件類型', + 'file_status': '文件狀態', + 'last_modify_time': '修改時間', + 'upload_tips': '將文件拖到此處,或點擊上傳', + 'upload_type': '只能上傳JMX/CSV文件', + 'related_file_not_found': "未找到關聯的測試文件!", + 'delete_file_confirm': '確認刪除文件: ', + 'delete_file': "請先刪除已存在的文件!", + 'thread_num': '並髮用戶數:', + 'input_thread_num': '請輸入線程數', + 'duration': '壓測時長(分鐘):', + 'input_duration': '請輸入時長', + 'rps_limit': 'RPS上限:', + 'input_rps_limit': '請輸入限制', + 'ramp_up_time_within': '在', + 'ramp_up_time_minutes': '分鐘內,分', + 'ramp_up_time_times': '次增加並髮用戶', + 'advanced_config_error': '高級配置校驗失敗', + 'domain_bind': '域名綁定', + 'domain': '域名', + 'enable': '是否啟用', + 'ip': 'IP地址', + 'params': '自定義屬性', + 'param_name': '屬性名', + 'param_value': '屬性值', + 'domain_is_duplicate': '域名不能重複', + 'param_is_duplicate': '參數名不能重複', + 'domain_ip_is_empty': '域名和IP不能為空', + 'param_name_value_is_empty': '參數名和參數值不能為空', + 'connect_timeout': '建立連接超時時間', + 'custom_http_code': '自定義 HTTP 響應成功狀態碼', + 'separated_by_commas': '按逗號分隔', + 'create': '創建測試', + 'select_resource_pool': '請選擇資源池', + 'resource_pool_is_null': '資源池為空', + 'download_log_file': '下載完整日誌文件', + 'pressure_prediction_chart': '壓力預估圖', + }, + api_test: { + save_and_run: "保存並執行", + run: "執行", + running: "正在執行", + reset: "重置", + input_name: "請輸入測試名稱", + select_project: "請選擇項目", + variable_name: "變量名", + copied: "已拷貝", + key: "鍵", + value: "值", + scenario: { + config: "場景配置", + input_name: "請輸入場景名稱", + name: "場景名稱", + base_url: "基礎URL", + base_url_description: "基礎URL作為所有請求的URL前綴", + variables: "自定義變量", + headers: "請求頭", + kv_description: "所有請求可以使用自定義變量", + }, + request: { + input_name: "請輸入請求名稱", + name: "請求名稱", + method: "請求方法", + url: "請求URL", + url_description: "例如: https://fit2cloud.com", + parameters: "請求參數", + parameters_desc: "參數追加到URL,例如https://fit2cloud.com/entries?key1=Value1&Key2=Value2", + headers: "請求頭", + body: "請求內容", + body_kv: "鍵值對", + body_text: "文本", + assertions: { + label: "斷言", + text: "文本", + regex: "正則", + response_time: "響應時間", + select_type: "請選擇類型", + select_subject: "請選擇對象", + select_condition: "請選擇條件", + contains: "包含", + not_contains: "不包含", + equals: "等於", + start_with: "以...開始", + end_with: "以...結束", + value: "值", + expression: "Perl型正則表達式", + response_in_time: "響應時間在...毫秒以內", + }, + extract: { + label: "提取", + select_type: "請選擇類型", + description: "從響應結果中提取數據並將其存儲在變量中,在後續請求中使用變量。", + regex: "正則", + regex_expression: "Perl型正則表達式", + json_path_expression: "JSONPath表達式", + xpath_expression: "XPath表達式", + } + } + }, + api_report: { + request: "請求", + request_body: "請求內容", + request_headers: "請求頭", + request_cookie: "Cookie", + response: "響應", + delete_confirm: '確認刪除報告: ', + scenario_name: "場景名稱", + response_time: "響應時間(ms)", + latency: "網絡延遲", + request_size: "請求大小", + response_size: "響應大小", + response_code: "狀態碼", + response_message: "響應報文", + error: "錯誤", + assertions: "斷言", + assertions_pass: "成功斷言", + assertions_name: "斷言名稱", + assertions_message: "斷言信息", + assertions_is_success: "是否成功", + result: "結果", + success: "成功", + fail: "失敗", + }, + test_track: { + test_track: "測試跟踪", + confirm: "確 定", + cancel: "取 消", + project: "項目", + save: "保 存", + return: "返 回", + length_less_than: "長度必須小於", + recent_plan: "最近的計劃", + recent_case: "最近的用例", + case: { + test_case: "測試用例", + move: "移動用例", + case_list: "用例列表", + create_case: "創建用例", + edit_case: "編輯用例", + view_case: "查看用例", + no_project: "該工作空間下無項目,請先創建項目", + priority: "優先級", + type: "類型", + method: "測試方式", + auto: "自動", + manual: "手動", + create: "新建用例", + case_type: "用例類型", + name: "用例名稱", + module: "所屬模塊", + maintainer: "維護人", + steps: "執行步驟", + number: "編號", + prerequisite: "前置條件", + step_desc: "步驟描述", + expected_results: "預期結果", + input_name: "請輸入名稱", + input_module: "請選擇模塊", + input_maintainer: "請選擇維護人", + input_priority: "請選擇優先級", + input_type: "請選擇用例類型", + input_method: "請選擇測試方式", + input_prerequisite: "請輸入前置條件", + delete_confirm: "確認刪除測試用例: ", + import: { + import: "導入用例", + case_import: "導入測試用例", + download_template: "下載模版", + click_upload: "點擊上傳", + upload_limit: "只能上傳xls/xlsx文件,且不超過20M", + upload_limit_count: "一次只能上傳一個文件", + upload_limit_format: "上傳文件只能是 xls、xlsx格式!", + upload_limit_size: "上傳文件大小不能超過 20MB!", + success: "導入成功!", + }, + export: { + export: "導出用例" + } + }, + plan: { + test_plan: "測試計劃", + create_plan: "創建測試計劃", + edit_plan: "編輯測試計劃", + plan_name: "計劃名稱", + plan_project: "所屬項目", + plan_stage: "測試階段", + plan_status: "當前狀態", + smoke_test: "冒煙測試", + functional_test: "功能測試", + regression_test: "回歸測試", + integration_testing: "集成測試", + system_test: "系統測試", + version_validation: "版本驗證", + plan_principal: "負責人", + input_plan_name: "請輸入測試計劃名稱", + input_plan_principal: "請選擇負責人", + input_plan_project: "請選擇所屬項目", + input_plan_stage: "請選擇測試階段", + plan_status_prepare: "未開始", + plan_status_running: "進行中", + plan_status_completed: "已完成", + plan_delete_confirm: "確認刪除測試計劃: ", + }, + module: { + search: "搜索模塊", + rename: "重命名", + add_submodule: "添加子模塊", + add_module: "添加模塊", + name: "模塊名稱", + delete_confirm: "確認刪除模塊: ", + delete_all_resource: "以及模塊下所有子模塊和測試用例", + }, + plan_view: { + plan: "計劃", + relevance_test_case: "關聯測試用例", + executor: "執行人", + execute_result: "執行結果", + pass: "通過", + failure: "失敗", + blocking: "阻塞", + skip: "跳過", + actual_result: "實際結果", + step_result: "步驟執行結果", + my_case: "我的用例", + all_case: "全部用例", + pre_case: "上一條用例", + next_case: "下一條用例", + change_execution_results: "更改執行結果", + change_executor: "更改執行人", + select_executor: "請選擇執行人", + select_execute_result: "選擇執行結果", + cancel_relevance: "取消關聯", + confirm_cancel_relevance: "確認取消關聯", + select_manipulate: "請選擇需要操作的數據", + } + }, + test_resource_pool: { + 'type': '類型', + 'enable_disable': '啟用/禁用', + 'search_by_name': '根據名稱搜索', + 'create_resource_pool': '創建資源池', + 'update_resource_pool': '修改資源池', + 'select_pool_type': '選擇資源類型', + 'max_threads': '最大並發數', + 'input_pool_name': '請輸入資源池名稱', + 'pool_name_valid': '資源池名稱不支持特殊字符', + 'cannot_remove_all_node': '不能刪除所有獨立節點', + 'cannot_empty': '資源池不能為空', + 'fill_the_data': '請完善數據', + 'delete_prompt': '此操作將永久刪除該資源池, 是否繼續?', + 'status_change_success': '狀態修改成功!', + 'status_change_failed': '狀態修改失敗, 校驗不通過!', }, i18n: { - 'home': '首页', + 'home': '首頁' } };