mobilizon.chapril.org-mobil.../js/src/main.ts
2019-09-02 15:16:28 +02:00

36 lines
885 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';
const translations = require('@/i18n/translations.json');
Vue.config.productionTip = false;
Vue.use(Buefy);
Vue.use(NotifierPlugin);
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 },
});