feat: Improve error handling, refine i18n title fallbacks for product pages, update Next.js type paths, and add an image loader test file.
All checks were successful
Build & Deploy / 🔍 Prepare (push) Successful in 12s
Build & Deploy / 🧪 QA (push) Successful in 1m58s
Build & Deploy / 🏗️ Build (push) Successful in 5m44s
Build & Deploy / 🚀 Deploy (push) Successful in 27s
Build & Deploy / 🧪 Smoke Test (push) Successful in 48s
Build & Deploy / 🛡️ Quality Gates (push) Successful in 1m39s
Build & Deploy / ⚡ Lighthouse (push) Successful in 5m39s
Build & Deploy / ♿ WCAG (push) Successful in 5m35s
Build & Deploy / 🔔 Notify (push) Successful in 2s

This commit is contained in:
2026-02-22 18:30:44 +01:00
parent 3de62dba04
commit 33d2d67774
6 changed files with 30 additions and 17 deletions

View File

@@ -223,7 +223,7 @@ export default async function ProductPage({ params }: ProductPageProps) {
href={`/${locale}/${await mapFileSlugToTranslated('products', locale)}`}
className="hover:text-accent transition-colors"
>
{t.has('breadcrumb') ? t('breadcrumb') : t('title').replace(/<[^>]*>/g, '')}
{t.has('breadcrumb') ? t('breadcrumb') : 'Products'}
</Link>
<span className="mx-3 opacity-30">/</span>
<span className="text-white/90">{categoryTitle}</span>
@@ -384,7 +384,7 @@ export default async function ProductPage({ params }: ProductPageProps) {
href={`/${locale}/${await mapFileSlugToTranslated('products', locale)}`}
className="hover:text-accent transition-colors"
>
{t.has('breadcrumb') ? t('breadcrumb') : t('title').replace(/<[^>]*>/g, '')}
{t.has('breadcrumb') ? t('breadcrumb') : 'Products'}
</Link>
<span className="mx-4 opacity-20">/</span>
<Link

View File

@@ -12,7 +12,11 @@ export default async function Image({ params }: { params: Promise<{ locale: stri
const t = await getTranslations({ locale, namespace: 'Products' });
const fonts = await getOgFonts();
const title = t('meta.title') || t('breadcrumb') || t('title').replace(/<[^>]*>/g, '');
const title = t.has('meta.title')
? t('meta.title')
: t.has('breadcrumb')
? t('breadcrumb')
: 'Products';
const description = t('meta.description') || t('subtitle');
return new ImageResponse(

View File

@@ -17,7 +17,11 @@ interface ProductsPageProps {
export async function generateMetadata({ params }: ProductsPageProps): Promise<Metadata> {
const { locale } = await params;
const t = await getTranslations({ locale, namespace: 'Products' });
const title = t('meta.title') || t('breadcrumb') || t('title').replace(/<[^>]*>/g, '');
const title = t.has('meta.title')
? t('meta.title')
: t.has('breadcrumb')
? t('breadcrumb')
: 'Products';
const description = t('meta.description') || t('subtitle');
return {
title,