From c913fc5cf6d2b750860ab2dd06c13bb7f5d87de6 Mon Sep 17 00:00:00 2001 From: ozymandiashh <234437643+ozymandiashh@users.noreply.github.com> Date: Fri, 3 Jul 2026 01:24:46 +0300 Subject: [PATCH 1/2] Add Romanian Leu (RON) currency support to menubar and GNOME extension The CLI already supports any ISO 4217 code dynamically via Intl.NumberFormat, but the macOS menubar app (SupportedCurrency enum) and GNOME extension (hardcoded CURRENCIES array) had fixed lists. RON was missing from both. - Add RON case to SupportedCurrency enum + displayName in AppStore.swift - Add RON symbol override ('lei') in CurrencyState.swift - Add RON entry to CURRENCIES array in gnome/indicator.js --- gnome/indicator.js | 1 + mac/Sources/CodeBurnMenubar/AppStore.swift | 3 ++- mac/Sources/CodeBurnMenubar/CurrencyState.swift | 3 ++- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/gnome/indicator.js b/gnome/indicator.js index 36ba382a..6805c4d8 100644 --- a/gnome/indicator.js +++ b/gnome/indicator.js @@ -63,6 +63,7 @@ const CURRENCIES = [ { code: 'MXN', symbol: 'MX$' }, { code: 'ZAR', symbol: 'R ' }, { code: 'DKK', symbol: 'kr ' }, + { code: 'RON', symbol: 'lei ' }, { code: 'CNY', symbol: '¥' }, ]; diff --git a/mac/Sources/CodeBurnMenubar/AppStore.swift b/mac/Sources/CodeBurnMenubar/AppStore.swift index b041b2c7..03e88450 100644 --- a/mac/Sources/CodeBurnMenubar/AppStore.swift +++ b/mac/Sources/CodeBurnMenubar/AppStore.swift @@ -1188,7 +1188,7 @@ final class AppStore { } enum SupportedCurrency: String, CaseIterable, Identifiable { - case USD, GBP, EUR, AUD, CAD, NZD, JPY, CNY, CHF, INR, BRL, SEK, SGD, HKD, KRW, MXN, ZAR, DKK + case USD, GBP, EUR, AUD, CAD, NZD, JPY, CNY, CHF, INR, BRL, SEK, SGD, HKD, KRW, MXN, ZAR, DKK, RON var id: String { rawValue } var displayName: String { switch self { @@ -1210,6 +1210,7 @@ enum SupportedCurrency: String, CaseIterable, Identifiable { case .MXN: "Mexican Peso" case .ZAR: "South African Rand" case .DKK: "Danish Krone" + case .RON: "Romanian Leu" } } } diff --git a/mac/Sources/CodeBurnMenubar/CurrencyState.swift b/mac/Sources/CodeBurnMenubar/CurrencyState.swift index 5fc907a6..def6cf32 100644 --- a/mac/Sources/CodeBurnMenubar/CurrencyState.swift +++ b/mac/Sources/CodeBurnMenubar/CurrencyState.swift @@ -60,7 +60,8 @@ final class CurrencyState: Sendable { "CHF": "CHF", "SEK": "kr", "DKK": "kr", - "ZAR": "R" + "ZAR": "R", + "RON": "lei" ] } 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 2/2] 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 81d8d8e0..9c8430d3 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 331d27de..d951c815 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 4fbb7d0d..385e0693 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) }) })