From f37bf71dc0afb7da530b9a379b9979c7d8b80ec4 Mon Sep 17 00:00:00 2001 From: adevopg Date: Tue, 14 Jul 2026 20:34:45 +0000 Subject: [PATCH] =?UTF-8?q?d-points:=20tabla=20de=20niveles=20especifica?= =?UTF-8?q?=20tambi=C3=A9n=20el=20importe=20en=20euros?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit La tabla de niveles mostraba solo PD ("Hasta 100 PD"); ahora añade el equivalente en la moneda (100 PD = 1 €): "Hasta 100 PD (1 €)" / "Up to 100 PD (1 €)". Se sustituyen los 14 mensajes range1..14 por 3 plantillas parametrizadas (rangeFrom/rangeUpTo/rangeOver) con {pd}/{price}/{sym}; RANK_ROWS lleva el umbral en PD y el tipo. Adaptado a la moneda (DP_CURRENCY). Co-Authored-By: Claude Opus 4.8 (1M context) --- web-next/components/DPointsTabs.tsx | 37 ++++++++++++++++------------- web-next/messages/en.json | 19 ++++----------- web-next/messages/es.json | 19 ++++----------- 3 files changed, 28 insertions(+), 47 deletions(-) diff --git a/web-next/components/DPointsTabs.tsx b/web-next/components/DPointsTabs.tsx index ba5e408..01491d1 100644 --- a/web-next/components/DPointsTabs.tsx +++ b/web-next/components/DPointsTabs.tsx @@ -9,21 +9,22 @@ const RANKS = '/nw-themes/nw-ryu/nw-images/nw-ranks' type TabId = 'Info' | 'Stripe' | 'SumUp' -const RANK_ROWS: [string, number, string][] = [ - ['1_Newbie', 1, 'range1'], - ['2_Rookie', 2, 'range2'], - ['3_Apprentice', 3, 'range3'], - ['4_Explorer', 4, 'range4'], - ['5_Contributor', 5, 'range5'], - ['6_Enthusiast', 6, 'range6'], - ['7_Collaborator', 7, 'range7'], - ['8_Regular', 8, 'range8'], - ['9_RisingStar', 9, 'range9'], - ['10_Proficient', 10, 'range10'], - ['11_Experienced', 11, 'range11'], - ['12_Mentor', 12, 'range12'], - ['13_Veteran', 13, 'range13'], - ['14_GrandMaster', 14, 'range14'], +// [archivo, nivel, umbral en PD, tipo de rango]. El euro = PD / 100 (1 unidad = 100 PD). +const RANK_ROWS: [string, number, number, 'from' | 'upto' | 'over'][] = [ + ['1_Newbie', 1, 0, 'from'], + ['2_Rookie', 2, 100, 'upto'], + ['3_Apprentice', 3, 200, 'upto'], + ['4_Explorer', 4, 300, 'upto'], + ['5_Contributor', 5, 400, 'upto'], + ['6_Enthusiast', 6, 500, 'upto'], + ['7_Collaborator', 7, 600, 'upto'], + ['8_Regular', 8, 700, 'upto'], + ['9_RisingStar', 9, 800, 'upto'], + ['10_Proficient', 10, 900, 'upto'], + ['11_Experienced', 11, 1000, 'upto'], + ['12_Mentor', 12, 5000, 'upto'], + ['13_Veteran', 13, 10000, 'upto'], + ['14_GrandMaster', 14, 10000, 'over'], ] export function DPointsTabs({ realm, currency }: { realm: string; currency: string }) { @@ -75,11 +76,13 @@ export function DPointsTabs({ realm, currency }: { realm: string; currency: stri
- {RANK_ROWS.map(([file, level, rangeKey]) => ( + {RANK_ROWS.map(([file, level, pd, type]) => ( - + ))} diff --git a/web-next/messages/en.json b/web-next/messages/en.json index f591801..5cec9b6 100644 --- a/web-next/messages/en.json +++ b/web-next/messages/en.json @@ -1614,20 +1614,6 @@ "show": "Show", "hide": "Hide", "level": "Level {n}", - "range1": "From 0 PD", - "range2": "Up to 100 PD", - "range3": "Up to 200 PD", - "range4": "Up to 300 PD", - "range5": "Up to 400 PD", - "range6": "Up to 500 PD", - "range7": "Up to 600 PD", - "range8": "Up to 700 PD", - "range9": "Up to 800 PD", - "range10": "Up to 900 PD", - "range11": "Up to 1000 PD", - "range12": "Up to 5000 PD", - "range13": "Up to 10000 PD", - "range14": "Over 10000 PD", "purchaseMethods": "What are the PD purchase methods?", "purchaseMethodsText": "The currently available purchase methods are:", "stripeMethod": "Stripe (credit/debit card, for all countries).", @@ -1671,7 +1657,10 @@ "invalidAmount": "The amount must be a whole number between 1 and 200.", "notAuthenticated": "Your session has expired. Please log in again.", "generic": "The payment could not be started. Please try again." - } + }, + "rangeFrom": "From {pd} PD ({price} {sym})", + "rangeUpTo": "Up to {pd} PD ({price} {sym})", + "rangeOver": "More than {pd} PD (over {price} {sym})" } }, "UI": { diff --git a/web-next/messages/es.json b/web-next/messages/es.json index 7b09dfd..5ca4b49 100644 --- a/web-next/messages/es.json +++ b/web-next/messages/es.json @@ -1614,20 +1614,6 @@ "show": "Mostrar", "hide": "Ocultar", "level": "Nivel {n}", - "range1": "Desde 0 PD", - "range2": "Hasta 100 PD", - "range3": "Hasta 200 PD", - "range4": "Hasta 300 PD", - "range5": "Hasta 400 PD", - "range6": "Hasta 500 PD", - "range7": "Hasta 600 PD", - "range8": "Hasta 700 PD", - "range9": "Hasta 800 PD", - "range10": "Hasta 900 PD", - "range11": "Hasta 1000 PD", - "range12": "Hasta 5000 PD", - "range13": "Hasta 10000 PD", - "range14": "Más de 10000 PD", "purchaseMethods": "¿Cuáles son los métodos de compra de PD?", "purchaseMethodsText": "Los métodos de compra disponibles actualmente son:", "stripeMethod": "Stripe (tarjeta de crédito/débito, para todos los países).", @@ -1671,7 +1657,10 @@ "invalidAmount": "La cantidad debe ser un número entero entre 1 y 200.", "notAuthenticated": "Tu sesión ha expirado. Inicia sesión de nuevo.", "generic": "No se pudo iniciar el pago. Inténtalo de nuevo." - } + }, + "rangeFrom": "Desde {pd} PD ({price} {sym})", + "rangeUpTo": "Hasta {pd} PD ({price} {sym})", + "rangeOver": "Más de {pd} PD (más de {price} {sym})" } }, "UI": {
{t('tabs.level', {t('tabs.level', { n: level })}{t(`tabs.${rangeKey}`)} + {t(`tabs.range${type === 'from' ? 'From' : type === 'over' ? 'Over' : 'UpTo'}`, { pd: String(pd), price: String(pd / 100), sym })} +