globalizejs / globalize

A JavaScript library for internationalization and localization that leverages the official Unicode CLDR JSON data
https://globalizejs.com
MIT License
4.8k stars 602 forks source link

Adjust unit categories to CLDR version #843

Open ccprog opened 6 years ago

ccprog commented 6 years ago

Currently, the unit formatter uses a hard-coded list of unit categories. This list is getting longer by CLDR version. Currently (v33), the following entries are missing:

"concentr", "consumption", "electric", "energy", "frequency"

See https://www.unicode.org/repos/cldr/tags/release-33/common/validity/unit.xml

rxaviers commented 6 years ago

True. We need to evaluate the feasibility/cost to using a list generated dynamically...