27f2597b07
Close #156 and #158 Signed-off-by: Thomas Citharel <tcit@tcit.fr>
38 lines
936 B
TypeScript
38 lines
936 B
TypeScript
// The Vue build version to load with the `import` command
|
|
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
|
|
import Vue from 'vue';
|
|
import Buefy from 'buefy';
|
|
import GetTextPlugin from 'vue-gettext';
|
|
import App from '@/App.vue';
|
|
import router from '@/router';
|
|
import { apolloProvider } from './vue-apollo';
|
|
import { NotifierPlugin } from '@/plugins/notifier';
|
|
import filters from '@/filters';
|
|
|
|
const translations = require('@/i18n/translations.json');
|
|
|
|
Vue.config.productionTip = false;
|
|
|
|
Vue.use(Buefy);
|
|
Vue.use(NotifierPlugin);
|
|
Vue.use(filters);
|
|
|
|
const language = (window.navigator as any).userLanguage || window.navigator.language;
|
|
|
|
Vue.use(GetTextPlugin, {
|
|
translations,
|
|
defaultLanguage: 'en_US',
|
|
silent: true,
|
|
});
|
|
|
|
Vue.config.language = language.replace('-', '_');
|
|
|
|
/* eslint-disable no-new */
|
|
new Vue({
|
|
router,
|
|
apolloProvider,
|
|
el: '#app',
|
|
template: '<App/>',
|
|
components: { App },
|
|
});
|