Skeptick / libres

Resources generation in Kotlin Multiplatform
Apache License 2.0
207 stars 11 forks source link

Fall back to English plural rules instead of crashing on unknown locale #54

Open jacobras opened 9 months ago

jacobras commented 9 months ago

Currently the library crashes on JS when using any language that doesn't have a set of PluralRules. See #53.

They should be added when needed, but I suggest not crashing on it. It's better to fall back to the English formatting rule. For many languages this will already be correct and the ones that need something else should get a custom configuration.

I would like to add some logging still when the fallback is triggered, but there's no logging mechanism in Libres currently so that's omitted.