i18n: traducir toda la app (ES + EN) — páginas y componentes con texto hardcodeado
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>
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import type { Metadata } from 'next'
|
||||
import { setRequestLocale } from 'next-intl/server'
|
||||
import { setRequestLocale, getTranslations } from 'next-intl/server'
|
||||
import { redirect } from '@/i18n/navigation'
|
||||
import { getSession } from '@/lib/session'
|
||||
import { getPointsHistory, getPointsBalances, type PointsMovement } from '@/lib/points-history'
|
||||
@@ -25,6 +25,7 @@ function methodClass(method: PointsMovement['method']): string {
|
||||
export default async function PointsHistoryPage({ params }: { params: Promise<{ locale: string }> }) {
|
||||
const { locale } = await params
|
||||
setRequestLocale(locale)
|
||||
const t = await getTranslations('History')
|
||||
|
||||
const session = await getSession()
|
||||
if (!session.bnetId) redirect({ href: '/login', locale })
|
||||
@@ -36,25 +37,24 @@ export default async function PointsHistoryPage({ params }: { params: Promise<{
|
||||
])
|
||||
|
||||
return (
|
||||
<PageShell title="Historial de PD y PV">
|
||||
<PageShell title={t('points.pageTitle')}>
|
||||
<ServiceBox>
|
||||
<br />
|
||||
<p>Aquí verás los consumos de PD y PV más recientes que ha tenido la cuenta.</p>
|
||||
<p>{t('points.intro1')}</p>
|
||||
<p>
|
||||
Con esta información podrás tener control de todo lo que has adquirido así como también chequear que toda la
|
||||
actividad sea normal.
|
||||
{t('points.intro2')}
|
||||
</p>
|
||||
<p>Si observas algún movimiento sospechoso, puedes contactar con el equipo de Nova WoW.</p>
|
||||
<p>{t('points.intro3')}</p>
|
||||
<br />
|
||||
</ServiceBox>
|
||||
|
||||
<div className="box-content">
|
||||
<div className="title-box-content">
|
||||
<h2>Historial de PD y PV</h2>
|
||||
<h2>{t('points.boxTitle')}</h2>
|
||||
</div>
|
||||
<div className="body-box-content">
|
||||
<p className="centered">
|
||||
Saldo actual: <span className="yellow-info">{balances.dp} PD</span> ·{' '}
|
||||
{t('points.currentBalance')} <span className="yellow-info">{balances.dp} PD</span> ·{' '}
|
||||
<span className="purple-info">{balances.pv} PV</span>
|
||||
</p>
|
||||
<br />
|
||||
@@ -63,7 +63,7 @@ export default async function PointsHistoryPage({ params }: { params: Promise<{
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<span>No hay movimientos</span>
|
||||
<span>{t('points.noMovements')}</span>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
@@ -72,13 +72,13 @@ export default async function PointsHistoryPage({ params }: { params: Promise<{
|
||||
<table className="max-center-table-aligned2">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Fecha</th>
|
||||
<th>Concepto</th>
|
||||
<th>Método</th>
|
||||
<th>{t('points.thDate')}</th>
|
||||
<th>{t('points.thConcept')}</th>
|
||||
<th>{t('points.thMethod')}</th>
|
||||
<th>PD</th>
|
||||
<th>PV</th>
|
||||
<th>Importe</th>
|
||||
<th>Estado</th>
|
||||
<th>{t('points.thAmount')}</th>
|
||||
<th>{t('points.thStatus')}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
Reference in New Issue
Block a user