From e3a1788b7ad5f504113927d5505bd8994a871f8c Mon Sep 17 00:00:00 2001 From: Lei OT Date: Thu, 30 May 2024 14:40:22 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A4=9A=E8=AF=AD=E8=A8=80:=20=E8=B4=A6?= =?UTF-8?q?=E5=8F=B7=E4=BF=A1=E6=81=AF=E9=A1=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/locales/en/common.json | 7 +++++++ public/locales/zh/common.json | 7 +++++++ src/views/account/Profile.jsx | 16 +++++++++------- 3 files changed, 23 insertions(+), 7 deletions(-) diff --git a/public/locales/en/common.json b/public/locales/en/common.json index c621d64..29d5ac4 100644 --- a/public/locales/en/common.json +++ b/public/locales/en/common.json @@ -30,6 +30,13 @@ "LoginTimeout": "Login timeout", "LoginTimeoutTip": "Please input your password", + "userProfile": "User Profile", + "Telephone": "Telephone", + "Email": "Email address", + "Address": "Address", + "Company": "Company", + "Department": "Department", + "datetime": { "thisWeek": "This Week", "lastWeek": "Last Week", diff --git a/public/locales/zh/common.json b/public/locales/zh/common.json index 8f791d4..d32fbe8 100644 --- a/public/locales/zh/common.json +++ b/public/locales/zh/common.json @@ -30,6 +30,13 @@ "LoginTimeout": "登录超时", "LoginTimeoutTip": "请输入密码", + "userProfile": "账号信息", + "Telephone": "联系电话", + "Email": "电子邮箱", + "Address": "公司地址", + "Company": "公司名称", + "Department": "部门", + "datetime": { "thisWeek": "本周", "lastWeek": "上周", diff --git a/src/views/account/Profile.jsx b/src/views/account/Profile.jsx index 81366b6..7e69e48 100644 --- a/src/views/account/Profile.jsx +++ b/src/views/account/Profile.jsx @@ -1,23 +1,25 @@ import { Descriptions, Col, Row } from 'antd'; import { useStore } from '@/stores/StoreContext.js'; +import { useTranslation } from 'react-i18next'; function Profile() { + const { t } = useTranslation(); const { authStore } = useStore(); const { login } = authStore; return ( - + - - {login.username} - {login.telephone} - {login.emailAddress} - {login.travelAgencyName} + + {login.username} + {login.telephone} + {login.emailAddress} + {login.travelAgencyName} ); } -export default Profile; \ No newline at end of file +export default Profile;