Add translations for feedback form

This commit is contained in:
Ramon Wenger 2023-01-11 00:41:56 +01:00
parent 063473469a
commit b87881136c
3 changed files with 27 additions and 24 deletions

View File

@ -1,58 +1,53 @@
<template> <template>
<div> <div>
<p class="text-gray-800 mb-4">Schritt {{ stepNo + 1 }} von {{ MAX_STEPS }}</p> <p class="text-gray-800 mb-4">Schritt {{ stepNo + 1 }} von {{ MAX_STEPS }}</p>
<p class="mb-10 text-xl"> <p class="mb-10 text-xl" v-html="$t('feedback.intro')"></p>
Patrizia Huggel, deine Trainerin, bittet dich, ihr Feedback zu geben.
<br />
Das ist freiwillig, würde ihr aber helfen, dein Lernerlebnis zu verbessern.
</p>
<ItRadioGroup <ItRadioGroup
v-if="stepNo === 0" v-if="stepNo === 0"
v-model="wouldRecommend" v-model="wouldRecommend"
label="Würden Sie den Kurs weiterempfehlen?" :label="$t('feedback.recommendLabel')"
class="mb-8" class="mb-8"
:items="YES_NO" :items="YES_NO"
/> />
<ItRadioGroup <ItRadioGroup
v-if="stepNo === 1" v-if="stepNo === 1"
v-model="satisfaction" v-model="satisfaction"
label="Zufriedenheit insgesamt" :label="$t('feedback.satisfactionLabel')"
class="mb-8" class="mb-8"
:items="RATINGS" :items="RATINGS"
/> />
<ItRadioGroup <ItRadioGroup
v-if="stepNo === 2" v-if="stepNo === 2"
v-model="goalAttainment" v-model="goalAttainment"
label="Zielerreichung insgesamt" :label="$t('feedback.goalAttainmentLabel')"
class="mb-8" class="mb-8"
:items="RATINGS" :items="RATINGS"
/> />
<ItRadioGroup <ItRadioGroup
v-if="stepNo === 3" v-if="stepNo === 3"
v-model="proficiency" v-model="proficiency"
label="Wie beurteilen Sie Ihre Sicherheit bezüglichen den Themen nach dem Kurs?" :label="$t('feedback.proficiencyLabel')"
class="mb-8" class="mb-8"
:items="PERCENTAGES" :items="PERCENTAGES"
/> />
<ItRadioGroup <ItRadioGroup
v-if="stepNo === 4" v-if="stepNo === 4"
v-model="receivedMaterials" v-model="receivedMaterials"
label="Haben Sie Vorbereitungsunterlagen (z.B. eLearning) erhalten?" :label="$t('feedback.receivedMaterialsLabel')"
class="mb-8" class="mb-8"
:items="YES_NO" :items="YES_NO"
/> />
<ItRadioGroup <ItRadioGroup
v-if="stepNo === 4 && receivedMaterials" v-if="stepNo === 4 && receivedMaterials"
v-model="materialsRating" v-model="materialsRating"
label="Falls ja: Wie beurteilen Sie die Vorbereitungsunterlagen (z.B. :label="$t('feedback.materialsRatingLabel')"
eLearning)?"
class="mb-8" class="mb-8"
:items="RATINGS" :items="RATINGS"
/> />
<ItRadioGroup <ItRadioGroup
v-if="stepNo === 5" v-if="stepNo === 5"
v-model="instructorCompetence" v-model="instructorCompetence"
label="Der Kursleiter war themenstark, fachkompetent." :label="$t('feedback.instructorCompetenceLabel')"
class="mb-8" class="mb-8"
:items="RATINGS" :items="RATINGS"
/> />
@ -60,26 +55,25 @@ eLearning)?"
v-if="stepNo === 6" v-if="stepNo === 6"
v-model="instructorRespect" v-model="instructorRespect"
class="mb-8" class="mb-8"
label="Fragen und Anregungen der Kursteilnehmenden wurden ernst :label="$t('feedback.instructorRespectLabel')"
genommen u. aufgegriffen."
:items="RATINGS" :items="RATINGS"
/> />
<ItTextarea <ItTextarea
v-if="stepNo === 7" v-if="stepNo === 7"
v-model="instructorOpenFeedback" v-model="instructorOpenFeedback"
:label="instructorOpenFeedbackLabel" :label="$t('feedback.instructorOpenFeedbackLabel')"
class="mb-8" class="mb-8"
/> />
<ItTextarea <ItTextarea
v-if="stepNo === 8" v-if="stepNo === 8"
v-model="courseNegativeFeedback" v-model="courseNegativeFeedback"
:label="courseNegativeFeedbackLabel" :label="$t('feedback.courseNegativeFeedbackLabel')"
class="mb-8" class="mb-8"
/> />
<ItTextarea <ItTextarea
v-if="stepNo === 9" v-if="stepNo === 9"
v-model="coursePositiveFeedback" v-model="coursePositiveFeedback"
:label="coursePositiveFeedbackLabel" :label="$t('feedback.coursePositiveFeedbackLabel')"
class="mb-8" class="mb-8"
/> />
<button class="btn-blue" @click="sendFeedback">Senden und abschliessen</button> <button class="btn-blue" @click="sendFeedback">Senden und abschliessen</button>
@ -133,10 +127,6 @@ onMounted(async () => {
const stepNo = ref(0); const stepNo = ref(0);
const MAX_STEPS = 10; const MAX_STEPS = 10;
const instructorOpenFeedbackLabel = "Was ich dem Kursleiter sonst noch sagen wollte:";
const courseNegativeFeedbackLabel = "Wo sehen Sie Verbesserungspotenzial?";
const coursePositiveFeedbackLabel = "Was hat Ihnen besonders gut gefallen?";
const sendFeedbackMutation = graphql(` const sendFeedbackMutation = graphql(`
mutation SendFeedbackMutation($input: SendFeedbackInput!) { mutation SendFeedbackMutation($input: SendFeedbackInput!) {
sendFeedback(input: $input) { sendFeedback(input: $input) {

View File

@ -2,7 +2,7 @@
import LearningContentContainer from "@/components/learningPath/LearningContentContainer.vue"; import LearningContentContainer from "@/components/learningPath/LearningContentContainer.vue";
import { useCircleStore } from "@/stores/circle"; import { useCircleStore } from "@/stores/circle";
import type { LearningContent } from "@/types"; import type { LearningContent } from "@/types";
import * as log from "loglevel"; import log from "loglevel";
import { computed } from "vue"; import { computed } from "vue";
import DescriptionBlock from "@/components/learningPath/blocks/DescriptionBlock.vue"; import DescriptionBlock from "@/components/learningPath/blocks/DescriptionBlock.vue";
@ -55,7 +55,6 @@ const component = computed(() => {
v-if="block" v-if="block"
:title="learningContent.title" :title="learningContent.title"
:next-button-text="$t('learningContent.completeAndContinue')" :next-button-text="$t('learningContent.completeAndContinue')"
:exit-text="$t('general.backToCircle')"
@exit="circleStore.closeLearningContent(props.learningContent)" @exit="circleStore.closeLearningContent(props.learningContent)"
@next="circleStore.continueFromLearningContent(props.learningContent)" @next="circleStore.continueFromLearningContent(props.learningContent)"
> >

View File

@ -109,5 +109,19 @@
}, },
"messages": { "messages": {
"sendMessage": "Nachricht schreiben" "sendMessage": "Nachricht schreiben"
},
"feedback": {
"intro": "Dein/e Trainer/in bittet dich, ihr/ihm Feedback zu geben. <br /> Das ist freiwillig, würde ihr aber helfen, dein Lernerlebnis zu verbessern.",
"recommendLabel": "Würden Sie den Kurs weiterempfehlen?",
"satisfactionLabel": "Zufriedenheit insgesamt",
"goalAttainmentLabel": "Zielerreichung insgesamt",
"proficiencyLabel": "Wie beurteilen Sie Ihre Sicherheit bezüglichen den Themen nach dem Kurs?",
"receivedMaterialsLabel": "Haben Sie Vorbereitungsunterlagen (z.B. eLearning) erhalten?",
"materialsRatingLabel": "Falls ja: Wie beurteilen Sie die Vorbereitungsunterlagen (z.B. eLearning)?",
"instructorCompetenceLabel": "Der Kursleiter war themenstark, fachkompetent.",
"instructorRespectLabel": "Fragen und Anregungen der Kursteilnehmenden wurden ernst genommen u. aufgegriffen.",
"instructorOpenFeedbackLabel": "Was ich dem Kursleiter sonst noch sagen wollte:",
"courseNegativeFeedbackLabel": "Wo sehen Sie Verbesserungspotenzial?",
"coursePositiveFeedbackLabel": "Was hat Ihnen besonders gut gefallen?"
} }
} }