rxaviers / cldrjs

Simple CLDR traverser
MIT License
155 stars 30 forks source link

Unresolved: Instances should always be assigned a bundle for convenience #31

Closed rxaviers closed 9 years ago

rxaviers commented 9 years ago

A bundle is assigned null in case there's no main data loaded for such locale (ref #17, PR #26), which is perfectly precise. Although, for unresolved data, it's safe to consider that a bundle always exists at least with empty data.

rxaviers commented 9 years ago

Thinking more about it, it's safer having the user to explicitly load an empty bundle. Because, otherwise it would be hard to tell if cldrjs was using the right data. For example, loading en bundle, but instantiating en-CA would return consider an empty Canadian bundle, which isn't safe.