From f8543ac8fc86574ef8233e631453b7958a228908 Mon Sep 17 00:00:00 2001 From: ozymandiashh <234437643+ozymandiashh@users.noreply.github.com> Date: Mon, 6 Jul 2026 03:42:19 +0300 Subject: [PATCH] fix(currency): resolve RON symbol to "lei" across all surfaces MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. --- README.md | 1 + src/currency.ts | 1 + tests/currency-rounding.test.ts | 1 + 3 files changed, 3 insertions(+) diff --git a/README.md b/README.md index 81d8d8e..9c8430d 100644 --- a/README.md +++ b/README.md @@ -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 ``` diff --git a/src/currency.ts b/src/currency.ts index 331d27d..d951c81 100644 --- a/src/currency.ts +++ b/src/currency.ts @@ -30,6 +30,7 @@ let active: CurrencyState = { code: 'USD', rate: 1, symbol: '$' } const USD: CurrencyState = { code: 'USD', rate: 1, symbol: '$' } const SYMBOL_OVERRIDES: Record = { CNY: '¥', + RON: 'lei', } // Intl.NumberFormat throws on invalid ISO 4217 codes, so we use it as a validator diff --git a/tests/currency-rounding.test.ts b/tests/currency-rounding.test.ts index 4fbb7d0..385e069 100644 --- a/tests/currency-rounding.test.ts +++ b/tests/currency-rounding.test.ts @@ -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) }) })