points-history: concepto/método/estado multiidioma

Los valores de las columnas Concepto/Método/Estado venían en español desde la lib.
Ahora getPointsHistory devuelve CLAVES (conceptKey+args, method 'vote'/'promo',
status 'delivered'/'pending'/'credited') y la página las traduce. Concepto por
servicio ("Rename character: {char}", "Vote on {site}", "Code {code}", "{n} PD");
los pagos heredados sin servicio caen a conceptRaw. Claves nuevas en History.points.
Verificado con la cuenta 15: todas las combinaciones resuelven en es y en.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-07-14 19:29:20 +00:00
parent 86c9b01c76
commit b2e7ab1b88
4 changed files with 112 additions and 24 deletions
@@ -89,12 +89,14 @@ export default async function PointsHistoryPage({ params }: { params: Promise<{
{movements.map((m, i) => (
<tr key={i}>
<td>{fmt(m.date)}</td>
<td>{m.concept}</td>
<td className={methodClass(m.method)}>{m.method}</td>
<td>{m.conceptKey ? t(`points.concept.${m.conceptKey}`, m.conceptArgs) : m.conceptRaw}</td>
<td className={methodClass(m.method)}>
{m.method === 'vote' || m.method === 'promo' ? t(`points.method.${m.method}`) : m.method}
</td>
<td className="yellow-info">{m.pd != null ? `+${m.pd}` : '—'}</td>
<td className="purple-info">{m.pv != null ? `+${m.pv}` : '—'}</td>
<td>{m.amount != null ? `${m.amount.toFixed(2)}` : '—'}</td>
<td>{m.status}</td>
<td>{t(`points.status.${m.status}`)}</td>
</tr>
))}
</tbody>