mirror of
https://github.com/huge-dream/django-vue3-admin.git
synced 2026-10-10 11:21:35 +00:00
feat(i18n): restore framework menu i18n and fix login page i18n keys
- Restore init_menu.json with name_en/name_zh_tw for menu buttons (104 entries) - Add data migration 0003 to populate menu item name_en/name_zh_tw - Fix login page i18n key paths (message.account.* -> message.pages.login.account.*) - Add missing login i18n keys: loginTitle, firstLoginTip, welcomeLogin, copyright - Fix hardcoded Chinese strings in login page to use i18n
This commit is contained in:
@@ -14,6 +14,8 @@ export default {
|
||||
accountPlaceholder1: 'Please enter your login account',
|
||||
accountPlaceholder2: 'Please enter your login password',
|
||||
accountPlaceholder3: 'Please enter the verification code',
|
||||
accountPlaceholder4: 'Please enter new password',
|
||||
accountPlaceholder5: 'Please enter new password again',
|
||||
accountBtnText: 'Sign in',
|
||||
},
|
||||
mobile: {
|
||||
@@ -28,4 +30,8 @@ export default {
|
||||
text: 'Open the mobile phone to scan and quickly log in / register',
|
||||
},
|
||||
signInText: 'welcome back!',
|
||||
loginTitle: 'Procurement Quotation System - Buyer Portal',
|
||||
firstLoginTip: 'Please change your password on first login',
|
||||
welcomeLogin: 'Welcome',
|
||||
copyright: 'Copyright © AVC All Rights Reserved',
|
||||
};
|
||||
|
||||
@@ -29,4 +29,8 @@ export default {
|
||||
text: '打开手机扫一扫,快速登录/注册',
|
||||
},
|
||||
signInText: '欢迎回来!',
|
||||
loginTitle: '采购询报价系统 - 采购端',
|
||||
firstLoginTip: '初次登录请修改密码',
|
||||
welcomeLogin: '欢迎登录',
|
||||
copyright: 'Copyright © AVC 版权所有',
|
||||
};
|
||||
|
||||
@@ -14,6 +14,8 @@ export default {
|
||||
accountPlaceholder1: '請輸入登入賬號',
|
||||
accountPlaceholder2: '請輸入登入密碼',
|
||||
accountPlaceholder3: '請輸入驗證碼',
|
||||
accountPlaceholder4: '請輸入新密碼',
|
||||
accountPlaceholder5: '請再次輸入新密碼',
|
||||
accountBtnText: '登入',
|
||||
},
|
||||
mobile: {
|
||||
@@ -27,4 +29,8 @@ export default {
|
||||
text: '打開手機掃一掃,快速登錄/注册',
|
||||
},
|
||||
signInText: '歡迎回來!',
|
||||
loginTitle: '採購詢報價系統 - 採購端',
|
||||
firstLoginTip: '初次登入請修改密碼',
|
||||
welcomeLogin: '歡迎登入',
|
||||
copyright: 'Copyright © AVC 版權所有',
|
||||
};
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<el-form ref="formRef" size="large" class="login-content-form" :model="state.ruleForm" :rules="rules" @keyup.enter="loginClick">
|
||||
<el-form-item class="login-animation1" prop="username">
|
||||
<el-input type="text" :placeholder="$t('message.account.accountPlaceholder1')" v-model="ruleForm.username"
|
||||
<el-input type="text" :placeholder="$t('message.pages.login.account.accountPlaceholder1')" v-model="ruleForm.username"
|
||||
clearable autocomplete="off">
|
||||
<template #prefix>
|
||||
<el-icon class="el-input__icon"><ele-User /></el-icon>
|
||||
@@ -9,7 +9,7 @@
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item class="login-animation2" prop="password">
|
||||
<el-input :type="isShowPassword ? 'text' : 'password'" :placeholder="$t('message.account.accountPlaceholder2')"
|
||||
<el-input :type="isShowPassword ? 'text' : 'password'" :placeholder="$t('message.pages.login.account.accountPlaceholder2')"
|
||||
v-model="ruleForm.password">
|
||||
<template #prefix>
|
||||
<el-icon class="el-input__icon"><ele-Unlock /></el-icon>
|
||||
@@ -24,7 +24,7 @@
|
||||
</el-form-item>
|
||||
<el-form-item class="login-animation3" v-if="isShowCaptcha" prop="captcha">
|
||||
<el-col :span="15">
|
||||
<el-input type="text" maxlength="4" :placeholder="$t('message.account.accountPlaceholder3')"
|
||||
<el-input type="text" maxlength="4" :placeholder="$t('message.pages.login.account.accountPlaceholder3')"
|
||||
v-model="ruleForm.captcha" clearable autocomplete="off">
|
||||
<template #prefix>
|
||||
<el-icon class="el-input__icon"><ele-Position /></el-icon>
|
||||
@@ -41,7 +41,7 @@
|
||||
<el-form-item class="login-animation4">
|
||||
<el-button type="primary" class="login-content-submit" round @click="loginClick"
|
||||
:loading="loading.signIn">
|
||||
<span>{{ $t('message.account.accountBtnText') }}</span>
|
||||
<span>{{ $t('message.pages.login.account.accountBtnText') }}</span>
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
@@ -193,7 +193,7 @@ export default defineComponent({
|
||||
// 登录成功提示
|
||||
// 关闭 loading
|
||||
state.loading.signIn = true;
|
||||
const signInText = t('message.signInText');
|
||||
const signInText = t('message.pages.login.signInText');
|
||||
ElMessage.success(`${currentTimeInfo},${signInText}`);
|
||||
// 添加 loading,防止第一次进入界面时出现短暂空白
|
||||
NextLoading.start();
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<el-form ref="formRef" size="large" class="login-content-form" :model="state.ruleForm" :rules="rules"
|
||||
@keyup.enter="loginClick">
|
||||
<el-form-item class="login-animation1" prop="username">
|
||||
<el-input type="text" :placeholder="$t('message.account.accountPlaceholder1')" readonly
|
||||
<el-input type="text" :placeholder="$t('message.pages.login.account.accountPlaceholder1')" readonly
|
||||
v-model="ruleForm.username" clearable autocomplete="off">
|
||||
<template #prefix>
|
||||
<el-icon class="el-input__icon"><ele-User /></el-icon>
|
||||
@@ -11,7 +11,7 @@
|
||||
</el-form-item>
|
||||
<el-form-item class="login-animation2" prop="password">
|
||||
<el-input :type="isShowPassword ? 'text' : 'password'"
|
||||
:placeholder="$t('message.account.accountPlaceholder4')" v-model="ruleForm.password">
|
||||
:placeholder="$t('message.pages.login.account.accountPlaceholder4')" v-model="ruleForm.password">
|
||||
<template #prefix>
|
||||
<el-icon class="el-input__icon"><ele-Unlock /></el-icon>
|
||||
</template>
|
||||
@@ -25,7 +25,7 @@
|
||||
</el-form-item>
|
||||
<el-form-item class="login-animation3" prop="password_regain">
|
||||
<el-input :type="isShowPassword ? 'text' : 'password'"
|
||||
:placeholder="$t('message.account.accountPlaceholder5')" v-model="ruleForm.password_regain">
|
||||
:placeholder="$t('message.pages.login.account.accountPlaceholder5')" v-model="ruleForm.password_regain">
|
||||
<template #prefix>
|
||||
<el-icon class="el-input__icon"><ele-Unlock /></el-icon>
|
||||
</template>
|
||||
@@ -39,7 +39,7 @@
|
||||
</el-form-item>
|
||||
<el-form-item class="login-animation4">
|
||||
<el-button type="primary" class="login-content-submit" round @click="loginClick" :loading="loading.signIn">
|
||||
<span>{{ $t('message.account.accountBtnText') }}</span>
|
||||
<span>{{ $t('message.pages.login.account.accountBtnText') }}</span>
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
@@ -206,7 +206,7 @@ export default defineComponent({
|
||||
// 登录成功提示
|
||||
// 关闭 loading
|
||||
state.loading.signIn = true;
|
||||
const signInText = t('message.signInText');
|
||||
const signInText = t('message.pages.login.signInText');
|
||||
ElMessage.success(`${currentTimeInfo},${signInText}`);
|
||||
// 添加 loading,防止第一次进入界面时出现短暂空白
|
||||
NextLoading.start();
|
||||
|
||||
@@ -14,25 +14,25 @@
|
||||
<!-- <span class="login-right-warp-two"></span>-->
|
||||
<div class="login-right-warp-mian">
|
||||
<div class="login-right-warp-main-title">
|
||||
<span>采购询报价系统 - 采购端</span>
|
||||
<span>{{ $t('message.pages.login.loginTitle') }}</span>
|
||||
<br>
|
||||
<span>{{userInfos.pwd_change_count===0?'初次登录请修改密码':'欢迎登录'}}</span>
|
||||
<span>{{ $t(userInfos.pwd_change_count===0?'message.pages.login.firstLoginTip':'message.pages.login.welcomeLogin') }}</span>
|
||||
</div>
|
||||
<div class="login-right-warp-main-form">
|
||||
<div v-if="!state.isScan">
|
||||
<el-tabs v-model="state.tabsActiveName">
|
||||
<el-tab-pane :label="$t('message.label.changePwd')" name="changePwd" v-if="userInfos.pwd_change_count===0">
|
||||
<el-tab-pane :label="$t('message.pages.login.label.changePwd')" name="changePwd" v-if="userInfos.pwd_change_count===0">
|
||||
<ChangePwd />
|
||||
</el-tab-pane>
|
||||
<el-tab-pane :label="$t('message.label.one1')" name="account" v-else>
|
||||
<el-tab-pane :label="$t('message.pages.login.label.one1')" name="account" v-else>
|
||||
<Account />
|
||||
</el-tab-pane>
|
||||
|
||||
<el-tab-pane v-if="showMobileLoginTab" :label="$t('message.label.two2')" name="mobile">
|
||||
<el-tab-pane v-if="showMobileLoginTab" :label="$t('message.pages.login.label.two2')" name="mobile">
|
||||
<Mobile />
|
||||
</el-tab-pane>
|
||||
|
||||
<el-tab-pane v-if="showScanLoginTab" :label="$t('message.label.two3')" name="scan">
|
||||
<el-tab-pane v-if="showScanLoginTab" :label="$t('message.pages.login.label.two3')" name="scan">
|
||||
<scan />
|
||||
</el-tab-pane>
|
||||
|
||||
@@ -52,7 +52,7 @@
|
||||
</div>
|
||||
|
||||
<div class="login-authorization z-10">
|
||||
<p>Copyright © AVC 版权所有</p>
|
||||
<p>{{ $t('message.pages.login.copyright') }}</p>
|
||||
<p class="la-other" style="margin-top: 5px;">
|
||||
</p>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user