651d8deafc
Se externaliza el texto español hardcodeado de ~55 archivos a next-intl y se añaden traducciones al inglés, con paridad de claves es/en. Nuevos namespaces: History, CharService, CharServiceB, Points, Legal, UI, Misc (+ altas en Common/Admin). - Historiales (PD/PV, transacciones, sanciones, seguridad), servicios de personaje (transfer, send-gift, quest, restore-*, change-*, customize, level-up, gold, rename), PD/pagos (d-points, trade, promo, transfer-dp, rename-guild, DPointsTabs), páginas legales (cookies, privacidad, términos, reembolsos, aviso legal, contacto), layout (cabecera, footer, cookies, 2FA, descargas, jugadores, recluta) y páginas varias (home, reino, ayuda, addons, 2falogin). - Textos con markup inline via t.rich; interpolación con ICU. - Componente <NoteLegend/> para la leyenda NOTA/NOTE compartida. - payLabel/confirmText de los servicios de pago traducidos. - Verificado: tsc OK, next build OK, todas las claves t() resuelven en es y en, todos los t.rich casan etiquetas, páginas 200 en /es/ y /en/ sin claves crudas. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
70 lines
2.5 KiB
TypeScript
70 lines
2.5 KiB
TypeScript
import type { Metadata } from 'next'
|
|
import { NoteLegend } from '@/components/NoteLegend'
|
|
import { getTranslations, setRequestLocale } from 'next-intl/server'
|
|
import { redirect, Link } from '@/i18n/navigation'
|
|
import { getSession } from '@/lib/session'
|
|
import { getGameCharacters } from '@/lib/characters'
|
|
import { getTransferPrice } from '@/lib/prices'
|
|
import { PageShell } from '@/components/PageShell'
|
|
import { ServiceBox } from '@/components/ServiceBox'
|
|
import { TransferForm } from '@/components/TransferForm'
|
|
|
|
export const dynamic = 'force-dynamic'
|
|
|
|
export const metadata: Metadata = { title: 'Transferir personaje' }
|
|
|
|
export default async function TransferCharacterPage({ params }: { params: Promise<{ locale: string }> }) {
|
|
const { locale } = await params
|
|
setRequestLocale(locale)
|
|
const t = await getTranslations('CharService')
|
|
|
|
const session = await getSession()
|
|
if (!session.bnetId) redirect({ href: '/login', locale })
|
|
if (!session.username) redirect({ href: '/select-account', locale })
|
|
|
|
const [chars, price] = await Promise.all([getGameCharacters(session.accountId!), getTransferPrice()])
|
|
|
|
return (
|
|
<PageShell title={t('transfer.pageTitle')}>
|
|
<ServiceBox>
|
|
<br />
|
|
<p>
|
|
{t.rich('transfer.intro', { s: (c) => <span>{c}</span> })}
|
|
</p>
|
|
<br />
|
|
<p>{t.rich('transfer.dkHeading', { dk: (c) => <span className="death-knight">{c}</span> })}</p>
|
|
<p>{t('transfer.dkCond1')}</p>
|
|
<p>{t('transfer.dkCond2')}</p>
|
|
<br />
|
|
<p>{t('transfer.securityLock')}</p>
|
|
<br />
|
|
<p>
|
|
{t('transfer.buttonExplain')}
|
|
</p>
|
|
<p>{t('transfer.afterTransfer')}</p>
|
|
<br />
|
|
<p>{t.rich('transfer.securityTokenHint', { link: (c) => <Link href="/security-token" target="_blank">{c}</Link> })}</p>
|
|
<p>{t.rich('transfer.twoFaHint', { link: (c) => <Link href="/security-2falogin" target="_blank">{c}</Link> })}</p>
|
|
<br />
|
|
<fieldset>
|
|
<NoteLegend />
|
|
<div className="separate2">
|
|
<p>{t('transfer.noteOffline')}</p>
|
|
<p>
|
|
{t('transfer.noteIrreversible')}
|
|
</p>
|
|
</div>
|
|
</fieldset>
|
|
|
|
<div className="centered">
|
|
<br />
|
|
<br />
|
|
<p>{t.rich('transfer.requires', { price, s: (c) => <span>{c}</span>, e: (c) => <span className="yellow-info">{c}</span> })}</p>
|
|
</div>
|
|
|
|
<TransferForm characters={chars.map((c) => ({ name: c.name, classCss: c.classCss }))} price={price} />
|
|
</ServiceBox>
|
|
</PageShell>
|
|
)
|
|
}
|