globalizejs / globalizejs/globalize
Globalize Numberformatter issue
- Dominant language
- JavaScript
- Stars
- 4.8k
- Forks
- 585
- PR merge metrics
- No merged PRs in 30d
Description
Hi everyone ,
i just upgraded to the latest version of globalize with latest json cldr data.
im trying to format a value using the fallowing format :
var currencyFormatter = Globalize('en-GB').currencyFormatter('GBP', {compact:"short"});
console.log(currencyFormatter(value));
but i get an exception at :
Uncaught TypeError: this.pluralGenerator is not a function
at Globalize.numberFormatter.Globalize.numberFormatter (number.js:1506)
at Globalize.currencyFormatter.Globalize.currencyFormatter (currency.js:377)
if i remove {compact:"short"} everything works fine.
any idea please.Thanks
Contributor guide
Research direction
Reproduce the failure with the en-GB currencyFormatter example using GBP and compact:"short". Start in number.js around line 1506 and currency.js around line 377, then verify that compact currency formatting no longer throws and produces the expected formatted value.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- internationalization
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100