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

Add fallback date-fns locale import #1729

Merged
merged 1 commit into from
Jul 1, 2023

Conversation

sunaurus
Copy link
Collaborator

@sunaurus sunaurus commented Jul 1, 2023

This date-fns locale bug is like a bossfight with multiple phases... hopefully this is the last phase 😅

Previously I fixed:

  1. Other locales not loading at all Add publicPath for static js #1672
  2. Locales like xx-XX (eg: fr-FR) failing to work, because for these date-fns expects just xx Fix date-fns locale import failing for some locales #1721

These fixed the problem for most users, but turns out there are some locales out there which date-fns simply doesn't have support for. One example: es-MX. For these users, the import still fails and Lemmy is still broken.

This PR adds a fallback import of en-US when the user's locale is not availabe in date-fns.

Copy link
Member

@SleeplessOne1917 SleeplessOne1917 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for your service

@SleeplessOne1917 SleeplessOne1917 merged commit d00a4fa into LemmyNet:main Jul 1, 2023
@sunaurus sunaurus deleted the locale_fallback branch July 1, 2023 23:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants