synacor / preact-i18n

Simple localization for Preact.
BSD 3-Clause "New" or "Revised" License
206 stars 18 forks source link

move pluralization extraction to a separate function #37

Closed AEnterprise closed 4 years ago

AEnterprise commented 5 years ago

This allows people using the this to provide their own function that handles pluralization rules for languages currently not supported by this implementation

this is optional and the current implementation is used as default

pl12133 commented 5 years ago

Fixes https://github.com/synacor/preact-i18n/issues/2

@AEnterprise thanks for working on this!

AEnterprise commented 5 years ago

oops seems i messed up a few things in the merge, i'll just squash and force push it

AEnterprise commented 5 years ago

i gave up on making the unit tests pass though, these are pretty much impossible to run locally on windows or WSL here are some of the things i ran into with it:

any help with making these tests actually run would be much appreciated but all of this involves tools that i never heard of before that just spit out non descriptive or just wrong errors

AEnterprise commented 4 years ago

reworking this with a new PR