-
Timestamps
+
{t("details.timestamps")}
- Created:
- {formatDateTime(trade.created_at)}
+ {t("details.created")}
+
+ {formatDateTime(trade.created_at, intlLocale)}
+
{trade.cancelled_at && (
- Cancelled:
- {formatDateTime(trade.cancelled_at)}
+ {t("details.cancelled")}
+
+ {formatDateTime(trade.cancelled_at, intlLocale)}
+
)}
{trade.completed_at && (
- Completed:
- {formatDateTime(trade.completed_at)}
+ {t("details.completed")}
+
+ {formatDateTime(trade.completed_at, intlLocale)}
+
)}
@@ -204,23 +215,19 @@ export default function TradeDetailPage() {
)}
diff --git a/frontend/app/utils/date.ts b/frontend/app/utils/date.ts
index 1a821fc..0fb15ac 100644
--- a/frontend/app/utils/date.ts
+++ b/frontend/app/utils/date.ts
@@ -27,9 +27,9 @@ export function formatTime(isoString: string): string {
/**
* Format datetime from ISO string to a readable format in local timezone.
*/
-export function formatDateTime(isoString: string): string {
+export function formatDateTime(isoString: string, locale: string = "es-ES"): string {
const d = new Date(isoString);
- return d.toLocaleString("es-ES", {
+ return d.toLocaleString(locale, {
weekday: "short",
month: "short",
day: "numeric",
diff --git a/frontend/locales/ca/trades.json b/frontend/locales/ca/trades.json
index 547f9af..8b05e64 100644
--- a/frontend/locales/ca/trades.json
+++ b/frontend/locales/ca/trades.json
@@ -12,5 +12,34 @@
"rate": "Taxa:",
"cancel": "Cancel·lar",
"viewDetails": "Veure Detalls"
+ },
+ "details": {
+ "title": "Detalls de l'Operació",
+ "loading": "Carregant...",
+ "backToTrades": "← Tornar a Operacions",
+ "backToTradesShort": "Tornar a Operacions",
+ "error": "Error en carregar l'operació. Pot ser que no existeixi o no tenguis permís per veure-la.",
+ "tradeInformation": "Informació de l'Operació",
+ "amounts": "Quantitats",
+ "pricing": "Preus",
+ "timestamps": "Dates",
+ "status": "Estat:",
+ "time": "Hora:",
+ "direction": "Direcció:",
+ "paymentMethod": "Mètode de Pagament:",
+ "eurAmount": "Quantitat EUR:",
+ "bitcoinAmount": "Quantitat Bitcoin:",
+ "marketPrice": "Preu de Mercat:",
+ "agreedPrice": "Preu Acordat:",
+ "premium": "Prima:",
+ "created": "Creada:",
+ "cancelled": "Cancel·lada:",
+ "completed": "Completada:",
+ "buyBtc": "COMPRAR BTC",
+ "sellBtc": "VENDRE BTC",
+ "receiveVia": "Rebre via",
+ "sendVia": "Enviar via",
+ "cancelTrade": "Cancel·lar Operació",
+ "cancelConfirm": "Estàs segur que vols cancel·lar aquesta operació? Aquesta acció no es pot desfer."
}
}
diff --git a/frontend/locales/en/trades.json b/frontend/locales/en/trades.json
index a4917a7..dba3893 100644
--- a/frontend/locales/en/trades.json
+++ b/frontend/locales/en/trades.json
@@ -12,5 +12,34 @@
"rate": "Rate:",
"cancel": "Cancel",
"viewDetails": "View Details"
+ },
+ "details": {
+ "title": "Trade Details",
+ "loading": "Loading...",
+ "backToTrades": "← Back to Trades",
+ "backToTradesShort": "Back to Trades",
+ "error": "Failed to load trade. It may not exist or you may not have permission to view it.",
+ "tradeInformation": "Trade Information",
+ "amounts": "Amounts",
+ "pricing": "Pricing",
+ "timestamps": "Timestamps",
+ "status": "Status:",
+ "time": "Time:",
+ "direction": "Direction:",
+ "paymentMethod": "Payment Method:",
+ "eurAmount": "EUR Amount:",
+ "bitcoinAmount": "Bitcoin Amount:",
+ "marketPrice": "Market Price:",
+ "agreedPrice": "Agreed Price:",
+ "premium": "Premium:",
+ "created": "Created:",
+ "cancelled": "Cancelled:",
+ "completed": "Completed:",
+ "buyBtc": "BUY BTC",
+ "sellBtc": "SELL BTC",
+ "receiveVia": "Receive via",
+ "sendVia": "Send via",
+ "cancelTrade": "Cancel Trade",
+ "cancelConfirm": "Are you sure you want to cancel this trade? This action cannot be undone."
}
}
diff --git a/frontend/locales/es/trades.json b/frontend/locales/es/trades.json
index 40c22c4..30998ee 100644
--- a/frontend/locales/es/trades.json
+++ b/frontend/locales/es/trades.json
@@ -12,5 +12,34 @@
"rate": "Tasa:",
"cancel": "Cancelar",
"viewDetails": "Ver Detalles"
+ },
+ "details": {
+ "title": "Detalles de la Operación",
+ "loading": "Cargando...",
+ "backToTrades": "← Volver a Operaciones",
+ "backToTradesShort": "Volver a Operaciones",
+ "error": "Error al cargar la operación. Puede que no exista o no tengas permiso para verla.",
+ "tradeInformation": "Información de la Operación",
+ "amounts": "Cantidades",
+ "pricing": "Precios",
+ "timestamps": "Fechas",
+ "status": "Estado:",
+ "time": "Hora:",
+ "direction": "Dirección:",
+ "paymentMethod": "Método de Pago:",
+ "eurAmount": "Cantidad EUR:",
+ "bitcoinAmount": "Cantidad Bitcoin:",
+ "marketPrice": "Precio de Mercado:",
+ "agreedPrice": "Precio Acordado:",
+ "premium": "Prima:",
+ "created": "Creada:",
+ "cancelled": "Cancelada:",
+ "completed": "Completada:",
+ "buyBtc": "COMPRAR BTC",
+ "sellBtc": "VENDER BTC",
+ "receiveVia": "Recibir vía",
+ "sendVia": "Enviar vía",
+ "cancelTrade": "Cancelar Operación",
+ "cancelConfirm": "¿Estás seguro de que quieres cancelar esta operación? Esta acción no se puede deshacer."
}
}