Skip to content
Snippets Groups Projects
Commit e4946283 authored by Nik | Klampfradler's avatar Nik | Klampfradler
Browse files

Merge branch '857-include-correct-vuetify-translations' into 'master'

Resolve "Include correct Vuetify translations"

Closes #857

See merge request !1244
parents 1a687893 578e1c58
No related branches found
No related tags found
1 merge request!1244Resolve "Include correct Vuetify translations"
Pipeline #129194 canceled
......@@ -12,6 +12,7 @@ Unreleased
Fixed
~~~~~
* Default translations from vuetify were not loaded.
* In some cases, some items in the sidenav menu were not shown due to its height being higher than the visible page area.
* The search bar in the sidenav menu is shown even though the user has no permission to see it.
* Add permission check to accept invitation menu point in order to hide it when this feature is disabled.
......
......@@ -46,6 +46,7 @@ const vuetify = new Vuetify({
current: Vue.$cookies.get("django_language")
? Vue.$cookies.get("django_language")
: "en",
t: (key, ...params) => i18n.t(key, params),
},
...vuetifyOpts,
});
......@@ -90,5 +91,6 @@ const app = new Vue({
});
// Late setup for some plugins handed off to out ALeksisVue plugin
app.$loadVuetifyMessages();
app.$loadAppMessages();
app.$setupNavigationGuards();
......@@ -5,6 +5,7 @@
// aleksisAppImporter is a virtual module defined in Vite config
import { appMessages } from "aleksisAppImporter";
import aleksisMixin from "../mixins/aleksis.js";
import * as langs from "@/vuetify/src/locale";
console.debug("Defining AleksisVue plugin");
const AleksisVue = {};
......@@ -115,6 +116,15 @@ AleksisVue.install = function (Vue) {
}
};
/**
* Load vuetifys built-in translations
*/
Vue.prototype.$loadVuetifyMessages = function () {
for (const [locale, messages] of Object.entries(langs)) {
this.$i18n.mergeLocaleMessage(locale, { $vuetify: messages });
}
};
/**
* Invalidate state and force reload from server.
*
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment