Coder Social home page Coder Social logo

Comments (5)

matthewbub avatar matthewbub commented on June 9, 2024 1

Very interesting to see from another locale! I was unaware it would fail in this manor. We have #70 created which should ultimately resolve this, the getDefaultLocale option will be used to create a more predictable development experience and will be required everywhere locales might apply.

function getDefaultLocale(overrideLocale, fallbackLocale) {
  let userLocale = navigator.language;
  
  if (overrideLocale) {
    userLocale = overrideLocale;
  } else if (!userLocale && fallbackLocale) {
    userLocale = fallbackLocale;
  }
  
  return userLocale;
}

I tried slapping it in everywhere carelessly and everything broke lol. I'll bump this up on the list of priorities and get it ironed out ASAP.

from calendar-widgets.

Ngoakor12 avatar Ngoakor12 commented on June 9, 2024

Just saw the jsdoc documentation of the function that it does indeed default to the user's locale. I thought there was a project default, this one seems flaky because the expected string will always be different depending the user. Unless a helper can be created to get a person's locale and make that the expected string?

from calendar-widgets.

matthewbub avatar matthewbub commented on June 9, 2024

@Ngoakor12 i've removed the failing test suite for now, to allow folks in other locales to properly test. This temp fix will allow me to iron out a better solution in #70 🙂

please let me know if this solves the failing tests in your local env.

from calendar-widgets.

Ngoakor12 avatar Ngoakor12 commented on June 9, 2024

@Ngoakor12 i've removed the failing test suite for now, to allow folks in other locales to properly test. This temp fix will allow me to iron out a better solution in #70 slightly_smiling_face

please let me know if this solves the failing tests in your local env.

Had a quick look, all the tests are passing :)

Side note: the week was hectic, I will hopefully be able to work on that issue assigned to me and open more

from calendar-widgets.

matthewbub avatar matthewbub commented on June 9, 2024

No worries at all 💯 thank you for taking the time to run these tests again. It's greatly appreciated!

from calendar-widgets.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.