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:
@@ -10,7 +10,11 @@ import { GoldForm } from '@/components/GoldForm'
|
||||
|
||||
export const dynamic = 'force-dynamic'
|
||||
|
||||
export const metadata: Metadata = { title: 'Adquirir oro' }
|
||||
export async function generateMetadata({ params }: { params: Promise<{ locale: string }> }): Promise<Metadata> {
|
||||
const { locale } = await params
|
||||
const t = await getTranslations({ locale, namespace: 'CharServiceB.gold' })
|
||||
return { title: t('title') }
|
||||
}
|
||||
|
||||
const GOLD_ICON = '/nw-themes/nw-ryu/nw-images/nw-icons/money-gold.gif'
|
||||
|
||||
@@ -27,7 +31,7 @@ export default async function GoldCharacterPage({ params }: { params: Promise<{
|
||||
const t = await getTranslations('CharServiceB.gold')
|
||||
|
||||
return (
|
||||
<PageShell title="Adquirir oro">
|
||||
<PageShell title={t('title')}>
|
||||
<ServiceBox>
|
||||
<br />
|
||||
<p>{t.rich('intro', { s: (c) => <span>{c}</span> })}</p>
|
||||
|
||||
Reference in New Issue
Block a user