Description
The NotFound.tsx page has hardcoded English text and doesn't use the i18n translation system.
Current state
// src/pages/NotFound.tsx
<h1 className="mb-4 text-4xl font-bold">404</h1>
<p className="mb-4 text-xl text-muted-foreground">Oops! Page not found</p>
<a href="/" className="text-primary underline hover:text-primary/90">
Return to Home
</a>
Expected behavior
Should use translation keys like other pages:
<h1>{t('notFound.title')}</h1>
<p>{t('notFound.message')}</p>
<a href="/">{t('notFound.returnHome')}</a>
Solution
1. Add translations to src/i18n/en.ts
notFound: {
title: '404',
message: 'Oops! Page not found',
returnHome: 'Return to Home',
}
2. Add translations to src/i18n/ar.ts
notFound: {
title: '404',
message: 'عذراً! الصفحة غير موجودة',
returnHome: 'العودة للرئيسية',
}
3. Update NotFound.tsx to use useI18n
Description
The
NotFound.tsxpage has hardcoded English text and doesn't use the i18n translation system.Current state
Expected behavior
Should use translation keys like other pages:
Solution
1. Add translations to
src/i18n/en.ts2. Add translations to
src/i18n/ar.ts3. Update
NotFound.tsxto useuseI18n