Closed schleyfox closed 5 years ago
/cc @airbnb/webinfra @airbnb/polyglot-js-owners
Don't forget to also update the transformPhrase()
usage on line 387
@spikebrehm https://github.com/airbnb/polyglot.js/blob/4a43fafe220092ddda4809ac50eb9da19ffaa97a/index.js#L387 doesn't support the other polyglot option of tokenRegex, so I don't think making it configurable is within scope.
The omission of the tokenRegex
argument in that method was probably an oversight that we could fix here, but if you think it's out of scope, then đź‘Ť.
It wasn’t an oversight :-) it was intentional to not expose that internal implementation detail, and i think it’s fine to add the overrides later if it’s desired.
Users may wish to support different locales without requiring a change or fork to the library. Additionally, some users may prefer slightly different pluralization rules for some locales.
Follow up to https://github.com/airbnb/polyglot.js/pull/137
/cc @ljharb @mereskin-zz