unsplash / intlc

Compile ICU messages into code. Supports TypeScript and JSX. No runtime.
MIT License
56 stars 3 forks source link

Ordinal plural fails to parse without at least one non-wildcard case #140

Closed samhh closed 1 year ago

samhh commented 2 years ago

Failing example:

{n, selectordinal, =1 {} other {}}
samhh commented 2 years ago

I think it's a bug? Or were we being more strict here? I don't think we happen to use this type very much.

samhh commented 2 years ago

I think this might actually be intentional: https://github.com/unsplash/intlc/blob/1793ecc281121a53b37102cf56e6790b430ce9fc/lib/Intlc/Parser/ICU.hs#L194

In which case this should possibly succeed parsing but be linted against. Bonus points that the lint warning will give better output than "unknown parse error". :eyes:

samhh commented 1 year ago

This was fixed in #158 and #159.