diff --git a/src/components/Footer.vue b/src/components/Footer.vue index bc07e87..763dbb9 100644 --- a/src/components/Footer.vue +++ b/src/components/Footer.vue @@ -1,11 +1,27 @@ @@ -14,7 +30,7 @@ import AjaxErrorHandler from '../../assets/js/errorHandler' export default { name: 'locale-changer', data () { - return { langs: ['en', 'debug', 'wind'], currentLang: this.$i18n.locale} + return { langs: ['en', 'debug', 'wind'], currentLang: this.$i18n.locale, langModal: false} }, methods: { en () { @@ -31,25 +47,25 @@ export default { }, setLang () { localStorage.setItem("lang", this.$i18n.locale); - this.axios - .put(process.env.VUE_APP_APIENDPOINT + process.env.VUE_APP_APIVERSION + '/' + 'users/preferences', { - lang: this.$i18n.locale - }) - .then(() => { - this.axios.get(process.env.VUE_APP_APIENDPOINT + process.env.VUE_APP_APIVERSION + '/' + 'userinfo') - .then(res => { - this.$store.commit('setUsername', res.data.username) - this.$store.commit('setEmail', res.data.email) - this.$store.commit('setEmailVerified', res.data.emailVerified) - this.$store.commit('setAdmin', res.data.admin) - this.$store.commit('setDevMode', res.data.developerMode) - this.$store.commit('setTheme', res.data.theme) - this.$store.commit('setLang', res.data.lang) - }) - }) - .catch(e => { - AjaxErrorHandler(this.$store)(e) - }) + this.axios + .put(process.env.VUE_APP_APIENDPOINT + process.env.VUE_APP_APIVERSION + '/' + 'users/preferences', { + lang: this.$i18n.locale + }) + .then(() => { + this.axios.get(process.env.VUE_APP_APIENDPOINT + process.env.VUE_APP_APIVERSION + '/' + 'userinfo') + .then(res => { + this.$store.commit('setUsername', res.data.username) + this.$store.commit('setEmail', res.data.email) + this.$store.commit('setEmailVerified', res.data.emailVerified) + this.$store.commit('setAdmin', res.data.admin) + this.$store.commit('setDevMode', res.data.developerMode) + this.$store.commit('setTheme', res.data.theme) + this.$store.commit('setLang', res.data.lang) + }) + }) + .catch(e => { + AjaxErrorHandler(this.$store)(e) + }) } }, mounted () { diff --git a/src/locales/en.json b/src/locales/en.json index 5f9be57..1bfb83b 100644 --- a/src/locales/en.json +++ b/src/locales/en.json @@ -189,6 +189,12 @@ "title": "Security" } }, + "languages": { + "title": "Locale Selector", + "en": "English", + "wind": "Windspeak", + "debug": "Debug" + }, "currency": "Koins", "close": "Close", "tos": "Terms of Service", diff --git a/src/locales/wind.json b/src/locales/wind.json index a62f7fa..a1d2f38 100644 --- a/src/locales/wind.json +++ b/src/locales/wind.json @@ -189,6 +189,12 @@ "title": "Security" } }, + "languages": { + "title": "(Locale Select) can you put out an announcement on the kaverti server", + "en": "(English) ill pay extra with the tet domain if u do £50 infact £100", + "wind": "(Windspeak) are you having a bubble", + "debug": "(Debug) hello mr trooooplooo" + }, "currency": "fuck you", "close": "I've just told the full truth to logan", "tos": "get the fuck over it, it was never a scam",