From d485174edbc8e8f6f6fc3175136a8bf3d5940608 Mon Sep 17 00:00:00 2001 From: chenjianxing Date: Sat, 18 Jun 2022 19:29:19 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=B5=8B=E8=AF=95=E8=B7=9F=E8=B8=AA):=20?= =?UTF-8?q?=E8=84=91=E5=9B=BE=E5=9B=BD=E9=99=85=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --bug=1008911 --user=陈建星 【国际化】测试跟踪 模块,未进行国际化的问题汇总 https://www.tapd.cn/55049933/s/1186008 --- frontend/package.json | 2 +- frontend/src/business/main.js | 6 ++++-- frontend/src/i18n/i18n.js | 14 +++++++++++--- 3 files changed, 16 insertions(+), 6 deletions(-) diff --git a/frontend/package.json b/frontend/package.json index 824047017e..3db830fb4e 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -55,7 +55,7 @@ "vue-float-action-button": "^0.6.6", "vue-i18n": "^8.15.3", "vue-jsonpath-picker": "^1.1.5", - "vue-minder-editor-plus": "1.0.46", + "vue-minder-editor-plus": "1.1.2", "vue-papa-parse": "^2.0.0", "vue-pdf": "^4.2.0", "vue-router": "^3.1.3", diff --git a/frontend/src/business/main.js b/frontend/src/business/main.js index 435f12a50c..895db5451a 100644 --- a/frontend/src/business/main.js +++ b/frontend/src/business/main.js @@ -31,8 +31,6 @@ import 'mavon-editor/dist/css/index.css' import 'element-ui/lib/theme-chalk/display.css'; Vue.use(mavonEditor) -Vue.use(vueMinderEditor) - Vue.use(JsonSchemaEditor); Vue.use(ComparedEditor); @@ -45,6 +43,10 @@ Vue.use(icon); Vue.use(ElementUI, { i18n: (key, value) => i18n.t(key, value) }); +Vue.use(vueMinderEditor, { + i18n: (key, value) => i18n.t(key, value) +}); + Vue.use(filters); Vue.use(ajax); Vue.use(chart); diff --git a/frontend/src/i18n/i18n.js b/frontend/src/i18n/i18n.js index de3eb372f8..9145607952 100644 --- a/frontend/src/i18n/i18n.js +++ b/frontend/src/i18n/i18n.js @@ -4,6 +4,11 @@ import axios from "axios"; import enLocale from "element-ui/lib/locale/lang/en"; import zh_CNLocale from "element-ui/lib/locale/lang/zh-CN"; import zh_TWLocale from "element-ui/lib/locale/lang/zh-TW"; + +import minder_en_US from "vue-minder-editor-plus/src/locale/lang/en-US"; +import minder_zh_CN from "vue-minder-editor-plus/src/locale/lang/zh-CN"; +import minder_zh_TW from "vue-minder-editor-plus/src/locale/lang/zh-TW"; + import zh_CN from "./zh-CN"; import en_US from "./en-US"; import zh_TW from "./zh-TW"; @@ -15,15 +20,18 @@ Vue.use(VueI18n); const messages = { 'en_US': { ...enLocale, - ...en_US + ...en_US, + ...minder_en_US }, 'zh_CN': { ...zh_CNLocale, - ...zh_CN + ...zh_CN, + ...minder_zh_CN }, 'zh_TW': { ...zh_TWLocale, - ...zh_TW + ...zh_TW, + ...minder_zh_TW } };