From 22835fa31b4657a0930eafd069f41e033caa128c Mon Sep 17 00:00:00 2001 From: Ideal <141259309+idealsh@users.noreply.github.com> Date: Thu, 13 Aug 2026 21:55:09 +0800 Subject: [PATCH] feat(currency): add SGD (Singapore Dollar) (#794) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## What Add the Singapore Dollar as a supported currency. ## Compatibility Provider covers `sgd` (standard ISO 4217). The conversion service lowercases codes and fetches `sgd.min.json` — same path RSD/NZD use. `exchange_rates` stores rates as JSON, so any 3-letter code works. Validation rules and Inertia currency props auto-derive from config. ## Changes - `config/currencies.php` — SGD entry (`allows_primary` + `allows_account`) - `lang/es.json` — Spanish translation - `lang/fr.json` — French translation - `resources/js/utils/currency.ts` — short symbol (S$) for SGD Follows the RSD addition (#567) exactly; no code changes needed. --- config/currencies.php | 6 ++++++ lang/es.json | 1 + lang/fr.json | 1 + resources/js/utils/currency.ts | 1 + 4 files changed, 9 insertions(+) diff --git a/config/currencies.php b/config/currencies.php index 098a880b..50925f14 100644 --- a/config/currencies.php +++ b/config/currencies.php @@ -194,5 +194,11 @@ return [ 'allows_primary' => true, 'allows_account' => true, ], + [ + 'code' => 'SGD', + 'name' => 'Singapore Dollar', + 'allows_primary' => true, + 'allows_account' => true, + ], ], ]; diff --git a/lang/es.json b/lang/es.json index 50e0f1fc..48db8fd4 100644 --- a/lang/es.json +++ b/lang/es.json @@ -1485,6 +1485,7 @@ "Show this transfer category as money leaving available cash.": "Muestra esta categoría de transferencia como dinero que sale del saldo disponible.", "Sign up": "Crear cuenta", "Simple, transparent pricing": "Precios simples y transparentes", + "Singapore Dollar": "Dólar de Singapur", "Single-use. Works on monthly or yearly plans. Tied to your email — please keep it private.": "Un solo uso. Funciona con el plan mensual o anual. Está vinculado a tu email — guárdalo en privado.", "Skip": "Saltar", "Skip for now": "Omitir por ahora", diff --git a/lang/fr.json b/lang/fr.json index 09d55a71..5922f081 100644 --- a/lang/fr.json +++ b/lang/fr.json @@ -1434,6 +1434,7 @@ "Show this transfer category as money leaving available cash.": "Affiche cette catégorie de transfert comme de l'argent sortant de votre solde disponible.", "Sign up": "Créer un compte", "Simple, transparent pricing": "Tarification simple et transparente", + "Singapore Dollar": "Dollar de Singapour", "Single-use. Works on monthly or yearly plans. Tied to your email — please keep it private.": "Usage unique. Il fonctionne avec le forfait mensuel ou annuel. Il est lié à votre e-mail : gardez-le privé.", "Skip": "Houblon", "Skip for now": "Passer pour l'instant", diff --git a/resources/js/utils/currency.ts b/resources/js/utils/currency.ts index f8798bcd..b350c264 100644 --- a/resources/js/utils/currency.ts +++ b/resources/js/utils/currency.ts @@ -28,6 +28,7 @@ export function getCurrencySymbol(currencyCode: string): string { NGN: '₦', SEK: 'kr', THB: '฿', + SGD: 'S$', }; return symbols[currencyCode] || currencyCode; }