elixir-cldr / cldr_units

Unit formatting (volume, area, length, ...) functions for the Common Locale Data Repository (CLDR)
Other
16 stars 13 forks source link

Singular / Plural form of units #7

Closed LostKobrakai closed 6 years ago

LostKobrakai commented 6 years ago

It seems like Cldr.Unit.to_string is always returning the plural form of the units name.

Edit: Seems like it's working for "en" as locale, but not for "de".

kipcole9 commented 6 years ago

Thanks for the report. The issue came down to the incorrect usage of pluralisation rules (Ordinal v Cardinal). It is now correctly Cardinal. I added some tests in "de" to verify.

I also observed that the pluralisation data for "de" units may not be complete but as a native German speaker I'm sure you can advise better than I can :-)

Published to hex as version 1.2.1.

LostKobrakai commented 6 years ago

Thanks for the quick fix.

I also observed that the pluralisation data for "de" units may not be complete but as a native German speaker I'm sure you can advise better than I can :-)

I checked this yesterday for the unit I was using and that one is complete :D