From f07078fdf6126ba2480fcaeb601f36dfb3b60f59 Mon Sep 17 00:00:00 2001 From: q4speed Date: Mon, 11 May 2020 11:48:52 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8Delement=20ui=E5=9B=BD?= =?UTF-8?q?=E9=99=85=E5=8C=96=E6=96=87=E4=BB=B6=E5=8A=A0=E8=BD=BD=E5=A4=B1?= =?UTF-8?q?=E8=B4=A5=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../business/components/common/head/HeaderUser.vue | 2 +- frontend/src/i18n/en-US.js | 11 ++++++----- frontend/src/i18n/i18n.js | 7 ++++--- frontend/src/i18n/zh-CN.js | 1 + 4 files changed, 12 insertions(+), 9 deletions(-) diff --git a/frontend/src/business/components/common/head/HeaderUser.vue b/frontend/src/business/components/common/head/HeaderUser.vue index 510cf349c..685bfb86f 100644 --- a/frontend/src/business/components/common/head/HeaderUser.vue +++ b/frontend/src/business/components/common/head/HeaderUser.vue @@ -85,7 +85,7 @@ handleCommand(command) { switch (command) { case "personal": - this.$setLang("en-US"); + this.$setLang("en_US"); break; case "logout": this.$get("/signout", function () { diff --git a/frontend/src/i18n/en-US.js b/frontend/src/i18n/en-US.js index b3854758e..32f7900ea 100644 --- a/frontend/src/i18n/en-US.js +++ b/frontend/src/i18n/en-US.js @@ -193,24 +193,24 @@ export default { running: "Running", reset: "Rest", input_name: "Please enter the test name", - select_project: "Please select project", + select_project: "Select project", scenario: { config: "Scenario Config", input_name: "Please enter the scenario name", name: "Scenario Name", base_url: "Base URL", base_url_description: "Base URL as URL prefix for all requests", - parameters: "arguments", + parameters: "Parameters", headers: "Headers", kv_description: "Will be used for requests where the item is not set", }, request: { input_name: "Please enter the request name", - name: "Request Name", + name: "Name", method: "Method", - url: "url", + url: "URL", url_description: "etc: https://fit2cloud.com", - parameters: "arguments", + parameters: "Parameters", parameters_desc: "Parameters will be appended to the URL e.g. https://fit2cloud.com?Name=Value&Name2=Value2", headers: "Headers", body: "Body", @@ -234,6 +234,7 @@ export default { response_in_time: "Response in time", }, extract: "Extract from response", + extract_desc: "Extract data from the response and store it in variables. Use the variables in subsequent requests.", } }, api_report: { diff --git a/frontend/src/i18n/i18n.js b/frontend/src/i18n/i18n.js index a20d00155..bf0b4d74b 100644 --- a/frontend/src/i18n/i18n.js +++ b/frontend/src/i18n/i18n.js @@ -13,8 +13,8 @@ const messages = { ...enLocale }, 'zh_CN': { - ...zh_CN, - ...zh_CNLocale + ...zh_CNLocale, + ...zh_CN }, 'zh_TW': { ...zh_TWLocale @@ -38,7 +38,8 @@ function setI18nLanguage(lang) { Vue.prototype.$setLang = function (lang) { if (i18n.locale !== lang) { if (!loadedLanguages.includes(lang)) { - return import(`./${lang}`).then(response => { + let file = lang.replace("_", "-"); + return import(`./${file}`).then(response => { i18n.mergeLocaleMessage(lang, response.default); loadedLanguages.push(lang); return setI18nLanguage(lang) diff --git a/frontend/src/i18n/zh-CN.js b/frontend/src/i18n/zh-CN.js index 5a33026a3..62eb2a710 100644 --- a/frontend/src/i18n/zh-CN.js +++ b/frontend/src/i18n/zh-CN.js @@ -237,6 +237,7 @@ export default { response_in_time: "响应时间在...毫秒以内", }, extract: "提取", + extract_desc: "从响应中提取数据并将其存储在变量中。在后续请求中使用变量", } }, api_report: { -- GitLab