mirror of
https://gitlab.dit.htwk-leipzig.de/htwk-software/htwkalender-pwa.git
synced 2025-07-16 17:48:51 +02:00
15 localization with translation strings
This commit is contained in:
@ -1,9 +1,11 @@
|
||||
<script lang="ts" setup>
|
||||
import { Ref, computed, ref } from "vue";
|
||||
import moduleStore from "../store/moduleStore";
|
||||
import { useI18n } from "vue-i18n";
|
||||
|
||||
const dialogVisible: Ref<boolean> = ref(false);
|
||||
const mobilePage = ref(true);
|
||||
const { t } = useI18n({ useScope: "global" });
|
||||
|
||||
const store = moduleStore();
|
||||
const tableData = computed(() =>
|
||||
@ -19,9 +21,9 @@ const previewOn: Ref<boolean> = computed(() => {
|
||||
return moduleStore().modules.size > 0;
|
||||
});
|
||||
|
||||
const columns = ref([
|
||||
{ field: "Course", header: "Course" },
|
||||
{ field: "Module", header: "Module" },
|
||||
const columns = computed(() => [
|
||||
{ field: "Course", header: t("calendarPreview.course") },
|
||||
{ field: "Module", header: t("calendarPreview.module") },
|
||||
]);
|
||||
|
||||
const updateMobile = () => {
|
||||
@ -40,7 +42,7 @@ window.addEventListener("resize", updateMobile);
|
||||
:visible="dialogVisible && previewOn"
|
||||
:maximizable="!mobilePage"
|
||||
:draggable="false"
|
||||
header="Kalendervorschau"
|
||||
:header="$t('calendarPreview.preview-long')"
|
||||
class="w-full lg:w-30rem lg:h-auto m-0 lg:m-2"
|
||||
position="bottomright"
|
||||
@update:visible="dialogVisible = $event"
|
||||
@ -71,7 +73,7 @@ window.addEventListener("resize", updateMobile);
|
||||
<template #button>
|
||||
<Button
|
||||
icon="pi pi-calendar"
|
||||
label="Preview"
|
||||
:label="$t('calendarPreview.preview')"
|
||||
class="p-button-rounded p-button-primary"
|
||||
@click="dialogVisible = true"
|
||||
/>
|
||||
|
Reference in New Issue
Block a user