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:
2026-07-14 18:58:54 +00:00
parent e457a43f05
commit 651d8deafc
57 changed files with 3516 additions and 1190 deletions
+14 -23
View File
@@ -1,4 +1,4 @@
import { setRequestLocale } from 'next-intl/server'
import { getTranslations, setRequestLocale } from 'next-intl/server'
import { Link } from '@/i18n/navigation'
import { ServerClock } from '@/components/ServerClock'
import { getNoticias, getServerStatus, type Noticia, type ServerStatus } from '@/lib/home'
@@ -38,6 +38,7 @@ function formatFecha(iso: string | Date | null): string {
export default async function HomePage({ params }: { params: Promise<{ locale: string }> }) {
const { locale } = await params
setRequestLocale(locale)
const t = await getTranslations('Misc')
const { noticias, status } = await getData()
const realmName = await getRealmName()
@@ -72,7 +73,7 @@ export default async function HomePage({ params }: { params: Promise<{ locale: s
<td className={`real-info-box ${loginClass}`}>{loginStatus}</td>
</tr>
<tr>
<td>Hora</td>
<td>{t('home.labelTime')}</td>
<td className="real-info-box">
<ServerClock />
</td>
@@ -93,42 +94,32 @@ export default async function HomePage({ params }: { params: Promise<{ locale: s
</table>
</div>
<div className="raf-index-responsive">
<Link href="/recruit-a-friend">¡RECLUTA A UN AMIGO!</Link>
<Link href="/recruit-a-friend">{t('home.recruitFriend')}</Link>
</div>
</div>
<div className="raf-index">
<Link href="/recruit-a-friend">¡RECLUTA A UN AMIGO!</Link>
<Link href="/recruit-a-friend">{t('home.recruitFriend')}</Link>
</div>
</div>
<div className="body-box-content">
<div className="body-box-content">
<p>
{realmName} es una comunidad enfocada en usuarios de habla hispana,
especialmente dirigida al público español y latino.
</p>
<p>
Atraemos a usuarios apasionados tanto por el PvE como por el PvP, y ofrecemos una
amplia variedad de contenido.
</p>
<p>{t('home.introP1', { realm: realmName })}</p>
<p>{t('home.introP2')}</p>
<br />
<p>
Nuestro objetivo principal es mantener una comunidad de alto nivel, brindando un
ambiente agradable para que todos los miembros, nuevos y veteranos, encuentren aquí
un lugar donde puedan vivir momentos inigualables.
</p>
<p>¡Únete y disfruta de una experiencia única con miles de usuarios!</p>
<p>{t('home.introP3')}</p>
<p>{t('home.introP4')}</p>
</div>
</div>
</div>
<br />
<div className="title-content-h3">
<h3 className="big-font">NOTICIAS</h3>
<h3 className="big-font">{t('home.newsHeading')}</h3>
</div>
<div className="box-content">
<div className="body-box-content">
{noticias.length === 0 ? (
<p>No hay noticias disponibles en este momento.</p>
<p>{t('home.noNews')}</p>
) : (
<>
{noticias.map((n) => (
@@ -141,9 +132,9 @@ export default async function HomePage({ params }: { params: Promise<{ locale: s
/>
{n.enlace && (
<p>
Enlace:{' '}
{t('home.newsLinkLabel')}{' '}
<a href={n.enlace} target="_blank" rel="noopener noreferrer">
aquí
{t('home.here')}
</a>
</p>
)}
@@ -153,7 +144,7 @@ export default async function HomePage({ params }: { params: Promise<{ locale: s
</div>
))}
<p className="centered third-brown">
<i>* Mostrando las últimas 50 noticias</i>
<i>{t('home.showingLatest')}</i>
</p>
<br />
</>