Skip to content

bug: NotFound page is not i18n-powered #20

Description

@Abdelkaderbzz

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions