Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Last updated x minutes ago" fails for Maori, Samoan, and Tongan language #172

Open
olafwrieden opened this issue Sep 12, 2021 · 0 comments
Labels
advanced Probably requires some experience developing Vaxx.nz? Pick it if you had a successful PR! bug Something isn't working help wanted Extra attention is needed

Comments

@olafwrieden
Copy link
Member

olafwrieden commented Sep 12, 2021

Describe the bug
Due to our date library date-fns's lack of support for mi / sm / to support, we need to find a way to make the experience consistent for these vital locales (in particular Te Reo Maori) before we can ship it.

As you can see, the second part of the sentence "Last updated 34 minutes ago" fails as the locale is not yet supported when passed to date-fns's formatDistance function. This happens with Samoan, Tongan, and Maori.

Screen Shot 2021-09-12 at 7 21 46 PM

Proposed solution

  • Open to ideas for an immediate fix - let's discuss in #dev or #translations on Discord
  • Long-term: Given we have speakers of the language, maybe we can promote change by doing the heavy lifting, translating the essential pieces and adding the missing locales via a PR to the date-fns library GitHub for the world to use.

How to add a new Locale to date-fns: https://github.com/date-fns/date-fns/blob/master/docs/i18n.md#adding-new-language

Issue (request to date-fns): date-fns/date-fns#2627

@olafwrieden olafwrieden added bug Something isn't working help wanted Extra attention is needed advanced Probably requires some experience developing Vaxx.nz? Pick it if you had a successful PR! labels Sep 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
advanced Probably requires some experience developing Vaxx.nz? Pick it if you had a successful PR! bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant