From 28309305117b63f35912771905088f3a55eb882c Mon Sep 17 00:00:00 2001 From: elweyn Date: Tue, 26 Mar 2024 09:11:06 +0100 Subject: [PATCH] Change the translation in +title.ts page to use i18n. --- presenter/src/pages/_error/+title.ts | 6 +++++- presenter/src/pages/datenschutz/+title.ts | 6 +++++- presenter/src/pages/impressum/+title.ts | 7 ++++++- presenter/src/pages/index/+title.ts | 6 ++++-- presenter/src/pages/optin/+title.ts | 7 ++++++- presenter/src/pages/silent-refresh/+title.ts | 6 +++++- 6 files changed, 31 insertions(+), 7 deletions(-) diff --git a/presenter/src/pages/_error/+title.ts b/presenter/src/pages/_error/+title.ts index 17faffcf02..574b5b13f7 100644 --- a/presenter/src/pages/_error/+title.ts +++ b/presenter/src/pages/_error/+title.ts @@ -1 +1,5 @@ -export const title = 'DreamMall | Fehler' +import i18n from '#plugins/i18n' + +export const title = () => { + return i18n.global.t('error.title') +} diff --git a/presenter/src/pages/datenschutz/+title.ts b/presenter/src/pages/datenschutz/+title.ts index fe2528e1bb..66b042c884 100644 --- a/presenter/src/pages/datenschutz/+title.ts +++ b/presenter/src/pages/datenschutz/+title.ts @@ -1 +1,5 @@ -export const title = 'DreamMall | Datenschutz' +import i18n from '#plugins/i18n' + +export const title = () => { + return i18n.global.t('dataProtection.title') +} diff --git a/presenter/src/pages/impressum/+title.ts b/presenter/src/pages/impressum/+title.ts index 72f7a6bc1e..8c37d1d1da 100644 --- a/presenter/src/pages/impressum/+title.ts +++ b/presenter/src/pages/impressum/+title.ts @@ -1 +1,6 @@ -export const title = 'DreamMall | Impressum' +import i18n from '#plugins/i18n' + +// DreamMall | Impressum +export const title = () => { + return i18n.global.t('impress.title') +} diff --git a/presenter/src/pages/index/+title.ts b/presenter/src/pages/index/+title.ts index 125d4b660c..d7555eb3d9 100644 --- a/presenter/src/pages/index/+title.ts +++ b/presenter/src/pages/index/+title.ts @@ -1,3 +1,5 @@ -import { META } from '#src/env' +import i18n from '#plugins/i18n' -export const title = META.DEFAULT_TITLE +export const title = () => { + return i18n.global.t('title') +} diff --git a/presenter/src/pages/optin/+title.ts b/presenter/src/pages/optin/+title.ts index 0260dfd2c5..9cd8c93054 100644 --- a/presenter/src/pages/optin/+title.ts +++ b/presenter/src/pages/optin/+title.ts @@ -1 +1,6 @@ -export const title = 'DreamMall | Newsletter' +import i18n from '#plugins/i18n' + +// 'DreamMall | Newsletter' +export const title = () => { + return i18n.global.t('optin.title') +} diff --git a/presenter/src/pages/silent-refresh/+title.ts b/presenter/src/pages/silent-refresh/+title.ts index 111df23145..3d4d484ec0 100644 --- a/presenter/src/pages/silent-refresh/+title.ts +++ b/presenter/src/pages/silent-refresh/+title.ts @@ -1 +1,5 @@ -export const title = 'DreamMall | Authentifizierung' +import i18n from '#plugins/i18n' + +export const title = () => { + return i18n.global.t('auth.title') // 'DreamMall | Authentifizierung' +}