Open-source personal finance manager. Self-hosted, privacy-first.
feat(currencies): add GEL (Georgian Lari) (#1272)
Tássio Noronha0b217c61e6d4
diff --git a/backend/app/api/currencies.py b/backend/app/api/currencies.pyindex 5e47b864..b942b1da 100644--- a/backend/app/api/currencies.py+++ b/backend/app/api/currencies.py@@ -55,6 +55,7 @@ CURRENCY_META = {"HKD": {"symbol": "HK$", "name": "Hong Kong Dollar", "flag": "\U0001F1ED\U0001F1F0"},"TWD": {"symbol": "NT$", "name": "New Taiwan Dollar", "flag": "\U0001F1F9\U0001F1FC"},"ZAR": {"symbol": "R", "name": "South African Rand", "flag": "\U0001F1FF\U0001F1E6"},+ "GEL": {"symbol": "₾", "name": "Georgian Lari", "flag": "\U0001F1EC\U0001F1EA"},}diff --git a/backend/app/core/config.py b/backend/app/core/config.pyindex e5487538..21a32098 100644--- a/backend/app/core/config.py+++ b/backend/app/core/config.py@@ -72,7 +72,7 @@ class Settings(BaseSettings):# FX Ratesopenexchangerates_app_id: str = ""- supported_currencies: str = "USD,EUR,GBP,BRL,CAD,AUD,CHF,ARS,JPY,MXN,INR,SEK,DKK,NOK,PLN,CZK,HUF,RON,CRC,IDR,COP,CLP,DOP,KZT,RUB,GTQ,PHP,UAH,NZD,VND,SGD,AZN,TRY,PKR,MDL,AED,THB,EGP,MYR,CNY,SAR,QAR,JMD,RSD,MKD,HKD,TWD,ZAR" # comma-separated list+ supported_currencies: str = "USD,EUR,GBP,BRL,CAD,AUD,CHF,ARS,JPY,MXN,INR,SEK,DKK,NOK,PLN,CZK,HUF,RON,CRC,IDR,COP,CLP,DOP,KZT,RUB,GTQ,PHP,UAH,NZD,VND,SGD,AZN,TRY,PKR,MDL,AED,THB,EGP,MYR,CNY,SAR,QAR,JMD,RSD,MKD,HKD,TWD,ZAR,GEL" # comma-separated listfx_sync_mode: str = "on_demand" # "on_demand" or "scheduled"# Storagediff --git a/backend/tests/test_currencies_api.py b/backend/tests/test_currencies_api.pyindex ce055f5d..d8416e34 100644--- a/backend/tests/test_currencies_api.py+++ b/backend/tests/test_currencies_api.py@@ -287,3 +287,15 @@ async def test_currencies_include_zar_with_metadata(client: AsyncClient):assert zar["symbol"] == "R"assert zar["name"] == "South African Rand"assert zar["flag"] == "🇿🇦"+++async def test_currencies_include_gel_with_metadata(client: AsyncClient):+ response = await client.get("/api/currencies")+ data = response.json()+ gel = next((currency for currency in data if currency["code"] == "GEL"), None)++ assert gel is not None+ assert gel["symbol"] == "₾"+ assert gel["name"] == "Georgian Lari"+ assert gel["flag"] == "🇬🇪"diff --git a/frontend/src/components/currency-select.tsx b/frontend/src/components/currency-select.tsxindex 256c5534..39c47542 100644--- a/frontend/src/components/currency-select.tsx+++ b/frontend/src/components/currency-select.tsx@@ -58,6 +58,7 @@ export const CURRENCIES = [{ code: 'HKD', flag: '\u{1F1ED}\u{1F1F0}', symbol: 'HK$' },{ code: 'TWD', flag: '\u{1F1F9}\u{1F1FC}', symbol: 'NT$' },{ code: 'ZAR', flag: '\u{1F1FF}\u{1F1E6}', symbol: 'R' },+ { code: 'GEL', flag: '\u{1F1EC}\u{1F1EA}', symbol: '₾' },] as constinterface CurrencySelectProps {diff --git a/frontend/src/lib/format.test.ts b/frontend/src/lib/format.test.tsindex ebd2525f..541449d1 100644--- a/frontend/src/lib/format.test.ts+++ b/frontend/src/lib/format.test.ts@@ -37,6 +37,7 @@ describe('resolveDisplayLocale', () => {expect(resolveDisplayLocale('auto', 'HKD')).toBe('zh-HK')expect(resolveDisplayLocale('auto', 'TWD')).toBe('zh-TW')expect(resolveDisplayLocale('auto', 'ZAR')).toBe('en-ZA')+ expect(resolveDisplayLocale('auto', 'GEL')).toBe('en-GE')})it('treats a missing number format like auto', () => {diff --git a/frontend/src/lib/format.ts b/frontend/src/lib/format.tsindex ee392bd7..f526a7d4 100644--- a/frontend/src/lib/format.ts+++ b/frontend/src/lib/format.ts@@ -80,6 +80,7 @@ const CURRENCY_LOCALE: Record<string, string> = {HKD: 'zh-HK',TWD: 'zh-TW',ZAR: 'en-ZA',+ GEL: 'en-GE',}/**