mirror of
https://gitlab.dit.htwk-leipzig.de/htwk-software/htwkalender-pwa.git
synced 2026-01-19 12:02:26 +01:00
feat:#60 added localization switch
This commit is contained in:
@@ -1,11 +1,14 @@
|
||||
<script lang="ts" setup>
|
||||
import { Ref, ref } from "vue";
|
||||
import { computed, ComputedRef, Ref, ref } from "vue";
|
||||
import {
|
||||
fetchCourse,
|
||||
fetchModulesByCourseAndSemester,
|
||||
} from "../api/fetchCourse";
|
||||
import ModuleSelection from "./ModuleSelection.vue";
|
||||
import { Module } from "../model/module.ts";
|
||||
import { useI18n } from "vue-i18n";
|
||||
const { t } = useI18n({ useScope: 'global' })
|
||||
|
||||
|
||||
const courses = async () => {
|
||||
return await fetchCourse();
|
||||
@@ -13,9 +16,9 @@ const courses = async () => {
|
||||
|
||||
const selectedCourse: Ref<{ name: string }> = ref({ name: "" });
|
||||
const countries: Ref<{ name: string }[]> = ref([]);
|
||||
const semesters: Ref<{ name: string; value: string }[]> = ref([
|
||||
{ name: "Wintersemester", value: "ws" },
|
||||
{ name: "Sommersemester", value: "ss" },
|
||||
const semesters: ComputedRef<{ name: string; value: string }[]> = computed(() =>[
|
||||
{ name: t('courseSelection.winterSemester'), value: "ws" },
|
||||
{ name: t('courseSelection.summerSemester'), value: "ss" },
|
||||
]);
|
||||
|
||||
const selectedSemester: Ref<{ name: string; value: string }> = ref(
|
||||
@@ -53,7 +56,7 @@ async function getModules() {
|
||||
<div
|
||||
class="flex align-items-center justify-content-center h-4rem border-round m-2"
|
||||
>
|
||||
<h5 class="text-2xl">Please select a course</h5>
|
||||
<h5 class="text-2xl">{{ $t('courseSelection.selectCourse') }}</h5>
|
||||
</div>
|
||||
<div
|
||||
class="flex align-items-center justify-content-center border-round m-2"
|
||||
|
||||
Reference in New Issue
Block a user