mirror of
https://github.com/AgentSeal/codeburn.git
synced 2026-07-10 01:29:41 +00:00
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:
parent
c913fc5cf6
commit
f8543ac8fc
3 changed files with 3 additions and 0 deletions
|
|
@ -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
|
||||
```
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
})
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue