From e7943dc8bd54699da7c8bfc2690c72e4e5c74031 Mon Sep 17 00:00:00 2001 From: julia221501 Date: Tue, 5 Sep 2023 12:15:53 +0200 Subject: [PATCH 01/17] =?UTF-8?q?Anfang=20des=20=C3=9Cbersetzens?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/App.vue | 10 +++ src/components/AlteriConnectionList.vue | 14 +++ src/components/AlteriPanel.vue | 22 ++++- src/de.ts | 108 ++++++++++++++++++++++++ src/en.ts | 108 ++++++++++++++++++++++++ src/views/HomeView.vue | 41 +++++++-- 6 files changed, 293 insertions(+), 10 deletions(-) create mode 100644 src/de.ts create mode 100644 src/en.ts diff --git a/src/App.vue b/src/App.vue index 2dfc132..bd5bf6f 100644 --- a/src/App.vue +++ b/src/App.vue @@ -10,6 +10,16 @@ export default { created(): void { document.documentElement.setAttribute("lang", "de"); }, + methods: { + onLangChange(event: any): void { + document.documentElement.setAttribute("lang", event.target.value); + }, + }, + data: function () { + return { + lang: "de", + }; + }, }; diff --git a/src/components/AlteriConnectionList.vue b/src/components/AlteriConnectionList.vue index d50e5e7..710c10f 100644 --- a/src/components/AlteriConnectionList.vue +++ b/src/components/AlteriConnectionList.vue @@ -44,8 +44,22 @@ import { defineComponent, computed, onMounted } from "vue"; import { useStore } from "@/store"; import { isConnectable } from "@/data/Alter"; import { TAB_CONNECTIONS } from "@/store/viewOptionsModule"; +import de from "@/de"; +import en from "@/en"; export default defineComponent({ + mixins: [de, en], + methods: { + t(prop: string) { + console.log(document.documentElement.lang); + return this[document.documentElement.lang][prop]; + }, + }, + data() { + return { + lang: "de", + }; + }, props: { alter: { type: Object, diff --git a/src/components/AlteriPanel.vue b/src/components/AlteriPanel.vue index 04089d4..9f99238 100644 --- a/src/components/AlteriPanel.vue +++ b/src/components/AlteriPanel.vue @@ -1,7 +1,7 @@