Skip to content

Commit bbaf0bb

Browse files
committed
🌐 i18n: Localize Settings header
1 parent 1850003 commit bbaf0bb

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

‎src/pages/settings/index.test.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ describe('SettingsPage', () => {
113113

114114
it('renders page header', () => {
115115
renderWithProviders(<SettingsPage />)
116-
expect(screen.getByText('我的')).toBeInTheDocument()
116+
expect(screen.getByText('设置')).toBeInTheDocument()
117117
})
118118

119119
it('displays wallet info card', () => {

‎src/pages/settings/index.tsx‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { useNavigate } from '@tanstack/react-router'
2+
import { useTranslation } from 'react-i18next'
23
import {
34
Wallet,
45
BookUser,
@@ -37,13 +38,14 @@ const CURRENCY_NAMES: Record<string, string> = {
3738

3839
export function SettingsPage() {
3940
const navigate = useNavigate()
41+
const { t } = useTranslation()
4042
const currentWallet = useCurrentWallet()
4143
const currentLanguage = useLanguage()
4244
const currentCurrency = useCurrency()
4345

4446
return (
4547
<div className="flex min-h-screen flex-col bg-muted/30">
46-
<PageHeader title="我的" />
48+
<PageHeader title={t('a11y.tabSettings')} />
4749

4850
<div className="flex-1 space-y-4 p-4">
4951
{/* 钱包信息头 */}

0 commit comments

Comments
 (0)