Can't add Haitian (ht) or Māori (mi)
Closed this issue · 6 comments
yarn run add-locale ht
Result:
Unknown locale: ht.
In locales.js:
return (
localeData !== null &&
localeData !== undefined &&
localeData.language in _makePlural2.default
);
It looks like it's not finding ht
in the make-plural
library. Ideas?
Perhaps the make-plural function needs to be wrapped? Compare: https://github.com/messageformat/messageformat/blob/master/packages/messageformat/lib/plurals.js
As described in make-plural eemeli/make-plural#11, CLDR is missing plural rules for Maori and Haitian. The wrapper would solve the problem as a temporary solution until these languages are added to CLDR.
Do you know what plural rules these languages use? If so, feel free to send a PR. I believe we could have just an object of locale data for each locale and if the locale code doesn't exists in CLDR, we would pull own config.
It'd be nice to have a fallback for these situations that doesn't break the whole build (especially in scenarios where we support dozens of other languages).
I’ve bumped into this same issue today too (also for Maori) and it would definitely be nice to have a mechanism for specifying additional custom locales.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.