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

See #161: removed unused dependencies

parent 833c0f16
...@@ -21,9 +21,6 @@ ...@@ -21,9 +21,6 @@
"axios": "^0.17.1", "axios": "^0.17.1",
"dateformat": "^2.0.0", "dateformat": "^2.0.0",
"django-channels": "^1.1.6", "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", "js-logger": "^1.3.0",
"jwt-decode": "^2.2.0", "jwt-decode": "^2.2.0",
"lodash": "^4.17.4", "lodash": "^4.17.4",
...@@ -106,7 +103,6 @@ ...@@ -106,7 +103,6 @@
"sinon-chai": "^2.8.0", "sinon-chai": "^2.8.0",
"sinon-stub-promise": "^4.0.0", "sinon-stub-promise": "^4.0.0",
"url-loader": "^0.5.8", "url-loader": "^0.5.8",
"vue-i18n-xgettext": "^0.0.4",
"vue-loader": "^12.1.0", "vue-loader": "^12.1.0",
"vue-style-loader": "^3.0.1", "vue-style-loader": "^3.0.1",
"vue-template-compiler": "^2.3.3", "vue-template-compiler": "^2.3.3",
......
...@@ -11,9 +11,6 @@ import router from './router' ...@@ -11,9 +11,6 @@ import router from './router'
import axios from 'axios' import axios from 'axios'
import {VueMasonryPlugin} from 'vue-masonry' import {VueMasonryPlugin} from 'vue-masonry'
import VueLazyload from 'vue-lazyload' 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 store from './store'
import GetTextPlugin from 'vue-gettext' import GetTextPlugin from 'vue-gettext'
import { sync } from 'vuex-router-sync' import { sync } from 'vuex-router-sync'
...@@ -54,10 +51,9 @@ Vue.use(GetTextPlugin, { ...@@ -54,10 +51,9 @@ Vue.use(GetTextPlugin, {
} }
}, },
translations: translations, translations: translations,
silent: false silent: true
}) })
Vue.use(VueI18Next)
Vue.use(VueMasonryPlugin) Vue.use(VueMasonryPlugin)
Vue.use(VueLazyload) Vue.use(VueLazyload)
Vue.config.productionTip = false Vue.config.productionTip = false
...@@ -124,35 +120,17 @@ axios.interceptors.response.use(function (response) { ...@@ -124,35 +120,17 @@ axios.interceptors.response.use(function (response) {
} }
} }
if (error.backendErrors.length === 0) { 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 // Do something with response error
return Promise.reject(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 */ /* eslint-disable no-new */
new Vue({ new Vue({
el: '#app', el: '#app',
router, router,
store, store,
i18n,
template: '<App/>', template: '<App/>',
components: { 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