i18n: títulos de pestaña por idioma (metadata -> generateMetadata)
Los <title> estáticos estaban en español fijo. Se migran 31 páginas a generateMetadata reutilizando la clave de título ya traducida de cada página (o del <h1>). Se traducen además los PageShell title hardcodeados de las 6 páginas CharServiceB y los títulos de download-client y changelogs (+ su mensaje de error). tsc/build OK, paridad es/en, <title> cambia por idioma. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -2,7 +2,11 @@ import type { Metadata } from 'next'
|
||||
import { getTranslations, setRequestLocale } from 'next-intl/server'
|
||||
import { getRealmName } from '@/lib/realm'
|
||||
|
||||
export const metadata: Metadata = { title: 'Ayuda' }
|
||||
export async function generateMetadata({ params }: { params: Promise<{ locale: string }> }): Promise<Metadata> {
|
||||
const { locale } = await params
|
||||
const t = await getTranslations({ locale, namespace: 'Misc' })
|
||||
return { title: t('help.title') }
|
||||
}
|
||||
|
||||
export const dynamic = 'force-dynamic'
|
||||
|
||||
|
||||
Reference in New Issue
Block a user