You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm no ruby pro either. :) I added custom formats to the related JavaScript library a while back, so I can certainly take a look at making them work here as well.
I've got a bunch of competing priorities right now, though, so if you'd like to try to implement it in a pull request, you can probably get it sooner.
I'll see what I can do. I think I'd classify this as a bug, since trying to format EUR or CAD currencies through the currency number helper will output incorrect values, but it probably doesn't matter what the label is.
jagn3w
referenced
this issue
in figma/message-format-rb-public
Mar 2, 2022
https://github.com/format-message/message-format-rb/blob/master/lib/message_format/interpreter.rb#L91
Currently, using a message like
Your total is: {amount, number, currency}
can only support USD (Since that's the default in Twitter's CLDR lib[0]).I'm unsure of the best way to add this functionality (I'm no ruby pro), but it'd be quite helpful.
Until then, it's decently easy to just pass in a Twitter CLDR formatted currency as a string, but it'd be cool to do all in one spot!
Thanks!
[0] https://github.com/twitter/twitter-cldr-rb/blob/4054e3ee23c42716d14c38231c7b39169a3afad4/lib/twitter_cldr/formatters/numbers/currency_formatter.rb#L11
The text was updated successfully, but these errors were encountered: