twitter / twitter-cldr-rb

Ruby implementation of the ICU (International Components for Unicode) that uses the Common Locale Data Repository to format dates, plurals, and more.
Apache License 2.0
672 stars 93 forks source link

Why use :one instead of :name #253

Closed ur5us closed 2 years ago

ur5us commented 2 years ago

https://github.com/twitter/twitter-cldr-rb/blob/a1bf5d0207fd7a9e763fa7e8f2a91d15cd0a0e99/lib/twitter_cldr/shared/currencies.rb#L22

Is there a reason why for_code(:EUR, :en) returns {…, :name=>"euro", …} instead of name=>"Euro" as per the locale’s yml file?

camertron commented 2 years ago

Hey @ur5us, thanks for bringing this up. It looks like this code is old enough that it predates the name field being available in the CLDR data set. Here's the currencies.yml file for English from 2012.

It should be ok to update the code to use :name instead of :one, would you care to submit a pull request?