ban-history: alcance y estado multiidioma
getSanctions devuelve claves (scopeKey account/battlenet/character + scopeName;
statusKey active/activePermanent/expired) en vez de español. La página traduce
alcance ("Character: {name}") y estado; "Permanente" ya usaba clave. Motivo y
autor son datos del GM (no se traducen). Nuevas claves History.ban.scope/status.
Verificado con sanciones de prueba (todos los combos resuelven en es y en).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -20,10 +20,6 @@ function fmt(d: Date): string {
|
||||
return `${p(d.getDate())}-${p(d.getMonth() + 1)}-${d.getFullYear()} ${p(d.getHours())}:${p(d.getMinutes())}:${p(d.getSeconds())}`
|
||||
}
|
||||
|
||||
function StatusCell({ s }: { s: Sanction }) {
|
||||
return <span className={s.active ? 'red-info2' : 'green-info2'}>{s.status}</span>
|
||||
}
|
||||
|
||||
/** Caja con la tabla de sanciones (baneos o muteos), o el vacío del diseño. */
|
||||
async function SanctionBox({
|
||||
title,
|
||||
@@ -68,7 +64,11 @@ async function SanctionBox({
|
||||
<tr key={i}>
|
||||
{showScope && (
|
||||
<td>
|
||||
<span>{s.scope}</span>
|
||||
<span>
|
||||
{s.scopeKey === 'character'
|
||||
? t('ban.scope.character', { name: s.scopeName })
|
||||
: t(`ban.scope.${s.scopeKey}`)}
|
||||
</span>
|
||||
</td>
|
||||
)}
|
||||
<td>
|
||||
@@ -84,7 +84,7 @@ async function SanctionBox({
|
||||
<span>{s.expires ? fmt(s.expires) : t('ban.permanent')}</span>
|
||||
</td>
|
||||
<td>
|
||||
<StatusCell s={s} />
|
||||
<span className={s.active ? 'red-info2' : 'green-info2'}>{t(`ban.status.${s.statusKey}`)}</span>
|
||||
</td>
|
||||
</tr>
|
||||
))}
|
||||
|
||||
Reference in New Issue
Block a user