Verified Commit d308dd4c authored by Eliot Berriot's avatar Eliot Berriot 💬

Fixed failing test

parent 7b91ca6f
Pipeline #3798 failed with stages
in 4 minutes and 11 seconds
...@@ -85,6 +85,9 @@ export default { ...@@ -85,6 +85,9 @@ export default {
}, },
switchLanguage(newValue) { switchLanguage(newValue) {
let self = this; let self = this;
if (newValue === this.$language.current) {
return
}
import(`./translations/${newValue}.json`) import(`./translations/${newValue}.json`)
.then(response => { .then(response => {
Vue.$translations[newValue] = response.default[newValue]; Vue.$translations[newValue] = response.default[newValue];
......
...@@ -3,6 +3,12 @@ import App from "./App.vue"; ...@@ -3,6 +3,12 @@ import App from "./App.vue";
import './setup' import './setup'
import router from './router' import router from './router'
import VueHead from "vue-head";
Vue.use(VueHead, {
separator: "-",
complement: "Funkwhale"
});
require("bulma/css/bulma.css"); require("bulma/css/bulma.css");
require('fork-awesome/css/fork-awesome.min.css') require('fork-awesome/css/fork-awesome.min.css')
......
...@@ -2,12 +2,6 @@ import Vue from "vue"; ...@@ -2,12 +2,6 @@ import Vue from "vue";
import moment from "moment"; import moment from "moment";
import VueRouter from "vue-router"; import VueRouter from "vue-router";
import "./components/globals" import "./components/globals"
import VueHead from "vue-head";
Vue.use(VueHead, {
separator: "-",
complement: "Funkwhale"
});
import GetTextPlugin from 'vue-gettext' import GetTextPlugin from 'vue-gettext'
import locales from '@/locales' import locales from '@/locales'
......
...@@ -6,6 +6,9 @@ import Guide from '@/views/Guide' ...@@ -6,6 +6,9 @@ import Guide from '@/views/Guide'
const Fake = { const Fake = {
$pgettext: function(a, b) { return b }, $pgettext: function(a, b) { return b },
$language: {
current: 'en_US'
},
} }
const guides = getTasks(Fake) const guides = getTasks(Fake)
config.silent = false config.silent = false
......
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