diff --git a/frontend/src/i18n/index.ts b/frontend/src/i18n/index.ts
index 2efae20..54a6b70 100644
--- a/frontend/src/i18n/index.ts
+++ b/frontend/src/i18n/index.ts
@@ -2,12 +2,7 @@ import { createI18n } from "vue-i18n";
import en from "./translations/en.json";
import de from "./translations/de.json";
import localeStore from "../store/localeStore.ts";
-import { usePrimeVue } from "primevue/config";
-export const supportedLocales = {
- en: { name: "English" },
- de: { name: "Deutsch" },
-};
// Private instance of VueI18n object
// eslint-disable-next-line @typescript-eslint/no-explicit-any
let _i18n: any;
@@ -25,20 +20,6 @@ function setup() {
return _i18n;
}
-// Sets the active locale.
-function setLocale(newLocale: string) {
- _i18n.global.locale = newLocale;
- setDocumentAttributesFor(newLocale);
- const primeVue = usePrimeVue();
- primeVue.config.locale = Object.assign(_i18n);
-}
-
-function setDocumentAttributesFor(locale: string) {
- const htmlElement = document.querySelector("html");
-
- htmlElement?.setAttribute("lang", locale);
-}
-
// Public interface
export default {
// Expose the VueI18n instance via a getter
@@ -46,5 +27,4 @@ export default {
return _i18n;
},
setup,
- setLocale,
};
diff --git a/frontend/src/i18n/translations/de.json b/frontend/src/i18n/translations/de.json
index 2c96b47..0118026 100644
--- a/frontend/src/i18n/translations/de.json
+++ b/frontend/src/i18n/translations/de.json
@@ -29,7 +29,11 @@
},
"freeRooms": {
"freeRooms": "Freie Räume",
- "detail": "Bitte wähle einen Zeitraum aus, um alle Räume ohne Belegung anzuzeigen."
+ "detail": "Bitte wähle einen Zeitraum aus, um alle Räume ohne Belegung anzuzeigen.",
+ "searchByRoom": "Suche nach Räumen",
+ "pleaseSelectDate": "Bitte wähle ein Datum aus",
+ "room": "Raum",
+ "search": "Suchen"
},
"moduleSelection": {
"selectAll": "Alle anwählen",
@@ -229,125 +233,6 @@
"ninthQuestion": "Wo kann ich den Quellcode einsehen und mitwirken?",
"ninthAnswer": "Wenn du dich für die Entwicklung und den Quelltext interessierst, kannst du jederzeit als HTWK Student daran mitarbeiten. Dort findest alle Informationen im ",
"notFound": "Nicht gefunden, wonach du suchst?",
- "contact": "Kontakt aufnehmen",
- "startsWith": "Beginnt mit",
- "contains": "Enthält",
- "notContains": "Enthält nicht",
- "endsWith": "Endet mit",
- "equals": "Ist gleich",
- "notEquals": "Ist ungleich",
- "noFilter": "Kein Filter",
- "filter": "Filtern",
- "lt": "Kleiner als",
- "lte": "Kleiner oder gleich",
- "gt": "Größer als",
- "gte": "Größer oder gleich",
- "dateIs": "Datum ist",
- "dateIsNot": "Datum ist nicht",
- "dateBefore": "Datum ist vor",
- "dateAfter": "Datum ist nach",
- "custom": "Benutzerdefiniert",
- "clear": "Löschen",
- "apply": "Übernehmen",
- "matchAll": "Passt auf alle",
- "matchAny": "Passt auf einige",
- "addRule": "Regel hinzufügen",
- "removeRule": "Regel entfernen",
- "accept": "Ja",
- "reject": "Nein",
- "choose": "Auswählen",
- "upload": "Hochladen",
- "cancel": "Abbrechen",
- "completed": "Abgeschlossen",
- "pending": "Ausstehend",
- "fileSizeTypes": ["B", "KB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB"],
- "dayNames": ["Sonntag", "Montag", "Dienstag", "Mittwoch", "Donnerstag", "Freitag", "Samstag"],
- "dayNamesShort": ["Son", "Mon", "Die", "Mit", "Don", "Fre", "Sam"],
- "dayNamesMin": ["So", "Mo", "Di", "Mi", "Do", "Fr", "Sa"],
- "monthNames": ["Januar", "Februar", "März", "April", "Mai", "Juni", "Juli", "August", "September", "Oktober", "November", "Dezember"],
- "monthNamesShort": ["Jan", "Feb", "Mär", "Apr", "Mai", "Jun", "Jul", "Aug", "Sep", "Okt", "Nov", "Dez"],
- "chooseYear": "Jahr wählen",
- "chooseMonth": "Monat wählen",
- "chooseDate": "Datum wählen",
- "prevDecade": "Vorheriges Jahrzehnt",
- "nextDecade": "Nächstes Jahrzehnt",
- "prevYear": "Vorheriges Jahr",
- "nextYear": "Nächstes Jahr",
- "prevMonth": "Vorheriger Monat",
- "nextMonth": "Nächster Monat",
- "prevHour": "Vorherige Stunde",
- "nextHour": "Nächste Stunde",
- "prevMinute": "Vorherige Minute",
- "nextMinute": "Nächste Minute",
- "prevSecond": "Vorherige Sekunde",
- "nextSecond": "Nächste Sekunde",
- "am": "am",
- "pm": "pm",
- "today": "Heute",
- "now": "Jetzt",
- "weekHeader": "KW",
- "firstDayOfWeek": 1,
- "showMonthAfterYear": false,
- "dateFormat": "dd.mm.yy",
- "weak": "Schwach",
- "medium": "Mittel",
- "strong": "Stark",
- "passwordPrompt": "Passwort eingeben",
- "emptyFilterMessage": "Keine Ergebnisse gefunden",
- "searchMessage": "{0} Ergebnisse verfügbar",
- "selectionMessage": "{0} Elemente ausgewählt",
- "emptySelectionMessage": "Kein ausgewähltes Element",
- "emptySearchMessage": "Keine Ergebnisse gefunden",
- "emptyMessage": "Keine Einträge gefunden",
- "aria": {
- "trueLabel": "Wahr",
- "falseLabel": "Falsch",
- "nullLabel": "Nicht ausgewählt",
- "star": "1 Stern",
- "stars": "{star} Sterne",
- "selectAll": "Alle Elemente ausgewählt",
- "unselectAll": "Alle Elemente abgewählt",
- "close": "Schließen",
- "previous": "Vorherige",
- "next": "Nächste",
- "navigation": "Navigation",
- "scrollTop": "Nach oben scrollen",
- "moveTop": "Zum Anfang bewegen",
- "moveUp": "Nach oben bewegen",
- "moveDown": "Nach unten bewegen",
- "moveBottom": "Zum Ende bewegen",
- "moveToTarget": "Zum Ziel bewegen",
- "moveToSource": "Zur Quelle bewegen",
- "moveAllToTarget": "Alle zum Ziel bewegen",
- "moveAllToSource": "Alle zur Quelle bewegen",
- "pageLabel": "Seite {page}",
- "firstPageLabel": "Erste Seite",
- "lastPageLabel": "Letzte Seite",
- "nextPageLabel": "Nächste Seite",
- "previousPageLabel": "Vorherige Seite",
- "rowsPerPageLabel": "Zeilen pro Seite",
- "jumpToPageDropdownLabel": "Zum Dropdown-Menü springen",
- "jumpToPageInputLabel": "Zum Eingabefeld springen",
- "selectRow": "Zeile ausgewählt",
- "unselectRow": "Zeile abgewählt",
- "expandRow": "Zeile erweitert",
- "collapseRow": "Zeile reduziert",
- "showFilterMenu": "Filtermenü anzeigen",
- "hideFilterMenu": "Filtermenü ausblenden",
- "filterOperator": "Filteroperator",
- "filterConstraint": "Filterbeschränkung",
- "editRow": "Zeile bearbeiten",
- "saveEdit": "Änderungen speichern",
- "cancelEdit": "Änderungen abbrechen",
- "listView": "Listenansicht",
- "gridView": "Rasteransicht",
- "slide": "Folie",
- "slideNumber": "{slideNumber}",
- "zoomImage": "Bild vergrößern",
- "zoomIn": "Vergrößern",
- "zoomOut": "Verkleinern",
- "rotateRight": "Nach rechts drehen",
- "rotateLeft": "Nach links drehen"
- }
+ "contact": "Kontakt aufnehmen"
}
}
diff --git a/frontend/src/i18n/translations/en.json b/frontend/src/i18n/translations/en.json
index c989224..b264795 100644
--- a/frontend/src/i18n/translations/en.json
+++ b/frontend/src/i18n/translations/en.json
@@ -32,7 +32,8 @@
"detail": "Please select a time period to display rooms that have no occupancy.",
"searchByRoom": "search by room",
"pleaseSelectDate": "please select a date",
- "room": "room"
+ "room": "room",
+ "search": "search"
},
"moduleSelection": {
"selectAll": "select all",
diff --git a/frontend/src/i18n/translations/primevue/prime_vue_local_de.json b/frontend/src/i18n/translations/primevue/prime_vue_local_de.json
new file mode 100644
index 0000000..d2fe7a3
--- /dev/null
+++ b/frontend/src/i18n/translations/primevue/prime_vue_local_de.json
@@ -0,0 +1,155 @@
+{
+ "startsWith": "Beginnt mit",
+ "contains": "Enthält",
+ "notContains": "Enthält nicht",
+ "endsWith": "Endet mit",
+ "equals": "Ist gleich",
+ "notEquals": "Ist ungleich",
+ "noFilter": "Kein Filter",
+ "filter": "Filtern",
+ "lt": "Kleiner als",
+ "lte": "Kleiner oder gleich",
+ "gt": "Größer als",
+ "gte": "Größer oder gleich",
+ "dateIs": "Datum ist",
+ "dateIsNot": "Datum ist nicht",
+ "dateBefore": "Datum ist vor",
+ "dateAfter": "Datum ist nach",
+ "custom": "Benutzerdefiniert",
+ "clear": "Löschen",
+ "apply": "Übernehmen",
+ "matchAll": "Passt auf alle",
+ "matchAny": "Passt auf einige",
+ "addRule": "Regel hinzufügen",
+ "removeRule": "Regel entfernen",
+ "accept": "Ja",
+ "reject": "Nein",
+ "choose": "Auswählen",
+ "upload": "Hochladen",
+ "cancel": "Abbrechen",
+ "completed": "Abgeschlossen",
+ "pending": "Ausstehend",
+ "fileSizeTypes": ["B", "KB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB"],
+ "dayNames": [
+ "Sonntag",
+ "Montag",
+ "Dienstag",
+ "Mittwoch",
+ "Donnerstag",
+ "Freitag",
+ "Samstag"
+ ],
+ "dayNamesShort": ["Son", "Mon", "Die", "Mit", "Don", "Fre", "Sam"],
+ "dayNamesMin": ["So", "Mo", "Di", "Mi", "Do", "Fr", "Sa"],
+ "monthNames": [
+ "Januar",
+ "Februar",
+ "März",
+ "April",
+ "Mai",
+ "Juni",
+ "Juli",
+ "August",
+ "September",
+ "Oktober",
+ "November",
+ "Dezember"
+ ],
+ "monthNamesShort": [
+ "Jan",
+ "Feb",
+ "Mär",
+ "Apr",
+ "Mai",
+ "Jun",
+ "Jul",
+ "Aug",
+ "Sep",
+ "Okt",
+ "Nov",
+ "Dez"
+ ],
+ "chooseYear": "Jahr wählen",
+ "chooseMonth": "Monat wählen",
+ "chooseDate": "Datum wählen",
+ "prevDecade": "Vorheriges Jahrzehnt",
+ "nextDecade": "Nächstes Jahrzehnt",
+ "prevYear": "Vorheriges Jahr",
+ "nextYear": "Nächstes Jahr",
+ "prevMonth": "Vorheriger Monat",
+ "nextMonth": "Nächster Monat",
+ "prevHour": "Vorherige Stunde",
+ "nextHour": "Nächste Stunde",
+ "prevMinute": "Vorherige Minute",
+ "nextMinute": "Nächste Minute",
+ "prevSecond": "Vorherige Sekunde",
+ "nextSecond": "Nächste Sekunde",
+ "am": "am",
+ "pm": "pm",
+ "today": "Heute",
+ "now": "Jetzt",
+ "weekHeader": "KW",
+ "firstDayOfWeek": 1,
+ "showMonthAfterYear": false,
+ "dateFormat": "dd.mm.yy",
+ "weak": "Schwach",
+ "medium": "Mittel",
+ "strong": "Stark",
+ "passwordPrompt": "Passwort eingeben",
+ "emptyFilterMessage": "Keine Ergebnisse gefunden",
+ "searchMessage": "{0} Ergebnisse verfügbar",
+ "selectionMessage": "{0} Elemente ausgewählt",
+ "emptySelectionMessage": "Kein ausgewähltes Element",
+ "emptySearchMessage": "Keine Ergebnisse gefunden",
+ "emptyMessage": "Keine Einträge gefunden",
+ "aria": {
+ "trueLabel": "Wahr",
+ "falseLabel": "Falsch",
+ "nullLabel": "Nicht ausgewählt",
+ "star": "1 Stern",
+ "stars": "{star} Sterne",
+ "selectAll": "Alle Elemente ausgewählt",
+ "unselectAll": "Alle Elemente abgewählt",
+ "close": "Schließen",
+ "previous": "Vorherige",
+ "next": "Nächste",
+ "navigation": "Navigation",
+ "scrollTop": "Nach oben scrollen",
+ "moveTop": "Zum Anfang bewegen",
+ "moveUp": "Nach oben bewegen",
+ "moveDown": "Nach unten bewegen",
+ "moveBottom": "Zum Ende bewegen",
+ "moveToTarget": "Zum Ziel bewegen",
+ "moveToSource": "Zur Quelle bewegen",
+ "moveAllToTarget": "Alle zum Ziel bewegen",
+ "moveAllToSource": "Alle zur Quelle bewegen",
+ "pageLabel": "Seite {page}",
+ "firstPageLabel": "Erste Seite",
+ "lastPageLabel": "Letzte Seite",
+ "nextPageLabel": "Nächste Seite",
+ "previousPageLabel": "Vorherige Seite",
+ "rowsPerPageLabel": "Zeilen pro Seite",
+ "jumpToPageDropdownLabel": "Zum Dropdown-Menü springen",
+ "jumpToPageInputLabel": "Zum Eingabefeld springen",
+ "selectRow": "Zeile ausgewählt",
+ "unselectRow": "Zeile abgewählt",
+ "expandRow": "Zeile erweitert",
+ "collapseRow": "Zeile reduziert",
+ "showFilterMenu": "Filtermenü anzeigen",
+ "hideFilterMenu": "Filtermenü ausblenden",
+ "filterOperator": "Filteroperator",
+ "filterConstraint": "Filterbeschränkung",
+ "editRow": "Zeile bearbeiten",
+ "saveEdit": "Änderungen speichern",
+ "cancelEdit": "Änderungen abbrechen",
+ "listView": "Listenansicht",
+ "gridView": "Rasteransicht",
+ "slide": "Folie",
+ "slideNumber": "{slideNumber}",
+ "zoomImage": "Bild vergrößern",
+ "zoomIn": "Vergrößern",
+ "zoomOut": "Verkleinern",
+ "rotateRight": "Nach rechts drehen",
+ "rotateLeft": "Nach links drehen"
+ }
+}
diff --git a/frontend/src/i18n/translations/primevue/prime_vue_local_en.json b/frontend/src/i18n/translations/primevue/prime_vue_local_en.json
new file mode 100644
index 0000000..c944df5
--- /dev/null
+++ b/frontend/src/i18n/translations/primevue/prime_vue_local_en.json
@@ -0,0 +1,155 @@
+{
+ "startsWith": "Starts with",
+ "contains": "Contains",
+ "notContains": "Not contains",
+ "endsWith": "Ends with",
+ "equals": "Equals",
+ "notEquals": "Not equals",
+ "noFilter": "No Filter",
+ "filter": "Filter",
+ "lt": "Less than",
+ "lte": "Less than or equal to",
+ "gt": "Greater than",
+ "gte": "Greater than or equal to",
+ "dateIs": "Date is",
+ "dateIsNot": "Date is not",
+ "dateBefore": "Date is before",
+ "dateAfter": "Date is after",
+ "custom": "Custom",
+ "clear": "Clear",
+ "apply": "Apply",
+ "matchAll": "Match All",
+ "matchAny": "Match Any",
+ "addRule": "Add Rule",
+ "removeRule": "Remove Rule",
+ "accept": "Yes",
+ "reject": "No",
+ "choose": "Choose",
+ "upload": "Upload",
+ "cancel": "Cancel",
+ "completed": "Completed",
+ "pending": "Pending",
+ "fileSizeTypes": ["B", "KB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB"],
+ "dayNames": [
+ "Sunday",
+ "Monday",
+ "Tuesday",
+ "Wednesday",
+ "Thursday",
+ "Friday",
+ "Saturday"
+ ],
+ "dayNamesShort": ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
+ "dayNamesMin": ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"],
+ "monthNames": [
+ "January",
+ "February",
+ "March",
+ "April",
+ "May",
+ "June",
+ "July",
+ "August",
+ "September",
+ "October",
+ "November",
+ "December"
+ ],
+ "monthNamesShort": [
+ "Jan",
+ "Feb",
+ "Mar",
+ "Apr",
+ "May",
+ "Jun",
+ "Jul",
+ "Aug",
+ "Sep",
+ "Oct",
+ "Nov",
+ "Dec"
+ ],
+ "chooseYear": "Choose Year",
+ "chooseMonth": "Choose Month",
+ "chooseDate": "Choose Date",
+ "prevDecade": "Previous Decade",
+ "nextDecade": "Next Decade",
+ "prevYear": "Previous Year",
+ "nextYear": "Next Year",
+ "prevMonth": "Previous Month",
+ "nextMonth": "Next Month",
+ "prevHour": "Previous Hour",
+ "nextHour": "Next Hour",
+ "prevMinute": "Previous Minute",
+ "nextMinute": "Next Minute",
+ "prevSecond": "Previous Second",
+ "nextSecond": "Next Second",
+ "am": "AM",
+ "pm": "PM",
+ "today": "Today",
+ "now": "Now",
+ "weekHeader": "Wk",
+ "firstDayOfWeek": 0,
+ "showMonthAfterYear": false,
+ "dateFormat": "mm/dd/yy",
+ "weak": "Weak",
+ "medium": "Medium",
+ "strong": "Strong",
+ "passwordPrompt": "Enter a password",
+ "emptyFilterMessage": "No results found",
+ "searchMessage": "{0} results are available",
+ "selectionMessage": "{0} items selected",
+ "emptySelectionMessage": "No selected item",
+ "emptySearchMessage": "No results found",
+ "emptyMessage": "No available options",
+ "aria": {
+ "trueLabel": "True",
+ "falseLabel": "False",
+ "nullLabel": "Not Selected",
+ "star": "1 star",
+ "stars": "{star} stars",
+ "selectAll": "All items selected",
+ "unselectAll": "All items unselected",
+ "close": "Close",
+ "previous": "Previous",
+ "next": "Next",
+ "navigation": "Navigation",
+ "scrollTop": "Scroll Top",
+ "moveTop": "Move Top",
+ "moveUp": "Move Up",
+ "moveDown": "Move Down",
+ "moveBottom": "Move Bottom",
+ "moveToTarget": "Move to Target",
+ "moveToSource": "Move to Source",
+ "moveAllToTarget": "Move All to Target",
+ "moveAllToSource": "Move All to Source",
+ "pageLabel": "Page {page}",
+ "firstPageLabel": "First Page",
+ "lastPageLabel": "Last Page",
+ "nextPageLabel": "Next Page",
+ "previousPageLabel": "Previous Page",
+ "rowsPerPageLabel": "Rows per page",
+ "jumpToPageDropdownLabel": "Jump to Page Dropdown",
+ "jumpToPageInputLabel": "Jump to Page Input",
+ "selectRow": "Row Selected",
+ "unselectRow": "Row Unselected",
+ "expandRow": "Row Expanded",
+ "collapseRow": "Row Collapsed",
+ "showFilterMenu": "Show Filter Menu",
+ "hideFilterMenu": "Hide Filter Menu",
+ "filterOperator": "Filter Operator",
+ "filterConstraint": "Filter Constraint",
+ "editRow": "Edit Row",
+ "saveEdit": "Save Edit",
+ "cancelEdit": "Cancel Edit",
+ "listView": "List View",
+ "gridView": "Grid View",
+ "slide": "Slide",
+ "slideNumber": "{slideNumber}",
+ "zoomImage": "Zoom Image",
+ "zoomIn": "Zoom In",
+ "zoomOut": "Zoom Out",
+ "rotateRight": "Rotate Right",
+ "rotateLeft": "Rotate Left"
+ }
+}
diff --git a/frontend/src/main.ts b/frontend/src/main.ts
index 379aef8..17ef5c9 100644
--- a/frontend/src/main.ts
+++ b/frontend/src/main.ts
@@ -14,7 +14,7 @@ import InputSwitch from "primevue/inputswitch";
import Card from "primevue/card";
import DataView from "primevue/dataview";
import Dialog from "primevue/dialog";
-import Slider from 'primevue/slider';
+import Slider from "primevue/slider";
import ToggleButton from "primevue/togglebutton";
import "primeicons/primeicons.css";
import "primeflex/primeflex.css";
@@ -38,7 +38,6 @@ import Checkbox from "primevue/checkbox";
import Skeleton from "primevue/skeleton";
import Calendar from "primevue/calendar";
import i18n from "./i18n";
-
const app = createApp(App);
const pinia = createPinia();
diff --git a/frontend/src/view/FreeRooms.vue b/frontend/src/view/FreeRooms.vue
index 5da275f..5a0539a 100644
--- a/frontend/src/view/FreeRooms.vue
+++ b/frontend/src/view/FreeRooms.vue
@@ -1,80 +1,114 @@
-
-
-
- {timeRange[0] = start.getHours() * 60 + start.getMinutes();}"
- />
- {timeRange[1] = end.getHours() * 60 + end.getMinutes();}"
- />
-
-
-
-
-
-
-
+
+
+ {
+ timeRange[0] = start.getHours() * 60 + start.getMinutes();
+ }
+ "
+ />
+ {
+ timeRange[1] = end.getHours() * 60 + end.getMinutes();
+ }
+ "
+ />
+
+
+
+
+
+
+
-
+
-
+
@@ -115,10 +149,14 @@ if (end.value.getHours() === 23) {
const timeRange: Ref = ref([
start.value.getHours() * 60 + start.value.getMinutes(),
- end.value.getHours() * 60 + end.value.getMinutes()
+ end.value.getHours() * 60 + end.value.getMinutes(),
]);
-function buttonMovedTimeout(time: number, timeDate: Date, moved: Ref): void {
+function buttonMovedTimeout(
+ time: number,
+ timeDate: Date,
+ moved: Ref,
+): void {
if (time !== timeDate.getHours() * 60 + timeDate.getMinutes()) {
if (moved.value.timeout !== null) {
clearTimeout(moved.value.timeout);
@@ -144,11 +182,15 @@ function updateTimeRange(): void {
}
function formatTime(time: Date): string {
- return padStart(time.getHours().toString(), 2) + ":" + padStart(time.getMinutes().toString(), 2);
+ return (
+ padStart(time.getHours().toString(), 2) +
+ ":" +
+ padStart(time.getMinutes().toString(), 2)
+ );
}
function timeToPercentString(time: number): string {
- return `${Number(time) * 100 / (24 * 60)}%`;
+ return `${(Number(time) * 100) / (24 * 60)}%`;
}
async function loadFreeRooms(): Promise {
@@ -159,19 +201,20 @@ async function loadFreeRooms(): Promise {
const endDate = new Date(date.value.getTime());
endDate.setHours(end.value.getHours());
endDate.setMinutes(end.value.getMinutes());
- await requestFreeRooms(startDate.toISOString(), endDate.toISOString()).then((data) => {
- availableRooms.value = data.map((room, index) => {
- return { id: index, room: room };
- });
- });
+ await requestFreeRooms(startDate.toISOString(), endDate.toISOString()).then(
+ (data) => {
+ availableRooms.value = data.map((room, index) => {
+ return { id: index, room: room };
+ });
+ },
+ );
}
const isLater = computed(() => {
return start.value > end.value;
});
-const availableRooms: Ref<{id: number, room: string}[]> = ref([]);
-
+const availableRooms: Ref<{ id: number; room: string }[]> = ref([]);