buefy / nuxt-buefy

Nuxt Buefy
MIT License
221 stars 33 forks source link

Locales not working unless you install buefy manually #73

Closed codesxt closed 4 years ago

codesxt commented 4 years ago

I've been using this library for a while and one thing that has been annoying me for a while is that datepickers don't seem to get properly localized.

According to buefy documentation, datepickers should use the browser locale automatically if you don't specify it. It doesn't. Event if I specify the locale explicitly in the datepicker component, dates are not being applied in the correct locale.

I started checking versions and I realized that nuxt-buefy is requiring buefy 0.8.20 in the package-lock.json file, not the current version which is: 0.9.2.

// Extracted from package-lock.json 
"nuxt-buefy": {
  "version": "0.3.31",
  "resolved": "https://registry.npmjs.org/nuxt-buefy/-/nuxt-buefy-0.3.31.tgz",
  "integrity": "sha512-nO2xd56fizUlNK86D9VRB9DdGq2ekYqDEhBACaQ9XwE16JwCPnV+nLObI/+RkiQNAQM4P12dIqAtbHHgfT6dVw==",
  "requires": {
    "buefy": "^0.8.20"
  }
}

I solved this by installing buefy manually. But I think the buefy require from this library should be able to point to the latest version by default.

I verified this problem with a new project:

npx create-nuxt-app testing
cd testing
npm install nuxt-buefy --save

And then added a datepicker widget to the default page and it was in English, not in Spanish which is my default locale.

Then I ran:

npm install --save buefy

And buefy 0.9.2 was used instead of version 0.8.20 which made the datepicker appear in Spanish by default.

jtommy commented 4 years ago

You have to use nuxt-buefy 0.4.x