TheCombine icon indicating copy to clipboard operation
TheCombine copied to clipboard

[Project Statistics] dayjs locale console warning

Open imnasnainaec opened this issue 1 year ago • 1 comments

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:

  1. Set web browser to a country-specific language (e.g., "en-US" or "en-GB")
  2. Open a project in The Combine of which you are the owner or an administrator
  3. Click the gear icon in the top bar to open Project Settings
  4. Click the Schedule (calendar icon) tab
  5. Observe the three icons under the "Workshop Schedule" section heading
  6. Open the web browser console
  7. Hover over the left icon (with 6 dots in the calendar) and see hover text about "range of days"
  8. 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

imnasnainaec avatar May 03 '24 19:05 imnasnainaec

This could be due to our wrapping, or case sensitivity or insufficient fallback logic in dayjs

jasonleenaylor avatar Jun 05 '24 16:06 jasonleenaylor