提交 f07078fd 编写于 作者: Q q4speed

修复element ui国际化文件加载失败的bug

上级 6de53a59
......@@ -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 () {
......
......@@ -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: {
......
......@@ -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)
......
......@@ -237,6 +237,7 @@ export default {
response_in_time: "响应时间在...毫秒以内",
},
extract: "提取",
extract_desc: "从响应中提取数据并将其存储在变量中。在后续请求中使用变量",
}
},
api_report: {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册