TheCombine
TheCombine copied to clipboard
[Project Statistics] dayjs locale console warning
Describe the bug
Project Settings > Workshop Schedule tab
For browser languages with a country code, the first schedule button option (with "range of days"), throws a locale console warning.
To Reproduce
Steps to reproduce the behavior:
- Set web browser to a country-specific language (e.g., "en-US" or "en-GB")
- Open a project in The Combine of which you are the owner or an administrator
- Click the gear icon in the top bar to open Project Settings
- Click the Schedule (calendar icon) tab
- Observe the three icons under the "Workshop Schedule" section heading
- Open the web browser console
- Hover over the left icon (with 6 dots in the calendar) and see hover text about "range of days"
- Click this icon and see a warning appear in the console:
console.js:273 Your locale has not been found. Either the locale key is not a supported one. Locales supported by dayjs are available here: https://github.com/iamkun/dayjs/tree/dev/src/locale Or you forget to import the locale from 'dayjs/locale/{localeUsed}' fallback on English locale
This could be due to our wrapping, or case sensitivity or insufficient fallback logic in dayjs