feat(currencies): add Swedish Krona (SEK) (#684)

## What

Adds **Swedish Krona (SEK)** as a currency available for both user
primary/display currencies and individual account currencies (including
bank accounts).

## Why

Config-driven per `docs/adding-a-currency.md`.
`App\Services\CurrencyOptions` reads `config/currencies.php` and feeds
validation (`in:` rules), the Inertia dropdown props, and conversion —
so a single config entry wires the whole feature.

## Changes

- `config/currencies.php` — SEK entry (`allows_primary: true`,
`allows_account: true`)
- `lang/es.json` — `"Swedish Krona": "Corona sueca"` (enforced locale)
- `lang/fr.json` — `"Swedish Krona": "Couronne suédoise"` (optional)
- `resources/js/utils/currency.ts` — `SEK: 'kr'` short symbol

## Verification

Confirmed the `@fawazahmed0/currency-api` provider covers `sek` at a
sane rate (SEK→EUR ≈ 0.091 → EUR→SEK ≈ 11).

## Test

```bash
php artisan test --compact tests/Feature/CurrencyConversionServiceTest.php tests/Feature/LocalizationTest.php
```
This commit is contained in:
Víctor Falcón 2026-07-16 16:25:33 +02:00 committed by GitHub
parent a873582191
commit 7aa32dab0f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 9 additions and 0 deletions

View File

@ -164,5 +164,11 @@ return [
'allows_primary' => true,
'allows_account' => true,
],
[
'code' => 'SEK',
'name' => 'Swedish Krona',
'allows_primary' => true,
'allows_account' => true,
],
],
];

View File

@ -1549,6 +1549,7 @@
"Serbian Dinar": "Dinar Serbio",
"Nigerian Naira": "Naira Nigeriano",
"Ghanaian Cedi": "Cedi ghanés",
"Swedish Krona": "Corona sueca",
"Take control of your finances with privacy-first money tracking. Let's set up your account in just a few minutes.": "Toma el control de tus finanzas con un seguimiento privado de tu dinero. Vamos a configurar tu cuenta en pocos minutos.",
"Tap": "Toca",
"Tap the": "Toca el botón",

View File

@ -1501,6 +1501,7 @@
"System": "Système",
"Serbian Dinar": "Dinar Serbe",
"Ghanaian Cedi": "Cedi ghanéen",
"Swedish Krona": "Couronne suédoise",
"Take control of your finances with privacy-first money tracking. Let's set up your account in just a few minutes.": "Prenez le contrôle de vos finances grâce au suivi de l'argent privé. Nous créerons votre compte dans quelques minutes.",
"Tap": "Touche",
"Tap the": "Touchez le bouton",

View File

@ -26,6 +26,7 @@ export function getCurrencySymbol(currencyCode: string): string {
NZD: 'NZ$',
DOP: 'RD$',
NGN: '₦',
SEK: 'kr',
};
return symbols[currencyCode] || currencyCode;
}