fix: init #1262

Merged
jsegarra merged 2 commits from fix_quasar_lang into dev 2025-01-21 13:03:03 +00:00
1 changed files with 2 additions and 2 deletions
Showing only changes of commit 21251a5167 - Show all commits

View File

@ -22,6 +22,7 @@ const { t, locale } = useI18n();
const { copyText } = useClipboard(); const { copyText } = useClipboard();
const { notify } = useNotify(); const { notify } = useNotify();
const langList = import.meta.glob('../../node_modules/quasar/lang/*.js');
const userLocale = computed({ const userLocale = computed({
get() { get() {
return locale.value; return locale.value;
@ -32,8 +33,7 @@ const userLocale = computed({
value = localeEquivalence[value] ?? value; value = localeEquivalence[value] ?? value;
try { try {
/* @vite-ignore */ langList[`../../node_modules/quasar/lang/${value}.js`]().then((lang) => {
import(`../../node_modules/quasar/lang/${value}.mjs`).then((lang) => {
Quasar.lang.set(lang.default); Quasar.lang.set(lang.default);
}); });
} catch (error) { } catch (error) {