fix(currency): resolve RON symbol to "lei" across all surfaces

RON was added to the native macOS/GNOME pickers but not to the shared
SYMBOL_OVERRIDES map, so the CLI, CSV/JSON export, and web dashboard
resolved it through Intl to "RON" while native UI showed "lei" — a
cross-surface split for GNOME/CLI-set currency. Mirror the CNY precedent
(906c533): symbol override + fraction-digits test + README example.
This commit is contained in:
ozymandiashh 2026-07-06 03:42:19 +03:00
parent c913fc5cf6
commit f8543ac8fc
3 changed files with 3 additions and 0 deletions

View file

@ -410,6 +410,7 @@ codeburn currency GBP # set to British Pounds
codeburn currency AUD # set to Australian Dollars
codeburn currency JPY # set to Japanese Yen
codeburn currency CNY # set to Chinese Yuan
codeburn currency RON # set to Romanian Leu
codeburn currency # show current setting
codeburn currency --reset # back to USD
```

View file

@ -30,6 +30,7 @@ let active: CurrencyState = { code: 'USD', rate: 1, symbol: '$' }
const USD: CurrencyState = { code: 'USD', rate: 1, symbol: '$' }
const SYMBOL_OVERRIDES: Record<string, string> = {
CNY: '¥',
RON: 'lei',
}
// Intl.NumberFormat throws on invalid ISO 4217 codes, so we use it as a validator

View file

@ -101,5 +101,6 @@ describe('getFractionDigits', () => {
expect(getFractionDigits('GBP')).toBe(2)
expect(getFractionDigits('INR')).toBe(2)
expect(getFractionDigits('CNY')).toBe(2)
expect(getFractionDigits('RON')).toBe(2)
})
})