mobilizon.chapril.org-mobil.../js/src/main.ts

36 lines
885 B
TypeScript
Raw Normal View History

// 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';
2019-01-18 14:47:10 +01:00
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',
2019-09-02 14:35:50 +02:00
silent: true,
});
Vue.config.language = language.replace('-', '_');
/* eslint-disable no-new */
new Vue({
router,
apolloProvider,
el: '#app',
template: '<App/>',
components: { App },
});