mirror of
https://github.com/VueFileManager/vuefilemanager.git
synced 2026-05-24 05:34:43 +00:00
fixed - Cannot read property '$t'
This commit is contained in:
Vendored
+13
-4
@@ -1,7 +1,16 @@
|
||||
// index.js
|
||||
import Vue from 'vue';
|
||||
import VueI18n from 'vue-i18n';
|
||||
|
||||
import en from './lang/en.json'
|
||||
import sk from './lang/sk.json'
|
||||
|
||||
export const languages = {
|
||||
en, sk
|
||||
}
|
||||
Vue.use(VueI18n);
|
||||
|
||||
const i18n = new VueI18n({
|
||||
locale: config.locale,
|
||||
messages: Object.assign({
|
||||
en, sk
|
||||
}),
|
||||
});
|
||||
|
||||
export default i18n;
|
||||
|
||||
Vendored
+1
-10
@@ -1,7 +1,6 @@
|
||||
require('./bootstrap');
|
||||
import Vue from 'vue'
|
||||
import VueI18n from 'vue-i18n'
|
||||
import { languages } from './i18n/index.js'
|
||||
import i18n from './i18n/index.js'
|
||||
import App from './App.vue'
|
||||
import store from './store/index'
|
||||
import Helpers from './helpers'
|
||||
@@ -65,17 +64,9 @@ library.add(
|
||||
Vue.component('FontAwesomeIcon', FontAwesomeIcon)
|
||||
|
||||
Vue.use(Helpers)
|
||||
Vue.use(VueI18n)
|
||||
|
||||
Vue.config.productionTip = false
|
||||
|
||||
const messages = Object.assign(languages)
|
||||
|
||||
const i18n = new VueI18n({
|
||||
locale: config.locale,
|
||||
messages
|
||||
})
|
||||
|
||||
var vueFileManager = new Vue({
|
||||
i18n,
|
||||
store,
|
||||
|
||||
+27
-24
@@ -1,5 +1,6 @@
|
||||
import axios from 'axios'
|
||||
import {events} from '@/bus'
|
||||
import i18n from '@/i18n/index.js'
|
||||
|
||||
const defaultState = {
|
||||
fileInfoPanelVisible: localStorage.getItem('file_info_visibility') == 'true' || false,
|
||||
@@ -62,8 +63,8 @@ const actions = {
|
||||
.catch(() => {
|
||||
// Show error message
|
||||
events.$emit('alert:open', {
|
||||
title: this.$t('popup_error.title'),
|
||||
message: this.$t('popup_error.message'),
|
||||
title: i18n.t('popup_error.title'),
|
||||
message: i18n.t('popup_error.message'),
|
||||
})
|
||||
})
|
||||
},
|
||||
@@ -99,8 +100,8 @@ const actions = {
|
||||
.catch(() => {
|
||||
// Show error message
|
||||
events.$emit('alert:open', {
|
||||
title: this.$t('popup_error.title'),
|
||||
message: this.$t('popup_error.message'),
|
||||
title: i18n.t('popup_error.title'),
|
||||
message: i18n.t('popup_error.message'),
|
||||
})
|
||||
})
|
||||
},
|
||||
@@ -119,15 +120,15 @@ const actions = {
|
||||
|
||||
// Show error message
|
||||
events.$emit('success:open', {
|
||||
title: this.$t('popup_trashed.title'),
|
||||
message: this.$t('popup_trashed.message'),
|
||||
title: i18n.t('popup_trashed.title'),
|
||||
message: i18n.t('popup_trashed.message'),
|
||||
})
|
||||
})
|
||||
.catch(() => {
|
||||
// Show error message
|
||||
events.$emit('alert:open', {
|
||||
title: this.$t('popup_error.title'),
|
||||
message: this.$t('popup_error.message'),
|
||||
title: i18n.t('popup_error.title'),
|
||||
message: i18n.t('popup_error.message'),
|
||||
})
|
||||
})
|
||||
},
|
||||
@@ -147,8 +148,8 @@ const actions = {
|
||||
.catch(() => {
|
||||
// Show error message
|
||||
events.$emit('alert:open', {
|
||||
title: this.$t('popup_error.title'),
|
||||
message: this.$t('popup_error.message'),
|
||||
title: i18n.t('popup_error.title'),
|
||||
message: i18n.t('popup_error.message'),
|
||||
})
|
||||
})
|
||||
},
|
||||
@@ -165,8 +166,8 @@ const actions = {
|
||||
.catch(() => {
|
||||
// Show error message
|
||||
events.$emit('alert:open', {
|
||||
title: this.$t('popup_error.title'),
|
||||
message: this.$t('popup_error.message'),
|
||||
title: i18n.t('popup_error.title'),
|
||||
message: i18n.t('popup_error.message'),
|
||||
})
|
||||
})
|
||||
},
|
||||
@@ -192,8 +193,8 @@ const actions = {
|
||||
.catch(() => {
|
||||
// Show error message
|
||||
events.$emit('alert:open', {
|
||||
title: this.$t('popup_error.title'),
|
||||
message: this.$t('popup_error.message'),
|
||||
title: i18n.t('popup_error.title'),
|
||||
message: i18n.t('popup_error.message'),
|
||||
})
|
||||
})
|
||||
},
|
||||
@@ -219,8 +220,8 @@ const actions = {
|
||||
.catch(() => {
|
||||
// Show error message
|
||||
events.$emit('alert:open', {
|
||||
title: this.$t('popup_error.title'),
|
||||
message: this.$t('popup_error.message'),
|
||||
title: i18n.t('popup_error.title'),
|
||||
message: i18n.t('popup_error.message'),
|
||||
})
|
||||
})
|
||||
},
|
||||
@@ -264,6 +265,8 @@ const actions = {
|
||||
})
|
||||
},
|
||||
changeItemName: (context, data) => {
|
||||
|
||||
|
||||
if (data.type === 'folder') context.commit('UPDATE_NAME_IN_FAVOURITES', data)
|
||||
|
||||
axios
|
||||
@@ -274,8 +277,8 @@ const actions = {
|
||||
.catch(() => {
|
||||
// Show error message
|
||||
events.$emit('alert:open', {
|
||||
title: this.$t('popup_error.title'),
|
||||
message: this.$t('popup_error.message'),
|
||||
title: i18n.t('popup_error.title'),
|
||||
message: i18n.t('popup_error.message'),
|
||||
})
|
||||
})
|
||||
},
|
||||
@@ -295,8 +298,8 @@ const actions = {
|
||||
.catch(() => {
|
||||
// Show error message
|
||||
events.$emit('alert:open', {
|
||||
title: this.$t('popup_error.title'),
|
||||
message: this.$t('popup_error.message'),
|
||||
title: i18n.t('popup_error.title'),
|
||||
message: i18n.t('popup_error.message'),
|
||||
})
|
||||
})
|
||||
},
|
||||
@@ -337,8 +340,8 @@ const actions = {
|
||||
.catch(() => {
|
||||
// Show error message
|
||||
events.$emit('alert:open', {
|
||||
title: this.$t('popup_error.title'),
|
||||
message: this.$t('popup_error.message'),
|
||||
title: i18n.t('popup_error.title'),
|
||||
message: i18n.t('popup_error.message'),
|
||||
})
|
||||
})
|
||||
},
|
||||
@@ -360,8 +363,8 @@ const actions = {
|
||||
.catch(() => {
|
||||
// Show error message
|
||||
events.$emit('alert:open', {
|
||||
title: this.$t('popup_error.title'),
|
||||
message: this.$t('popup_error.message'),
|
||||
title: i18n.t('popup_error.title'),
|
||||
message: i18n.t('popup_error.message'),
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
+7
-6
@@ -1,5 +1,6 @@
|
||||
import axios from 'axios'
|
||||
import {events} from '@/bus'
|
||||
import i18n from '@/i18n/index.js'
|
||||
|
||||
const defaultState = {
|
||||
authorized: undefined,
|
||||
@@ -41,8 +42,8 @@ const actions = {
|
||||
.catch(() => {
|
||||
// Show error message
|
||||
events.$emit('alert:open', {
|
||||
title: this.$t('popup_error.title'),
|
||||
message: this.$t('popup_error.message'),
|
||||
title: i18n.t('popup_error.title'),
|
||||
message: i18n.t('popup_error.message'),
|
||||
})
|
||||
})
|
||||
},
|
||||
@@ -56,8 +57,8 @@ const actions = {
|
||||
.catch(() => {
|
||||
// Show error message
|
||||
events.$emit('alert:open', {
|
||||
title: this.$t('popup_error.title'),
|
||||
message: this.$t('popup_error.message'),
|
||||
title: i18n.t('popup_error.title'),
|
||||
message: i18n.t('popup_error.message'),
|
||||
})
|
||||
})
|
||||
},
|
||||
@@ -75,8 +76,8 @@ const actions = {
|
||||
|
||||
// Show error message
|
||||
events.$emit('alert:open', {
|
||||
title: this.$t('popup_error.title'),
|
||||
message: this.$t('popup_error.message'),
|
||||
title: i18n.t('popup_error.title'),
|
||||
message: i18n.t('popup_error.message'),
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user