diff --git a/client/src/locales/de.json b/client/src/locales/de.json index fe250649..2622f4f7 100644 --- a/client/src/locales/de.json +++ b/client/src/locales/de.json @@ -1,3 +1,11 @@ { - "test": "Hallo VBV" + "general": { + "c2aNextStep": "Weiter geht's" + }, + "dashboard": { + "welcome": "Willkommen, {name}" + }, + "learningPathPage": { + "showListView": "Listenansicht anzeigen" + } } diff --git a/client/src/main.ts b/client/src/main.ts index 1d0de370..062cf3f1 100644 --- a/client/src/main.ts +++ b/client/src/main.ts @@ -2,8 +2,8 @@ import * as log from "loglevel"; import { createPinia } from "pinia"; import { createApp, markRaw } from "vue"; -// import {setupI18n} from './i18n' import App from "./App.vue"; +import { loadLocaleMessages, setupI18n } from "./i18n"; import router from "./router"; import type { Router } from "vue-router"; @@ -15,11 +15,11 @@ if (window.location.href.indexOf("localhost") >= 0) { log.setLevel("warn"); } -// const i18n = setupI18n() +const i18n = setupI18n(); const app = createApp(App); // todo: define lang setup -// await loadLocaleMessages(i18n, 'de') +await loadLocaleMessages(i18n, "de"); app.use(router); @@ -33,6 +33,6 @@ pinia.use(({ store }) => { store.router = markRaw(router); }); app.use(pinia); -// app.use(i18n) +app.use(i18n); app.mount("#app"); diff --git a/client/src/pages/CockpitPage.vue b/client/src/pages/CockpitPage.vue index f26350b7..84f5f146 100644 --- a/client/src/pages/CockpitPage.vue +++ b/client/src/pages/CockpitPage.vue @@ -11,7 +11,9 @@ const userStore = useUserStore();
-

Willkommen, {{ userStore.first_name }}

+

+ {{ $t("dashboard.welcome", { name: userStore.first_name }) }} +

Kurse

@@ -19,7 +21,7 @@ const userStore = useUserStore();

Versicherungsvermittler/in

- Weiter geht's + {{ $t("general.c2aNextStep") }}
diff --git a/client/src/pages/learningPath/LearningPathPage.vue b/client/src/pages/learningPath/LearningPathPage.vue index b1f2f490..30b6e245 100644 --- a/client/src/pages/learningPath/LearningPathPage.vue +++ b/client/src/pages/learningPath/LearningPathPage.vue @@ -64,7 +64,7 @@ const createContinueUrl = (learningPath: LearningPath): [string, boolean] => { @click="learningPathStore.page = 'OVERVIEW'" > - Listenansicht anzeigen + {{ $t("learningPathPage.showListView") }}