simsustech / vitrify

Vite as your Full Stack development tool
MIT License
13 stars 1 forks source link

vitrify.conf.js: quasar.framework.lang option not working (with workaround) #41

Closed 0x42h closed 2 years ago

0x42h commented 2 years ago

Issue:

vitrify.conf.js:

export default function ({
  mode,
  command
}) {
  return {
    vitrify: {
      hooks: {
        // Vitrify hooks
      },
      sass: {
        variables: {
          $primary: '#000000'
        }
      }
    },
    quasar: {
      extras: ['material-icons'],
      framework: {
        lang: 'fr',
        components: [
          // Deprecated
        ],
        plugins: []
      }
    }
  }
}

mainLayout.vue:

<template>
         ...
          <q-toolbar-title> Quasar App </q-toolbar-title>
          {{ $q.lang.isoName }}
         ...
</template>

Browser:

image

Workaround:

App.vue:

import { useQuasar } from "quasar";
import lang from "quasar/lang/fr";
const $q = useQuasar();
$q.lang.set(lang);

Browser:

image
stefanvanherwijnen commented 2 years ago

I'll have to implement this. If I'm correct I'll only have to add an argument to the Quasar Vue plugin.

0x42h commented 2 years ago

A little more than just that, eventually, I saw and you made and referenced a vitrify.lang for vitrify.config.js, also, when it's set, I see. Nice. Thanks once again! 👍