From 9eeb53f4ff6c86ac4bfa05ede90adad255a22a58 Mon Sep 17 00:00:00 2001
From: iczer <1126263215@qq.com>
Date: Wed, 24 Jun 2020 22:31:03 +0800
Subject: [PATCH] =?UTF-8?q?feat:=20add=20international=20language=20suppor?=
=?UTF-8?q?t=20for=20basicForm=20page;=20:star2:=20=E6=96=B0=E5=A2=9E?=
=?UTF-8?q?=EF=BC=9A=E6=A8=99=E6=BA=96=E8=A1=A8=E5=96=AE=E9=A1=B5=E9=9D=A2?=
=?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=9B=BD=E9=99=85=E5=8C=96=E8=AF=AD=E8=A8=80?=
=?UTF-8?q?=E6=94=AF=E6=8C=81=EF=BC=9B?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../AdvancedForm.vue | 0
.../RepositoryForm.vue | 0
.../{advancedForm => advance}/TaskForm.vue | 0
.../{advancedForm => advance}/UserForm.vue | 0
.../i18n-repository.js | 0
.../{advancedForm => advance}/i18n-task.js | 0
.../{advancedForm => advance}/i18n-user.js | 0
.../form/{advancedForm => advance}/i18n.js | 0
src/pages/form/{ => basic}/BasicForm.vue | 59 +++++++-------
src/pages/form/basic/i18n.js | 79 +++++++++++++++++++
src/pages/form/{stepForm => step}/Step1.vue | 0
src/pages/form/{stepForm => step}/Step2.vue | 0
src/pages/form/{stepForm => step}/Step3.vue | 0
.../form/{stepForm => step}/StepForm.vue | 0
src/router/index.js | 6 +-
src/router/lazy.js | 6 +-
16 files changed, 116 insertions(+), 34 deletions(-)
rename src/pages/form/{advancedForm => advance}/AdvancedForm.vue (100%)
rename src/pages/form/{advancedForm => advance}/RepositoryForm.vue (100%)
rename src/pages/form/{advancedForm => advance}/TaskForm.vue (100%)
rename src/pages/form/{advancedForm => advance}/UserForm.vue (100%)
rename src/pages/form/{advancedForm => advance}/i18n-repository.js (100%)
rename src/pages/form/{advancedForm => advance}/i18n-task.js (100%)
rename src/pages/form/{advancedForm => advance}/i18n-user.js (100%)
rename src/pages/form/{advancedForm => advance}/i18n.js (100%)
rename src/pages/form/{ => basic}/BasicForm.vue (50%)
create mode 100644 src/pages/form/basic/i18n.js
rename src/pages/form/{stepForm => step}/Step1.vue (100%)
rename src/pages/form/{stepForm => step}/Step2.vue (100%)
rename src/pages/form/{stepForm => step}/Step3.vue (100%)
rename src/pages/form/{stepForm => step}/StepForm.vue (100%)
diff --git a/src/pages/form/advancedForm/AdvancedForm.vue b/src/pages/form/advance/AdvancedForm.vue
similarity index 100%
rename from src/pages/form/advancedForm/AdvancedForm.vue
rename to src/pages/form/advance/AdvancedForm.vue
diff --git a/src/pages/form/advancedForm/RepositoryForm.vue b/src/pages/form/advance/RepositoryForm.vue
similarity index 100%
rename from src/pages/form/advancedForm/RepositoryForm.vue
rename to src/pages/form/advance/RepositoryForm.vue
diff --git a/src/pages/form/advancedForm/TaskForm.vue b/src/pages/form/advance/TaskForm.vue
similarity index 100%
rename from src/pages/form/advancedForm/TaskForm.vue
rename to src/pages/form/advance/TaskForm.vue
diff --git a/src/pages/form/advancedForm/UserForm.vue b/src/pages/form/advance/UserForm.vue
similarity index 100%
rename from src/pages/form/advancedForm/UserForm.vue
rename to src/pages/form/advance/UserForm.vue
diff --git a/src/pages/form/advancedForm/i18n-repository.js b/src/pages/form/advance/i18n-repository.js
similarity index 100%
rename from src/pages/form/advancedForm/i18n-repository.js
rename to src/pages/form/advance/i18n-repository.js
diff --git a/src/pages/form/advancedForm/i18n-task.js b/src/pages/form/advance/i18n-task.js
similarity index 100%
rename from src/pages/form/advancedForm/i18n-task.js
rename to src/pages/form/advance/i18n-task.js
diff --git a/src/pages/form/advancedForm/i18n-user.js b/src/pages/form/advance/i18n-user.js
similarity index 100%
rename from src/pages/form/advancedForm/i18n-user.js
rename to src/pages/form/advance/i18n-user.js
diff --git a/src/pages/form/advancedForm/i18n.js b/src/pages/form/advance/i18n.js
similarity index 100%
rename from src/pages/form/advancedForm/i18n.js
rename to src/pages/form/advance/i18n.js
diff --git a/src/pages/form/BasicForm.vue b/src/pages/form/basic/BasicForm.vue
similarity index 50%
rename from src/pages/form/BasicForm.vue
rename to src/pages/form/basic/BasicForm.vue
index ac819dc..299dbe9 100644
--- a/src/pages/form/BasicForm.vue
+++ b/src/pages/form/basic/BasicForm.vue
@@ -2,51 +2,51 @@
-
+
-
+
-
+
-
+
-
+
%
- 公开
- 部分公开
- 不公开
+ {{$t('public')}}
+ {{$t('partially')}}
+ {{$t('private')}}
-
-
- 同事一
- 同事二
- 同事三
-
-
+
+ {{$t('colleague1')}}
+ {{$t('colleague2')}}
+ {{$t('colleague3')}}
+
-
- 提交
- 保存
+
+ {{$t('submit')}}
+ {{$t('save')}}
@@ -85,11 +83,16 @@
diff --git a/src/pages/form/basic/i18n.js b/src/pages/form/basic/i18n.js
new file mode 100644
index 0000000..e01fcda
--- /dev/null
+++ b/src/pages/form/basic/i18n.js
@@ -0,0 +1,79 @@
+module.exports = {
+ messages: {
+ CN: {
+ pageDesc: '表单页用于向用户收集或验证信息,基础表单常见于数据项较少的表单场景。',
+ title: '标题',
+ titleInput: '给目标起个名字',
+ date: '起止日期',
+ describe: '目标描述',
+ describeInput: '请输入你阶段性工作目标',
+ metrics: '衡量标准',
+ metricsInput: '请输入衡量标准',
+ customer: '客户',
+ customerInput: '请描述你服务的客户,内部客户直接 @姓名/工号',
+ critics: '邀评人',
+ criticsInput: '请直接 @姓名/工号,最多可邀请 5 人',
+ weight: '权重',
+ disclosure: '目标公开',
+ disclosureDesc: '客户、邀评人默认被分享',
+ public: '公开',
+ partially: '部分公开',
+ private: '不公开',
+ submit: '提交',
+ save: '保存',
+ colleague1: '同事甲',
+ colleague2: '同事乙',
+ colleague3: '同事丙'
+ },
+ HK: {
+ pageDesc: '表單頁用於向用戶收集或驗證信息,基礎表單常見於數據項較少的表單場景。',
+ title: '標題',
+ titleInput: '給目標起個名字',
+ date: '起止日期',
+ describe: '目標描述',
+ describeInput: '請輸入你階段性的工作目標',
+ metrics: '衡量標準',
+ metricsInput: '請輸入衡量標準',
+ customer: '客戶',
+ customerInput: '請描述你服務的客戶,內部客戶直接 @姓名/工號',
+ critics: '邀評人',
+ criticsInput: '請直接 @姓名/工號,最多可邀請 5 人',
+ weight: '圈中人',
+ disclosure: '目標公開',
+ disclosureDesc: '客戶、邀評人默認被分享',
+ public: '公開',
+ partially: '部分公開',
+ private: '不公開',
+ submit: '提交',
+ save: '保存',
+ colleague1: '同事甲',
+ colleague2: '同事乙',
+ colleague3: '同事丙'
+ },
+ US: {
+ pageDesc: 'Form pages are used to collect or verify information to users, and basic forms are common in scenarios where there are fewer data items.',
+ title: 'Title',
+ titleInput: 'Give the target a name',
+ date: 'Start and end date',
+ describe: 'Goal description',
+ describeInput: 'Please enter your work goals',
+ metrics: 'Metrics',
+ metricsInput: 'Please enter a metric',
+ customer: 'Customer',
+ customerInput: 'Please describe your customer service, internal customers directly @ Name / job number',
+ critics: 'Inviting critics',
+ criticsInput: 'Please direct @ Name / job number, you can invite up to 5 people',
+ weight: 'Weight',
+ disclosure: 'Target disclosure',
+ disclosureDesc: 'Customers and invitees are shared by default',
+ public: 'Public',
+ partially: 'Partially public',
+ private: 'Private',
+ submit: 'Submit',
+ save: 'Save',
+ colleague1: 'Colleague A',
+ colleague2: 'Colleague B',
+ colleague3: 'Colleague C'
+ }
+ }
+}
diff --git a/src/pages/form/stepForm/Step1.vue b/src/pages/form/step/Step1.vue
similarity index 100%
rename from src/pages/form/stepForm/Step1.vue
rename to src/pages/form/step/Step1.vue
diff --git a/src/pages/form/stepForm/Step2.vue b/src/pages/form/step/Step2.vue
similarity index 100%
rename from src/pages/form/stepForm/Step2.vue
rename to src/pages/form/step/Step2.vue
diff --git a/src/pages/form/stepForm/Step3.vue b/src/pages/form/step/Step3.vue
similarity index 100%
rename from src/pages/form/stepForm/Step3.vue
rename to src/pages/form/step/Step3.vue
diff --git a/src/pages/form/stepForm/StepForm.vue b/src/pages/form/step/StepForm.vue
similarity index 100%
rename from src/pages/form/stepForm/StepForm.vue
rename to src/pages/form/step/StepForm.vue
diff --git a/src/router/index.js b/src/router/index.js
index 71b124a..25eead8 100644
--- a/src/router/index.js
+++ b/src/router/index.js
@@ -7,9 +7,9 @@ import ServerError from '@/pages/exception/500'
import PageView from '@/layouts/PageView'
import RouteView from '@/layouts/RouteView'
import MenuView from '@/layouts/MenuView'
-import BasicForm from '@/pages/form/BasicForm'
-import StepForm from '@/pages/form/stepForm/StepForm'
-import AdvancedForm from '@/pages/form/advancedForm/AdvancedForm'
+import BasicForm from '@/pages/form/basic/BasicForm'
+import StepForm from '@/pages/form/step/StepForm'
+import AdvancedForm from '@/pages/form/advance/AdvancedForm'
import Success from '@/pages/result/Success'
import Error from '@/pages/result/Error'
import QueryList from '@/pages/list/QueryList'
diff --git a/src/router/lazy.js b/src/router/lazy.js
index 7ff4679..a1fedb5 100644
--- a/src/router/lazy.js
+++ b/src/router/lazy.js
@@ -52,17 +52,17 @@ export default new Router({
{
path: 'basic',
name: '基础表单',
- component: () => import('@/pages/form/BasicForm'),
+ component: () => import('@/pages/form/basic/BasicForm'),
},
{
path: 'step',
name: '分步表单',
- component: () => import('@/pages/form/stepForm/StepForm'),
+ component: () => import('@/pages/form/step/StepForm'),
},
{
path: 'advance',
name: '高级表单',
- component: () => import('@/pages/form/advancedForm/AdvancedForm'),
+ component: () => import('@/pages/form/advance/AdvancedForm'),
}
]
},