Add Romanian Leu (RON) currency to menubar and GNOME extension#600
Open
ozymandiashh wants to merge 1 commit into
Open
Add Romanian Leu (RON) currency to menubar and GNOME extension#600ozymandiashh wants to merge 1 commit into
ozymandiashh wants to merge 1 commit into
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 fixedSupportedCurrencyenum, and the GNOME extension uses a hardcodedCURRENCIESarray. RON was missing from both, so users on these surfaces could not select Romanian Leu despite it being a valid ISO 4217 code.Changes
mac/Sources/CodeBurnMenubar/AppStore.swiftRONcase toSupportedCurrencyenum +"Romanian Leu"displayNamemac/Sources/CodeBurnMenubar/CurrencyState.swift"RON": "lei"tosymbolOverridesgnome/indicator.js{ code: "RON", symbol: "lei " }toCURRENCIESarrayNotes
lei(the common Romanian shorthand) rather than the ISO codeRON, consistent with how SEK/DKK usekrinstead of the ISO code.src/currency.tsvalidates dynamically viaIntl.NumberFormat.Testing
main, unrelated to this change — confirmed by running tests on cleanmain).