chore(web): translations in page load functions (#10260)

This commit is contained in:
Michel Heusschen
2024-06-13 16:23:52 +02:00
committed by GitHub
parent 827ec1b63a
commit 212ba35aef
20 changed files with 90 additions and 22 deletions
+6 -2
View File
@@ -1,6 +1,8 @@
import { AppRoute } from '$lib/constants';
import { getServerConfig } from '@immich/sdk';
import { redirect } from '@sveltejs/kit';
import { t } from 'svelte-i18n';
import { get } from 'svelte/store';
import { loadUser } from '../lib/utils/auth';
import type { PageLoad } from './$types';
@@ -19,10 +21,12 @@ export const load = (async () => {
redirect(302, AppRoute.AUTH_LOGIN);
}
const $t = get(t);
return {
meta: {
title: 'Welcome 🎉',
description: 'Immich Web Interface',
title: $t('welcome') + ' 🎉',
description: $t('immich_web_interface'),
},
};
}) satisfies PageLoad;