Commit 6afb0e5e authored by Eliot Berriot's avatar Eliot Berriot 💬

See #161: removed unused dependencies

parent 833c0f16
......@@ -21,9 +21,6 @@
"axios": "^0.17.1",
"dateformat": "^2.0.0",
"django-channels": "^1.1.6",
"i18next": "^11.1.1",
"i18next-conv": "^6.0.0",
"i18next-fetch-backend": "^0.1.0",
"js-logger": "^1.3.0",
"jwt-decode": "^2.2.0",
"lodash": "^4.17.4",
......@@ -106,7 +103,6 @@
"sinon-chai": "^2.8.0",
"sinon-stub-promise": "^4.0.0",
"url-loader": "^0.5.8",
"vue-i18n-xgettext": "^0.0.4",
"vue-loader": "^12.1.0",
"vue-style-loader": "^3.0.1",
"vue-template-compiler": "^2.3.3",
......
......@@ -11,9 +11,6 @@ import router from './router'
import axios from 'axios'
import {VueMasonryPlugin} from 'vue-masonry'
import VueLazyload from 'vue-lazyload'
import i18next from 'i18next'
import i18nextFetch from 'i18next-fetch-backend'
import VueI18Next from '@panter/vue-i18next'
import store from './store'
import GetTextPlugin from 'vue-gettext'
import { sync } from 'vuex-router-sync'
......@@ -54,10 +51,9 @@ Vue.use(GetTextPlugin, {
}
},
translations: translations,
silent: false
silent: true
})
Vue.use(VueI18Next)
Vue.use(VueMasonryPlugin)
Vue.use(VueLazyload)
Vue.config.productionTip = false
......@@ -124,35 +120,17 @@ axios.interceptors.response.use(function (response) {
}
}
if (error.backendErrors.length === 0) {
error.backendErrors.push(i18next.t('An unknown error occured, ensure your are connected to the internet and your funkwhale instance is up and running'))
error.backendErrors.push('An unknown error occured, ensure your are connected to the internet and your funkwhale instance is up and running')
}
// Do something with response error
return Promise.reject(error)
})
// i18n
i18next
.use(i18nextFetch)
.init({
lng: navigator.language,
fallbackLng: ['en'],
preload: [navigator.language, 'en'],
backend: {
loadPath: '/static/translations/{%lng%}.json'
},
interpolation: {
prefix: '{%',
suffix: '%}'
}
})
const i18n = new VueI18Next(i18next)
/* eslint-disable no-new */
new Vue({
el: '#app',
router,
store,
i18n,
template: '<App/>',
components: { App }
})
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment