preferences: add currency_code field + shared currency formatting utility #52
Labels
No labels
architecture
backlog
enhancement
module:documents
module:hardware
module:manage
module:pipeline
module:voice
priority:backlog
priority:high
priority:medium
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: Circuit-Forge/circuitforge-core#52
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Add
currency_code(ISO 4217) to the preferences module so all menagerie apps can store a per-user currency preference. Also ship a sharedformat_currency(amount, currency_code, locale=None)utility so each app does not roll its own.Motivation
Snipe displays eBay listing prices — these come in whatever currency the seller uses. A UK buyer seeing USD on every listing is friction. Kiwi has food item costs. Peregrine has salary ranges. Crossbill is a finance app. All of them need this.
Proposed schema addition (preferences table)
Proposed utility (MIT, cf-core.preferences or cf-core.formatting)
Priority fallback chain
currency_codein preferences table)CURRENCY_DEFAULT)USDConsumers
Notes
babelorpy-moneyedare candidates for the formatting utility — check licenses before picking.