feat(i18n): add internationalization support across multiple components

This commit is contained in:
2025-10-27 14:41:58 +08:00
parent 49742f6219
commit 46cc8a254a
23 changed files with 777 additions and 2623 deletions

View File

@@ -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>