Skip to content

Add Romanian Leu (RON) currency to menubar and GNOME extension#600

Open
ozymandiashh wants to merge 1 commit into
mainfrom
feat/add-ron-currency
Open

Add Romanian Leu (RON) currency to menubar and GNOME extension#600
ozymandiashh wants to merge 1 commit into
mainfrom
feat/add-ron-currency

Conversation

@ozymandiashh

Copy link
Copy Markdown
Collaborator

What

Adds Romanian Leu (RON) to the currency picker in the macOS menubar app and GNOME extension.

Why

The CLI already supports any ISO 4217 currency code dynamically via Intl.NumberFormat + Frankfurter API (162 currencies). However, the macOS menubar app uses a fixed SupportedCurrency enum, and the GNOME extension uses a hardcoded CURRENCIES array. RON was missing from both, so users on these surfaces could not select Romanian Leu despite it being a valid ISO 4217 code.

Changes

File Change
mac/Sources/CodeBurnMenubar/AppStore.swift Added RON case to SupportedCurrency enum + "Romanian Leu" displayName
mac/Sources/CodeBurnMenubar/CurrencyState.swift Added "RON": "lei" to symbolOverrides
gnome/indicator.js Added { code: "RON", symbol: "lei " } to CURRENCIES array

Notes

  • Symbol uses lei (the common Romanian shorthand) rather than the ISO code RON, consistent with how SEK/DKK use kr instead of the ISO code.
  • Exchange rates are already fetched from Frankfurter (ECB data) which supports RON.
  • No CLI changes needed — src/currency.ts validates dynamically via Intl.NumberFormat.
  • No test changes needed — currency validation in CLI is dynamic, and the menubar/GNOME currency lists are not covered by automated tests.

Testing

  • TypeScript test suite: 1387 passed, 8 failed (all pre-existing failures on main, unrelated to this change — confirmed by running tests on clean main).
  • Verified RON is a valid ISO 4217 code and is supported by the Frankfurter API.
  • Swift changes are straightforward enum additions following the exact pattern of existing cases.

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant