Skip to content

Commit

Permalink
translated breadcrumbs
Browse files Browse the repository at this point in the history
  • Loading branch information
odalys-dataport committed Sep 17, 2024
1 parent b437ee7 commit 7ba18a4
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 10 deletions.
10 changes: 5 additions & 5 deletions src/modules/page/room/RoomCreate.page.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<template>
<DefaultWireframe max-width="short" :breadcrumbs="breadcrumbs">
<template #header>
<h1 class="text-h3 py-2 mb-4">Create Room [TODO translation]</h1>
<h1 class="text-h3 py-2 mb-4">{{ $t("pages.rooms.fab.title") }}</h1>
</template>
<RoomForm />
</DefaultWireframe>
Expand All @@ -11,17 +11,17 @@
import { Breadcrumb } from "@/components/templates/default-wireframe.types";
import DefaultWireframe from "@/components/templates/DefaultWireframe.vue";
import { RoomForm } from "@feature-room";
// import { useI18n } from "vue-i18n";
import { useI18n } from "vue-i18n";
// const { t } = useI18n();
const { t } = useI18n();
const breadcrumbs: Breadcrumb[] = [
{
title: "Räume",
title: t("pages.rooms.title"),
to: "/rooms",
},
{
title: "Raum erstellen",
title: t("pages.rooms.fab.title"),
disabled: true,
},
];
Expand Down
12 changes: 7 additions & 5 deletions src/modules/page/room/RoomEdit.page.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
<template>
<DefaultWireframe max-width="short" :breadcrumbs="breadcrumbs">
<template #header>
<h1 class="text-h3 py-2 mb-4">Edit Room [TODO translation]</h1>
<h1 class="text-h3 py-2 mb-4">
{{ $t("pages.roomDetails.ariaLabels.menu.action.edit") }}
</h1>
</template>
<div v-if="isLoading" />
<RoomForm v-else :room="room" @update:room="onUpdateRoom($event)" />
Expand All @@ -16,9 +18,9 @@ import { Breadcrumb } from "@/components/templates/default-wireframe.types";
import DefaultWireframe from "@/components/templates/DefaultWireframe.vue";
import { RoomForm } from "@feature-room";
import { Room } from "@/types/room/Room";
// import { useI18n } from "vue-i18n";
import { useI18n } from "vue-i18n";
// const { t } = useI18n();
const { t } = useI18n();
const route = useRoute();
const { fetchRoom, isLoading, room } = useRoomDetailsState();
Expand All @@ -39,15 +41,15 @@ const breadcrumbs: ComputedRef<Breadcrumb[]> = computed(() => {
if (room.value !== undefined) {
return [
{
title: "Räume",
title: t("pages.rooms.title"),
to: "/rooms",
},
{
title: room.value.title,
to: `/rooms/${route.params.id}`,
},
{
title: "Raum bearbeiten",
title: t("pages.roomDetails.ariaLabels.menu.action.edit"),
disabled: true,
},
];
Expand Down

0 comments on commit 7ba18a4

Please sign in to comment.