diff --git a/.env b/.env index c6c21fd5..3dd46db8 100644 --- a/.env +++ b/.env @@ -1,5 +1,5 @@ VUE_APP_TITLE=D2Admin VUE_APP_API=/api/ VUE_APP_REPO=https://github.com/d2-projects/d2-admin -VUE_APP_I18N_LOCALE=en -VUE_APP_I18N_FALLBACK_LOCALE=zh +VUE_APP_I18N_LOCALE=zh +VUE_APP_I18N_FALLBACK_LOCALE=en diff --git a/locales.babel b/locales.babel deleted file mode 100644 index 33b3e21d..00000000 --- a/locales.babel +++ /dev/null @@ -1,51 +0,0 @@ - - - - vue-json - locales.babel - - - - - false - - - en-US - - src/locales/en.json - - - zh-CN - - src/locales/zh.json - - - - - src/locales/en.json - - - src/locales/zh.json - - - - - $t('%1') - - - - - zh-CN - - tab - namespaced-json - - diff --git a/locales.babel.REMOVED.git-id b/locales.babel.REMOVED.git-id new file mode 100644 index 00000000..2f11b0e0 --- /dev/null +++ b/locales.babel.REMOVED.git-id @@ -0,0 +1 @@ +e0de8ba3e07826cc9efccc379d7c5ef83608bab7 \ No newline at end of file diff --git a/src/locales/en.json b/src/locales/en.json index 0967ef42..a0c9bb4d 100644 --- a/src/locales/en.json +++ b/src/locales/en.json @@ -1 +1,61 @@ -{} +{ + "public": { + "error-message": { + "form-not-valid": "Form Check Failure" + }, + "rules": { + "required": "{name} is required" + } + }, + "views": { + "system": { + "login": { + "footer": { + "button": { + "clause": "Terms", + "help": "Help", + "privacy": "Privacy" + }, + "copyright": { + "author": "FairyEver", + "content": "2018 D2 Projects Open Source Organization", + "copyright": "copyright" + } + }, + "form": { + "button": { + "login": "Log In" + }, + "label": { + "code": "Verification code", + "password": "Password", + "username": "Username" + }, + "placeholder": { + "code": "- - - -", + "password": "Password", + "username": "Username" + }, + "prepend": { + "code": "Code" + } + }, + "motto": { + "text": "Time is the most precious treasure of all wealth." + }, + "options": { + "forget-password": "Forget password", + "register": "Registered user" + }, + "quick-login": { + "dialog": { + "title": "Quickly select users" + }, + "toggle-button": { + "text": "Quickly select users (test function)" + } + } + } + } + } +} diff --git a/src/locales/zh.json b/src/locales/zh.json index 0967ef42..1429fca6 100644 --- a/src/locales/zh.json +++ b/src/locales/zh.json @@ -1 +1,61 @@ -{} +{ + "public": { + "error-message": { + "form-not-valid": "表单校验失败" + }, + "rules": { + "required": "请输入{name}" + } + }, + "views": { + "system": { + "login": { + "footer": { + "button": { + "clause": "条款", + "help": "帮助", + "privacy": "隐私" + }, + "copyright": { + "author": "FairyEver", + "content": "2018 D2 Projects 开源组织出品", + "copyright": "Copyright" + } + }, + "form": { + "button": { + "login": "登录" + }, + "label": { + "code": "验证码", + "password": "密码", + "username": "用户名" + }, + "placeholder": { + "code": "- - - -", + "password": "密码", + "username": "用户名" + }, + "prepend": { + "code": "验证码" + } + }, + "motto": { + "text": "时间是一切财富中最宝贵的财富。" + }, + "options": { + "forget-password": "忘记密码", + "register": "注册用户" + }, + "quick-login": { + "dialog": { + "title": "快速选择用户" + }, + "toggle-button": { + "text": "快速选择用户(测试功能)" + } + } + } + } + } +} diff --git a/src/mock/api/sys.login.js b/src/mock/api/sys.login.js index 7283ee70..4ec3af31 100644 --- a/src/mock/api/sys.login.js +++ b/src/mock/api/sys.login.js @@ -1,7 +1,7 @@ const userDB = [ - { username: 'admin', password: 'admin', uuid: 'admin-uuid', name: '管理员' }, - { username: 'editor', password: 'editor', uuid: 'editor-uuid', name: '编辑' }, - { username: 'user1', password: 'user1', uuid: 'user1-uuid', name: '用户1' } + { username: 'admin', password: 'admin', uuid: 'admin-uuid', name: 'Admin' }, + { username: 'editor', password: 'editor', uuid: 'editor-uuid', name: 'Editor' }, + { username: 'user1', password: 'user1', uuid: 'user1-uuid', name: 'User1' } ] export default [ diff --git a/src/views/system/login/page.vue.REMOVED.git-id b/src/views/system/login/page.vue.REMOVED.git-id index ea09c37d..847db1a4 100644 --- a/src/views/system/login/page.vue.REMOVED.git-id +++ b/src/views/system/login/page.vue.REMOVED.git-id @@ -1 +1 @@ -bf433bc08708fd43c3fcf70acb0d3993d9153e7d \ No newline at end of file +cbc630abf031357f47241555ef834ae7c2a9c140 \ No newline at end of file diff --git a/vue.config.js b/vue.config.js index 0d49e264..10b039bf 100644 --- a/vue.config.js +++ b/vue.config.js @@ -110,8 +110,8 @@ module.exports = { // i18n pluginOptions: { i18n: { - locale: 'en', - fallbackLocale: 'zh', + locale: 'zh', + fallbackLocale: 'en', localeDir: 'locales', enableInSFC: true }