Fix date/time formatting to use es-ES locale
- Update all date/time formatting functions to use 'es-ES' locale instead of 'en-US' or 'de-DE' - Update utility functions in utils/date.ts and utils/exchange.ts - Update all component files that use date formatting - Update e2e test helper to match new Spanish date format - All formatting now uses Spanish locale regardless of selected language as per PR requirements
This commit is contained in:
parent
d2fc7d8850
commit
e35e79e84d
19 changed files with 146 additions and 50 deletions
|
|
@ -116,7 +116,7 @@ export default function AdminInvitesPage() {
|
|||
};
|
||||
|
||||
const formatDate = (dateStr: string) => {
|
||||
return new Date(dateStr).toLocaleString();
|
||||
return new Date(dateStr).toLocaleString("es-ES");
|
||||
};
|
||||
|
||||
const getStatusBadgeVariant = (status: string): "ready" | "success" | "error" | undefined => {
|
||||
|
|
|
|||
|
|
@ -39,11 +39,11 @@ export default function AdminPriceHistoryPage() {
|
|||
};
|
||||
|
||||
const formatDate = (dateStr: string) => {
|
||||
return new Date(dateStr).toLocaleString();
|
||||
return new Date(dateStr).toLocaleString("es-ES");
|
||||
};
|
||||
|
||||
const formatPrice = (price: number) => {
|
||||
return new Intl.NumberFormat("en-US", {
|
||||
return new Intl.NumberFormat("es-ES", {
|
||||
style: "currency",
|
||||
currency: "EUR",
|
||||
minimumFractionDigits: 2,
|
||||
|
|
|
|||
|
|
@ -262,7 +262,7 @@ export default function AdminTradesPage() {
|
|||
<span style={tradeCardStyles.rateLabel}>Rate:</span>
|
||||
<span style={tradeCardStyles.rateValue}>
|
||||
€
|
||||
{trade.agreed_price_eur.toLocaleString("de-DE", {
|
||||
{trade.agreed_price_eur.toLocaleString("es-ES", {
|
||||
maximumFractionDigits: 0,
|
||||
})}
|
||||
/BTC
|
||||
|
|
@ -270,7 +270,7 @@ export default function AdminTradesPage() {
|
|||
<span style={tradeCardStyles.rateLabel}>Market:</span>
|
||||
<span style={tradeCardStyles.rateValue}>
|
||||
€
|
||||
{trade.market_price_eur.toLocaleString("de-DE", {
|
||||
{trade.market_price_eur.toLocaleString("es-ES", {
|
||||
maximumFractionDigits: 0,
|
||||
})}
|
||||
</span>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue