Skip to content

Commit

Permalink
fix: localize not found metadata
Browse files Browse the repository at this point in the history
  • Loading branch information
Aerilym committed Oct 8, 2024
1 parent 9bad718 commit 3d3921a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
5 changes: 3 additions & 2 deletions apps/foundation/app/(Site)/not-found.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,10 @@ import Link from 'next/link';
import { getTranslations } from 'next-intl/server';

export async function generateMetadata() {
const dictionary = await getTranslations('notFound');
return {
title: 'Page not found',
description: "Sorry! We couldn't find the page you were looking for.",
title: dictionary('metaTitle'),
description: dictionary('metaDescription'),
};
}

Expand Down
4 changes: 3 additions & 1 deletion apps/foundation/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@
},
"notFound": {
"description": "Sorry! We couldn't find the page you were looking for.",
"homeButton": "Return Home"
"homeButton": "Return Home",
"metaTitle": "Page not found",
"metaDescription": "Sorry! We couldn't find the page you were looking for."
},
"blog": {
"backToBlog": "Back to blog",
Expand Down

0 comments on commit 3d3921a

Please sign in to comment.