From 67016975565e9072bdc562db4104fa16e1118220 Mon Sep 17 00:00:00 2001 From: Ramon Wenger Date: Wed, 11 Jan 2023 17:36:08 +0100 Subject: [PATCH] Add translation strings for constants --- .../components/learningPath/feedback.constants.ts | 12 ++++++------ client/src/components/ui/ItRadioGroup.vue | 2 +- client/src/locales/de.json | 8 ++++++++ 3 files changed, 15 insertions(+), 7 deletions(-) diff --git a/client/src/components/learningPath/feedback.constants.ts b/client/src/components/learningPath/feedback.constants.ts index 6c38fd7e..cae097dd 100644 --- a/client/src/components/learningPath/feedback.constants.ts +++ b/client/src/components/learningPath/feedback.constants.ts @@ -2,29 +2,29 @@ import type { RadioItem } from "@/components/learningPath/feedback.types"; export const YES_NO: RadioItem[] = [ { - name: "Ja", + name: "constants.yes", value: true, }, { - name: "Nein", + name: "constants.no", value: false, }, ]; export const RATINGS: RadioItem[] = [ { - name: "sehr unzufrieden", + name: "constants.veryUnsatisfied", value: 1, }, { - name: "unzufrieden", + name: "constants.unsatisfied", value: 2, }, { - name: "zufrieden", + name: "constants.satisfied", value: 3, }, { - name: "sehr zufrieden", + name: "constants.verySatisfied", value: 4, }, ]; diff --git a/client/src/components/ui/ItRadioGroup.vue b/client/src/components/ui/ItRadioGroup.vue index db2a4baf..3ccaf2fb 100644 --- a/client/src/components/ui/ItRadioGroup.vue +++ b/client/src/components/ui/ItRadioGroup.vue @@ -19,7 +19,7 @@ class="py-10 text-xl flex-1 text-center cursor-pointer font-bold ui-checked:bg-sky-500 ui-not-checked:border hover:border-gray-500 hover:bg-gray-200" > - {{ item.name }} + {{ $t(item.name) }} diff --git a/client/src/locales/de.json b/client/src/locales/de.json index d712b37b..bb6a4998 100644 --- a/client/src/locales/de.json +++ b/client/src/locales/de.json @@ -124,5 +124,13 @@ "instructorOpenFeedbackLabel": "Was ich dem Kursleiter sonst noch sagen wollte:", "courseNegativeFeedbackLabel": "Wo sehen Sie Verbesserungspotenzial?", "coursePositiveFeedbackLabel": "Was hat Ihnen besonders gut gefallen?" + }, + "constants": { + "yes": "Ja", + "no": "Nein", + "verySatisfied": "sehr zufrieden", + "satisfied": "zufrieden", + "unsatisfied": "unzufrieden", + "veryUnsatisfied": "sehr unzufrieden" } }