feat(i18n): add internationalization support across multiple components
This commit is contained in:
@@ -1,12 +1,14 @@
|
||||
import React, { useState } from "react";
|
||||
import { Box, Button, Divider, Typography } from "@mui/material";
|
||||
import { Lock } from "@mui/icons-material";
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import ProfileForm from "./components/ProfileForm";
|
||||
import ChangePasswordDialog from "./components/ChangePasswordDialog";
|
||||
import { useProfileSetting } from "@/hooks/setting-hooks";
|
||||
import logger from "@/utils/logger";
|
||||
|
||||
function ProfileSetting() {
|
||||
const { t } = useTranslation();
|
||||
const { userInfo, updateUserInfo: updateUserInfoFunc, changeUserPassword: changeUserPasswordFunc } = useProfileSetting();
|
||||
const [passwordDialogOpen, setPasswordDialogOpen] = useState(false);
|
||||
|
||||
@@ -31,10 +33,10 @@ function ProfileSetting() {
|
||||
{/* 密码修改部分 */}
|
||||
<Box sx={{ p: 3 }}>
|
||||
<Typography variant="h6" gutterBottom sx={{ mb: 2, fontWeight: 600 }}>
|
||||
账户安全
|
||||
{t('setting.accountSecurity')}
|
||||
</Typography>
|
||||
<Typography variant="body2" color="text.secondary" sx={{ mb: 3 }}>
|
||||
定期更新密码有助于保护您的账户安全
|
||||
{t('setting.passwordUpdateTip')}
|
||||
</Typography>
|
||||
|
||||
<Button
|
||||
@@ -51,7 +53,7 @@ function ProfileSetting() {
|
||||
}
|
||||
}}
|
||||
>
|
||||
修改密码
|
||||
{t('setting.changePassword')}
|
||||
</Button>
|
||||
</Box>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user