mirror of
https://gitlab.dit.htwk-leipzig.de/htwk-software/htwkalender-pwa.git
synced 2025-08-03 18:29:16 +02:00
feat:#60 added more localization
This commit is contained in:
@@ -3,6 +3,9 @@ import tokenStore from "../store/tokenStore.ts";
|
||||
import { useToast } from "primevue/usetoast";
|
||||
import { onMounted } from "vue";
|
||||
import router from "../router";
|
||||
import { useI18n } from "vue-i18n";
|
||||
const { t } = useI18n({ useScope: 'global' })
|
||||
|
||||
const toast = useToast();
|
||||
|
||||
const domain = window.location.hostname;
|
||||
@@ -12,8 +15,8 @@ const getLink = () => "https://" + domain + "/api/feed?token=" + tokenStore().to
|
||||
const show = () => {
|
||||
toast.add({
|
||||
severity: "info",
|
||||
summary: "Info",
|
||||
detail: "Link copied to clipboard",
|
||||
summary: t('calendarLink.copyToastSummary'),
|
||||
detail: t('calendarLink.copyToastNotification'),
|
||||
life: 3000,
|
||||
});
|
||||
};
|
||||
@@ -36,8 +39,8 @@ function copyToClipboard() {
|
||||
console.error("Could not copy text: ", err);
|
||||
toast.add({
|
||||
severity: "error",
|
||||
summary: "Error",
|
||||
detail: "Could not copy text",
|
||||
summary: t('calendarLink.copyToastError'),
|
||||
detail: t('calendarLink.copyToastErrorDetail'),
|
||||
life: 3000,
|
||||
});
|
||||
},
|
||||
@@ -54,17 +57,17 @@ const forwardToMicrosoft = () => {
|
||||
|
||||
const actions = [
|
||||
{
|
||||
label: "Copy to Clipboard",
|
||||
label: t('calendarLink.copyToClipboard'),
|
||||
icon: "pi pi-copy",
|
||||
command: copyToClipboard,
|
||||
},
|
||||
{
|
||||
label: "To Google Calendar",
|
||||
label: t('calendarLink.toGoogleCalendar'),
|
||||
icon: "pi pi-google",
|
||||
command: forwardToGoogle,
|
||||
},
|
||||
{
|
||||
label: "To Microsoft Calendar",
|
||||
label: t('calendarLink.toMicrosoftCalendar'),
|
||||
icon: "pi pi-microsoft",
|
||||
command: forwardToMicrosoft,
|
||||
},
|
||||
|
Reference in New Issue
Block a user